o&&(p=o-u);for(var g=0;gv&&(v=x,d=u+g)}var _=this.getRawIndex(c),y=this.getRawIndex(d);cu-v&&(f=u-v,o.length=f);for(var p=0;pc[1]&&(c[1]=m),h[d++]=x}return i._count=d,i._indices=h,i._updateGetRawIdx(),i},e.prototype.each=function(t,r){if(this._count)for(var a=t.length,n=this._chunks,i=0,s=this.count();if&&(f=c)}return s=[o,f],this._extent[t]=s,s},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var a=[],n=this._chunks,i=0;i=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=(function(){function t(r,a,n,i){return Y0(r[i],this._dimensions[i])}Lh={arrayRows:t,objectRows:function(r,a,n,i){return Y0(r[a],this._dimensions[i])},keyedColumns:t,original:function(r,a,n,i){var s=r&&(r.value==null?r:r.value);return Y0(s instanceof Array?s[i]:s,this._dimensions[i])},typedArray:function(r,a,n,i){return r[i]}}})(),e})(),DF=(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(),a=!!r.length,n,i;if(h0(t)){var s=t,o=void 0,f=void 0,l=void 0;if(a){var u=r[0];u.prepareSource(),l=u.getSource(),o=l.data,f=l.sourceFormat,i=[u._getVersionSign()]}else o=s.get("data",!0),f=Ur(o)?qn:va,i=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},d=Xe(c.seriesLayoutBy,h.seriesLayoutBy)||null,v=Xe(c.sourceHeader,h.sourceHeader),p=Xe(c.dimensions,h.dimensions),g=d!==h.seriesLayoutBy||!!v!=!!h.sourceHeader||p;n=g?[nv(o,{seriesLayoutBy:d,sourceHeader:v,dimensions:p},f)]:[]}else{var m=t;if(a){var x=this._applyTransform(r);n=x.sourceList,i=x.upstreamSignList}else{var _=m.get("source",!0);n=[nv(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},e.prototype._applyTransform=function(t){var r=this._sourceHost,a=r.get("transform",!0),n=r.get("fromTransformResult",!0);if(n!=null){var i="";t.length!==1&&im(i)}var s,o=[],f=[];return G(t,function(l){l.prepareSource();var u=l.getSource(n||0),c="";n!=null&&!u&&im(c),o.push(u),f.push(l._getVersionSign())}),a?s=TF(a,o,{datasetIndex:r.componentIndex}):n!=null&&(s=[iF(o[0])]),{sourceList:s,upstreamSignList:f}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!e.noHeader;return G(e.blocks,function(n){var i=iS(n);i>=t&&(t=i+ +(a&&(!i||sv(n)&&!n.noHeader)))}),t}return 0}function IF(e,t,r,a){var n=t.noHeader,i=RF(iS(t)),s=[],o=t.blocks||[];Zr(!o||Le(o)),o=o||[];var f=e.orderMode;if(t.sortBlocks&&f){o=o.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(ho(l,f)){var u=new vF(l[f],null);o.sort(function(p,g){return u.evaluate(p.sortParam,g.sortParam)})}else f==="seriesDesc"&&o.reverse()}G(o,function(p,g){var m=t.valueFormatter,x=nS(p)(m?De(De({},e),{valueFormatter:m}):e,p,g>0?i.html:0,a);x!=null&&s.push(x)});var c=e.renderMode==="richText"?s.join(i.richText):ov(a,s.join(""),n?r:i.html);if(n)return c;var h=av(t.header,"ordinal",e.useUTC),d=aS(a,e.renderMode).nameStyle,v=rS(a);return e.renderMode==="richText"?sS(e,h,d)+i.richText+c:ov(a,''+yr(h)+"
"+c,r)}function MF(e,t,r,a){var n=e.renderMode,i=t.noName,s=t.noValue,o=!t.markerType,f=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(y){return y=Le(y)?y:[y],je(y,function(k,C){return av(k,Le(d)?d[C]:d,l)})};if(!(i&&s)){var c=o?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),h=i?"":av(f,"ordinal",l),d=t.valueType,v=s?[]:u(t.value,t.dataIndex),p=!o||!i,g=!o&&i,m=aS(a,n),x=m.nameStyle,_=m.valueStyle;return n==="richText"?(o?"":c)+(i?"":sS(e,h,x))+(s?"":OF(e,v,p,g,_)):ov(a,(o?"":c)+(i?"":PF(h,!o,x))+(s?"":LF(v,p,g,_)),r)}}function sm(e,t,r,a,n,i){if(e){var s=nS(e),o={useUTC:n,renderMode:r,orderMode:a,markupStyleCreator:t,valueFormatter:e.valueFormatter};return s(o,e,0,i)}}function RF(e){return{html:bF[e],richText:FF[e]}}function ov(e,t,r){var a='',n="margin: "+r+"px 0 0",i=rS(e);return''+t+a+"
"}function PF(e,t,r){var a=t?"margin-left:2px":"";return''+yr(e)+""}function LF(e,t,r,a){var n=r?"10px":"20px",i=t?"float:right;margin-left:"+n:"";return e=Le(e)?e:[e],''+je(e,function(s){return yr(s)}).join(" ")+""}function sS(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function OF(e,t,r,a,n){var i=[n],s=a?10:20;return r&&i.push({padding:[0,0,0,s],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Le(t)?t.join(" "):t,i)}function BF(e,t){var r=e.getData().getItemVisual(t,"style"),a=r[e.visualDrawType];return el(a)}function oS(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var Oh=(function(){function e(){this.richTextStyles={},this._nextStyleNameId=Uw()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,a){var n=a==="richText"?this._generateStyleName():null,i=C8({color:r,type:t,renderMode:a,markerId:n});return Oe(i)?i:(this.richTextStyles[n]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(t,r){var a={};Le(r)?G(r,function(i){return De(a,i)}):De(a,r);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+t+"}"},e})();function NF(e){var t=e.series,r=e.dataIndex,a=e.multipleSeries,n=t.getData(),i=n.mapDimensionsAll("defaultedTooltip"),s=i.length,o=t.getRawValue(r),f=Le(o),l=BF(t,r),u,c,h,d;if(s>1||f&&!s){var v=UF(o,t,r,i,l);u=v.inlineValues,c=v.inlineValueTypes,h=v.blocks,d=v.inlineValues[0]}else if(s){var p=n.getDimensionInfo(i[0]);d=u=Eu(n,r,i[0]),c=p.type}else d=u=f?o[0]:o;var g=Ww(t),m=g&&t.name||"",x=n.getName(r),_=a?m:x;return us("section",{header:m,noHeader:a||!g,sortParam:d,blocks:[us("nameValue",{markerType:"item",markerColor:l,name:_,noName:!$a(_),value:u,valueType:c,dataIndex:r})].concat(h||[])})}function UF(e,t,r,a,n){var i=t.getData(),s=mo(e,function(c,h,d){var v=i.getDimensionInfo(d);return c=c||v&&v.tooltip!==!1&&v.displayName!=null},!1),o=[],f=[],l=[];a.length?G(a,function(c){u(Eu(i,r,c),c)}):G(e,u);function u(c,h){var d=i.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(s?l.push(us("nameValue",{markerType:"subItem",markerColor:n,name:d.displayName,value:c,valueType:d.type})):(o.push(c),f.push(d.type)))}return{inlineValues:o,inlineValueTypes:f,blocks:l}}var Pn=Zt();function d0(e,t){return e.getName(t)||e.getId(t)}var HF="__universalTransitionEnabled",ii=(function(e){$e(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,a,n){this.seriesIndex=this.componentIndex,this.dataTask=Df({count:zF,reset:WF}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,n);var i=Pn(this).sourceManager=new DF(this);i.prepareSource();var s=this.getInitialData(r,n);fm(s,this),this.dataTask.context.data=s,Pn(this).dataBeforeProcessed=s,om(this),this._initSelectedMapFromData(s)},t.prototype.mergeDefaultAndTheme=function(r,a){var n=Tu(this),i=n?BT(r):{},s=this.subType;Tt.hasClass(s)&&(s+="Series"),Vt(r,a.getTheme().get(this.subType)),Vt(r,this.getDefaultOption()),$g(r,"label",["show"]),this.fillDataTextStyle(r.data),n&&Su(r,i,n)},t.prototype.mergeOption=function(r,a){r=Vt(this.option,r,!0),this.fillDataTextStyle(r.data);var n=Tu(this);n&&Su(this.option,r,n);var i=Pn(this).sourceManager;i.dirty(),i.prepareSource();var s=this.getInitialData(r,a);fm(s,this),this.dataTask.dirty(),this.dataTask.context.data=s,Pn(this).dataBeforeProcessed=s,om(this),this._initSelectedMapFromData(s)},t.prototype.fillDataTextStyle=function(r){if(r&&!Ur(r))for(var a=["show"],n=0;nthis.getShallow("animationThreshold")&&(a=!1),!!a},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,a,n){var i=this.ecModel,s=Op.prototype.getColorFromPalette.call(this,r,a,n);return s||(s=i.getColorFromPalette(r,a,n)),s},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,a){this._innerSelect(this.getData(a),r)},t.prototype.unselect=function(r,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,s=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o=0&&n.push(s)}return n},t.prototype.isSelected=function(r,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[d0(i,r)])&&!i.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[HF])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,a){var n,i,s=this.option,o=s.selectedMode,f=a.length;if(!(!o||!f)){if(o==="series")s.selectedMap="all";else if(o==="multiple"){Be(s.selectedMap)||(s.selectedMap={});for(var l=s.selectedMap,u=0;u0&&this._innerSelect(r,a)}},t.registerClass=function(r){return Tt.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})(Tt);Ia(ii,hF);Ia(ii,Op);Xw(ii,Tt);function om(e){var t=e.name;Ww(e)||(e.name=VF(e)||t)}function VF(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),a=[];return G(r,function(n){var i=t.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function zF(e){return e.model.getRawData().count()}function WF(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),GF}function GF(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function fm(e,t){G(QA(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Cr($F,t))})}function $F(e,t){var r=fv(e);return r&&r.setOutputEnd((t||this).count()),t}function fv(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var a=r.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(e.uid))}return a}}var si=(function(){function e(){this.group=new Sn,this.uid=gc("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,a,n){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,a,n){},e.prototype.updateLayout=function(t,r,a,n){},e.prototype.updateVisual=function(t,r,a,n){},e.prototype.toggleBlurSeries=function(t,r,a){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e})();dp(si);vp(si);function XF(){var e=Zt();return function(t){var r=e(t),a=t.pipelineContext,n=!!r.large,i=!!r.progressiveRender,s=r.large=!!(a&&a.large),o=r.progressiveRender=!!(a&&a.progressiveRender);return(n!==s||i!==o)&&"reset"}}var fS=Zt(),YF=XF(),Jn=(function(){function e(){this.group=new Sn,this.uid=gc("viewChart"),this.renderTask=Df({plan:KF,reset:ZF}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,a,n){},e.prototype.highlight=function(t,r,a,n){var i=t.getData(n&&n.dataType);i&&um(i,n,"emphasis")},e.prototype.downplay=function(t,r,a,n){var i=t.getData(n&&n.dataType);i&&um(i,n,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,a,n){this.render(t,r,a,n)},e.prototype.updateLayout=function(t,r,a,n){this.render(t,r,a,n)},e.prototype.updateVisual=function(t,r,a,n){this.render(t,r,a,n)},e.prototype.eachRendered=function(t){DT(this.group,t)},e.markUpdateMethod=function(t,r){fS(t).updateMethod=r},e.protoInitialize=(function(){var t=e.prototype;t.type="chart"})(),e})();function lm(e,t,r){e&&Qd(e)&&(t==="emphasis"?gu:mu)(e,r)}function um(e,t,r){var a=El(e,t),n=t&&t.highlightKey!=null?ib(t.highlightKey):null;a!=null?G(Ar(a),function(i){lm(e.getItemGraphicEl(i),r,n)}):e.eachItemGraphicEl(function(i){lm(i,r,n)})}dp(Jn);vp(Jn);function KF(e){return YF(e.model)}function ZF(e){var t=e.model,r=e.ecModel,a=e.api,n=e.payload,i=t.pipelineContext.progressiveRender,s=e.view,o=n&&fS(n).updateMethod,f=i?"incrementalPrepareRender":o&&s[o]?o:"render";return f!=="render"&&s[f](t,r,a,n),jF[f]}var jF={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)}}},Cu="\0__throttleOriginMethod",cm="\0__throttleRate",hm="\0__throttleType";function lS(e,t,r){var a,n=0,i=0,s=null,o,f,l,u;t=t||0;function c(){i=new Date().getTime(),s=null,e.apply(f,l||[])}var h=function(){for(var d=[],v=0;v=0?c():s=setTimeout(c,-o),n=a};return h.clear=function(){s&&(clearTimeout(s),s=null)},h.debounceNextCall=function(d){u=d},h}function uS(e,t,r,a){var n=e[t];if(n){var i=n[Cu]||n,s=n[hm],o=n[cm];if(o!==r||s!==a){if(r==null||!a)return e[t]=i;n=e[t]=lS(i,r,a==="debounce"),n[Cu]=i,n[hm]=a,n[cm]=r}return n}}function lv(e,t){var r=e[t];r&&r[Cu]&&(r.clear&&r.clear(),e[t]=r[Cu])}var dm=Zt(),vm={itemStyle:qf(bT,!0),lineStyle:qf(kT,!0)},qF={lineStyle:"stroke",itemStyle:"fill"};function cS(e,t){var r=e.visualStyleMapper||vm[t];return r||(console.warn("Unknown style type '"+t+"'."),vm.itemStyle)}function hS(e,t){var r=e.visualDrawType||qF[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var JF={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),a=e.visualStyleAccessPath||"itemStyle",n=e.getModel(a),i=cS(e,a),s=i(n),o=n.getShallow("decal");o&&(r.setVisual("decal",o),o.dirty=!0);var f=hS(e,a),l=s[f],u=ct(l)?l:null,c=s.fill==="auto"||s.stroke==="auto";if(!s[f]||u||c){var h=e.getColorFromPalette(e.name,null,t.getSeriesCount());s[f]||(s[f]=h,r.setVisual("colorFromPalette",!0)),s.fill=s.fill==="auto"||ct(s.fill)?h:s.fill,s.stroke=s.stroke==="auto"||ct(s.stroke)?h:s.stroke}if(r.setVisual("style",s),r.setVisual("drawType",f),!t.isSeriesFiltered(e)&&u)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,v){var p=e.getDataParams(v),g=De({},s);g[f]=u(p),d.setItemVisual(v,"style",g)}}}},Vo=new It,QF={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),a=e.visualStyleAccessPath||"itemStyle",n=cS(e,a),i=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(s,o){var f=s.getRawDataItem(o);if(f&&f[a]){Vo.option=f[a];var l=n(Vo),u=s.ensureUniqueItemVisual(o,"style");De(u,l),Vo.option.decal&&(s.setItemVisual(o,"decal",Vo.option.decal),Vo.option.decal.dirty=!0),i in l&&s.setItemVisual(o,"colorFromPalette",!1)}}:null}}}},e6={performRawSeries:!0,overallReset:function(e){var t=qe();e.eachSeries(function(r){var a=r.getColorBy();if(!r.isColorBySeries()){var n=r.type+"-"+a,i=t.get(n);i||(i={},t.set(n,i)),dm(r).scope=i}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var a=r.getRawData(),n={},i=r.getData(),s=dm(r).scope,o=r.visualStyleAccessPath||"itemStyle",f=hS(r,o);i.each(function(l){var u=i.getRawIndex(l);n[u]=l}),a.each(function(l){var u=n[l],c=i.getItemVisual(u,"colorFromPalette");if(c){var h=i.ensureUniqueItemVisual(u,"style"),d=a.getName(l)||l+"",v=a.count();h[f]=r.getColorFromPalette(d,s,v)}})}})}},v0=Math.PI;function t6(e,t){t=t||{},Ot(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Sn,a=new Kr({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(a);var n=new Ja({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new Kr({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(i);var s;return t.showSpinner&&(s=new vc({shape:{startAngle:-v0/2,endAngle:-v0/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),s.animateShape(!0).when(1e3,{endAngle:v0*3/2}).start("circularInOut"),s.animateShape(!0).when(1e3,{startAngle:v0*3/2}).delay(300).start("circularInOut"),r.add(s)),r.resize=function(){var o=n.getBoundingRect().width,f=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-f*2-(t.showSpinner&&o?10:0)-o)/2-(t.showSpinner&&o?0:5+o/2)+(t.showSpinner?0:o/2)+(o?0:f),u=e.getHeight()/2;t.showSpinner&&s.setShape({cx:l,cy:u}),i.setShape({x:l-f,y:u-f,width:f*2,height:f*2}),a.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var dS=(function(){function e(t,r,a,n){this._stageTaskMap=qe(),this.ecInstance=t,this.api=r,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var a=this._pipelineMap.get(t.__pipeline.id),n=a.context,i=!r&&a.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>a.blockIndex,s=i?a.step:null,o=n&&n.modDataCount,f=o!=null?Math.ceil(o/s):null;return{step:s,modBy:f,modDataCount:o}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var a=this._pipelineMap.get(t.uid),n=t.getData(),i=n.count(),s=a.progressiveEnabled&&r.incrementalPrepareRender&&i>=a.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),f=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=a.context={progressiveRender:s,modDataCount:f,large:o}},e.prototype.restorePipelines=function(t){var r=this,a=r._pipelineMap=qe();t.eachSeries(function(n){var i=n.getProgressive(),s=n.uid;a.set(s,{id:s,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),r._pipe(n,n.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),a=this.api;G(this._allHandlers,function(n){var i=t.get(n.uid)||t.set(n.uid,{}),s="";Zr(!(n.reset&&n.overallReset),s),n.reset&&this._createSeriesStageTask(n,i,r,a),n.overallReset&&this._createOverallStageTask(n,i,r,a)},this)},e.prototype.prepareView=function(t,r,a,n){var i=t.renderTask,s=i.context;s.model=r,s.ecModel=a,s.api=n,i.__block=!t.incrementalPrepareRender,this._pipe(r,i)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,a){this._performStageTasks(this._visualHandlers,t,r,a)},e.prototype._performStageTasks=function(t,r,a,n){n=n||{};var i=!1,s=this;G(t,function(f,l){if(!(n.visualType&&n.visualType!==f.visualType)){var u=s._stageTaskMap.get(f.uid),c=u.seriesTaskMap,h=u.overallTask;if(h){var d,v=h.agentStubMap;v.each(function(g){o(n,g)&&(g.dirty(),d=!0)}),d&&h.dirty(),s.updatePayload(h,a);var p=s.getPerformArgs(h,n.block);v.each(function(g){g.perform(p)}),h.perform(p)&&(i=!0)}else c&&c.each(function(g,m){o(n,g)&&g.dirty();var x=s.getPerformArgs(g,n.block);x.skip=!f.performRawSeries&&r.isSeriesFiltered(g.context.model),s.updatePayload(g,a),g.perform(x)&&(i=!0)})}});function o(f,l){return f.setDirty&&(!f.dirtyMap||f.dirtyMap.get(l.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(a){r=a.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,a,n){var i=this,s=r.seriesTaskMap,o=r.seriesTaskMap=qe(),f=t.seriesType,l=t.getTargetSeries;t.createOnAllSeries?a.eachRawSeries(u):f?a.eachRawSeriesByType(f,u):l&&l(a,n).each(u);function u(c){var h=c.uid,d=o.set(h,s&&s.get(h)||Df({plan:s6,reset:o6,count:l6}));d.context={model:c,ecModel:a,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(c,d)}},e.prototype._createOverallStageTask=function(t,r,a,n){var i=this,s=r.overallTask=r.overallTask||Df({reset:r6});s.context={ecModel:a,api:n,overallReset:t.overallReset,scheduler:i};var o=s.agentStubMap,f=s.agentStubMap=qe(),l=t.seriesType,u=t.getTargetSeries,c=!0,h=!1,d="";Zr(!t.createOnAllSeries,d),l?a.eachRawSeriesByType(l,v):u?u(a,n).each(v):(c=!1,G(a.getSeries(),v));function v(p){var g=p.uid,m=f.set(g,o&&o.get(g)||(h=!0,Df({reset:a6,onDirty:i6})));m.context={model:p,overallProgress:c},m.agent=s,m.__block=c,i._pipe(p,m)}h&&s.dirty()},e.prototype._pipe=function(t,r){var a=t.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=r),n.tail&&n.tail.pipe(r),n.tail=r,r.__idxInPipeline=n.count++,r.__pipeline=n},e.wrapStageHandler=function(t,r){return ct(t)&&(t={overallReset:t,seriesType:u6(t)}),t.uid=gc("stageHandler"),r&&(t.visualType=r),t},e})();function r6(e){e.overallReset(e.ecModel,e.api,e.payload)}function a6(e){return e.overallProgress&&n6}function n6(){this.agent.dirty(),this.getDownstream().dirty()}function i6(){this.agent&&this.agent.dirty()}function s6(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function o6(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Ar(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?je(t,function(r,a){return vS(a)}):f6}var f6=vS(0);function vS(e){return function(t,r){var a=r.data,n=r.resetDefines[e];if(n&&n.dataEach)for(var i=t.start;i0&&d===l.length-h.length){var v=l.slice(0,d);v!=="data"&&(r.mainType=v,r[h.toLowerCase()]=f,u=!0)}}o.hasOwnProperty(l)&&(a[l]=f,u=!0),u||(n[l]=f)})}return{cptQuery:r,dataQuery:a,otherQuery:n}},e.prototype.filter=function(t,r){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,s=a.model,o=a.view;if(!s||!o)return!0;var f=r.cptQuery,l=r.dataQuery;return u(f,s,"mainType")&&u(f,s,"subType")&&u(f,s,"index","componentIndex")&&u(f,s,"name")&&u(f,s,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(t,r.otherQuery,n,i));function u(c,h,d,v){return c[d]==null||h[v||d]===c[d]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e})(),uv=["symbol","symbolSize","symbolRotate","symbolOffset"],xm=uv.concat(["symbolKeepAspect"]),d6={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 a={},n={},i=!1,s=0;s=0&&ji(f)?f:.5;var l=e.createRadialGradient(s,o,0,s,o,f);return l}function hv(e,t,r){for(var a=t.type==="radial"?I6(e,t,r):F6(e,t,r),n=t.colorStops,i=0;i0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Lt(e)?[e]:Le(e)?e:null}function zp(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&R6(t.lineDash,t.lineWidth),a=t.lineDashOffset;if(r){var n=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;n&&n!==1&&(r=je(r,function(i){return i/n}),a/=n)}return[r,a]}var P6=new ls(!0);function Du(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function _m(e){return typeof e=="string"&&e!=="none"}function ku(e){var t=e.fill;return t!=null&&t!=="none"}function ym(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 wm(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 dv(e,t,r){var a=pp(t.image,t.__image,r);if(uc(a)){var n=e.createPattern(a,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*O0),i.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(i)}return n}}function L6(e,t,r,a){var n,i=Du(r),s=ku(r),o=r.strokePercent,f=o<1,l=!t.path;(!t.silent||f)&&l&&t.createPathProxy();var u=t.path||P6,c=t.__dirty;if(!a){var h=r.fill,d=r.stroke,v=s&&!!h.colorStops,p=i&&!!d.colorStops,g=s&&!!h.image,m=i&&!!d.image,x=void 0,_=void 0,y=void 0,k=void 0,C=void 0;(v||p)&&(C=t.getBoundingRect()),v&&(x=c?hv(e,h,C):t.__canvasFillGradient,t.__canvasFillGradient=x),p&&(_=c?hv(e,d,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(y=c||!t.__canvasFillPattern?dv(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=y),m&&(k=c||!t.__canvasStrokePattern?dv(e,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=y),v?e.fillStyle=x:g&&(y?e.fillStyle=y:s=!1),p?e.strokeStyle=_:m&&(k?e.strokeStyle=k:i=!1)}var w=t.getGlobalScale();u.setScale(w[0],w[1],t.segmentIgnoreThreshold);var E,S;e.setLineDash&&r.lineDash&&(n=zp(t),E=n[0],S=n[1]);var D=!0;(l||c&Hs)&&(u.setDPR(e.dpr),f?u.setContext(null):(u.setContext(e),D=!1),u.reset(),t.buildPath(u,t.shape,a),u.toStatic(),t.pathUpdated()),D&&u.rebuildPath(e,f?o:1),E&&(e.setLineDash(E),e.lineDashOffset=S),a||(r.strokeFirst?(i&&wm(e,r),s&&ym(e,r)):(s&&ym(e,r),i&&wm(e,r))),E&&e.setLineDash([])}function O6(e,t,r){var a=t.__image=pp(r.image,t.__image,t,t.onload);if(!(!a||!uc(a))){var n=r.x||0,i=r.y||0,s=t.getWidth(),o=t.getHeight(),f=a.width/a.height;if(s==null&&o!=null?s=o*f:o==null&&s!=null?o=s/f:s==null&&o==null&&(s=a.width,o=a.height),r.sWidth&&r.sHeight){var l=r.sx||0,u=r.sy||0;e.drawImage(a,l,u,r.sWidth,r.sHeight,n,i,s,o)}else if(r.sx&&r.sy){var l=r.sx,u=r.sy,c=s-l,h=o-u;e.drawImage(a,l,u,c,h,n,i,s,o)}else e.drawImage(a,n,i,s,o)}}function B6(e,t,r){var a,n=r.text;if(n!=null&&(n+=""),n){e.font=r.font||ai,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var i=void 0,s=void 0;e.setLineDash&&r.lineDash&&(a=zp(t),i=a[0],s=a[1]),i&&(e.setLineDash(i),e.lineDashOffset=s),r.strokeFirst?(Du(r)&&e.strokeText(n,r.x,r.y),ku(r)&&e.fillText(n,r.x,r.y)):(ku(r)&&e.fillText(n,r.x,r.y),Du(r)&&e.strokeText(n,r.x,r.y)),i&&e.setLineDash([])}}var Tm=["shadowBlur","shadowOffsetX","shadowOffsetY"],Sm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function _S(e,t,r,a,n){var i=!1;if(!a&&(r=r||{},t===r))return!1;if(a||t.opacity!==r.opacity){Br(e,n),i=!0;var s=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(s)?as.opacity:s}(a||t.blend!==r.blend)&&(i||(Br(e,n),i=!0),e.globalCompositeOperation=t.blend||as.blend);for(var o=0;o0&&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,a,n){if(!this[tr]){if(this._disposed){this.id;return}var i,s,o;if(Be(a)&&(n=a.lazyUpdate,i=a.silent,s=a.replaceMerge,o=a.transition,a=a.notMerge),this[tr]=!0,!this._model||a){var f=new $8(this._api),l=this._theme,u=this._model=new Bp;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,f)}this._model.setOption(r,{replaceMerge:s},pv);var c={seriesTransition:o,optionChanged:!0};if(n)this[Fr]={silent:i,updateParams:c},this[tr]=!1,this.getZr().wakeUp();else{try{Ls(this),Ln.update.call(this,null,c)}catch(h){throw this[Fr]=null,this[tr]=!1,h}this._ssr||this._zr.flush(),this[Fr]=null,this[tr]=!1,zo.call(this,i),Wo.call(this,i)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var a=this._zr.painter;return a.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){if(We.svgSupported){var r=this._zr,a=r.storage.getDisplayList();return G(a,function(n){n.stopAnimation(null,!0)}),r.painter.toDataURL()}},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var a=r.excludeComponents,n=this._model,i=[],s=this;G(a,function(f){n.eachComponent({mainType:f},function(l){var u=s._componentsMap[l.__viewId];u.group.ignore||(i.push(u),u.group.ignore=!0)})});var o=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return G(i,function(f){f.group.ignore=!1}),o},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var a=r.type==="svg",n=this.group,i=Math.min,s=Math.max,o=1/0;if(Um[n]){var f=o,l=o,u=-o,c=-o,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();G(bf,function(_,y){if(_.group===n){var k=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(et(r)),C=_.getDom().getBoundingClientRect();f=i(C.left,f),l=i(C.top,l),u=s(C.right,u),c=s(C.bottom,c),h.push({dom:k,left:C.left,top:C.top})}}),f*=d,l*=d,u*=d,c*=d;var v=u-f,p=c-l,g=go.createCanvas(),m=Vg(g,{renderer:a?"svg":"canvas"});if(m.resize({width:v,height:p}),a){var x="";return G(h,function(_){var y=_.left-f,k=_.top-l;x+=''+_.dom+""}),m.painter.getSvgRoot().innerHTML=x,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new Kr({shape:{x:0,y:0,width:v,height:p},style:{fill:r.connectedBackgroundColor}})),G(h,function(_){var y=new An({style:{x:_.left*d-f,y:_.top*d-l,image:_.dom}});m.add(y)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,a){return Vh(this,"convertToPixel",r,a)},t.prototype.convertFromPixel=function(r,a){return Vh(this,"convertFromPixel",r,a)},t.prototype.containPixel=function(r,a){if(this._disposed){this.id;return}var n=this._model,i,s=ch(n,r);return G(s,function(o,f){f.indexOf("Models")>=0&&G(o,function(l){var u=l.coordinateSystem;if(u&&u.containPoint)i=i||!!u.containPoint(a);else if(f==="seriesModels"){var c=this._chartsMap[l.__viewId];c&&c.containPoint&&(i=i||c.containPoint(a,l))}},this)},this),!!i},t.prototype.getVisual=function(r,a){var n=this._model,i=ch(n,r,{defaultMainType:"series"}),s=i.seriesModel,o=s.getData(),f=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?o.indexOfRawIndex(i.dataIndex):null;return f!=null?p6(o,f,a):g6(o,a)},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;G(fI,function(a){var n=function(i){var s=r.getModel(),o=i.target,f,l=a==="globalout";if(l?f={}:o&&af(o,function(v){var p=At(v);if(p&&p.dataIndex!=null){var g=p.dataModel||s.getSeriesByIndex(p.seriesIndex);return f=g&&g.getDataParams(p.dataIndex,p.dataType,o)||{},!0}else if(p.eventData)return f=De({},p.eventData),!0},!0),f){var u=f.componentType,c=f.componentIndex;(u==="markLine"||u==="markPoint"||u==="markArea")&&(u="series",c=f.seriesIndex);var h=u&&c!=null&&s.getComponent(u,c),d=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];f.event=i,f.type=a,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:f,model:h,view:d},r.trigger(a,f)}};n.zrEventfulCallAtLast=!0,r._zr.on(a,n,r)}),G(kf,function(a,n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),G(["selectchanged"],function(a){r._messageCenter.on(a,function(n){this.trigger(a,n)},r)}),m6(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&Gw(this.getDom(),$p,"");var a=this,n=a._api,i=a._model;G(a._componentsViews,function(s){s.dispose(i,n)}),G(a._chartsViews,function(s){s.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete bf[a.id]},t.prototype.resize=function(r){if(!this[tr]){if(this._disposed){this.id;return}this._zr.resize(r);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=r&&r.silent;this[Fr]&&(i==null&&(i=this[Fr].silent),n=!0,this[Fr]=null),this[tr]=!0;try{n&&Ls(this),Ln.update.call(this,{type:"resize",animation:De({duration:0},r&&r.animation)})}catch(s){throw this[tr]=!1,s}this[tr]=!1,zo.call(this,i),Wo.call(this,i)}}},t.prototype.showLoading=function(r,a){if(this._disposed){this.id;return}if(Be(r)&&(a=r,r=""),r=r||"default",this.hideLoading(),!!gv[r]){var n=gv[r](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var a=De({},r);return a.type=kf[r.type],a},t.prototype.dispatchAction=function(r,a){if(this._disposed){this.id;return}if(Be(a)||(a={silent:!!a}),!!bu[r.type]&&this._model){if(this[tr]){this._pendingActions.push(r);return}var n=a.silent;Wh.call(this,r,n);var i=a.flush;i?this._zr.flush():i!==!1&&We.browser.weChat&&this._throttledZrFlush(),zo.call(this,n),Wo.call(this,n)}},t.prototype.updateLabelLayout=function(){Ta.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var a=r.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){Ls=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),Hh(c,!0),Hh(c,!1),h.plan()},Hh=function(c,h){for(var d=c._model,v=c._scheduler,p=h?c._componentsViews:c._chartsViews,g=h?c._componentsMap:c._chartsMap,m=c._zr,x=c._api,_=0;_h.get("hoverLayerThreshold")&&!We.node&&!We.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=c._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(x){x.states.emphasis&&(x.states.emphasis.hoverLayer=!0)})}})}function s(c,h){var d=c.get("blendMode")||null;h.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function o(c,h){if(!c.preventAutoZ){var d=c.get("z")||0,v=c.get("zlevel")||0;h.eachRendered(function(p){return f(p,d,v,-1/0),!0})}}function f(c,h,d,v){var p=c.getTextContent(),g=c.getTextGuideLine(),m=c.isGroup;if(m)for(var x=c.childrenRef(),_=0;_0?{duration:p,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Af(m))return;if(m instanceof _t&&sb(m),m.__dirty){var x=m.prevStates;x&&m.useStates(x)}if(v){m.stateTransition=g;var _=m.getTextContent(),y=m.getTextGuideLine();_&&(_.stateTransition=g),y&&(y.stateTransition=g)}m.__dirty&&n(m)}})}Bm=function(c){return new((function(h){$e(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var p=v.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);v=v.parent}},d.prototype.enterEmphasis=function(v,p){gu(v,p),qr(c)},d.prototype.leaveEmphasis=function(v,p){mu(v,p),qr(c)},d.prototype.enterBlur=function(v){Z5(v),qr(c)},d.prototype.leaveBlur=function(v){sT(v),qr(c)},d.prototype.enterSelect=function(v){oT(v),qr(c)},d.prototype.leaveSelect=function(v){fT(v),qr(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(v){return c.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return c.getViewOfSeriesModel(v)},d})(GT))(c)},PS=function(c){function h(d,v){for(var p=0;p=0)){Vm.push(r);var i=dS.wrapStageHandler(r,n);i.__prio=t,i.__raw=r,e.push(i)}}function HS(e,t){gv[e]=t}function pI(e,t,r){var a=Y6("registerMap");a&&a(e,t,r)}var gI=wF;vs(Wp,JF);vs(yc,QF);vs(yc,e6);vs(Wp,d6);vs(yc,v6);vs(kS,$6);NS(XT);US(j6,aF);HS("default",t6);wo({type:ns,event:ns,update:ns},ur);wo({type:W0,event:W0,update:W0},ur);wo({type:Sf,event:Sf,update:Sf},ur);wo({type:G0,event:G0,update:G0},ur);wo({type:Ef,event:Ef,update:Ef},ur);BS("light",c6);BS("dark",mS);function Go(e){return e==null?0:e.length||1}function zm(e){return e}var mI=(function(){function e(t,r,a,n,i,s){this._old=t,this._new=r,this._oldKeyGetter=a||zm,this._newKeyGetter=n||zm,this.context=i,this._diffModeMultiple=s==="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,a={},n=new Array(t.length),i=new Array(r.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(r,a,i,"_newKeyGetter");for(var s=0;s1){var u=f.shift();f.length===1&&(a[o]=f[0]),this._update&&this._update(u,s)}else l===1?(a[o]=null,this._update&&this._update(f,s)):this._remove&&this._remove(s)}this._performRestAdd(i,a)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,a={},n={},i=[],s=[];this._initIndexMap(t,a,i,"_oldKeyGetter"),this._initIndexMap(r,n,s,"_newKeyGetter");for(var o=0;o1&&h===1)this._updateManyToOne&&this._updateManyToOne(u,l),n[f]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),n[f]=null;else if(c===1&&h===1)this._update&&this._update(u,l),n[f]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),n[f]=null;else if(c>1)for(var d=0;d1)for(var o=0;o30}var $o=Be,On=je,EI=typeof Int32Array>"u"?Array:Int32Array,CI="e\0\0",Wm=-1,AI=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],DI=["_approximateExtent"],Gm,_0,Xo,Yo,Xh,Ko,Yh,mv=(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 a,n=!1;zS(t)?(a=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,a=t),a=a||["x","y"];for(var i={},s=[],o={},f=!1,l={},u=0;u=r)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,s=this._idList,o=n.getSource().sourceFormat,f=o===va;if(f&&!n.pure)for(var l=[],u=t;u0},e.prototype.ensureUniqueItemVisual=function(t,r){var a=this._itemVisuals,n=a[t];n||(n=a[t]={});var i=n[r];return i==null&&(i=this.getVisual(r),Le(i)?i=i.slice():$o(i)&&(i=De({},i)),n[r]=i),i},e.prototype.setItemVisual=function(t,r,a){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,$o(r)?De(n,r):n[r]=a},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){$o(t)?De(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,a){this._itemLayouts[t]=a?De(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var a=this.hostModel&&this.hostModel.seriesIndex;U5(a,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){G(this._graphicEls,function(a,n){a&&t&&t.call(r,a,n)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:On(this.dimensions,this._getDimInfo,this),this.hostModel)),Xh(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var a=this[t];ct(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=a.apply(this,arguments);return r.apply(this,[n].concat(np(arguments)))})},e.internalField=(function(){Gm=function(t){var r=t._invertedIndicesMap;G(r,function(a,n){var i=t._dimInfos[n],s=i.ordinalMeta,o=t._store;if(s){a=r[n]=new EI(s.categories.length);for(var f=0;f1&&(f+="__ec__"+u),n[r]=f}}})(),e})();function XS(e,t){Np(e)||(e=Up(e)),t=t||{};var r=t.coordDimensions||[],a=t.dimensionsDefine||e.dimensionsDefine||[],n=qe(),i=[],s=bI(e,r,a,t.dimensionsCount),o=t.canOmitUnusedDimensions&&$S(s),f=a===e.dimensionsDefine,l=f?GS(e):WS(a),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,s));for(var c=qe(u),h=new eS(s),d=0;d0&&(a.name=n+(i-1)),i++,t.set(n,i)}}function bI(e,t,r,a){var n=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,a||0);return G(t,function(i){var s;Be(i)&&(s=i.dimsDef)&&(n=Math.max(n,s.length))}),n}function FI(e,t,r){if(r||t.hasKey(e)){for(var a=0;t.hasKey(e+a);)a++;e+=a}return t.set(e,!0),e}var II=(function(){function e(t){this.coordSysDims=[],this.axisMap=qe(),this.categoryAxisMap=qe(),this.coordSysName=t}return e})();function MI(e){var t=e.get("coordinateSystem"),r=new II(t),a=RI[t];if(a)return a(e,r,r.axisMap,r.categoryAxisMap),r}var RI={cartesian2d:function(e,t,r,a){var n=e.getReferringComponents("xAxis",Ki).models[0],i=e.getReferringComponents("yAxis",Ki).models[0];t.coordSysDims=["x","y"],r.set("x",n),r.set("y",i),Os(n)&&(a.set("x",n),t.firstCategoryDimIndex=0),Os(i)&&(a.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,a){var n=e.getReferringComponents("singleAxis",Ki).models[0];t.coordSysDims=["single"],r.set("single",n),Os(n)&&(a.set("single",n),t.firstCategoryDimIndex=0)},polar:function(e,t,r,a){var n=e.getReferringComponents("polar",Ki).models[0],i=n.findAxisModel("radiusAxis"),s=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",i),r.set("angle",s),Os(i)&&(a.set("radius",i),t.firstCategoryDimIndex=0),Os(s)&&(a.set("angle",s),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,a){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,a){var n=e.ecModel,i=n.getComponent("parallel",e.get("parallelIndex")),s=t.coordSysDims=i.dimensions.slice();G(i.parallelAxisIndex,function(o,f){var l=n.getComponent("parallelAxis",o),u=s[f];r.set(u,l),Os(l)&&(a.set(u,l),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=f))})}};function Os(e){return e.get("type")==="category"}function PI(e,t,r){r=r||{};var a=r.byIndex,n=r.stackedCoordDimension,i,s,o;LI(t)?i=t:(s=t.schema,i=s.dimensions,o=t.store);var f=!!(e&&e.get("stack")),l,u,c,h;if(G(i,function(x,_){Oe(x)&&(i[_]=x={name:x}),f&&!x.isExtraCoord&&(!a&&!l&&x.ordinalMeta&&(l=x),!u&&x.type!=="ordinal"&&x.type!=="time"&&(!n||n===x.coordDim)&&(u=x))}),u&&!a&&!l&&(a=!0),u){c="__\0ecstackresult_"+e.id,h="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var d=u.coordDim,v=u.type,p=0;G(i,function(x){x.coordDim===d&&p++});var g={name:c,coordDim:d,coordDimIndex:p,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},m={name:h,coordDim:h,coordDimIndex:p+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};s?(o&&(g.storeDimIndex=o.ensureCalculationDimension(h,v),m.storeDimIndex=o.ensureCalculationDimension(c,v)),s.appendCalculationDimension(g),s.appendCalculationDimension(m)):(i.push(g),i.push(m))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function LI(e){return!zS(e.schema)}function OI(e,t){var r=e.get("coordinateSystem"),a=mc.get(r),n;return t&&t.coordSysDims&&(n=je(t.coordSysDims,function(i){var s={name:i},o=t.axisMap.get(i);if(o){var f=o.get("type");s.type=yI(f)}return s})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function BI(e,t,r){var a,n;return r&&G(e,function(i,s){var o=i.coordDim,f=r.categoryAxisMap.get(o);f&&(a==null&&(a=s),i.ordinalMeta=f.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(e[a].otherDims.itemName=0),a}function NI(e,t,r){r=r||{};var a=t.getSourceManager(),n,i=!1;e?(i=!0,n=Up(e)):(n=a.getSource(),i=n.sourceFormat===va);var s=MI(t),o=OI(t,s),f=r.useEncodeDefaulter,l=ct(f)?f:f?Cr(M8,o,t):null,u={coordDimensions:o,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!i},c=XS(n,u),h=BI(c.dimensions,r.createInvertedIndices,s),d=i?null:a.getSharedDataStore(c),v=PI(t,{schema:c,store:d}),p=new mv(c,t);p.setCalculationInfo(v);var g=h!=null&&UI(n)?function(m,x,_,y){return y===h?_:this.defaultDimValueGetter(m,x,_,y)}:null;return p.hasItemOption=!1,p.initData(i?n:d,null,g),p}function UI(e){if(e.sourceFormat===va){var t=HI(e.data||[]);return!Le(Sl(t))}}function HI(e){for(var t=0;t=0||($m.push(e),ct(e)&&(e={install:e}),e.install(WI))}function GI(e){for(var t=[],r=0;r0?"top":"bottom",i="center"):du(n-$n)?(s=a>0?"bottom":"top",i="center"):(s="middle",n>0&&n<$n?i=a>0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:s}},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})(),Ym={axisLine:function(e,t,r,a){var n=t.get(["axisLine","show"]);if(n==="auto"&&e.handleAutoShown&&(n=e.handleAutoShown("axisLine")),!!n){var i=t.axis.getExtent(),s=a.transform,o=[i[0],0],f=[i[1],0],l=o[0]>f[0];s&&(Ka(o,o,s),Ka(f,f,s));var u=De({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new _o({shape:{x1:o[0],y1:o[1],x2:f[0],y2:f[1]},style:u,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Fp(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var h=t.get(["axisLine","symbol"]);if(h!=null){var d=t.get(["axisLine","symbolSize"]);Oe(h)&&(h=[h,h]),(Oe(d)||Lt(d))&&(d=[d,d]);var v=b6(t.get(["axisLine","symbolOffset"])||0,d),p=d[0],g=d[1];G([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((o[0]-f[0])*(o[0]-f[0])+(o[1]-f[1])*(o[1]-f[1]))}],function(m,x){if(h[x]!=="none"&&h[x]!=null){var _=xS(h[x],-p/2,-g/2,p,g,u.stroke,!0),y=m.r+m.offset,k=l?f:o;_.attr({rotation:m.rotate,x:k[0]+y*Math.cos(e.rotation),y:k[1]-y*Math.sin(e.rotation),silent:!0,z2:11}),r.add(_)}})}}},axisTickLabel:function(e,t,r,a){var n=KI(r,a,t,e),i=jI(r,a,t,e);if(YI(t,i,n),ZI(r,a,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var s=GI(je(i,function(o){return{label:o,priority:o.z2,defaultAttr:{ignore:o.ignore}}}));$I(s)}},axisName:function(e,t,r,a){var n=fs(e.axisName,t.get("name"));if(n){var i=t.get("nameLocation"),s=e.nameDirection,o=t.getModel("nameTextStyle"),f=t.get("nameGap")||0,l=t.axis.getExtent(),u=l[0]>l[1]?-1:1,c=[i==="start"?l[0]-u*f:i==="end"?l[1]+u*f:(l[0]+l[1])/2,Zm(i)?e.labelOffset+s*f:0],h,d=t.get("nameRotate");d!=null&&(d=d*$n/180);var v;Zm(i)?h=is.innerTextLayout(e.rotation,d??e.rotation,s):(h=XI(e.rotation,i,d||0,l),v=e.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(h.rotation)),!isFinite(v)&&(v=null)));var p=o.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,x=fs(e.nameTruncateMaxWidth,g.maxWidth,v),_=new Ja({x:c[0],y:c[1],rotation:h.rotation,silent:is.isLabelSilent(t),style:Qf(o,{text:n,font:p,overflow:"truncate",width:x,ellipsis:m,fill:o.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:o.get("align")||h.textAlign,verticalAlign:o.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Mp({el:_,componentModel:t,itemName:n}),_.__fullText=n,_.anid="name",t.get("triggerEvent")){var y=is.makeAxisEventDataBase(t);y.targetType="axisName",y.name=n,At(_).eventData=y}a.add(_),_.updateTransform(),r.add(_),_.decomposeTransform()}}};function XI(e,t,r,a){var n=Nw(r-e),i,s,o=a[0]>a[1],f=t==="start"&&!o||t!=="start"&&o;return du(n-$n/2)?(s=f?"bottom":"top",i="center"):du(n-$n*1.5)?(s=f?"top":"bottom",i="center"):(s="middle",n<$n*1.5&&n>$n/2?i=f?"left":"right":i=f?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:s}}function YI(e,t,r){if(!zI(e.axis)){var a=e.get(["axisLabel","showMinLabel"]),n=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var i=t[0],s=t[1],o=t[t.length-1],f=t[t.length-2],l=r[0],u=r[1],c=r[r.length-1],h=r[r.length-2];a===!1?(Jr(i),Jr(l)):Km(i,s)&&(a?(Jr(s),Jr(u)):(Jr(i),Jr(l))),n===!1?(Jr(o),Jr(c)):Km(f,o)&&(n?(Jr(f),Jr(h)):(Jr(o),Jr(c)))}}function Jr(e){e&&(e.ignore=!0)}function Km(e,t){var r=e&&e.getBoundingRect().clone(),a=t&&t.getBoundingRect().clone();if(!(!r||!a)){var n=sp([]);return op(n,n,-e.rotation),r.applyTransform(no([],n,e.getLocalTransform())),a.applyTransform(no([],n,t.getLocalTransform())),r.intersect(a)}}function Zm(e){return e==="middle"||e==="center"}function KS(e,t,r,a,n){for(var i=[],s=[],o=[],f=0;f=0||e===t}function rM(e){var t=Zp(e);if(t){var r=t.axisPointerModel,a=t.axis.scale,n=r.option,i=r.get("status"),s=r.get("value");s!=null&&(s=a.parse(s));var o=xv(r);i==null&&(n.status=o?"show":"hide");var f=a.getExtent().slice();f[0]>f[1]&&f.reverse(),(s==null||s>f[1])&&(s=f[1]),s=0;i--)a[i]==null&&(delete r[t[i]],t.pop())}function Zh(e,t){var r=e.visual,a=[];Be(r)?il(r,function(i){a.push(i)}):r!=null&&a.push(r);var n={color:1,symbol:1};!t&&a.length===1&&!n.hasOwnProperty(e.type)&&(a[1]=a[0]),jS(e,a)}function y0(e){return{applyVisual:function(t,r,a){var n=this.mapValueToVisual(t);a("color",e(r("color"),n))},_normalizedToVisual:_v([0,1])}}function qm(e){var t=this.option.visual;return t[Math.round(Zf(e,[0,1],[0,t.length-1]))]||{}}function Zo(e){return function(t,r,a){a(e,this.mapValueToVisual(t))}}function nf(e){var t=this.option.visual;return t[this.option.loop&&e!==Iu?e%t.length:e]}function Vi(){return this.option.visual[0]}function _v(e){return{linear:function(t){return Zf(t,e,this.option.visual)},category:nf,piecewise:function(t,r){var a=yv.call(this,r);return a==null&&(a=Zf(t,e,this.option.visual)),a},fixed:Vi}}function yv(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var a=qp.findPieceIndex(e,r),n=r[a];if(n&&n.visual)return n.visual[this.type]}}function jS(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=je(t,function(r){var a=Za(r);return a||[0,0,0,1]})),t}var pM={linear:function(e){return Zf(e,this.option.dataExtent,[0,1])},piecewise:function(e){var t=this.option.pieceList,r=qp.findPieceIndex(e,t,!0);if(r!=null)return Zf(r,[0,t.length-1],[0,1])},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??Iu},fixed:ur};function w0(e,t,r){return e?t<=r:t=0&&t.call(r,a[i],i)},e.prototype.eachEdge=function(t,r){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&t.call(r,a[i],i)},e.prototype.breadthFirstTraverse=function(t,r,a,n){if(r instanceof zi||(r=this._nodesMap[Bs(r)]),!!r){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",s=0;s=0&&f.node2.dataIndex>=0});for(var i=0,s=n.length;i=0&&this[e][t].setItemVisual(this.dataIndex,r,a)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,a){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,a)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Ia(zi,JS("hostGraph","data"));Ia(qS,JS("hostGraph","edgeData"));function mM(e,t,r,a,n){for(var i=new gM(a),s=0;s "+h)),l++)}var d=r.get("coordinateSystem"),v;if(d==="cartesian2d"||d==="polar")v=NI(e,r);else{var p=mc.get(d),g=p?p.dimensions||[]:[];St(g,"value")<0&&g.concat(["value"]);var m=XS(e,{coordDimensions:g,encodeDefine:r.getEncode()}).dimensions;v=new mv(m,r),v.initData(e)}var x=new mv(["value"],r);return x.initData(f,o),n&&n(v,x),iM({mainData:v,struct:i,structAttr:"graph",datas:{node:v,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var xM=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e})(),_M=(function(e){$e(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new xM},t.prototype.buildPath=function(r,a){var n=a.extent;r.moveTo(a.x1,a.y1),r.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(r.lineTo(a.x2+n,a.y2),r.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(r.lineTo(a.x2,a.y2+n),r.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),r.closePath()},t.prototype.highlight=function(){gu(this)},t.prototype.downplay=function(){mu(this)},t})(_t),yM=(function(e){$e(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._focusAdjacencyDisabled=!1,r}return t.prototype.render=function(r,a,n){var i=this,s=r.getGraph(),o=this.group,f=r.layoutInfo,l=f.width,u=f.height,c=r.getData(),h=r.getData("edge"),d=r.get("orient");this._model=r,o.removeAll(),o.x=f.x,o.y=f.y,s.eachEdge(function(v){var p=new _M,g=At(p);g.dataIndex=v.dataIndex,g.seriesIndex=r.seriesIndex,g.dataType="edge";var m=v.getModel(),x=m.getModel("lineStyle"),_=x.get("curveness"),y=v.node1.getLayout(),k=v.node1.getModel(),C=k.get("localX"),w=k.get("localY"),E=v.node2.getLayout(),S=v.node2.getModel(),D=S.get("localX"),b=S.get("localY"),F=v.getLayout(),B,Y,Q,J,q,ce,U,ye;p.shape.extent=Math.max(1,F.dy),p.shape.orient=d,d==="vertical"?(B=(C!=null?C*l:y.x)+F.sy,Y=(w!=null?w*u:y.y)+y.dy,Q=(D!=null?D*l:E.x)+F.ty,J=b!=null?b*u:E.y,q=B,ce=Y*(1-_)+J*_,U=Q,ye=Y*_+J*(1-_)):(B=(C!=null?C*l:y.x)+y.dx,Y=(w!=null?w*u:y.y)+F.sy,Q=D!=null?D*l:E.x,J=(b!=null?b*u:E.y)+F.ty,q=B*(1-_)+Q*_,ce=Y,U=B*_+Q*(1-_),ye=J),p.setShape({x1:B,y1:Y,x2:Q,y2:J,cpx1:q,cpy1:ce,cpx2:U,cpy2:ye}),p.useStyle(x.getItemStyle()),Jm(p.style,d,v);var pe=""+m.get("value"),M=I2(m,"edgeLabel");F2(p,M,{labelFetcher:{getFormattedLabel:function(V,ie,xe,de,fe,oe){return r.getFormattedLabel(V,ie,"edge",de,_f(fe,M.normal&&M.normal.get("formatter"),pe),oe)}},labelDataIndex:v.dataIndex,defaultText:pe}),p.setTextConfig({position:"inside"});var H=m.getModel("emphasis");x2(p,m,"lineStyle",function(V){var ie=V.getItemStyle();return Jm(ie,d,v),ie}),o.add(p),h.setItemGraphicEl(v.dataIndex,p);var z=H.get("focus");g2(p,z==="adjacency"?v.getAdjacentDataIndices():z==="trajectory"?v.getTrajectoryDataIndices():z,H.get("blurScope"),H.get("disabled"))}),s.eachNode(function(v){var p=v.getLayout(),g=v.getModel(),m=g.get("localX"),x=g.get("localY"),_=g.getModel("emphasis"),y=g.get(["itemStyle","borderRadius"])||0,k=new Kr({shape:{x:m!=null?m*l:p.x,y:x!=null?x*u:p.y,width:p.dx,height:p.dy,r:y},style:g.getModel("itemStyle").getItemStyle(),z2:10});F2(k,I2(g),{labelFetcher:{getFormattedLabel:function(w,E){return r.getFormattedLabel(w,E,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),k.disableLabelAnimation=!0,k.setStyle("fill",v.getVisual("color")),k.setStyle("decal",v.getVisual("style").decal),x2(k,g),o.add(k),c.setItemGraphicEl(v.dataIndex,k),At(k).dataType="node";var C=_.get("focus");g2(k,C==="adjacency"?v.getAdjacentDataIndices():C==="trajectory"?v.getTrajectoryDataIndices():C,_.get("blurScope"),_.get("disabled"))}),c.eachItemGraphicEl(function(v,p){var g=c.getItemModel(p);g.get("draggable")&&(v.drift=function(m,x){i._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=x,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:c.getRawIndex(p),localX:this.shape.x/l,localY:this.shape.y/u})},v.ondragend=function(){i._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&r.isAnimationEnabled()&&o.setClipPath(wM(o.getBoundingRect(),r,function(){o.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){},t.type="sankey",t})(Jn);function Jm(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var a=r.node1.getVisual("color"),n=r.node2.getVisual("color");Oe(a)&&Oe(n)&&(e.fill=new _T(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function wM(e,t,r){var a=new Kr({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return yT(a,{shape:{width:e.width+20}},t,r),a}var TM=(function(e){$e(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,a){var n=r.edges||r.links||[],i=r.data||r.nodes||[],s=r.levels||[];this.levelModels=[];for(var o=this.levelModels,f=0;f=0&&(o[s[f].depth]=new It(s[f],this,a));var l=mM(i,n,this,!0,u);return l.data;function u(c,h){c.wrapMethod("getItemModel",function(d,v){var p=d.parentModel,g=p.getData().getItemLayout(v);if(g){var m=g.depth,x=p.levelModels[m];x&&(d.parentModel=x)}return d}),h.wrapMethod("getItemModel",function(d,v){var p=d.parentModel,g=p.getGraph().getEdgeByIndex(v),m=g.node1.getLayout();if(m){var x=m.depth,_=p.levelModels[x];_&&(d.parentModel=_)}return d})}},t.prototype.setNodePosition=function(r,a){var n=this.option.data||this.option.nodes,i=n[r];i.localX=a[0],i.localY=a[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,a,n){function i(d){return isNaN(d)||d==null}if(n==="edge"){var s=this.getDataParams(r,n),o=s.data,f=s.value,l=o.source+" -- "+o.target;return us("nameValue",{name:l,value:f,noValue:i(f)})}else{var u=this.getGraph().getNodeByIndex(r),c=u.getLayout().value,h=this.getDataParams(r,n).data.name;return us("nameValue",{name:h!=null?h+"":null,value:c,noValue:i(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,a){var n=e.prototype.getDataParams.call(this,r,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(r),s=i.getLayout().value;n.value=s}return n},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t})(ii);function SM(e,t){e.eachSeriesByType("sankey",function(r){var a=r.get("nodeWidth"),n=r.get("nodeGap"),i=EM(r,t);r.layoutInfo=i;var s=i.width,o=i.height,f=r.getGraph(),l=f.nodes,u=f.edges;AM(l);var c=zr(l,function(p){return p.getLayout().value===0}),h=c.length!==0?0:r.get("layoutIterations"),d=r.get("orient"),v=r.get("nodeAlign");CM(l,u,a,n,s,o,h,d,v)})}function EM(e,t){return OT(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function CM(e,t,r,a,n,i,s,o,f){DM(e,t,r,n,i,o,f),IM(e,t,i,n,a,s,o),HM(e,o)}function AM(e){G(e,function(t){var r=Qn(t.outEdges,Mu),a=Qn(t.inEdges,Mu),n=t.getValue()||0,i=Math.max(r,a,n);t.setLayout({value:i},!0)})}function DM(e,t,r,a,n,i,s){for(var o=[],f=[],l=[],u=[],c=0,h=0;h=0;m&&g.depth>d&&(d=g.depth),p.setLayout({depth:m?g.depth:c},!0),i==="vertical"?p.setLayout({dy:r},!0):p.setLayout({dx:r},!0);for(var x=0;xc-1?d:c-1;s&&s!=="left"&&kM(e,s,i,w);var E=i==="vertical"?(n-r)/w:(a-r)/w;FM(e,E,i)}function QS(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function kM(e,t,r,a){if(t==="right"){for(var n=[],i=e,s=0;i.length;){for(var o=0;o0;i--)f*=.99,PM(o,f,s),jh(o,n,r,a,s),UM(o,f,s),jh(o,n,r,a,s)}function MM(e,t){var r=[],a=t==="vertical"?"y":"x",n=zk(e,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,s){return i-s}),G(n.keys,function(i){r.push(n.buckets.get(i))}),r}function RM(e,t,r,a,n,i){var s=1/0;G(e,function(o){var f=o.length,l=0;G(o,function(c){l+=c.getLayout().value});var u=i==="vertical"?(a-(f-1)*n)/l:(r-(f-1)*n)/l;u0&&(o=f.getLayout()[i]+l,n==="vertical"?f.setLayout({x:o},!0):f.setLayout({y:o},!0)),u=f.getLayout()[i]+f.getLayout()[h]+t;var v=n==="vertical"?a:r;if(l=u-t-v,l>0){o=f.getLayout()[i]-l,n==="vertical"?f.setLayout({x:o},!0):f.setLayout({y:o},!0),u=o;for(var d=c-2;d>=0;--d)f=s[d],l=f.getLayout()[i]+f.getLayout()[h]+t-u,l>0&&(o=f.getLayout()[i]-l,n==="vertical"?f.setLayout({x:o},!0):f.setLayout({y:o},!0)),u=f.getLayout()[i]}})}function PM(e,t,r){G(e.slice().reverse(),function(a){G(a,function(n){if(n.outEdges.length){var i=Qn(n.outEdges,LM,r)/Qn(n.outEdges,Mu);if(isNaN(i)){var s=n.outEdges.length;i=s?Qn(n.outEdges,OM,r)/s:0}if(r==="vertical"){var o=n.getLayout().x+(i-oi(n,r))*t;n.setLayout({x:o},!0)}else{var f=n.getLayout().y+(i-oi(n,r))*t;n.setLayout({y:f},!0)}}})})}function LM(e,t){return oi(e.node2,t)*e.getValue()}function OM(e,t){return oi(e.node2,t)}function BM(e,t){return oi(e.node1,t)*e.getValue()}function NM(e,t){return oi(e.node1,t)}function oi(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Mu(e){return e.getValue()}function Qn(e,t,r){for(var a=0,n=e.length,i=-1;++is&&(s=f)}),G(a,function(o){var f=new qp({type:"color",mappingMethod:"linear",dataExtent:[i,s],visual:t.get("color")}),l=f.mapValueToVisual(o.getLayout().value),u=o.getModel().get(["itemStyle","color"]);u!=null?(o.setVisual("color",u),o.setVisual("style",{fill:u})):(o.setVisual("color",l),o.setVisual("style",{fill:l}))})}n.length&&G(n,function(o){var f=o.getModel().get("lineStyle");o.setVisual("style",f)})})}function zM(e){e.registerChartView(yM),e.registerSeriesModel(TM),e.registerLayout(SM),e.registerVisual(VM),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var $i=Zt(),Qm=et,qh=Dt,WM=(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,a,n){var i=r.get("value"),s=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===s)){this._lastValue=i,this._lastStatus=s;var o=this._group,f=this._handle;if(!s||s==="hide"){o&&o.hide(),f&&f.hide();return}o&&o.show(),f&&f.show();var l={};this.makeElOption(l,i,t,r,a);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(t,r);if(!o)o=this._group=new Sn,this.createPointerEl(o,l,t,r),this.createLabelEl(o,l,t,r),a.getZr().add(o);else{var h=Cr(ex,r,c);this.updatePointerEl(o,l,h),this.updateLabelEl(o,l,h,r)}rx(o,r,!0),this._renderHandle(i)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var a=r.get("animation"),n=t.axis,i=n.type==="category",s=r.get("snap");if(!s&&!i)return!1;if(a==="auto"||a==null){var o=this.animationThreshold;if(i&&n.getBandWidth()>o)return!0;if(s){var f=Zp(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/f>o}return!1}return a===!0},e.prototype.makeElOption=function(t,r,a,n,i){},e.prototype.createPointerEl=function(t,r,a,n){var i=r.pointer;if(i){var s=$i(t).pointerEl=new qb[i.type](Qm(r.pointer));t.add(s)}},e.prototype.createLabelEl=function(t,r,a,n){if(r.label){var i=$i(t).labelEl=new Ja(Qm(r.label));t.add(i),tx(i,n)}},e.prototype.updatePointerEl=function(t,r,a){var n=$i(t).pointerEl;n&&r.pointer&&(n.setStyle(r.pointer.style),a(n,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,a,n){var i=$i(t).labelEl;i&&(i.setStyle(r.label.style),a(i,{x:r.label.x,y:r.label.y}),tx(i,n))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=r.getModel("handle"),s=r.get("status");if(!i.get("show")||!s||s==="hide"){n&&a.remove(n),this._handle=null;return}var o;this._handle||(o=!0,n=this._handle=CT(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){uw(l.event)},onmousedown:qh(this._onHandleDragMove,this,0,0),drift:qh(this._onHandleDragMove,this),ondragend:qh(this._onHandleDragEnd,this)}),a.add(n)),rx(n,r,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var f=i.get("size");Le(f)||(f=[f,f]),n.scaleX=f[0]/2,n.scaleY=f[1]/2,uS(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},e.prototype._moveHandleToValue=function(t,r){ex(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Jh(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(Jh(a),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(Jh(n)),$i(a).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),a=this._group,n=this._handle;r&&a&&(this._lastGraphicKey=null,a&&r.remove(a),n&&r.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),lv(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,a){return a=a||0,{x:t[a],y:t[1-a],width:r[a],height:r[1-a]}},e})();function ex(e,t,r,a){e4($i(r).lastProp,a)||($i(r).lastProp=a,t?kp(r,a,e):(r.stopAnimation(),r.attr(a)))}function e4(e,t){if(Be(e)&&Be(t)){var r=!0;return G(t,function(a,n){r=r&&e4(e[n],a)}),!!r}else return e===t}function tx(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Jh(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function rx(e,t,r){var a=t.get("z"),n=t.get("zlevel");e&&e.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=r)})}function GM(e){var t=e.get("type"),r=e.getModel(t+"Style"),a;return t==="line"?(a=r.getLineStyle(),a.fill=null):t==="shadow"&&(a=r.getAreaStyle(),a.stroke=null),a}function $M(e,t,r,a,n){var i=r.get("value"),s=t4(i,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),o=r.getModel("label"),f=Lp(o.get("padding")||0),l=o.getFont(),u=Rw(s,l),c=n.position,h=u.width+f[1]+f[3],d=u.height+f[0]+f[2],v=n.align;v==="right"&&(c[0]-=h),v==="center"&&(c[0]-=h/2);var p=n.verticalAlign;p==="bottom"&&(c[1]-=d),p==="middle"&&(c[1]-=d/2),XM(c,h,d,a);var g=o.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:Qf(o,{text:s,font:l,fill:o.getTextColor(),padding:f,backgroundColor:g}),z2:10}}function XM(e,t,r,a){var n=a.getWidth(),i=a.getHeight();e[0]=Math.min(e[0]+t,n)-t,e[1]=Math.min(e[1]+r,i)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function t4(e,t,r,a,n){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:n.precision}),s=n.formatter;if(s){var o={value:YS(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};G(a,function(f){var l=r.getSeriesByIndex(f.seriesIndex),u=f.dataIndexInside,c=l&&l.getDataParams(u);c&&o.seriesData.push(c)}),Oe(s)?i=s.replace("{value}",i):ct(s)&&(i=s(o))}return i}function r4(e,t,r){var a=ao();return op(a,a,r.rotation),Pd(a,a,r.position),Ip([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function YM(e,t,r,a,n,i){var s=is.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=n.get(["label","margin"]),$M(t,a,n,i,{position:r4(a.axis,e,r),align:s.textAlign,verticalAlign:s.textVerticalAlign})}function KM(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function ZM(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}var jM=(function(e){$e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,a,n,i,s){var o=n.axis,f=o.grid,l=i.get("type"),u=ax(f,o).getOtherAxis(o).getGlobalExtent(),c=o.toGlobalCoord(o.dataToCoord(a,!0));if(l&&l!=="none"){var h=GM(i),d=qM[l](o,c,u);d.style=h,r.graphicKey=d.type,r.pointer=d}var v=Xm(f.model,n);YM(a,r,v,n,i,s)},t.prototype.getHandleTransform=function(r,a,n){var i=Xm(a.axis.grid.model,a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var s=r4(a.axis,r,i);return{x:s[0],y:s[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,a,n,i){var s=n.axis,o=s.grid,f=s.getGlobalExtent(!0),l=ax(o,s).getOtherAxis(s).getGlobalExtent(),u=s.dim==="x"?0:1,c=[r.x,r.y];c[u]+=a[u],c[u]=Math.min(f[1],c[u]),c[u]=Math.max(f[0],c[u]);var h=(l[1]+l[0])/2,d=[h,h];d[u]=c[u];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:v[u]}},t})(WM);function ax(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var qM={line:function(e,t,r){var a=KM([t,r[0]],[t,r[1]],nx(e));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(e,t,r){var a=Math.max(1,e.getBandWidth()),n=r[1]-r[0];return{type:"Rect",shape:ZM([t-a/2,r[0]],[a,n],nx(e))}}};function nx(e){return e.dim==="x"?0:1}var JM=(function(e){$e(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t})(Tt),vn=Zt(),QM=G;function a4(e,t,r){if(!We.node){var a=t.getZr();vn(a).records||(vn(a).records={}),eR(a,t);var n=vn(a).records[e]||(vn(a).records[e]={});n.handler=r}}function eR(e,t){if(vn(e).initialized)return;vn(e).initialized=!0,r("click",Cr(ix,"click")),r("mousemove",Cr(ix,"mousemove")),r("globalout",rR);function r(a,n){e.on(a,function(i){var s=aR(t);QM(vn(e).records,function(o){o&&n(o,i,s.dispatchAction)}),tR(s.pendings,t)})}}function tR(e,t){var r=e.showTip.length,a=e.hideTip.length,n;r?n=e.showTip[r-1]:a&&(n=e.hideTip[a-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function rR(e,t,r){e.handler("leave",null,r)}function ix(e,t,r,a){t.handler(e,r,a)}function aR(e){var t={showTip:[],hideTip:[]},r=function(a){var n=t[a.type];n?n.push(a):(a.dispatchAction=r,e.dispatchAction(a))};return{dispatchAction:r,pendings:t}}function wv(e,t){if(!We.node){var r=t.getZr(),a=(vn(r).records||{})[e];a&&(vn(r).records[e]=null)}}var nR=(function(e){$e(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,a,n){var i=a.getComponent("tooltip"),s=r.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";a4("axisPointer",n,function(o,f,l){s!=="none"&&(o==="leave"||s.indexOf(o)>=0)&&l({type:"updateAxisPointer",currTrigger:o,x:f&&f.offsetX,y:f&&f.offsetY})})},t.prototype.remove=function(r,a){wv("axisPointer",a)},t.prototype.dispose=function(r,a){wv("axisPointer",a)},t.type="axisPointer",t})(si);function n4(e,t){var r=[],a=e.seriesIndex,n;if(a==null||!(n=t.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),s=El(i,e);if(s==null||s<0||Le(s))return{point:[]};var o=i.getItemGraphicEl(s),f=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(s)||[];else if(f&&f.dataToPoint)if(e.isStacked){var l=f.getBaseAxis(),u=f.getOtherAxis(l),c=u.dim,h=l.dim,d=c==="x"||c==="radius"?1:0,v=i.mapDimension(h),p=[];p[d]=i.get(v,s),p[1-d]=i.get(i.getCalculationInfo("stackResultDimension"),s),r=f.dataToPoint(p)||[]}else r=f.dataToPoint(i.getValues(je(f.dimensions,function(m){return i.mapDimension(m)}),s))||[];else if(o){var g=o.getBoundingRect().clone();g.applyTransform(o.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:o}}var sx=Zt();function iR(e,t,r){var a=e.currTrigger,n=[e.x,e.y],i=e,s=e.dispatchAction||Dt(r.dispatchAction,r),o=t.getComponent("axisPointer").coordSysAxesInfo;if(o){Z0(n)&&(n=n4({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var f=Z0(n),l=i.axesInfo,u=o.axesInfo,c=a==="leave"||Z0(n),h={},d={},v={list:[],map:{}},p={showPointer:Cr(oR,d),showTooltip:Cr(fR,v)};G(o.coordSysMap,function(m,x){var _=f||m.containPoint(n);G(o.coordSysAxesInfo[x],function(y,k){var C=y.axis,w=hR(l,y);if(!c&&_&&(!l||w)){var E=w&&w.value;E==null&&!f&&(E=C.pointToData(n)),E!=null&&ox(y,E,p,!1,h)}})});var g={};return G(u,function(m,x){var _=m.linkGroup;_&&!d[x]&&G(_.axesInfo,function(y,k){var C=d[k];if(y!==m&&C){var w=C.value;_.mapper&&(w=m.axis.scale.parse(_.mapper(w,fx(y),fx(m)))),g[m.key]=w}})}),G(g,function(m,x){ox(u[x],m,p,!0,h)}),lR(d,u,h),uR(v,n,e,s),cR(u,s,r),h}}function ox(e,t,r,a,n){var i=e.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var s=sR(t,e),o=s.payloadBatch,f=s.snapToValue;o[0]&&n.seriesIndex==null&&De(n,o[0]),!a&&e.snap&&i.containData(f)&&f!=null&&(t=f),r.showPointer(e,t,o),r.showTooltip(e,s,f)}}function sR(e,t){var r=t.axis,a=r.dim,n=e,i=[],s=Number.MAX_VALUE,o=-1;return G(t.seriesModels,function(f,l){var u=f.getData().mapDimensionsAll(a),c,h;if(f.getAxisTooltipData){var d=f.getAxisTooltipData(u,e,r);h=d.dataIndices,c=d.nestestValue}else{if(h=f.getData().indicesOfNearest(u[0],e,r.type==="category"?.5:null),!h.length)return;c=f.getData().get(u[0],h[0])}if(!(c==null||!isFinite(c))){var v=e-c,p=Math.abs(v);p<=s&&((p=0&&o<0)&&(s=p,o=v,n=c,i.length=0),G(h,function(g){i.push({seriesIndex:f.seriesIndex,dataIndexInside:g,dataIndex:f.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function oR(e,t,r,a){e[t.key]={value:r,payloadBatch:a}}function fR(e,t,r,a){var n=r.payloadBatch,i=t.axis,s=i.model,o=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var f=t.coordSys.model,l=nl(f),u=e.map[l];u||(u=e.map[l]={coordSysId:f.id,coordSysIndex:f.componentIndex,coordSysType:f.type,coordSysMainType:f.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:i.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:a,valueLabelOpt:{precision:o.get(["label","precision"]),formatter:o.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function lR(e,t,r){var a=r.axesInfo=[];G(t,function(n,i){var s=n.axisPointerModel.option,o=e[i];o?(!n.useHandle&&(s.status="show"),s.value=o.value,s.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(s.status="hide"),s.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:s.value})})}function uR(e,t,r,a){if(Z0(t)||!e.list.length){a({type:"hideTip"});return}var n=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:e.list})}function cR(e,t,r){var a=r.getZr(),n="axisPointerLastHighlights",i=sx(a)[n]||{},s=sx(a)[n]={};G(e,function(l,u){var c=l.axisPointerModel.option;c.status==="show"&&l.triggerEmphasis&&G(c.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;s[d]=h})});var o=[],f=[];G(i,function(l,u){!s[u]&&f.push(l)}),G(s,function(l,u){!i[u]&&o.push(l)}),f.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:f}),o.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:o})}function hR(e,t){for(var r=0;r<(e||[]).length;r++){var a=e[r];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function fx(e){var t=e.axis.model,r={},a=r.axisDim=e.axis.dim;return r.axisIndex=r[a+"AxisIndex"]=t.componentIndex,r.axisName=r[a+"AxisName"]=t.name,r.axisId=r[a+"AxisId"]=t.id,r}function Z0(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function dR(e){nM.registerAxisPointerClass("CartesianAxisPointer",jM),e.registerComponentModel(JM),e.registerComponentView(nR),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!Le(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=qI(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},iR)}var vR=(function(e){$e(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t})(Tt);function i4(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function s4(e){if(We.domSupported){for(var t=document.documentElement.style,r=0,a=e.length;r-1?(o+="top:50%",f+="translateY(-50%) rotate("+(l=i==="left"?-225:-45)+"deg)"):(o+="left:50%",f+="translateX(-50%) rotate("+(l=i==="top"?225:45)+"deg)");var u=l*Math.PI/180,c=s+n,h=c*Math.abs(Math.cos(u))+c*Math.abs(Math.sin(u)),d=Math.round(((h-Math.SQRT2*n)/2+Math.SQRT2*n-(h-c)/2)*100)/100;o+=";"+i+":-"+d+"px";var v=t+" solid "+n+"px;",p=["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",o+";"+f+";","border-bottom:"+v,"border-right:"+v,"background-color:"+a+";"];return''}function wR(e,t){var r="cubic-bezier(0.23,1,0.32,1)",a=" "+e/2+"s "+r,n="opacity"+a+",visibility"+a;return t||(a=" "+e+"s "+r,n+=We.transformSupported?","+Jp+a:",left"+a+",top"+a),mR+":"+n}function lx(e,t,r){var a=e.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!We.transformSupported)return r?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=We.transform3dSupported,s="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return r?"top:0;left:0;"+Jp+":"+s+";":[["top",0],["left",0],[o4,s]]}function TR(e){var t=[],r=e.get("fontSize"),a=e.getTextColor();a&&t.push("color:"+a),t.push("font:"+e.getFont());var n=Xe(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+n+"px");var i=e.get("textShadowColor"),s=e.get("textShadowBlur")||0,o=e.get("textShadowOffsetX")||0,f=e.get("textShadowOffsetY")||0;return i&&s&&t.push("text-shadow:"+o+"px "+f+"px "+s+"px "+i),G(["decoration","align"],function(l){var u=e.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function SR(e,t,r){var a=[],n=e.get("transitionDuration"),i=e.get("backgroundColor"),s=e.get("shadowBlur"),o=e.get("shadowColor"),f=e.get("shadowOffsetX"),l=e.get("shadowOffsetY"),u=e.getModel("textStyle"),c=oS(e,"html"),h=f+"px "+l+"px "+s+"px "+o;return a.push("box-shadow:"+h),t&&n&&a.push(wR(n,r)),i&&a.push("background-color:"+i),G(["width","color","radius"],function(d){var v="border-"+d,p=RT(v),g=e.get(p);g!=null&&a.push(v+":"+g+(d==="color"?"":"px"))}),a.push(TR(u)),c!=null&&a.push("padding:"+Lp(c).join("px ")+"px"),a.join(";")+";"}function ux(e,t,r,a,n){var i=t&&t.painter;if(r){var s=i&&i.getViewportRoot();s&&lD(e,s,r,a,n)}else{e[0]=a,e[1]=n;var o=i&&i.getViewportRootOffset();o&&(e[0]+=o.offsetLeft,e[1]+=o.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var ER=(function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=t.getZr(),i=r.appendTo,s=i&&(Oe(i)?document.querySelector(i):$f(i)?i:ct(i)&&i(t.getDom()));ux(this._styleCoord,n,s,t.getWidth()/2,t.getHeight()/2),(s||t.getDom()).appendChild(a),this._api=t,this._container=s;var o=this;a.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},a.onmousemove=function(f){if(f=f||window.event,!o._enterable){var l=n.handler,u=n.painter.getViewportRoot();aa(u,f,!0),l.dispatch("mousemove",f)}},a.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),a=gR(r,"position"),n=r.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=xR+SR(t,!this._firstShow,this._longHide)+lx(i[0],i[1],!0)+("border-color:"+el(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,a,n,i){var s=this.el;if(t==null){s.innerHTML="";return}var o="";if(Oe(i)&&a.get("trigger")==="item"&&!i4(a)&&(o=yR(a,n,i)),Oe(t))s.innerHTML=t+o;else if(t){s.innerHTML="",Le(t)||(t=[t]);for(var f=0;f=0?this._tryShow(i,s):n==="leave"&&this._hide(s))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,a=this._ecModel,n=this._api,i=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var s=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&s.manuallyShowTip(r,a,n,{x:s._lastX,y:s._lastY,dataByCoordSys:s._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,a,n,i){if(!(i.from===this.uid||We.node||!n.getDom())){var s=dx(i,n);this._ticket="";var o=i.dataByCoordSys,f=IR(i,a,n);if(f){var l=f.el.getBoundingRect().clone();l.applyTransform(f.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:f.el,position:i.position,positionDefault:"bottom"},s)}else if(i.tooltip&&i.x!=null&&i.y!=null){var u=AR;u.x=i.x,u.y=i.y,u.update(),At(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},s)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},s);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(r,a,n,i))return;var c=n4(i,a),h=c.point[0],d=c.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:c.el,position:i.position,positionDefault:"bottom"},s)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},s))}},t.prototype.manuallyHideTip=function(r,a,n,i){var s=this._tooltipContent;this._tooltipModel&&s.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(dx(i,n))},t.prototype._manuallyAxisShowTip=function(r,a,n,i){var s=i.seriesIndex,o=i.dataIndex,f=a.getComponent("axisPointer").coordSysAxesInfo;if(!(s==null||o==null||f==null)){var l=a.getSeriesByIndex(s);if(l){var u=l.getData(),c=jo([u.getItemModel(o),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:s,dataIndex:o,position:i.position}),!0}}},t.prototype._tryShow=function(r,a){var n=r.target,i=this._tooltipModel;if(i){this._lastX=r.offsetX,this._lastY=r.offsetY;var s=r.dataByCoordSys;if(s&&s.length)this._showAxisTooltip(s,r);else if(n){var o=At(n);if(o.ssrType==="legend")return;this._lastDataByCoordSys=null;var f,l;af(n,function(u){if(At(u).dataIndex!=null)return f=u,!0;if(At(u).tooltipConfig!=null)return l=u,!0},!0),f?this._showSeriesItemTooltip(r,f,a):l?this._showComponentItemTooltip(r,l,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},t.prototype._showOrMove=function(r,a){var n=r.get("showDelay");a=Dt(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},t.prototype._showAxisTooltip=function(r,a){var n=this._ecModel,i=this._tooltipModel,s=[a.offsetX,a.offsetY],o=jo([a.tooltipOption],i),f=this._renderMode,l=[],u=us("section",{blocks:[],noHeader:!0}),c=[],h=new Oh;G(r,function(x){G(x.dataByAxis,function(_){var y=n.getComponent(_.axisDim+"Axis",_.axisIndex),k=_.value;if(!(!y||k==null)){var C=t4(k,y.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=us("section",{header:C,noHeader:!$a(C),sortBlocks:!0,blocks:[]});u.blocks.push(w),G(_.seriesDataIndices,function(E){var S=n.getSeriesByIndex(E.seriesIndex),D=E.dataIndexInside,b=S.getDataParams(D);if(!(b.dataIndex<0)){b.axisDim=_.axisDim,b.axisIndex=_.axisIndex,b.axisType=_.axisType,b.axisId=_.axisId,b.axisValue=YS(y.axis,{value:k}),b.axisValueLabel=C,b.marker=h.makeTooltipMarker("item",el(b.color),f);var F=tm(S.formatTooltip(D,!0,null)),B=F.frag;if(B){var Y=jo([S],i).get("valueFormatter");w.blocks.push(Y?De({valueFormatter:Y},B):B)}F.text&&c.push(F.text),l.push(b)}})}})}),u.blocks.reverse(),c.reverse();var d=a.position,v=o.get("order"),p=sm(u,h,f,v,n.get("useUTC"),o.get("textStyle"));p&&c.unshift(p);var g=f==="richText"?`
-
-`:"
",m=c.join(g);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(r,l)?this._updatePosition(o,d,s[0],s[1],this._tooltipContent,l):this._showTooltipContent(o,m,l,Math.random()+"",s[0],s[1],d,null,h)})},t.prototype._showSeriesItemTooltip=function(r,a,n){var i=this._ecModel,s=At(a),o=s.seriesIndex,f=i.getSeriesByIndex(o),l=s.dataModel||f,u=s.dataIndex,c=s.dataType,h=l.getData(c),d=this._renderMode,v=r.positionDefault,p=jo([h.getItemModel(u),l,f&&(f.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=l.getDataParams(u,c),x=new Oh;m.marker=x.makeTooltipMarker("item",el(m.color),d);var _=tm(l.formatTooltip(u,!1,c)),y=p.get("order"),k=p.get("valueFormatter"),C=_.frag,w=C?sm(k?De({valueFormatter:k},C):C,x,d,y,i.get("useUTC"),p.get("textStyle")):_.text,E="item_"+l.name+"_"+u;this._showOrMove(p,function(){this._showTooltipContent(p,w,m,E,r.offsetX,r.offsetY,r.position,r.target,x)}),n({type:"showTip",dataIndexInside:u,dataIndex:h.getRawIndex(u),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,a,n){var i=this._renderMode==="html",s=At(a),o=s.tooltipConfig,f=o.option||{},l=f.encodeHTMLContent;if(Oe(f)){var u=f;f={content:u,formatter:u},l=!0}l&&i&&f.content&&(f=et(f),f.content=yr(f.content));var c=[f],h=this._ecModel.getComponent(s.componentMainType,s.componentIndex);h&&c.push(h),c.push({formatter:f.content});var d=r.positionDefault,v=jo(c,this._tooltipModel,d?{position:d}:null),p=v.get("content"),g=Math.random()+"",m=new Oh;this._showOrMove(v,function(){var x=et(v.get("formatterParams")||{});this._showTooltipContent(v,p,x,g,r.offsetX,r.offsetY,r.position,a,m)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,a,n,i,s,o,f,l,u){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var h=r.get("formatter");f=f||r.get("position");var d=a,v=this._getNearestPoint([s,o],n,r.get("trigger"),r.get("borderColor")),p=v.color;if(h)if(Oe(h)){var g=r.ecModel.get("useUTC"),m=Le(n)?n[0]:n,x=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,x&&(d=MT(m.axisValue,d,g)),d=PT(d,n,!0)}else if(ct(h)){var _=Dt(function(y,k){y===this._ticket&&(c.setContent(k,u,r,p,f),this._updatePosition(r,f,s,o,c,n,l))},this);this._ticket=i,d=h(n,i,_)}else d=h;c.setContent(d,u,r,p,f),c.show(r,p),this._updatePosition(r,f,s,o,c,n,l)}},t.prototype._getNearestPoint=function(r,a,n,i){if(n==="axis"||Le(a))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!Le(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(r,a,n,i,s,o,f){var l=this._api.getWidth(),u=this._api.getHeight();a=a||r.get("position");var c=s.getSize(),h=r.get("align"),d=r.get("verticalAlign"),v=f&&f.getBoundingRect().clone();if(f&&v.applyTransform(f.transform),ct(a)&&(a=a([n,i],o,s.el,v,{viewSize:[l,u],contentSize:c.slice()})),Le(a))n=Wa(a[0],l),i=Wa(a[1],u);else if(Be(a)){var p=a;p.width=c[0],p.height=c[1];var g=OT(p,{width:l,height:u});n=g.x,i=g.y,h=null,d=null}else if(Oe(a)&&f){var m=FR(a,v,c,r.get("borderWidth"));n=m[0],i=m[1]}else{var m=kR(n,i,s,l,u,h?null:20,d?null:20);n=m[0],i=m[1]}if(h&&(n-=vx(h)?c[0]/2:h==="right"?c[0]:0),d&&(i-=vx(d)?c[1]/2:d==="bottom"?c[1]:0),i4(r)){var m=bR(n,i,s,l,u);n=m[0],i=m[1]}s.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(r,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,s=!!n&&n.length===r.length;return s&&G(n,function(o,f){var l=o.dataByAxis||[],u=r[f]||{},c=u.dataByAxis||[];s=s&&l.length===c.length,s&&G(l,function(h,d){var v=c[d]||{},p=h.seriesDataIndices||[],g=v.seriesDataIndices||[];s=s&&h.value===v.value&&h.axisType===v.axisType&&h.axisId===v.axisId&&p.length===g.length,s&&G(p,function(m,x){var _=g[x];s=s&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),i&&G(h.seriesDataIndices,function(m){var x=m.seriesIndex,_=a[x],y=i[x];_&&y&&y.data!==_.data&&(s=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=a,!!s},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,a){We.node||!a.getDom()||(lv(this,"_updatePosition"),this._tooltipContent.dispose(),wv("itemTooltip",a))},t.type="tooltip",t})(si);function jo(e,t,r){var a=t.ecModel,n;r?(n=new It(r,a,a),n=new It(t.option,n,a)):n=t;for(var i=e.length-1;i>=0;i--){var s=e[i];s&&(s instanceof It&&(s=s.get("tooltip",!0)),Oe(s)&&(s={formatter:s}),s&&(n=new It(s,n,a)))}return n}function dx(e,t){return e.dispatchAction||Dt(t.dispatchAction,t)}function kR(e,t,r,a,n,i,s){var o=r.getSize(),f=o[0],l=o[1];return i!=null&&(e+f+i+2>a?e-=f+i:e+=i),s!=null&&(t+l+s>n?t-=l+s:t+=s),[e,t]}function bR(e,t,r,a,n){var i=r.getSize(),s=i[0],o=i[1];return e=Math.min(e+s,a)-s,t=Math.min(t+o,n)-o,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function FR(e,t,r,a){var n=r[0],i=r[1],s=Math.ceil(Math.SQRT2*a)+8,o=0,f=0,l=t.width,u=t.height;switch(e){case"inside":o=t.x+l/2-n/2,f=t.y+u/2-i/2;break;case"top":o=t.x+l/2-n/2,f=t.y-i-s;break;case"bottom":o=t.x+l/2-n/2,f=t.y+u+s;break;case"left":o=t.x-n-s,f=t.y+u/2-i/2;break;case"right":o=t.x+l+s,f=t.y+u/2-i/2}return[o,f]}function vx(e){return e==="center"||e==="middle"}function IR(e,t,r){var a=hp(e).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=Cl(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),s=i.models[0];if(s){var o=r.getViewOfComponentModel(s),f;if(o.group.traverse(function(l){var u=At(l).tooltipConfig;if(u&&u.name===e.name)return f=l,!0}),f)return{componentMainType:n,componentIndex:s.componentIndex,el:f}}}}function MR(e){Kp(dR),e.registerComponentModel(vR),e.registerComponentView(DR),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ur),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ur)}var Qh=Math.sin,ed=Math.cos,l4=Math.PI,Ni=Math.PI*2,RR=180/l4,u4=(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,a,n,i,s){this._add("C",t,r,a,n,i,s)},e.prototype.quadraticCurveTo=function(t,r,a,n){this._add("Q",t,r,a,n)},e.prototype.arc=function(t,r,a,n,i,s){this.ellipse(t,r,a,a,0,n,i,s)},e.prototype.ellipse=function(t,r,a,n,i,s,o,f){var l=o-s,u=!f,c=Math.abs(l),h=Gn(c-Ni)||(u?l>=Ni:-l>=Ni),d=l>0?l%Ni:l%Ni+Ni,v=!1;h?v=!0:Gn(c)?v=!1:v=d>=l4==!!u;var p=t+a*ed(s),g=r+n*Qh(s);this._start&&this._add("M",p,g);var m=Math.round(i*RR);if(h){var x=1/this._p,_=(u?1:-1)*(Ni-x);this._add("A",a,n,m,1,+u,t+a*ed(s+_),r+n*Qh(s+_)),x>.01&&this._add("A",a,n,m,0,+u,p,g)}else{var y=t+a*ed(o),k=r+n*Qh(o);this._add("A",a,n,m,+v,+u,y,k)}},e.prototype.rect=function(t,r,a,n){this._add("M",t,r),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,a,n,i,s,o,f,l){for(var u=[],c=this._p,h=1;h"}function zR(e){return""+e+">"}function e1(e,t){t=t||{};var r=t.newline?`
-`:"";function a(n){var i=n.children,s=n.tag,o=n.attrs,f=n.text;return VR(s,o)+(s!=="style"?yr(f):f||"")+(i?""+r+je(i,function(l){return a(l)}).join(r)+r:"")+zR(s)}return a(e)}function WR(e,t,r){r=r||{};var a=r.newline?`
-`:"",n=" {"+a,i=a+"}",s=je(st(e),function(f){return f+n+je(st(e[f]),function(l){return l+":"+e[f][l]+";"}).join(a)+i}).join(a),o=je(st(t),function(f){return"@keyframes "+f+n+je(st(t[f]),function(l){return l+n+je(st(t[f][l]),function(u){var c=t[f][l][u];return u==="d"&&(c='path("'+c+'")'),u+":"+c+";"}).join(a)+i}).join(a)+i}).join(a);return!s&&!o?"":[""].join(a)}function Sv(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function gx(e,t,r,a){return Gt("svg","root",{width:e,height:t,xmlns:c4,"xmlns:xlink":h4,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+e+" "+t:!1},r)}var GR=0;function v4(){return GR++}var mx={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"},Wi="transform-origin";function $R(e,t,r){var a=De({},e.shape);De(a,t),e.buildPath(r,a);var n=new u4;return n.reset(Dw(e)),r.rebuildPath(n,1),n.generateStr(),n.getStr()}function XR(e,t){var r=t.originX,a=t.originY;(r||a)&&(e[Wi]=r+"px "+a+"px")}var YR={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function p4(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function KR(e,t,r){var a=e.shape.paths,n={},i,s;if(G(a,function(f){var l=Sv(r.zrId);l.animation=!0,wc(f,{},l,!0);var u=l.cssAnims,c=l.cssNodes,h=st(u),d=h.length;if(d){s=h[d-1];var v=u[s];for(var p in v){var g=v[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var m in c){var x=c[m].animation;x.indexOf(s)>=0&&(i=x)}}}),!!i){t.d=!1;var o=p4(n,r);return i.replace(s,o)}}function xx(e){return Oe(e)?mx[e]?"cubic-bezier("+mx[e]+")":fp(e)?e:"":""}function wc(e,t,r,a){var n=e.animators,i=n.length,s=[];if(e instanceof mT){var o=KR(e,t,r);if(o)s.push(o);else if(!i)return}else if(!i)return;for(var f={},l=0;l0}).length){var xe=p4(w,r);return xe+" "+x[0]+" both"}}for(var g in f){var o=p(f[g]);o&&s.push(o)}if(s.length){var m=r.zrId+"-cls-"+v4();r.cssNodes["."+m]={animation:s.join(",")},t.class=m}}function ZR(e,t,r){if(!e.ignore)if(e.isSilent()){var a={"pointer-events":"none"};_x(a,t,r)}else{var n=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=n.fill;if(!i){var s=e.style&&e.style.fill,o=e.states.select&&e.states.select.style&&e.states.select.style.fill,f=e.currentStates.indexOf("select")>=0&&o||s;f&&(i=Bd(f))}var l=n.lineWidth;if(l){var u=!n.strokeNoScale&&e.transform?e.transform[0]:1;l=l/u}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),l&&(a["stroke-width"]=l),_x(a,t,r)}}function _x(e,t,r,a){var n=JSON.stringify(e),i=r.cssStyleCache[n];i||(i=r.zrId+"-cls-"+v4(),r.cssStyleCache[n]=i,r.cssNodes["."+i+":hover"]=e),t.class=t.class?t.class+" "+i:i}var sl=Math.round;function g4(e){return e&&Oe(e.src)}function m4(e){return e&&ct(e.toDataURL)}function t1(e,t,r,a){NR(function(n,i){var s=n==="fill"||n==="stroke";s&&Aw(i)?_4(t,e,n,a):s&&lp(i)?y4(r,e,n,a):e[n]=i,s&&a.ssr&&i==="none"&&(e["pointer-events"]="visible")},t,r,!1),rP(r,e,a)}function r1(e,t){var r=yk(t);r&&(r.each(function(a,n){a!=null&&(e[(px+n).toLowerCase()]=a+"")}),t.isSilent()&&(e[px+"silent"]="true"))}function yx(e){return Gn(e[0]-1)&&Gn(e[1])&&Gn(e[2])&&Gn(e[3]-1)}function jR(e){return Gn(e[4])&&Gn(e[5])}function a1(e,t,r){if(t&&!(jR(t)&&yx(t))){var a=1e4;e.transform=yx(t)?"translate("+sl(t[4]*a)/a+" "+sl(t[5]*a)/a+")":WD(t)}}function Tx(e,t,r){for(var a=e.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Zr(h,g),Zr(d,g)}else if(h==null||d==null){var m=function(D,b){if(D){var F=D.elm,B=h||b.width,Y=d||b.height;D.tag==="pattern"&&(l?(Y=1,B/=i.width):u&&(B=1,Y/=i.height)),D.attrs.width=B,D.attrs.height=Y,F&&(F.setAttribute("width",B),F.setAttribute("height",Y))}},x=pp(v,null,e,function(D){f||m(C,D),m(c,D)});x&&x.width&&x.height&&(h=h||x.width,d=d||x.height)}c=Gt("image","img",{href:v,width:h,height:d}),s.width=h,s.height=d}else n.svgElement&&(c=et(n.svgElement),s.width=n.svgWidth,s.height=n.svgHeight);if(c){var _,y;f?_=y=1:l?(y=1,_=s.width/i.width):u?(_=1,y=s.height/i.height):s.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(s.width=_),y!=null&&!isNaN(y)&&(s.height=y);var k=kw(n);k&&(s.patternTransform=k);var C=Gt("pattern","",s,[c]),w=e1(C),E=a.patternCache,S=E[w];S||(S=a.zrId+"-p"+a.patternIdx++,E[w]=S,s.id=S,C=a.defs[S]=Gt("pattern",S,s,[c])),t[r]=sc(S)}}function aP(e,t,r){var a=r.clipPathCache,n=r.defs,i=a[e.id];if(!i){i=r.zrId+"-c"+r.clipPathIdx++;var s={id:i};a[e.id]=i,n[i]=Gt("clipPath",i,s,[x4(e,r)])}t["clip-path"]=sc(i)}function Cx(e){return document.createTextNode(e)}function Xi(e,t,r){e.insertBefore(t,r)}function Ax(e,t){e.removeChild(t)}function Dx(e,t){e.appendChild(t)}function w4(e){return e.parentNode}function T4(e){return e.nextSibling}function td(e,t){e.textContent=t}var kx=58,nP=120,iP=Gt("","");function Ev(e){return e===void 0}function Va(e){return e!==void 0}function sP(e,t,r){for(var a={},n=t;n<=r;++n){var i=e[n].key;i!==void 0&&(a[i]=n)}return a}function sf(e,t){var r=e.key===t.key,a=e.tag===t.tag;return a&&r}function ol(e){var t,r=e.children,a=e.tag;if(Va(a)){var n=e.elm=d4(a);if(n1(iP,e),Le(r))for(t=0;ti?(v=r[f+1]==null?null:r[f+1].elm,S4(e,v,r,n,f)):Ru(e,t,a,i))}function zs(e,t){var r=t.elm=e.elm,a=e.children,n=t.children;e!==t&&(n1(e,t),Ev(t.text)?Va(a)&&Va(n)?a!==n&&oP(r,a,n):Va(n)?(Va(e.text)&&td(r,""),S4(r,null,n,0,n.length-1)):Va(a)?Ru(r,a,0,a.length-1):Va(e.text)&&td(r,""):e.text!==t.text&&(Va(a)&&Ru(r,a,0,a.length-1),td(r,t.text)))}function fP(e,t){if(sf(e,t))zs(e,t);else{var r=e.elm,a=w4(r);ol(t),a!==null&&(Xi(a,t.elm,T4(r)),Ru(a,[e],0,0))}return t}var lP=0,uP=(function(){function e(t,r,a){if(this.type="svg",this.refreshHover=bx(),this.configLayer=bx(),this.storage=r,this._opts=a=De({},a),this.root=t,this._id="zr"+lP++,this._oldVNode=gx(a.width,a.height),t&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=d4("svg");n1(null,this._oldVNode),n.appendChild(i),t.appendChild(n)}this.resize(a.width,a.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",fP(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return Ex(t,Sv(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=Sv(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var s=[],o=this._bgVNode=cP(a,n,this._backgroundColor,i);o&&s.push(o);var f=t.compress?null:this._mainVNode=Gt("g","main",{},[]);this._paintList(r,i,f?f.children:s),f&&s.push(f);var l=je(st(i.defs),function(h){return i.defs[h]});if(l.length&&s.push(Gt("defs","defs",{},l)),t.animation){var u=WR(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=Gt("style","stl",{},[],u);s.push(c)}}return gx(a,n,s,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},e1(this.renderToVNode({animation:Xe(t.cssAnimation,!0),emphasis:Xe(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Xe(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,a){for(var n=t.length,i=[],s=0,o,f,l=0,u=0;u=0&&!(h&&f&&h[p]===f[p]);p--);for(var g=v-1;g>p;g--)s--,o=i[s-1];for(var m=p+1;m=o)}}for(var c=this.__startIndex;c15)break}}Y.prevElClipPaths&&m.restore()};if(x)if(x.length===0)E=g.__endIndex;else for(var D=d.dpr,b=0;b0&&t>n[0]){for(f=0;ft);f++);o=a[n[f]]}if(n.splice(f+1,0,t),a[t]=r,!r.virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(r.dom,l.nextSibling):s.appendChild(r.dom)}else s.firstChild?s.insertBefore(r.dom,s.firstChild):s.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var a=this._zlevelList,n=0;n0?T0:0),this._needsManuallyCompositing),u.__builtin__||ap("ZLevel "+l+" has been used by unkown layer "+u.id),u!==i&&(u.__used=!0,u.__startIndex!==f&&(u.__dirty=!0),u.__startIndex=f,u.incremental?u.__drawIndex=-1:u.__drawIndex=f,r(f),i=u),n.__dirty&Gr&&!n.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=f))}r(f),this.eachBuiltinLayer(function(c,h){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,G(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var a=this._layerConfig;a[t]?Vt(a[t],r,!0):a[t]=r;for(var n=0;n{e.exports=a()})(_P,function r(){var a=typeof self<"u"?self:typeof window<"u"?window:a!==void 0?a:{},n,i=!a.document&&!!a.postMessage,s=a.IS_PAPA_WORKER||!1,o={},f=0,l={};function u(E){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(S){var D=k(S);D.chunkSize=parseInt(D.chunkSize),S.step||S.chunk||(D.chunkSize=null),this._handle=new p(D),(this._handle.streamer=this)._config=D}).call(this,E),this.parseChunk=function(S,D){var b=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview),s)a.postMessage({results:F,workerId:l.WORKER_ID,finished:b});else if(w(this._config.chunk)&&!D){if(this._config.chunk(F,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=F=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(F.data),this._completeResults.errors=this._completeResults.errors.concat(F.errors),this._completeResults.meta=F.meta),this._completed||!b||!w(this._config.complete)||F&&F.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),b||F&&F.meta.paused||this._nextChunk(),F}this._halted=!0},this._sendError=function(S){w(this._config.error)?this._config.error(S):s&&this._config.error&&a.postMessage({workerId:l.WORKER_ID,error:S,finished:!1})}}function c(E){var S;(E=E||{}).chunkSize||(E.chunkSize=l.RemoteChunkSize),u.call(this,E),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(D){this._input=D,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(S=new XMLHttpRequest,this._config.withCredentials&&(S.withCredentials=this._config.withCredentials),i||(S.onload=C(this._chunkLoaded,this),S.onerror=C(this._chunkError,this)),S.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var D,b=this._config.downloadRequestHeaders;for(D in b)S.setRequestHeader(D,b[D])}var F;this._config.chunkSize&&(F=this._start+this._config.chunkSize-1,S.setRequestHeader("Range","bytes="+this._start+"-"+F));try{S.send(this._config.downloadRequestBody)}catch(B){this._chunkError(B.message)}i&&S.status===0&&this._chunkError()}},this._chunkLoaded=function(){S.readyState===4&&(S.status<200||400<=S.status?this._chunkError():(this._start+=this._config.chunkSize||S.responseText.length,this._finished=!this._config.chunkSize||this._start>=(D=>(D=D.getResponseHeader("Content-Range"))!==null?parseInt(D.substring(D.lastIndexOf("/")+1)):-1)(S),this.parseChunk(S.responseText)))},this._chunkError=function(D){D=S.statusText||D,this._sendError(new Error(D))}}function h(E){(E=E||{}).chunkSize||(E.chunkSize=l.LocalChunkSize),u.call(this,E);var S,D,b=typeof FileReader<"u";this.stream=function(F){this._input=F,D=F.slice||F.webkitSlice||F.mozSlice,b?((S=new FileReader).onload=C(this._chunkLoaded,this),S.onerror=C(this._chunkError,this)):S=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(F.target.result)},this._chunkError=function(){this._sendError(S.error)}}function d(E){var S;u.call(this,E=E||{}),this.stream=function(D){return S=D,this._nextChunk()},this._nextChunk=function(){var D,b;if(!this._finished)return D=this._config.chunkSize,S=D?(b=S.substring(0,D),S.substring(D)):(b=S,""),this._finished=!S,this.parseChunk(b)}}function v(E){u.call(this,E=E||{});var S=[],D=!0,b=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(F){this._input=F,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){b&&S.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),S.length?this.parseChunk(S.shift()):D=!0},this._streamData=C(function(F){try{S.push(typeof F=="string"?F:F.toString(this._config.encoding)),D&&(D=!1,this._checkIsFinished(),this.parseChunk(S.shift()))}catch(B){this._streamError(B)}},this),this._streamError=C(function(F){this._streamCleanUp(),this._sendError(F)},this),this._streamEnd=C(function(){this._streamCleanUp(),b=!0,this._streamData("")},this),this._streamCleanUp=C(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(E){var S,D,b,F,B=Math.pow(2,53),Y=-B,Q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,J=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,q=this,ce=0,U=0,ye=!1,pe=!1,M=[],H={data:[],errors:[],meta:{}};function z(de){return E.skipEmptyLines==="greedy"?de.join("").trim()==="":de.length===1&&de[0].length===0}function V(){if(H&&b&&(xe("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),b=!1),E.skipEmptyLines&&(H.data=H.data.filter(function(T){return!z(T)})),ie()){let T=function(N,W){w(E.transformHeader)&&(N=E.transformHeader(N,W)),M.push(N)};var he=T;if(H)if(Array.isArray(H.data[0])){for(var de=0;ie()&&de(me=>(E.dynamicTypingFunction&&E.dynamicTyping[me]===void 0&&(E.dynamicTyping[me]=E.dynamicTypingFunction(me)),(E.dynamicTyping[me]||E.dynamicTyping)===!0))(ue)?ve==="true"||ve==="TRUE"||ve!=="false"&&ve!=="FALSE"&&((me=>{if(Q.test(me)&&(me=parseFloat(me),Y=M.length?"__parsed_extra":M[ee]:Z,K=E.transform?E.transform(K,Z):K);Z==="__parsed_extra"?(W[Z]=W[Z]||[],W[Z].push(K)):W[Z]=K}return E.header&&(ee>M.length?xe("FieldMismatch","TooManyFields","Too many fields: expected "+M.length+" fields but parsed "+ee,U+N):eeE.preview?D.abort():(H.data=H.data[0],F(H,q))))}),this.parse=function(de,fe,oe){var he=E.quoteChar||'"',he=(E.newline||(E.newline=this.guessLineEndings(de,he)),b=!1,E.delimiter?w(E.delimiter)&&(E.delimiter=E.delimiter(de),H.meta.delimiter=E.delimiter):((he=((T,N,W,ee,Z)=>{var K,ue,ve,me;Z=Z||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var ge=0;ge=oe.length/2?`\r
-`:"\r"}}function g(E){return E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(E){var S=(E=E||{}).delimiter,D=E.newline,b=E.comments,F=E.step,B=E.preview,Y=E.fastMode,Q=null,J=!1,q=E.quoteChar==null?'"':E.quoteChar,ce=q;if(E.escapeChar!==void 0&&(ce=E.escapeChar),(typeof S!="string"||-1=B)return Se(!0);break}oe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:fe.length,index:U}),ue++}}else if(b&&he.length===0&&pe.substring(U,U+xe)===b){if(Z===-1)return Se();U=Z+ie,Z=pe.indexOf(D,U),ee=pe.indexOf(S,U)}else if(ee!==-1&&(ee=B)return Se(!0)}return be();function me(Me){fe.push(Me),T=U}function ge(Me){var Ne=0;return Ne=Me!==-1&&(Me=pe.substring(ue+1,Me))&&Me.trim()===""?Me.length:Ne}function be(Me){return H||(Me===void 0&&(Me=pe.substring(U)),he.push(Me),U=z,me(he),de&&Ie()),Se()}function Ee(Me){U=Me,me(he),he=[],Z=pe.indexOf(D,U)}function Se(Me){if(E.header&&!M&&fe.length&&!J){var Ne=fe[0],Pe=Object.create(null),ot=new Set(Ne);let Re=!1;for(let Ye=0;Yeb.charCodeAt(0)!==65279?b:b.slice(1))(E),D=new(S.download?c:d)(S)):E.readable===!0&&w(E.read)&&w(E.on)?D=new v(S):(a.File&&E instanceof File||E instanceof Object)&&(D=new h(S)),D.stream(E);(D=(()=>{var b;return!!l.WORKERS_SUPPORTED&&(b=(()=>{var F=a.URL||a.webkitURL||null,B=r.toString();return l.BLOB_URL||(l.BLOB_URL=F.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",B,")();"],{type:"text/javascript"})))})(),(b=new a.Worker(b)).onmessage=x,b.id=f++,o[b.id]=b)})()).userStep=S.step,D.userChunk=S.chunk,D.userComplete=S.complete,D.userError=S.error,S.step=w(S.step),S.chunk=w(S.chunk),S.complete=w(S.complete),S.error=w(S.error),delete S.worker,D.postMessage({input:E,config:S,workerId:D.id})},l.unparse=function(E,S){var D=!1,b=!0,F=",",B=`\r
-`,Y='"',Q=Y+Y,J=!1,q=null,ce=!1,U=((()=>{if(typeof S=="object"){if(typeof S.delimiter!="string"||l.BAD_DELIMITERS.filter(function(M){return S.delimiter.indexOf(M)!==-1}).length||(F=S.delimiter),typeof S.quotes!="boolean"&&typeof S.quotes!="function"&&!Array.isArray(S.quotes)||(D=S.quotes),typeof S.skipEmptyLines!="boolean"&&typeof S.skipEmptyLines!="string"||(J=S.skipEmptyLines),typeof S.newline=="string"&&(B=S.newline),typeof S.quoteChar=="string"&&(Y=S.quoteChar),typeof S.header=="boolean"&&(b=S.header),Array.isArray(S.columns)){if(S.columns.length===0)throw new Error("Option columns is empty");q=S.columns}S.escapeChar!==void 0&&(Q=S.escapeChar+Y),S.escapeFormulae instanceof RegExp?ce=S.escapeFormulae:typeof S.escapeFormulae=="boolean"&&S.escapeFormulae&&(ce=/^[=+\-@\t\r].*$/)}})(),new RegExp(g(Y),"g"));if(typeof E=="string"&&(E=JSON.parse(E)),Array.isArray(E)){if(!E.length||Array.isArray(E[0]))return ye(null,E,J);if(typeof E[0]=="object")return ye(q||Object.keys(E[0]),E,J)}else if(typeof E=="object")return typeof E.data=="string"&&(E.data=JSON.parse(E.data)),Array.isArray(E.data)&&(E.fields||(E.fields=E.meta&&E.meta.fields||q),E.fields||(E.fields=Array.isArray(E.data[0])?E.fields:typeof E.data[0]=="object"?Object.keys(E.data[0]):[]),Array.isArray(E.data[0])||typeof E.data[0]=="object"||(E.data=[E.data])),ye(E.fields||[],E.data||[],J);throw new Error("Unable to serialize unrecognized input");function ye(M,H,z){var V="",ie=(typeof M=="string"&&(M=JSON.parse(M)),typeof H=="string"&&(H=JSON.parse(H)),Array.isArray(M)&&0{for(var de=0;de>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}function A4(e){for(var t=[],r=0;r>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var of=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return t==255&&r==254?CP(e.slice(2)):t==254&&r==255?A4(e.slice(2)):t==65279?e.slice(1):e},S0=function(t){return String.fromCharCode(t)},Px=function(t){return String.fromCharCode(t)},fl,Xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Lx(e){for(var t="",r=0,a=0,n=0,i=0,s=0,o=0,f=0,l=0;l>2,a=e.charCodeAt(l++),s=(r&3)<<4|a>>4,n=e.charCodeAt(l++),o=(a&15)<<2|n>>6,f=n&63,isNaN(a)?o=f=64:isNaN(n)&&(f=64),t+=Xn.charAt(i)+Xn.charAt(s)+Xn.charAt(o)+Xn.charAt(f);return t}function jr(e){var t="",r=0,a=0,n=0,i=0,s=0,o=0,f=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l>4,t+=String.fromCharCode(r),o=Xn.indexOf(e.charAt(l++)),a=(s&15)<<4|o>>2,o!==64&&(t+=String.fromCharCode(a)),f=Xn.indexOf(e.charAt(l++)),n=(o&3)<<6|f,f!==64&&(t+=String.fromCharCode(n));return t}var Qe=(function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node})(),ps=(function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}})();function fi(e){return Qe?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Ox(e){return Qe?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Ea=function(t){return Qe?ps(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function gs(e){if(Array.isArray(e))return e.map(function(a){return String.fromCharCode(a)}).join("");for(var t=[],r=0;r"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return o1(new Uint8Array(e));for(var t=new Array(e.length),r=0;r>6&31,n[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var o=e.charCodeAt(++i)&1023;n[r++]=240|s>>8&7,n[r++]=128|s>>2&63,n[r++]=128|o>>6&15|(s&3)<<4,n[r++]=128|o&63}else n[r++]=224|s>>12&15,n[r++]=128|s>>6&63,n[r++]=128|s&63;r>a&&(t.push(n.slice(0,r)),r=0,n=fi(65535),a=65530)}return t.push(n.slice(0,r)),zn(t)}var Dr=/\u0000/g,ff=/[\u0001-\u0006]/g;function oo(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function Aa(e,t){var r=""+e;return r.length>=t?r:Ft("0",t-r.length)+r}function f1(e,t){var r=""+e;return r.length>=t?r:Ft(" ",t-r.length)+r}function Pu(e,t){var r=""+e;return r.length>=t?r:r+Ft(" ",t-r.length)}function DP(e,t){var r=""+Math.round(e);return r.length>=t?r:Ft("0",t-r.length)+r}function kP(e,t){var r=""+e;return r.length>=t?r:Ft("0",t-r.length)+r}var Bx=Math.pow(2,32);function Ns(e,t){if(e>Bx||e<-Bx)return DP(e,t);var r=Math.round(e);return kP(r,t)}function Lu(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var Nx=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],ad=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function bP(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var Ke={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Ux={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},FP={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Ou(e,t,r){for(var a=e<0?-1:1,n=e*a,i=0,s=1,o=0,f=1,l=0,u=0,c=Math.floor(n);lt&&(l>t?(u=f,o=i):(u=l,o=s)),!r)return[0,a*o,u];var h=Math.floor(a*o/u);return[h,a*o-h*u,u]}function Ji(e,t,r){if(e>2958465||e<0)return null;var a=e|0,n=Math.floor(86400*(e-a)),i=0,s=[],o={D:a,T:n,u:86400*(e-a)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),t&&t.date1904&&(a+=1462),o.u>.9999&&(o.u=0,++n==86400&&(o.T=n=0,++a,++o.D)),a===60)s=r?[1317,10,29]:[1900,2,29],i=3;else if(a===0)s=r?[1317,8,29]:[1900,1,0],i=6;else{a>60&&--a;var f=new Date(1900,0,1);f.setDate(f.getDate()+a-1),s=[f.getFullYear(),f.getMonth()+1,f.getDate()],i=f.getDay(),a<60&&(i=(i+6)%7),r&&(i=OP(f,s))}return o.y=s[0],o.m=s[1],o.d=s[2],o.S=n%60,n=Math.floor(n/60),o.M=n%60,n=Math.floor(n/60),o.H=n,o.q=i,o}var D4=new Date(1899,11,31,0,0,0),IP=D4.getTime(),MP=new Date(1900,2,1,0,0,0);function k4(e,t){var r=e.getTime();return t?r-=1461*24*60*60*1e3:e>=MP&&(r+=1440*60*1e3),(r-(IP+(e.getTimezoneOffset()-D4.getTimezoneOffset())*6e4))/(1440*60*1e3)}function l1(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function RP(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function PP(e){var t=e<0?12:11,r=l1(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function LP(e){var t=l1(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function ll(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=PP(e):t===10?r=e.toFixed(10).substr(0,12):r=LP(e),l1(RP(r.toUpperCase()))}function cs(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):ll(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return da(14,k4(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function OP(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function BP(e,t,r,a){var n="",i=0,s=0,o=r.y,f,l=0;switch(e){case 98:o=r.y+543;case 121:switch(t.length){case 1:case 2:f=o%100,l=2;break;default:f=o%1e4,l=4;break}break;case 109:switch(t.length){case 1:case 2:f=r.m,l=t.length;break;case 3:return ad[r.m-1][1];case 5:return ad[r.m-1][0];default:return ad[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:f=r.d,l=t.length;break;case 3:return Nx[r.q][0];default:return Nx[r.q][1]}break;case 104:switch(t.length){case 1:case 2:f=1+(r.H+11)%12,l=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:f=r.H,l=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:f=r.M,l=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?Aa(r.S,t.length):(a>=2?s=a===3?1e3:100:s=a===1?10:1,i=Math.round(s*(r.S+r.u)),i>=60*s&&(i=0),t==="s"?i===0?"0":""+i/s:(n=Aa(i,2+a),t==="ss"?n.substr(0,2):"."+n.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":f=r.D*24+r.H;break;case"[m]":case"[mm]":f=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":f=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}l=t.length===3?1:2;break;case 101:f=o,l=1;break}var u=l>0?Aa(f,l):"";return u}function Yn(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,a=e.substr(0,r);r!=e.length;r+=t)a+=(a.length>0?",":"")+e.substr(r,t);return a}var b4=/%/g;function NP(e,t,r){var a=t.replace(b4,""),n=t.length-a.length;return xn(e,a,r*Math.pow(10,2*n))+Ft("%",n)}function UP(e,t,r){for(var a=t.length-1;t.charCodeAt(a-1)===44;)--a;return xn(e,t.substr(0,a),r/Math.pow(10,3*(t.length-a)))}function F4(e,t){var r,a=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+F4(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%n;if(i<0&&(i+=n),r=(t/Math.pow(10,i)).toPrecision(a+1+(n+i)%n),r.indexOf("e")===-1){var s=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,n)+"."+r.substr(2+n),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,f,l,u){return f+l+u.substr(0,(n+i)%n)+"."+u.substr(i)+"E"})}else r=t.toExponential(a);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var I4=/# (\?+)( ?)\/( ?)(\d+)/;function HP(e,t,r){var a=parseInt(e[4],10),n=Math.round(t*a),i=Math.floor(n/a),s=n-i*a,o=a;return r+(i===0?"":""+i)+" "+(s===0?Ft(" ",e[1].length+1+e[4].length):f1(s,e[1].length)+e[2]+"/"+e[3]+Aa(o,e[4].length))}function VP(e,t,r){return r+(t===0?"":""+t)+Ft(" ",e[1].length+2+e[4].length)}var M4=/^#*0*\.([0#]+)/,R4=/\).*[0#]/,P4=/\(###\) ###\\?-####/;function xr(e){for(var t="",r,a=0;a!=e.length;++a)switch(r=e.charCodeAt(a)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function Hx(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function Vx(e,t){var r=e-Math.floor(e),a=Math.pow(10,t);return t<(""+Math.round(r*a)).length?0:Math.round(r*a)}function zP(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function WP(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function ra(e,t,r){if(e.charCodeAt(0)===40&&!t.match(R4)){var a=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ra("n",a,r):"("+ra("n",a,-r)+")"}if(t.charCodeAt(t.length-1)===44)return UP(e,t,r);if(t.indexOf("%")!==-1)return NP(e,t,r);if(t.indexOf("E")!==-1)return F4(t,r);if(t.charCodeAt(0)===36)return"$"+ra(e,t.substr(t.charAt(1)==" "?2:1),r);var n,i,s,o,f=Math.abs(r),l=r<0?"-":"";if(t.match(/^00+$/))return l+Ns(f,t.length);if(t.match(/^[#?]+$/))return n=Ns(r,0),n==="0"&&(n=""),n.length>t.length?n:xr(t.substr(0,t.length-n.length))+n;if(i=t.match(I4))return HP(i,f,l);if(t.match(/^#+0+$/))return l+Ns(f,t.length-t.indexOf("0"));if(i=t.match(M4))return n=Hx(r,i[1].length).replace(/^([^\.]+)$/,"$1."+xr(i[1])).replace(/\.$/,"."+xr(i[1])).replace(/\.(\d*)$/,function(v,p){return"."+p+Ft("0",xr(i[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+Hx(f,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+Yn(Ns(f,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ra(e,t,-r):Yn(""+(Math.floor(r)+zP(r,i[1].length)))+"."+Aa(Vx(r,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return ra(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=oo(ra(e,t.replace(/[\\-]/g,""),r)),s=0,oo(oo(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return s=0?Ua("n",a,r):"("+Ua("n",a,-r)+")"}if(t.charCodeAt(t.length-1)===44)return GP(e,t,r);if(t.indexOf("%")!==-1)return $P(e,t,r);if(t.indexOf("E")!==-1)return L4(t,r);if(t.charCodeAt(0)===36)return"$"+Ua(e,t.substr(t.charAt(1)==" "?2:1),r);var n,i,s,o,f=Math.abs(r),l=r<0?"-":"";if(t.match(/^00+$/))return l+Aa(f,t.length);if(t.match(/^[#?]+$/))return n=""+r,r===0&&(n=""),n.length>t.length?n:xr(t.substr(0,t.length-n.length))+n;if(i=t.match(I4))return VP(i,f,l);if(t.match(/^#+0+$/))return l+Aa(f,t.length-t.indexOf("0"));if(i=t.match(M4))return n=(""+r).replace(/^([^\.]+)$/,"$1."+xr(i[1])).replace(/\.$/,"."+xr(i[1])),n=n.replace(/\.(\d*)$/,function(v,p){return"."+p+Ft("0",xr(i[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+(""+f).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+Yn(""+f);if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Ua(e,t,-r):Yn(""+r)+"."+Ft("0",i[1].length);if(i=t.match(/^#,#*,#0/))return Ua(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=oo(Ua(e,t.replace(/[\\-]/g,""),r)),s=0,oo(oo(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return s-1||r=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t-1;);break;case" ":++t;break;default:++t;break}return!1}function YP(e,t,r,a){for(var n=[],i="",s=0,o="",f="t",l,u,c,h="H";s=12?"P":"A"),p.t="T",h="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(l!=null&&(p.v=l.H>=12?"PM":"AM"),p.t="T",s+=5,h="h"):e.substr(s,5).toUpperCase()==="上午/下午"?(l!=null&&(p.v=l.H>=12?"下午":"上午"),p.t="T",s+=5,h="h"):(p.t="t",++s),l==null&&p.t==="T")return"";n[n.length]=p,f=o;break;case"[":for(i=o;e.charAt(s++)!=="]"&&s-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",To(e)||(n[n.length]={t:"t",v:i}));break;case".":if(l!=null){for(i=o;++s-1;)i+=o;n[n.length]={t:"n",v:i};break;case"?":for(i=o;e.charAt(++s)===o;)i+=o;n[n.length]={t:o,v:i},f=o;break;case"*":++s,(e.charAt(s)==" "||e.charAt(s)=="*")&&++s;break;case"(":case")":n[n.length]={t:a===1?"t":o,v:o},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=o;s-1;)i+=e.charAt(s);n[n.length]={t:"D",v:i};break;case" ":n[n.length]={t:o,v:o},++s;break;case"$":n[n.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(o)===-1)throw new Error("unrecognized character "+o+" in "+e);n[n.length]={t:"t",v:o},++s;break}var g=0,m=0,x;for(s=n.length-1,f="t";s>=0;--s)switch(n[s].t){case"h":case"H":n[s].t=h,f="h",g<1&&(g=1);break;case"s":(x=n[s].v.match(/\.0+$/))&&(m=Math.max(m,x[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":f=n[s].t;break;case"m":f==="s"&&(n[s].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&n[s].v.match(/[Hh]/)&&(g=1),g<2&&n[s].v.match(/[Mm]/)&&(g=2),g<3&&n[s].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M);break}var _="",y;for(s=0;s0){_.charCodeAt(0)==40?(C=t<0&&_.charCodeAt(0)===45?-t:t,w=xn("n",_,C)):(C=t<0&&a>1?-t:t,w=xn("n",_,C),C<0&&n[0]&&n[0].t=="t"&&(w=w.substr(1),n[0].v="-"+n[0].v)),y=w.length-1;var E=n.length;for(s=0;s-1){E=s;break}var S=n.length;if(E===n.length&&w.indexOf("E")===-1){for(s=n.length-1;s>=0;--s)n[s]==null||"n?".indexOf(n[s].t)===-1||(y>=n[s].v.length-1?(y-=n[s].v.length,n[s].v=w.substr(y+1,n[s].v.length)):y<0?n[s].v="":(n[s].v=w.substr(0,y+1),y=-1),n[s].t="t",S=s);y>=0&&S=0;--s)if(!(n[s]==null||"n?".indexOf(n[s].t)===-1)){for(u=n[s].v.indexOf(".")>-1&&s===E?n[s].v.indexOf(".")-1:n[s].v.length-1,k=n[s].v.substr(u+1);u>=0;--u)y>=0&&(n[s].v.charAt(u)==="0"||n[s].v.charAt(u)==="#")&&(k=w.charAt(y--)+k);n[s].v=k,n[s].t="t",S=s}for(y>=0&&S-1&&s===E?n[s].v.indexOf(".")+1:0,k=n[s].v.substr(0,u);u-1&&(C=a>1&&t<0&&s>0&&n[s-1].v==="-"?-t:t,n[s].v=xn(n[s].t,n[s].v,C),n[s].t="t");var D="";for(s=0;s!==n.length;++s)n[s]!=null&&(D+=n[s].v);return D}var zx=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Wx(e,t){if(t==null)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function KP(e,t){var r=XP(e),a=r.length,n=r[a-1].indexOf("@");if(a<4&&n>-1&&--a,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof t!="number")return[4,r.length===4||n>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=n>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=n>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=n>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=t>0?r[0]:t<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[a,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(zx),o=r[1].match(zx);return Wx(t,s)?[a,r[0]]:Wx(t,o)?[a,r[1]]:[a,r[s!=null&&o!=null?2:1]]}return[a,i]}function da(e,t,r){r==null&&(r={});var a="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?a=r.dateNF:a=e;break;case"number":e==14&&r.dateNF?a=r.dateNF:a=(r.table!=null?r.table:Ke)[e],a==null&&(a=r.table&&r.table[Ux[e]]||Ke[Ux[e]]),a==null&&(a=FP[e]||"General");break}if(Lu(a,0))return cs(t,r);t instanceof Date&&(t=k4(t,r.date1904));var n=KP(a,t);if(Lu(n[1]))return cs(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return YP(n[1],t,r,n[0])}function ss(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(Ke[r]==null){t<0&&(t=r);continue}if(Ke[r]==e){t=r;break}}t<0&&(t=391)}return Ke[t]=e,t}function B4(){Ke=bP()}var ZP={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},N4=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function jP(e){var t=typeof e=="number"?Ke[e]:e;return t=t.replace(N4,"(\\d+)"),new RegExp("^"+t+"$")}function qP(e,t,r){var a=-1,n=-1,i=-1,s=-1,o=-1,f=-1;(t.match(N4)||[]).forEach(function(c,h){var d=parseInt(r[h+1],10);switch(c.toLowerCase().charAt(0)){case"y":a=d;break;case"d":i=d;break;case"h":s=d;break;case"s":f=d;break;case"m":s>=0?o=d:n=d;break}}),f>=0&&o==-1&&n>=0&&(o=n,n=-1);var l=(""+(a>=0?a:new Date().getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);l.length==7&&(l="0"+l),l.length==8&&(l="20"+l);var u=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(f>=0?f:0)).slice(-2);return s==-1&&o==-1&&f==-1?l:a==-1&&n==-1&&i==-1?u:l+"T"+u}var JP=(function(){var e={};e.version="1.2.0";function t(){for(var w=0,E=new Array(256),S=0;S!=256;++S)w=S,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,E[S]=w;return typeof Int32Array<"u"?new Int32Array(E):E}var r=t();function a(w){var E=0,S=0,D=0,b=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(D=0;D!=256;++D)b[D]=w[D];for(D=0;D!=256;++D)for(S=w[D],E=256+D;E<4096;E+=256)S=b[E]=S>>>8^w[S&255];var F=[];for(D=1;D!=16;++D)F[D-1]=typeof Int32Array<"u"?b.subarray(D*256,D*256+256):b.slice(D*256,D*256+256);return F}var n=a(r),i=n[0],s=n[1],o=n[2],f=n[3],l=n[4],u=n[5],c=n[6],h=n[7],d=n[8],v=n[9],p=n[10],g=n[11],m=n[12],x=n[13],_=n[14];function y(w,E){for(var S=E^-1,D=0,b=w.length;D>>8^r[(S^w.charCodeAt(D++))&255];return~S}function k(w,E){for(var S=E^-1,D=w.length-15,b=0;b>8&255]^m[w[b++]^S>>16&255]^g[w[b++]^S>>>24]^p[w[b++]]^v[w[b++]]^d[w[b++]]^h[w[b++]]^c[w[b++]]^u[w[b++]]^l[w[b++]]^f[w[b++]]^o[w[b++]]^s[w[b++]]^i[w[b++]]^r[w[b++]];for(D+=15;b>>8^r[(S^w[b++])&255];return~S}function C(w,E){for(var S=E^-1,D=0,b=w.length,F=0,B=0;D>>8^r[(S^F)&255]:F<2048?(S=S>>>8^r[(S^(192|F>>6&31))&255],S=S>>>8^r[(S^(128|F&63))&255]):F>=55296&&F<57344?(F=(F&1023)+64,B=w.charCodeAt(D++)&1023,S=S>>>8^r[(S^(240|F>>8&7))&255],S=S>>>8^r[(S^(128|F>>2&63))&255],S=S>>>8^r[(S^(128|B>>6&15|(F&3)<<4))&255],S=S>>>8^r[(S^(128|B&63))&255]):(S=S>>>8^r[(S^(224|F>>12&15))&255],S=S>>>8^r[(S^(128|F>>6&63))&255],S=S>>>8^r[(S^(128|F&63))&255]);return~S}return e.table=r,e.bstr=y,e.buf=k,e.str=C,e})(),tt=(function(){var t={};t.version="1.2.1";function r(A,P){for(var I=A.split("/"),R=P.split("/"),L=0,O=0,j=Math.min(I.length,R.length);L>>1,A.write_shift(2,I);var R=P.getFullYear()-1980;R=R<<4|P.getMonth()+1,R=R<<5|P.getDate(),A.write_shift(2,R)}function s(A){var P=A.read_shift(2)&65535,I=A.read_shift(2)&65535,R=new Date,L=I&31;I>>>=5;var O=I&15;I>>>=4,R.setMilliseconds(0),R.setFullYear(I+1980),R.setMonth(O-1),R.setDate(L);var j=P&31;P>>>=5;var le=P&63;return P>>>=6,R.setHours(P),R.setMinutes(le),R.setSeconds(j<<1),R}function o(A){jt(A,0);for(var P={},I=0;A.l<=A.length-4;){var R=A.read_shift(2),L=A.read_shift(2),O=A.l+L,j={};R===21589&&(I=A.read_shift(1),I&1&&(j.mtime=A.read_shift(4)),L>5&&(I&2&&(j.atime=A.read_shift(4)),I&4&&(j.ctime=A.read_shift(4))),j.mtime&&(j.mt=new Date(j.mtime*1e3))),A.l=O,P[R]=j}return P}var f;function l(){return f||(f={})}function u(A,P){if(A[0]==80&&A[1]==75)return Pl(A,P);if((A[0]|32)==109&&(A[1]|32)==105)return Ul(A,P);if(A.length<512)throw new Error("CFB file size "+A.length+" < 512");var I=3,R=512,L=0,O=0,j=0,le=0,te=0,ae=[],se=A.slice(0,512);jt(se,0);var we=c(se);switch(I=we[0],I){case 3:R=512;break;case 4:R=4096;break;case 0:if(we[1]==0)return Pl(A,P);default:throw new Error("Major Version: Expected 3 or 4 saw "+I)}R!==512&&(se=A.slice(0,R),jt(se,28));var Ce=A.slice(0,R);h(se,I);var Fe=se.read_shift(4,"i");if(I===3&&Fe!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Fe);se.l+=4,j=se.read_shift(4,"i"),se.l+=4,se.chk("00100000","Mini Stream Cutoff Size: "),le=se.read_shift(4,"i"),L=se.read_shift(4,"i"),te=se.read_shift(4,"i"),O=se.read_shift(4,"i");for(var Te=-1,ke=0;ke<109&&(Te=se.read_shift(4,"i"),!(Te<0));++ke)ae[ke]=Te;var He=d(A,R);g(te,O,He,R,ae);var pt=x(He,j,ae,R);pt[j].name="!Directory",L>0&&le!==B&&(pt[le].name="!MiniFAT"),pt[ae[0]].name="!FAT",pt.fat_addrs=ae,pt.ssz=R;var Ue={},Et=[],Fn=[],Co=[];_(j,pt,He,Et,L,Ue,Fn,le),v(Fn,Co,Et),Et.shift();var Ao={FileIndex:Fn,FullPaths:Co};return P&&P.raw&&(Ao.raw={header:Ce,sectors:He}),Ao}function c(A){if(A[A.l]==80&&A[A.l+1]==75)return[0,0];A.chk(Y,"Header Signature: "),A.l+=16;var P=A.read_shift(2,"u");return[A.read_shift(2,"u"),P]}function h(A,P){var I=9;switch(A.l+=2,I=A.read_shift(2)){case 9:if(P!=3)throw new Error("Sector Shift: Expected 9 saw "+I);break;case 12:if(P!=4)throw new Error("Sector Shift: Expected 12 saw "+I);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+I)}A.chk("0600","Mini Sector Shift: "),A.chk("000000000000","Reserved: ")}function d(A,P){for(var I=Math.ceil(A.length/P)-1,R=[],L=1;L0&&j>=0;)O.push(P.slice(j*F,j*F+F)),L-=F,j=Yi(I,j*4);return O.length===0?Wt(0):zn(O).slice(0,A.size)}function g(A,P,I,R,L){var O=B;if(A===B){if(P!==0)throw new Error("DIFAT chain shorter than expected")}else if(A!==-1){var j=I[A],le=(R>>>2)-1;if(!j)return;for(var te=0;te=0;){L[te]=!0,O[O.length]=te,j.push(A[te]);var se=I[Math.floor(te*4/R)];if(ae=te*4&le,R<4+ae)throw new Error("FAT boundary crossed: "+te+" 4 "+R);if(!A[se])break;te=Yi(A[se],ae)}return{nodes:O,data:Qx([j])}}function x(A,P,I,R){var L=A.length,O=[],j=[],le=[],te=[],ae=R-1,se=0,we=0,Ce=0,Fe=0;for(se=0;se=L&&(Ce-=L),!j[Ce]){te=[];var Te=[];for(we=Ce;we>=0;){Te[we]=!0,j[we]=!0,le[le.length]=we,te.push(A[we]);var ke=I[Math.floor(we*4/R)];if(Fe=we*4&ae,R<4+Fe)throw new Error("FAT boundary crossed: "+we+" 4 "+R);if(!A[ke]||(we=Yi(A[ke],Fe),Te[we]))break}O[Ce]={nodes:le,data:Qx([te])}}return O}function _(A,P,I,R,L,O,j,le){for(var te=0,ae=R.length?2:0,se=P[A].data,we=0,Ce=0,Fe;we0&&te!==B&&(P[te].name="!StreamData")):ke.size>=4096?(ke.storage="fat",P[ke.start]===void 0&&(P[ke.start]=m(I,ke.start,P.fat_addrs,P.ssz)),P[ke.start].name=ke.name,ke.content=P[ke.start].data.slice(0,ke.size)):(ke.storage="minifat",ke.size<0?ke.size=0:te!==B&&ke.start!==B&&P[te]&&(ke.content=p(ke,P[te].data,(P[le]||{}).data))),ke.content&&jt(ke.content,0),O[Fe]=ke,j.push(ke)}}function y(A,P){return new Date((Wr(A,P+4)/1e7*Math.pow(2,32)+Wr(A,P)/1e7-11644473600)*1e3)}function k(A,P){return l(),u(f.readFileSync(A),P)}function C(A,P){var I=P&&P.type;switch(I||Qe&&Buffer.isBuffer(A)&&(I="buffer"),I||"base64"){case"file":return k(A,P);case"base64":return u(Ea(jr(A)),P);case"binary":return u(Ea(A),P)}return u(A,P)}function w(A,P){var I=P||{},R=I.root||"Root Entry";if(A.FullPaths||(A.FullPaths=[]),A.FileIndex||(A.FileIndex=[]),A.FullPaths.length!==A.FileIndex.length)throw new Error("inconsistent CFB structure");A.FullPaths.length===0&&(A.FullPaths[0]=R+"/",A.FileIndex[0]={name:R,type:5}),I.CLSID&&(A.FileIndex[0].clsid=I.CLSID),E(A)}function E(A){var P="Sh33tJ5";if(!tt.find(A,"/"+P)){var I=Wt(4);I[0]=55,I[1]=I[3]=50,I[2]=54,A.FileIndex.push({name:P,type:2,content:I,size:4,L:69,R:69,C:69}),A.FullPaths.push(A.FullPaths[0]+P),S(A)}}function S(A,P){w(A);for(var I=!1,R=!1,L=A.FullPaths.length-1;L>=0;--L){var O=A.FileIndex[L];switch(O.type){case 0:R?I=!0:(A.FileIndex.pop(),A.FullPaths.pop());break;case 1:case 2:case 5:R=!0,isNaN(O.R*O.L*O.C)&&(I=!0),O.R>-1&&O.L>-1&&O.R==O.L&&(I=!0);break;default:I=!0;break}}if(!(!I&&!P)){var j=new Date(1987,1,19),le=0,te=Object.create?Object.create(null):{},ae=[];for(L=0;L1?1:-1,we.size=0,we.type=5;else if(Ce.slice(-1)=="/"){for(le=L+1;le=ae.length?-1:le,le=L+1;le=ae.length?-1:le,we.type=1}else a(A.FullPaths[L+1]||"")==a(Ce)&&(we.R=L+1),we.type=2}}}function D(A,P){var I=P||{};if(I.fileType=="mad")return bc(A,I);if(S(A),I.fileType==="zip")return Ol(A,I);var R=(function(Fe){for(var Te=0,ke=0,He=0;He0&&(Ue<4096?Te+=Ue+63>>6:ke+=Ue+511>>9)}}for(var Et=Fe.FullPaths.length+3>>2,Fn=Te+7>>3,Co=Te+127>>7,Ao=Fn+ke+Et+Co,vi=Ao+127>>7,Ic=vi<=109?0:Math.ceil((vi-109)/127);Ao+vi+Ic+127>>7>vi;)Ic=++vi<=109?0:Math.ceil((vi-109)/127);var nn=[1,Ic,vi,Co,Et,ke,Te,0];return Fe.FileIndex[0].size=Te<<6,nn[7]=(Fe.FileIndex[0].start=nn[0]+nn[1]+nn[2]+nn[3]+nn[4]+nn[5])+(nn[6]+7>>3),nn})(A),L=Wt(R[7]<<9),O=0,j=0;{for(O=0;O<8;++O)L.write_shift(1,Q[O]);for(O=0;O<8;++O)L.write_shift(2,0);for(L.write_shift(2,62),L.write_shift(2,3),L.write_shift(2,65534),L.write_shift(2,9),L.write_shift(2,6),O=0;O<3;++O)L.write_shift(2,0);for(L.write_shift(4,0),L.write_shift(4,R[2]),L.write_shift(4,R[0]+R[1]+R[2]+R[3]-1),L.write_shift(4,0),L.write_shift(4,4096),L.write_shift(4,R[3]?R[0]+R[1]+R[2]-1:B),L.write_shift(4,R[3]),L.write_shift(-4,R[1]?R[0]-1:B),L.write_shift(4,R[1]),O=0;O<109;++O)L.write_shift(-4,O>9)));for(le(R[6]+7>>3);L.l&511;)L.write_shift(-4,q.ENDOFCHAIN);for(j=O=0,te=0;te=4096)&&(se.start=j,le(ae+63>>6)));for(;L.l&511;)L.write_shift(-4,q.ENDOFCHAIN);for(O=0;O=4096)if(L.l=se.start+1<<9,Qe&&Buffer.isBuffer(se.content))se.content.copy(L,L.l,0,se.size),L.l+=se.size+511&-512;else{for(te=0;te