@ai-gui/image 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,8 +80,8 @@ yyyy`);var n=nu(t),i=r?"getUTC":"get",a=n[i+"FullYear"](),s=n[i+"Month"]()+1,o=n
80
80
  `)){var m=new ER;m.newline=!0,u.add(m);return}var y=i.getSeriesByName(v)[0];if(!h.get(v))if(y){var x=y.getData(),b=x.getVisual("legendLineStyle")||{},_=x.getVisual("legendIcon"),T=x.getVisual("style"),w=this._createItem(y,v,g,p,n,r,b,T,_,f,a);w.on("click",Rb(S1e,v,null,a,d)).on("mouseover",Rb(JV,y.name,null,a,d)).on("mouseout",Rb(eH,y.name,null,a,d)),i.ssr&&w.eachChild(function(S){var E=xr(S);E.seriesIndex=y.seriesIndex,E.dataIndex=g,E.ssrType="legend"}),h.set(v,!0)}else i.eachRawSeries(function(S){if(!h.get(v)&&S.legendVisualProvider){var E=S.legendVisualProvider;if(!E.containName(v))return;var A=E.indexOfName(v),k=E.getItemVisual(A,"style"),L=E.getItemVisual(A,"legendIcon"),I=go(k.fill);I&&I[3]===0&&(I[3]=.2,k=it(it({},k),{fill:oh(I,"rgba")}));var D=this._createItem(S,v,g,p,n,r,{},k,L,f,a);D.on("click",Rb(S1e,null,v,a,d)).on("mouseover",Rb(JV,null,v,a,d)).on("mouseout",Rb(eH,null,v,a,d)),i.ssr&&D.eachChild(function(R){var M=xr(R);M.seriesIndex=S.seriesIndex,M.dataIndex=g,M.ssrType="legend"}),h.set(v,!0)}},this)},this),s&&this._createSelector(s,n,a,o,l)},t.prototype._createSelector=function(r,n,i,a,s){var o=this.getSelectorGroup();QV(r,function(u){var h=u.type,f=new on({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});o.add(f);var d=n.getModel("selectorLabel"),p=n.getModel(["emphasis","selectorLabel"]);mo(f,{normal:d,emphasis:p},{defaultText:u.title}),tg(f)})},t.prototype._createItem=function(r,n,i,a,s,o,l,u,h,f,d){var p=r.visualDrawType,g=s.get("itemWidth"),v=s.get("itemHeight"),m=s.isSelected(n),y=a.get("symbolRotate"),x=a.get("symbolKeepAspect"),b=a.get("icon");h=b||h||"roundRect";var _=Dbt(h,a,l,u,p,m,d),T=new ER,w=a.getModel("textStyle");if(ar(r.getLegendIcon)&&(!b||b==="inherit"))T.add(r.getLegendIcon({itemWidth:g,itemHeight:v,icon:h,iconRotate:y,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:x}));else{var S=b==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;T.add(Mbt({itemWidth:g,itemHeight:v,icon:h,iconRotate:S,itemStyle:_.itemStyle,symbolKeepAspect:x}))}var E=o==="left"?g+5:-5,A=o,k=s.get("formatter"),L=n;$t(k)&&k?L=k.replace("{name}",n??""):ar(k)&&(L=k(n));var I=m?w.getTextColor():a.get("inactiveColor");T.add(new on({style:qn(w,{text:L,x:E,y:v/2,fill:I,align:A,verticalAlign:"middle"},{inheritColor:I})}));var D=new hn({shape:T.getBoundingRect(),style:{fill:"transparent"}}),R=a.getModel("tooltip");return R.get("show")&&Pm({el:D,componentModel:s,itemName:n,itemTooltipOption:R.option}),T.add(D),T.eachChild(function(M){M.silent=!0}),D.silent=!f,this.getContentGroup().add(T),tg(T),T.__legendDataIndex=i,T},t.prototype.layoutInner=function(r,n,i,a,s,o){var l=this.getContentGroup(),u=this.getSelectorGroup();Vm(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var h=l.getBoundingRect(),f=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),s){Vm("horizontal",u,r.get("selectorItemGap",!0));var d=u.getBoundingRect(),p=[-d.x,-d.y],g=r.get("selectorButtonGap",!0),v=r.getOrient().index,m=v===0?"width":"height",y=v===0?"height":"width",x=v===0?"y":"x";o==="end"?p[v]+=h[m]+g:f[v]+=d[m]+g,p[1-v]+=h[y]/2-d[y]/2,u.x=p[0],u.y=p[1],l.x=f[0],l.y=f[1];var b={x:0,y:0};return b[m]=h[m]+g+d[m],b[y]=Math.max(h[y],d[y]),b[x]=Math.min(0,d[x]+p[1-v]),b}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Yn);function Dbt(e,t,r,n,i,a,s){function o(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),QV(m,function(x,b){m[b]==="inherit"&&(m[b]=y[b])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),h=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:fb(f,s),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[h]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),o(u,n);var d=t.getModel("lineStyle"),p=d.getLineStyle();if(o(p,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),p.stroke==="auto"&&(p.stroke=n.fill),!a){var g=t.get("inactiveBorderWidth"),v=u[h];u.lineWidth=g==="auto"?n.lineWidth>0&&v?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}function Mbt(e){var t=e.icon||"roundRect",r=va(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function S1e(e,t,r,n){eH(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),JV(e,t,r,n)}function C1e(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function JV(e,t,r,n){C1e(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function eH(e,t,r,n){C1e(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function Ibt(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function b3(e,t,r){var n=e==="allSelect"||e==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:t},function(o){n?o[e]():o[e](t.name),E1e(o,i),a.push(o.componentIndex)});var s={};return r.eachComponent("legend",function(o){ae(i,function(l,u){o[l?"select":"unSelect"](u)}),E1e(o,s)}),n?{selected:s,legendIndex:a}:{name:t.name,selected:s}}function E1e(e,t){var r=t||{};return ae(e.getData(),function(n){var i=n.get("name");if(!(i===`
81
81
  `||i==="")){var a=e.isSelected(i);Xt(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function Pbt(e){e.registerAction("legendToggleSelect","legendselectchanged",Cr(b3,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Cr(b3,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Cr(b3,"inverseSelect")),e.registerAction("legendSelect","legendselected",Cr(b3,"select")),e.registerAction("legendUnSelect","legendunselected",Cr(b3,"unSelect"))}function A1e(e){e.registerComponentModel(ZV),e.registerComponentView(w1e),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Ibt),e.registerSubTypeDefaulter("legend",function(){return"plain"}),Pbt(e)}var Nbt=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=tb(r);e.prototype.init.call(this,r,n,i),k1e(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),k1e(this,this.option,r)},t.type="legend.scroll",t.defaultOption=lg(ZV.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(ZV);function k1e(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,ug(t,r,{type:"box",ignoreSize:!!i})}var L1e=mr,tH=["width","height"],rH=["x","y"],Obt=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new L1e),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new L1e)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,s,o,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,s,o,l);var h=this._controllerGroup,f=n.get("pageIconSize",!0),d=st(f)?f:[f,f];g("pagePrev",0);var p=n.getModel("pageTextStyle");h.add(new on({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),g("pageNext",1);function g(v,m){var y=v+"DataIndex",x=G2(n.get("pageIcons",!0)[n.getOrient().name][m],{onclick:Ht(u._pageGo,u,y,n,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});x.name=v,h.add(x)}},t.prototype.layoutInner=function(r,n,i,a,s,o){var l=this.getSelectorGroup(),u=r.getOrient().index,h=tH[u],f=rH[u],d=tH[1-u],p=rH[1-u];s&&Vm("horizontal",l,r.get("selectorItemGap",!0));var g=r.get("selectorButtonGap",!0),v=l.getBoundingRect(),m=[-v.x,-v.y],y=cr(i);s&&(y[h]=i[h]-v[h]-g);var x=this._layoutContentAndController(r,a,y,u,h,d,p,f);if(s){if(o==="end")m[u]+=x[h]+g;else{var b=v[h]+g;m[u]-=b,x[f]-=b}x[h]+=v[h]+g,m[1-u]+=x[p]+x[d]/2-v[d]/2,x[d]=Math.max(x[d],v[d]),x[p]=Math.min(x[p],v[p]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return x},t.prototype._layoutContentAndController=function(r,n,i,a,s,o,l,u){var h=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;Vm(r.get("orient"),h,r.get("itemGap"),a?i.width:null,a?null:i.height),Vm("horizontal",d,r.get("pageButtonItemGap",!0));var p=h.getBoundingRect(),g=d.getBoundingRect(),v=this._showController=p[s]>i[s],m=[-p.x,-p.y];n||(m[a]=h[u]);var y=[0,0],x=[-g.x,-g.y],b=Er(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(v){var _=r.get("pageButtonPosition",!0);_==="end"?x[a]+=i[s]-g[s]:y[a]+=g[s]+b}x[1-a]+=p[o]/2-g[o]/2,h.setPosition(m),f.setPosition(y),d.setPosition(x);var T={x:0,y:0};if(T[s]=v?i[s]:p[s],T[o]=Math.max(p[o],g[o]),T[l]=Math.min(0,g[l]+x[1-a]),f.__rectSize=i[s],v){var w={x:0,y:0};w[s]=Math.max(i[s]-g[s]-b,0),w[o]=T[o],f.setClipPath(new hn({shape:w})),f.__rectSize=w[s]}else d.eachChild(function(E){E.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(r);return S.pageIndex!=null&&Sn(h,{x:S.contentPosition[0],y:S.contentPosition[1]},v?r:null),this._updatePageInfoView(r,S),T},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;ae(["pagePrev","pageNext"],function(h){var f=h+"DataIndex",d=n[f]!=null,p=i.childOfName(h);p&&(p.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),p.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),s=r.get("pageFormatter"),o=n.pageIndex,l=o!=null?o+1:0,u=n.pageCount;a&&s&&a.setStyle("text",$t(s)?s.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):s({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,s=r.getOrient().index,o=tH[s],l=rH[s],u=this._findTargetItemIndex(n),h=i.children(),f=h[u],d=h.length,p=d?1:0,g={contentPosition:[i.x,i.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return g;var v=_(f);g.contentPosition[s]=-v.s;for(var m=u+1,y=v,x=v,b=null;m<=d;++m)b=_(h[m]),(!b&&x.e>y.s+a||b&&!T(b,y.s))&&(x.i>y.i?y=x:y=b,y&&(g.pageNextDataIndex==null&&(g.pageNextDataIndex=y.i),++g.pageCount)),x=b;for(var m=u-1,y=v,x=v,b=null;m>=-1;--m)b=_(h[m]),(!b||!T(x,b.s))&&y.i<x.i&&(x=y,g.pagePrevDataIndex==null&&(g.pagePrevDataIndex=y.i),++g.pageCount,++g.pageIndex),y=b;return g;function _(w){if(w){var S=w.getBoundingRect(),E=S[l]+w[l];return{s:E,e:E+S[o],i:w.__legendDataIndex}}}function T(w,S){return w.e>=S&&w.s<=S+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(s,o){var l=s.__legendDataIndex;a==null&&l!=null&&(a=o),l===r&&(n=o)}),n??a},t.type="legend.scroll",t}(w1e);function Bbt(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function $bt(e){En(A1e),e.registerComponentModel(Nbt),e.registerComponentView(Obt),Bbt(e)}function R1e(e){En(A1e),En($bt)}var Fbt=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=lg(g3.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(g3),nH=mn();function zbt(e,t,r){nH(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function Gbt(e,t){for(var r=nH(e).coordSysRecordMap,n=r.keys(),i=0;i<n.length;i++){var a=n[i],s=r.get(a),o=s.dataZoomInfoMap;if(o){var l=t.uid,u=o.get(l);u&&(o.removeKey(l),o.keys().length||D1e(r,s))}}}function D1e(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function Vbt(e,t){var r={model:t,containsPoint:Cr(Wbt,t),dispatchAction:Cr(Hbt,e),dataZoomInfoMap:null,controller:null},n=r.controller=new QC(e.getZr());return ae(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var s=[];r.dataZoomInfoMap.each(function(o){if(a.isAvailableBehavior(o.model.option)){var l=(o.getRange||{})[i],u=l&&l(o.dzReferCoordSysInfo,r.model.mainType,r.controller,a);!o.model.get("disabled",!0)&&u&&s.push({dataZoomId:o.model.id,start:u[0],end:u[1]})}}),s.length&&r.dispatchAction(s)})}),r}function Hbt(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Wbt(e,t,r,n){return e.coordinateSystem.containPoint([r,n])}function Ubt(e){var t,r="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each(function(a){var s=a.model,o=s.get("disabled",!0)?!1:s.get("zoomLock",!0)?"move":!0;n[r+o]>n[r+t]&&(t=o),i=i&&s.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function qbt(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=nH(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=Qt());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var s=Sye(a);ae(s.infoList,function(o){var l=o.model.uid,u=i.get(l)||i.set(l,Vbt(r,o.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=Qt());h.set(a.uid,{dzReferCoordSysInfo:o,model:a,getRange:null})})}),i.each(function(a){var s=a.controller,o,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(o=l.get(u))}if(!o){D1e(i,a);return}var h=Ubt(l);s.enable(h.controlType,h.opt),s.setPointerChecker(a.containsPoint),ab(a,"dispatchAction",o.model.get("throttle",!0),"fixRate")})})}var Ybt=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),zbt(i,r,{pan:Ht(iH.pan,this),zoom:Ht(iH.zoom,this),scrollMove:Ht(iH.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Gbt(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(RV),iH={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),s=e.axisModels[0];if(s){var o=aH[t](null,[n.originX,n.originY],s,r,e),l=(o.signal>0?o.pixelStart+o.pixelLength-o.pixel:o.pixel-o.pixelStart)/o.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(uy(0,a,[0,100],0,h.minSpan,h.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:M1e(function(e,t,r,n,i,a){var s=aH[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return s.signal*(e[1]-e[0])*s.pixel/s.pixelLength}),scrollMove:M1e(function(e,t,r,n,i,a){var s=aH[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return s.signal*(e[1]-e[0])*a.scrollDelta})};function M1e(e){return function(t,r,n,i){var a=this.range,s=a.slice(),o=t.axisModels[0];if(o){var l=e(s,o,t,r,n,i);if(uy(l,s,[0,100],"all"),this.range=s,a[0]!==s[0]||a[1]!==s[1])return s}}}var aH={grid:function(e,t,r,n,i){var a=r.axis,s={},o=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s},polar:function(e,t,r,n,i){var a=r.axis,s={},o=i.model.coordinateSystem,l=o.getRadiusAxis().getExtent(),u=o.getAngleAxis().getExtent();return e=e?o.pointToCoord(e):[0,0],t=o.pointToCoord(t),r.mainType==="radiusAxis"?(s.pixel=t[0]-e[0],s.pixelLength=l[1]-l[0],s.pixelStart=l[0],s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=u[1]-u[0],s.pixelStart=u[0],s.signal=a.inverse?-1:1),s},singleAxis:function(e,t,r,n,i){var a=r.axis,s=i.model.coordinateSystem.getRect(),o={};return e=e||[0,0],a.orient==="horizontal"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o}};function Xbt(e){DV(e),e.registerComponentModel(Fbt),e.registerComponentView(Ybt),qbt(e)}var jbt=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=lg(g3.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(g3),_3=hn,I1e=7,Kbt=1,sH=30,Zbt=7,T3="horizontal",P1e="vertical",Qbt=5,Jbt=["line","bar","candlestick","scatter"],e_t={easing:"cubicOut",duration:100,delay:0},t_t=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=Ht(this._onBrush,this),this._onBrushEnd=Ht(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),ab(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){LC(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new mr;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Zbt:0,s=this._findCoordRect(),o={width:n.getWidth(),height:n.getHeight()},l=this._orient===T3?{right:o.width-s.x-s.width,top:o.height-sH-I1e-a,width:s.width,height:sH}:{right:I1e,top:s.y,width:sH,height:s.height},u=tb(r.option);ae(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var h=Xi(u,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===P1e&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),s=a&&a.get("inverse"),o=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i===T3&&!s?{scaleY:l?1:-1,scaleX:1}:i===T3&&s?{scaleY:l?1:-1,scaleX:-1}:i===P1e&&!s?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([o]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new _3({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var s=new _3({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Ht(this._onClickPanel,this)}),o=this.api.getZr();a?(s.on("mousedown",this._onBrushStart,this),s.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),i.add(s)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,s=a.getRawData(),o=a.getShadowDim&&a.getShadowDim(),l=o&&s.getDimensionInfo(o)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(s!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=s.getDataExtent(l),d=(f[1]-f[0])*.3;f=[f[0]-d,f[1]+d];var p=[0,n[1]],g=[0,n[0]],v=[[n[0],0],[0,0]],m=[],y=g[1]/(s.count()-1),x=0,b=Math.round(s.count()/n[0]),_;s.each([l],function(A,k){if(b>0&&k%b){x+=y;return}var L=A==null||isNaN(A)||A==="",I=L?0:Dn(A,f,p,!0);L&&!_&&k?(v.push([v[v.length-1][0],0]),m.push([m[m.length-1][0],0])):!L&&_&&(v.push([x,0]),m.push([x,0])),v.push([x,I]),m.push([x,I]),x+=y,_=L}),u=this._shadowPolygonPts=v,h=this._shadowPolylinePts=m}this._shadowData=s,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var T=this.dataZoomModel;function w(A){var k=T.getModel(A?"selectedDataBackground":"dataBackground"),L=new mr,I=new Fo({shape:{points:u},segmentIgnoreThreshold:1,style:k.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),D=new zo({shape:{points:h},segmentIgnoreThreshold:1,style:k.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return L.add(I),L.add(D),L}for(var S=0;S<3;S++){var E=w(S===1);this._displayables.sliderGroup.add(E),this._displayables.dataShadowSegs.push(E)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(s,o){var l=r.getAxisProxy(s,o).getTargetSeriesModels();ae(l,function(u){if(!i&&!(n!==!0&&Ir(Jbt,u.get("type"))<0)){var h=a.getComponent(_g(s),o).axis,f=r_t(s),d,p=u.coordinateSystem;f!=null&&p.getOtherAxis&&(d=p.getOtherAxis(h).inverse),f=u.getData().mapDimension(f),i={thisAxis:h,series:u,thisDim:s,otherDim:f,otherAxisInverse:d}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],s=this._displayables.sliderGroup,o=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,f=l.get("brushSelect"),d=n.filler=new _3({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});s.add(d),s.add(new _3({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Kbt,fill:"rgba(0,0,0,0)"}})),ae([0,1],function(b){var _=l.get("handleIcon");!JL[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var T=va(_,-1,0,2,2,null,!0);T.attr({cursor:N1e(this._orient),draggable:!0,drift:Ht(this._onDragMove,this,b),ondragend:Ht(this._onDragEnd,this),onmouseover:Ht(this._showDataInfo,this,!0),onmouseout:Ht(this._showDataInfo,this,!1),z2:5});var w=T.getBoundingRect(),S=l.get("handleSize");this._handleHeight=Pt(S,this._size[1]),this._handleWidth=w.width/w.height*this._handleHeight,T.setStyle(l.getModel("handleStyle").getItemStyle()),T.style.strokeNoScale=!0,T.rectHover=!0,T.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),tg(T);var E=l.get("handleColor");E!=null&&(T.style.fill=E),s.add(i[b]=T);var A=l.getModel("textStyle"),k=l.get("handleLabel")||{},L=k.show||!1;r.add(a[b]=new on({silent:!0,invisible:!L,style:qn(A,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:A.getTextColor(),font:A.getFont()}),z2:10}))},this);var p=d;if(f){var g=Pt(l.get("moveHandleSize"),o[1]),v=n.moveHandle=new hn({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:g}}),m=g*.8,y=n.moveHandleIcon=va(l.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);y.silent=!0,y.y=o[1]+g/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var x=Math.min(o[1]/2,Math.max(g,10));p=n.moveZone=new hn({invisible:!0,shape:{y:o[1]-x,height:g+x}}),p.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),s.add(v),s.add(y),s.add(p)}p.attr({draggable:!0,cursor:N1e(this._orient),drift:Ht(this._onDragMove,this,"all"),ondragstart:Ht(this._showDataInfo,this,!0),ondragend:Ht(this._onDragEnd,this),onmouseover:Ht(this._showDataInfo,this,!0),onmouseout:Ht(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Dn(r[0],[0,100],n,!0),Dn(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,s=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];uy(n,a,s,i.get("zoomLock")?"all":r,o.minSpan!=null?Dn(o.minSpan,l,s,!0):null,o.maxSpan!=null?Dn(o.maxSpan,l,s,!0):null);var u=this._range,h=this._range=Nu([Dn(a[0],s,l,!0),Dn(a[1],s,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Nu(i.slice()),s=this._size;ae([0,1],function(p){var g=n.handles[p],v=this._handleHeight;g.attr({scaleX:v/2,scaleY:v/2,x:i[p]+(p?-1:1),y:s[1]/2-v/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:s[1]});var o={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(o),n.moveZone.setShape(o),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",o.x+o.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],s[0]],h=0;h<l.length;h++){var f=l[h],d=f.getClipPath();d||(d=new hn,f.setClipPath(d)),d.setShape({x:u[h],y:0,width:u[h+1]-u[h],height:s[1]})}this._updateDataInfo(r)},t.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,s=this._orient,o=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,h=this._range,f=r?l.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:l.getDataValueWindow();o=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var d=Nu(this._handleEnds.slice());p.call(this,0),p.call(this,1);function p(g){var v=ng(i.handles[g].parent,this.group),m=RL(g===0?"right":"left",v),y=this._handleWidth/2+Qbt,x=hh([d[g]+(g===0?-y:y),this._size[1]/2],v);a[g].setStyle({x:x[0],y:x[1],verticalAlign:s===T3?"middle":m,align:s===T3?m:"center",text:o[g]})}},t.prototype._formatLabel=function(r,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),s=i.get("labelPrecision");(s==null||s==="auto")&&(s=n.getPixelPrecision());var o=r==null||isNaN(r)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(s,20));return ar(a)?a(r,o):$t(a)?a.replace("{value}",o):o},t.prototype._showDataInfo=function(r){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),s=a.get("show")||!1,o=r||this._dragging?s:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!o),u[1].attr("invisible",!o),l.moveHandle&&this.api[o?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(r,n,i,a){this._dragging=!0,ep(a.event);var s=this._displayables.sliderGroup.getLocalTransform(),o=hh([n,i],s,!0),l=this._updateInterval(r,o[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(r){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,s=(a[0]+a[1])/2,o=this._updateInterval("all",i[0]-s);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Pr(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var s=this._getViewExtent(),o=[0,100];this._range=Nu([Dn(i.x,s,o,!0),Dn(i.x+i.width,s,o,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(ep(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,s=i.brushRect;s||(s=i.brushRect=new _3({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(s)),s.attr("ignore",!1);var o=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),h=l.transformCoordToLocal(o.x,o.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),s.setShape({x:h[0],y:0,width:u[0]-h[0],height:f[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?e_t:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=Sye(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),s=this.api.getHeight();r={x:a*.2,y:s*.2,width:a*.6,height:s*.6}}return r},t.type="dataZoom.slider",t}(RV);function r_t(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function N1e(e){return e==="vertical"?"ns-resize":"ew-resize"}function n_t(e){e.registerComponentModel(jbt),e.registerComponentView(t_t),DV(e)}function i_t(e){En(Xbt),En(n_t)}var O1e={get:function(e,t,r){var n=cr((a_t[e]||{})[t]);return r&&st(n)?n[n.length-1]:n}},a_t={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},B1e=bs.mapVisual,s_t=bs.eachVisual,o_t=st,$1e=ae,l_t=Nu,u_t=Dn,AR=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&t1e(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=Ht(r,this),this.controllerVisuals=zV(this.option.controller,n,r),this.targetVisuals=zV(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=ii(r),n},t.prototype.eachTargetSeries=function(r,n){ae(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,s=a.precision,o=this.dataBound,l=a.formatter,u;i=i||["<",">"],st(r)&&(r=r.slice(),u=!0);var h=n?r:u?[f(r[0]),f(r[1])]:f(r);if($t(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(ar(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===o[0]?i[0]+" "+h[1]:r[1]===o[1]?i[1]+" "+h[0]:h[0]+" - "+h[1];return h;function f(d){return d===o[0]?"min":d===o[1]?"max":(+d).toFixed(Math.min(s,20))}},t.prototype.resetExtent=function(){var r=this.option,n=l_t([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var s=i[a],o=r.getDimensionInfo(s);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),s=n.controller||(n.controller={});Yt(a,i),Yt(s,i);var o=this.isCategory();l.call(this,a),l.call(this,s),u.call(this,a,"inRange","outOfRange"),h.call(this,s);function l(f){o_t(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,d,p){var g=f[d],v=f[p];g&&!v&&(v=f[p]={},$1e(g,function(m,y){if(bs.isValidType(y)){var x=O1e.get(y,"inactive",o);x!=null&&(v[y]=x,y==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function h(f){var d=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,p=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,g=this.get("inactiveColor"),v=this.getItemSymbol(),m=v||"roundRect";$1e(this.stateList,function(y){var x=this.itemSize,b=f[y];b||(b=f[y]={color:o?g:[g]}),b.symbol==null&&(b.symbol=d&&cr(d)||(o?m:[m])),b.symbolSize==null&&(b.symbolSize=p&&cr(p)||(o?x[0]:[x[0],x[0]])),b.symbol=B1e(b.symbol,function(w){return w==="none"?m:w});var _=b.symbolSize;if(_!=null){var T=-1/0;s_t(_,function(w){w>T&&(T=w)}),b.symbolSize=B1e(_,function(w){return u_t(w,[0,T],[0,x[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Nr),F1e=[20,140],c_t=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=F1e[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=F1e[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):st(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),ae(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=Nu((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},t.prototype.getValueState=function(r){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=r)&&(n[1]>=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(o,l){r[0]<=o&&o<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=z1e(this,"outOfRange",this.getExtent()),i=z1e(this,"inRange",this.option.range.slice()),a=[];function s(p,g){a.push({value:p,color:r(p,g)})}for(var o=0,l=0,u=i.length,h=n.length;l<h&&(!i.length||n[l]<=i[0]);l++)n[l]<i[o]&&s(n[l],"outOfRange");for(var f=1;o<u;o++,f=0)f&&a.length&&s(i[o],"outOfRange"),s(i[o],"inRange");for(var f=1;l<h;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&s(a[a.length-1].value,"outOfRange"),f=0),s(n[l],"outOfRange"));var d=a.length;return{stops:a,outerColors:[d?a[0].color:"transparent",d?a[d-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=lg(AR.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(AR);function z1e(e,t,r){if(r[0]===r[1])return r.slice();for(var n=200,i=(r[1]-r[0])/n,a=r[0],s=[],o=0;o<=n&&a<r[1];o++)s.push(a),a+=i;return s.push(r[1]),s}var G1e=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n},t.prototype.render=function(r,n,i,a){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,i,a)},t.prototype.renderBackground=function(r){var n=this.visualMapModel,i=Fm(n.get("padding")||0),a=r.getBoundingRect();r.add(new hn({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(r,n,i){i=i||{};var a=i.forceState,s=this.visualMapModel,o={};if(n==="color"){var l=s.get("contentColor");o.color=l}function u(p){return o[p]}function h(p,g){o[p]=g}var f=s.controllerVisuals[a||s.getValueState(r)],d=bs.prepareVisualTypes(f);return ae(d,function(p){var g=f[p];i.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",g=f.__alphaForOpacity),bs.dependsOn(p,n)&&g&&g.applyVisual(r,u,h)}),o[n]},t.prototype.positionGroup=function(r){var n=this.visualMapModel,i=this.api;XL(r,n.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},t.prototype.doRender=function(r,n,i,a){},t.type="visualMap",t}(Yn),V1e=[["left","right","width"],["top","bottom","height"]];function H1e(e,t,r){var n=e.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},s=n.orient==="horizontal"?1:0,o=V1e[s],l=[0,null,10],u={},h=0;h<3;h++)u[V1e[1-s][h]]=l[h],u[o[h]]=h===2?r[0]:n[o[h]];var f=[["x","width",3],["y","height",0]][s],d=Xi(u,a,n.padding);return o[(d.margin[f[2]]||0)+d[f[0]]+d[f[1]]*.5<a[f[1]]*.5?0:1]}function kR(e,t){return ae(e||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var Mf=Dn,h_t=ae,W1e=Math.min,oH=Math.max,f_t=12,d_t=6,p_t=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return t.prototype.init=function(r,n){e.prototype.init.call(this,r,n),this._hoverLinkFromSeriesMouseOver=Ht(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Ht(this._hideIndicator,this)},t.prototype.doRender=function(r,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var i=r.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(r,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var s=this.visualMapModel,o=s.get("textGap"),l=s.itemSize,u=this._shapes.mainGroup,h=this._applyTransform([l[0]/2,i===0?-o:l[1]+o],u),f=this._applyTransform(i===0?"bottom":"top",u),d=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new on({style:qn(p,{x:h[0],y:h[1],verticalAlign:d==="horizontal"?"middle":f,align:d==="horizontal"?f:"center",text:a})}))}},t.prototype._renderBar=function(r){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,s=this._orient,o=this._useHandle,l=H1e(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),h=new mr;u.add(h),h.add(i.outOfRange=U1e()),h.add(i.inRange=U1e(null,o?Y1e(this._orient):null,Ht(this._dragHandle,this,"all",!1),Ht(this._dragHandle,this,"all",!0))),h.setClipPath(new hn({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),d=oH(f.width,f.height);o&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,d,s),this._createHandle(n,u,1,a,d,s)),this._createIndicator(n,u,a,d,s),r.add(u)},t.prototype._createHandle=function(r,n,i,a,s,o){var l=Ht(this._dragHandle,this,i,!1),u=Ht(this._dragHandle,this,i,!0),h=ah(r.get("handleSize"),a[0]),f=va(r.get("handleIcon"),-h/2,-h/2,h,h,null,!0),d=Y1e(this._orient);f.attr({cursor:d,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){ep(y.event)}}),f.x=a[0]/2,f.useStyle(r.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),Rm(f,!0),n.add(f);var p=this.visualMapModel.textStyleModel,g=new on({cursor:d,draggable:!0,drift:l,onmousemove:function(y){ep(y.event)},ondragend:u,style:qn(p,{x:0,y:0,text:""})});g.ensureState("blur").style={opacity:.1},g.stateTransition={duration:200},this.group.add(g);var v=[h,0],m=this._shapes;m.handleThumbs[i]=f,m.handleLabelPoints[i]=v,m.handleLabels[i]=g},t.prototype._createIndicator=function(r,n,i,a,s){var o=ah(r.get("indicatorSize"),i[0]),l=va(r.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof ms){var h=l.style;l.useStyle(it({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,d=new on({silent:!0,invisible:!0,style:qn(f,{x:0,y:0,text:""})});this.group.add(d);var p=[(s==="horizontal"?a/2:d_t)+i[0]/2,0],g=this._shapes;g.indicator=l,g.indicatorLabel=d,g.indicatorLabelPoint=p,this._firstShowIndicator=!0},t.prototype._dragHandle=function(r,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var s=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(r,s[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():q1e(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},t.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),i=r.getExtent(),a=[0,r.itemSize[1]];this._handleEnds=[Mf(n[0],i,a,!0),Mf(n[1],i,a,!0)]},t.prototype._updateInterval=function(r,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,s=[0,i.itemSize[1]];uy(n,a,s,r,0);var o=i.getExtent();this._dataInterval=[Mf(a[0],s,o,!0),Mf(a[1],s,o,!0)]},t.prototype._updateView=function(r){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,s=[0,n.itemSize[1]],o=r?s:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,o,"inRange"),u=this._createBarVisual(i,i,s,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(o,l)},t.prototype._createBarVisual=function(r,n,i,a){var s={forceState:a,convertOpacityToAlpha:!0},o=this._makeColorGradient(r,s),l=[this.getControllerVisual(r[0],"symbolSize",s),this.getControllerVisual(r[1],"symbolSize",s)],u=this._createBarPoints(i,l);return{barColor:new B2(0,0,0,1,o),barPoints:u,handlesColor:[o[0].color,o[o.length-1].color]}},t.prototype._makeColorGradient=function(r,n){var i=100,a=[],s=(r[1]-r[0])/i;a.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var o=1;o<i;o++){var l=r[0]+s*o;if(l>r[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:o/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new mr(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,s=i.handleThumbs,o=i.handleLabels,l=a.itemSize,u=a.getExtent(),h=this._applyTransform("left",i.mainGroup);h_t([0,1],function(f){var d=s[f];d.setStyle("fill",n.handlesColor[f]),d.y=r[f];var p=Mf(r[f],[0,l[1]],u,!0),g=this.getControllerVisual(p,"symbolSize");d.scaleX=d.scaleY=g/l[0],d.x=l[0]-g/2;var v=hh(i.handleLabelPoints[f],ng(d,this.group));if(this._orient==="horizontal"){var m=h==="left"||h==="top"?(l[0]-g)/2:(l[0]-g)/-2;v[1]+=m}o[f].setStyle({x:v[0],y:v[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var s=this.visualMapModel,o=s.getExtent(),l=s.itemSize,u=[0,l[1]],h=this._shapes,f=h.indicator;if(f){f.attr("invisible",!1);var d={convertOpacityToAlpha:!0},p=this.getControllerVisual(r,"color",d),g=this.getControllerVisual(r,"symbolSize"),v=Mf(r,o,u,!0),m=l[0]-g/2,y={x:f.x,y:f.y};f.y=v,f.x=m;var x=hh(h.indicatorLabelPoint,ng(f,this.group)),b=h.indicatorLabel;b.attr("invisible",!1);var _=this._applyTransform("left",h.mainGroup),T=this._orient,w=T==="horizontal";b.setStyle({text:(i||"")+s.formatValueText(n),verticalAlign:w?_:"middle",align:w?"center":_});var S={x:m,y:v,style:{fill:p}},E={style:{x:x[0],y:x[1]}};if(s.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var A={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(S,A),b.animateTo(E,A)}else f.attr(S),b.attr(E);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var L=0;L<k.length;L++)this.api.enterBlur(k[L])}},t.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=W1e(oH(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var s=[0,a[1]],o=i.getExtent();r=W1e(oH(s[0],r),s[1]);var l=g_t(i,o,s),u=[r-l,r+l],h=Mf(r,s,o,!0),f=[Mf(u[0],s,o,!0),Mf(u[1],s,o,!0)];u[0]<s[0]&&(f[0]=-1/0),u[1]>s[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(h,f[1],"< ",l):f[1]===1/0?this._showIndicator(h,f[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var d=this._hoverLinkDataIndices,p=[];(n||q1e(i))&&(p=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var g=Bst(d,p);this._dispatchHighDown("downplay",kR(g[0],i)),this._dispatchHighDown("highlight",kR(g[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Km(r.target,function(l){var u=xr(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var s=i.getData(n.dataType),o=s.getStore().get(a.getDataDimensionIndex(s),n.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this.api.leaveBlur(n[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",kR(r,this.visualMapModel)),r.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(r,n,i,a){var s=ng(n,a?null:this.group);return st(r)?hh(r,s,i):RL(r,s,i)},t.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(G1e);function U1e(e,t,r,n){return new Fo({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(i){ep(i.event)},ondragend:n})}function g_t(e,t,r){var n=f_t/2,i=e.get("hoverLinkDataSize");return i&&(n=Mf(i,t,r,!0)/2),n}function q1e(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function Y1e(e){return e==="vertical"?"ns-resize":"ew-resize"}var v_t={type:"selectDataRange",event:"dataRangeSelected",update:"update"},m_t=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(r){r.setSelected(e.selected)})},y_t=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",function(n){var i=e.pipelineContext;!n.isTargetSeries(e)||i&&i.large||r.push(z2t(n.stateList,n.targetVisuals,Ht(n.getValueState,n),n.getDataDimensionIndex(e.getData())))}),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(e)){var a=i.getVisualMeta(Ht(x_t,null,e,i))||{stops:[],outerColors:[]},s=i.getDataDimensionIndex(r);s>=0&&(a.dimension=s,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function x_t(e,t,r,n){for(var i=t.targetVisuals[n],a=bs.prepareVisualTypes(i),s={color:GC(e.getData(),"color")},o=0,l=a.length;o<l;o++){var u=a[o],h=i[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(r,f,d)}return s.color;function f(p){return s[p]}function d(p,g){s[p]=g}}var X1e=ae;function b_t(e){var t=e&&e.visualMap;st(t)||(t=t?[t]:[]),X1e(t,function(r){if(r){Db(r,"splitList")&&!Db(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&st(n)&&X1e(n,function(i){lr(i)&&(Db(i,"start")&&!Db(i,"min")&&(i.min=i.start),Db(i,"end")&&!Db(i,"max")&&(i.max=i.end))})}})}function Db(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var j1e=!1;function K1e(e){j1e||(j1e=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(v_t,m_t),ae(y_t,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(b_t))}function __t(e){e.registerComponentModel(c_t),e.registerComponentView(p_t),K1e(e)}var T_t=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],w_t[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(s,o){i==="categories"?(s.mappingMethod="category",s.categories=cr(a)):(s.dataExtent=this.getExtent(),s.mappingMethod="piecewise",s.pieceList=ct(this._pieceList,function(l){return l=cr(l),o!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=bs.listVisualTypes(),a=this.isCategory();ae(r.pieces,function(o){ae(i,function(l){o.hasOwnProperty(l)&&(n[l]=1)})}),ae(n,function(o,l){var u=!1;ae(this.stateList,function(h){u=u||s(r,h,l)||s(r.target,h,l)},this),!u&&ae(this.stateList,function(h){(r[h]||(r[h]={}))[l]=O1e.get(l,h==="inRange"?"active":"inactive",a)})},this);function s(o,l,u){return o&&o[l]&&o[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,s=(n?i:r).selected||{};if(i.selected=s,ae(a,function(l,u){var h=this.getSelectedMapKey(l);s.hasOwnProperty(h)||(s[h]=!0)},this),i.selectedMode==="single"){var o=!1;ae(a,function(l,u){var h=this.getSelectedMapKey(l);s[h]&&(o?s[h]=!1:o=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=cr(r)},t.prototype.getValueState=function(r){var n=bs.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var s=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(l,u){var h=bs.findPieceIndex(l,i);h===r&&s.push(u)},this),n.push({seriesId:a.id,dataIndex:s})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function s(h,f){var d=a.getRepresentValue({interval:h});f||(f=a.getValueState(d));var p=r(d,f);h[0]===-1/0?i[0]=p:h[1]===1/0?i[1]=p:n.push({value:h[0],color:p},{value:h[1],color:p})}var o=this._pieceList.slice();if(!o.length)o.push({interval:[-1/0,1/0]});else{var l=o[0].interval[0];l!==-1/0&&o.unshift({interval:[-1/0,l]}),l=o[o.length-1].interval[1],l!==1/0&&o.push({interval:[l,1/0]})}var u=-1/0;return ae(o,function(h){var f=h.interval;f&&(f[0]>u&&s([u,f[0]],"outOfRange"),s(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=lg(AR.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(AR),w_t={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var s=0,o=n[0];s<i;o+=a,s++){var l=s===i-1?n[1]:o+a;e.push({interval:[o,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),n$(e),ae(e,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(e){var t=this.option;ae(t.categories,function(r){e.push({text:this.formatValueText(r,!0),value:r})},this),Z1e(t,e)},pieces:function(e){var t=this.option;ae(t.pieces,function(r,n){lr(r)||(r={value:r});var i={text:"",index:n};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var a=i.value=r.value;i.interval=[a,a],i.close=[1,1]}else{for(var s=i.interval=[],o=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],h=[],f=0;f<2;f++){for(var d=[["gte","gt","min"],["lte","lt","max"]][f],p=0;p<3&&s[f]==null;p++)s[f]=r[d[p]],o[f]=l[p],h[f]=p===2;s[f]==null&&(s[f]=u[f])}h[0]&&s[1]===1/0&&(o[0]=0),h[1]&&s[0]===-1/0&&(o[1]=0),s[0]===s[1]&&o[0]&&o[1]&&(i.value=s[0])}i.visual=bs.retrieveVisuals(r),e.push(i)},this),Z1e(t,e),n$(e),ae(e,function(r){var n=r.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function Z1e(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var S_t=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,s=a.getFont(),o=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,h=this._getViewData(),f=h.endsText,d=gs(n.get("showLabel",!0),!f),p=!n.get("selectedMode");f&&this._renderEndsText(r,f[0],u,d,l),ae(h.viewPieceList,function(g){var v=g.piece,m=new mr;m.onclick=Ht(this._onItemClick,this,v),this._enableHoverLink(m,g.indexInModelPieceList);var y=n.getRepresentValue(v);if(this._createItemSymbol(m,y,[0,0,u[0],u[1]],p),d){var x=this.visualMapModel.getValueState(y);m.add(new on({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:v.text,verticalAlign:"middle",align:l,font:s,fill:o,opacity:x==="outOfRange"?.5:1},silent:p}))}r.add(m)},this),f&&this._renderEndsText(r,f[1],u,d,l),Vm(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(s){var o=i.visualMapModel;o.option.hoverLink&&i.api.dispatchAction({type:s,batch:kR(o.findTargetDataIndices(n),o)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return H1e(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,s){if(n){var o=new mr,l=this.visualMapModel.textStyleModel;o.add(new on({style:qn(l,{x:a?s==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?s:"center",text:n})})),r.add(o)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=ct(r.getPieceList(),function(o,l){return{piece:o,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),s=r.get("inverse");return(a==="horizontal"?s:!s)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i,a){var s=va(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));s.silent=a,r.add(s)},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var s=cr(i.selected),o=n.getSelectedMapKey(r);a==="single"||a===!0?(s[o]=!0,ae(s,function(l,u){s[u]=u===o})):s[o]=!s[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:s})}},t.type="visualMap.piecewise",t}(G1e);function C_t(e){e.registerComponentModel(T_t),e.registerComponentView(S_t),K1e(e)}function E_t(e){En(__t),En(C_t)}var A_t={label:{enabled:!0},decal:{show:!1}},Q1e=mn(),k_t={};function L_t(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=cr(A_t);Yt(n.label,e.getLocaleModel().get("aria"),!1),Yt(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),h=u.get("show");if(h){var f=Qt();e.eachSeries(function(d){if(!d.isColorBySeries()){var p=f.get(d.type);p||(p={},f.set(d.type,p)),Q1e(d).scope=p}}),e.eachRawSeries(function(d){if(e.isSeriesFiltered(d))return;if(ar(d.enableAriaDecal)){d.enableAriaDecal();return}var p=d.getData();if(d.isColorBySeries()){var x=hF(d.ecModel,d.name,k_t,e.getSeriesCount()),b=p.getVisual("decal");p.setVisual("decal",_(b,x))}else{var g=d.getRawData(),v={},m=Q1e(d).scope;p.each(function(T){var w=p.getRawIndex(T);v[w]=T});var y=g.count();g.each(function(T){var w=v[T],S=g.getName(T)||T+"",E=hF(d.ecModel,S,m,y),A=p.getItemVisual(w,"decal");p.setItemVisual(w,"decal",_(A,E))})}function _(T,w){var S=T?it(it({},w),T):w;return S.dirty=!0,S}})}}function a(){var u=t.getZr().dom;if(u){var h=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=tr(f.option,h),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var d=e.getSeriesCount(),p=f.get(["data","maxCount"])||10,g=f.get(["series","maxCount"])||10,v=Math.min(d,g),m;if(!(d<1)){var y=o();if(y){var x=f.get(["general","withTitle"]);m=s(x,{title:y})}else m=f.get(["general","withoutTitle"]);var b=[],_=d>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=s(_,{seriesCount:d}),e.eachSeries(function(E,A){if(A<v){var k=void 0,L=E.get("name"),I=L?"withName":"withoutName";k=d>1?f.get(["series","multiple",I]):f.get(["series","single",I]),k=s(k,{seriesId:E.seriesIndex,seriesName:E.get("name"),seriesType:l(E.subType)});var D=E.getData();if(D.count()>p){var R=f.get(["data","partialData"]);k+=s(R,{displayCnt:p})}else k+=f.get(["data","allData"]);for(var M=f.get(["data","separator","middle"]),O=f.get(["data","separator","end"]),B=f.get(["data","excludeDimensionId"]),P=[],$=0;$<D.count();$++)if($<p){var F=D.getName($),G=B?Rn(D.getValues($),function(V,H){return Ir(B,H)===-1}):D.getValues($),z=f.get(["data",F?"withName":"withoutName"]);P.push(s(z,{name:F,value:G.join(M)}))}k+=P.join(M)+O,b.push(k)}});var T=f.getModel(["series","multiple","separator"]),w=T.get("middle"),S=T.get("end");m+=b.join(w)+S,u.setAttribute("aria-label",m)}}}}function s(u,h){if(!$t(u))return u;var f=u;return ae(h,function(d,p){f=f.replace(new RegExp("\\{\\s*"+p+"\\s*\\}","g"),d)}),f}function o(){var u=e.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var h=e.getLocaleModel().get(["series","typeNames"]);return h[u]||h.chart}}function R_t(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},ae(["description","general","series","data"],function(r){t[r]!=null&&(t.label[r]=t[r])})}}function D_t(e){e.registerPreprocessor(R_t),e.registerVisual(e.PRIORITY.VISUAL.ARIA,L_t)}var J1e={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},M_t=function(){function e(t){var r=this._condVal=$t(t)?new RegExp(t):mle(t)?t:null;if(r==null){var n="";Bn(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return $t(r)?this._condVal.test(t):_n(r)?this._condVal.test(t+""):!1},e}(),I_t=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),P_t=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(!t[r].evaluate())return!1;return!0},e}(),N_t=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(t[r].evaluate())return!0;return!1},e}(),O_t=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),B_t=function(){function e(){}return e.prototype.evaluate=function(){for(var t=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=t?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?i:n))return!1;return!0},e}();function lH(e,t){if(e===!0||e===!1){var r=new I_t;return r.value=e,r}var n="";return txe(e)||Bn(n),e.and?exe("and",e,t):e.or?exe("or",e,t):e.not?$_t(e,t):F_t(e,t)}function exe(e,t,r){var n=t[e],i="";st(n)||Bn(i),n.length||Bn(i);var a=e==="and"?new P_t:new N_t;return a.children=ct(n,function(s){return lH(s,r)}),a.children.length||Bn(i),a}function $_t(e,t){var r=e.not,n="";txe(r)||Bn(n);var i=new O_t;return i.child=lH(r,t),i.child||Bn(n),i}function F_t(e,t){for(var r="",n=t.prepareGetValue(e),i=[],a=ln(e),s=e.parser,o=s?ihe(s):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var h=Xt(J1e,u)?J1e[u]:u,f=e[u],d=o?o(f):f,p=tlt(h,d)||h==="reg"&&new M_t(d);p||Bn(r),i.push(p)}}i.length||Bn(r);var g=new B_t;return g.valueGetterParam=n,g.valueParser=o,g.getValue=t.getValue,g.subCondList=i,g}function txe(e){return lr(e)&&!po(e)}var z_t=function(){function e(t,r){this._cond=lH(t,r)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function G_t(e,t){return new z_t(e,t)}var V_t={type:"echarts:filter",transform:function(e){for(var t=e.upstream,r,n=G_t(e.config,{valueGetterAttrMap:Qt({dimension:!0}),prepareGetValue:function(o){var l="",u=o.dimension;Xt(o,"dimension")||Bn(l);var h=t.getDimensionInfo(u);return h||Bn(l),{dimIdx:h.index}},getValue:function(o){return t.retrieveValueFromItem(r,o.dimIdx)}}),i=[],a=0,s=t.count();a<s;a++)r=t.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},H_t={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,n="",i=ii(r);i.length||Bn(n);var a=[];ae(i,function(h){var f=h.dimension,d=h.order,p=h.parser,g=h.incomparable;if(f==null&&Bn(n),d!=="asc"&&d!=="desc"&&Bn(n),g&&g!=="min"&&g!=="max"){var v="";Bn(v)}if(d!=="asc"&&d!=="desc"){var m="";Bn(m)}var y=t.getDimensionInfo(f);y||Bn(n);var x=p?ihe(p):null;p&&!x&&Bn(n),a.push({dimIdx:y.index,parser:x,comparator:new she(d,g)})});var s=t.sourceFormat;s!==Go&&s!==dc&&Bn(n);for(var o=[],l=0,u=t.count();l<u;l++)o.push(t.getRawDataItem(l));return o.sort(function(h,f){for(var d=0;d<a.length;d++){var p=a[d],g=t.retrieveValueFromItem(h,p.dimIdx),v=t.retrieveValueFromItem(f,p.dimIdx);p.parser&&(g=p.parser(g),v=p.parser(v));var m=p.comparator.evaluate(g,v);if(m!==0)return m}return 0}),{data:o}}};function rxe(e){e.registerTransform(V_t),e.registerTransform(H_t)}var W_t=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new Hhe(this),Whe(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),Whe(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Cf},t}(Nr),U_t=function(e){Ye(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(Yn);function uH(e){e.registerComponentModel(W_t),e.registerComponentView(U_t)}function nxe(e){return Ef(null,e)}var LR={isDimensionStacked:Jd,enableDataStack:yhe,getStackedDimension:Y$};function RR(e,t){var r=t;t instanceof yn||(r=new yn(t));var n=XC(r);return n.setExtent(e[0],e[1]),ty(n,r),n}function ixe(e){pa(e,gb)}function q_t(e,t){return t=t||{},qn(e,null,null,t.state!=="normal")}const Y_t=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Y2,createList:nxe,createScale:RR,createSymbol:va,createTextStyle:q_t,dataStack:LR,enableHoverEmphasis:tg,getECData:xr,getLayoutRect:Xi,mixinAxisModelCommonMethods:ixe},Symbol.toStringTag,{value:"Module"})),X_t=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:e$,asc:Nu,getPercentWithPrecision:Sst,getPixelPrecision:JB,getPrecision:lh,getPrecisionSafe:hL,isNumeric:i$,isRadianAroundZero:L2,linearMap:Dn,nice:r$,numericToNumber:_f,parseDate:nu,quantile:dL,quantity:Due,quantityExponent:fL,reformIntervals:n$,remRadian:t$,round:wi},Symbol.toStringTag,{value:"Module"})),j_t=Object.freeze(Object.defineProperty({__proto__:null,format:xC,parse:nu},Symbol.toStringTag,{value:"Module"})),K_t=Object.freeze(Object.defineProperty({__proto__:null,Arc:oC,BezierCurve:O2,BoundingRect:Mr,Circle:Tf,CompoundPath:TL,Ellipse:iC,Group:mr,Image:ms,IncrementalDisplayable:bce,Line:ts,LinearGradient:B2,Polygon:Fo,Polyline:zo,RadialGradient:w$,Rect:hn,Ring:N2,Sector:$o,Text:on,clipPointsByRect:k$,clipRectByRect:Ace,createIcon:G2,extendPath:Sce,extendShape:wce,getShapeClass:kL,getTransform:ng,initProps:Si,makeImage:E$,makePath:uC,mergePath:Ou,registerShape:hc,resizePath:A$,updateProps:Sn},Symbol.toStringTag,{value:"Module"})),Z_t=Object.freeze(Object.defineProperty({__proto__:null,addCommas:_C,capitalFirst:Glt,encodeHTML:wa,formatTime:Nhe,formatTpl:UL,getTextRect:Flt,getTooltipMarker:lF,normalizeCssArray:Fm,toCamelCase:aF,truncateText:nat},Symbol.toStringTag,{value:"Module"})),Q_t=Object.freeze(Object.defineProperty({__proto__:null,bind:Ht,clone:cr,curry:Cr,defaults:tr,each:ae,extend:it,filter:Rn,indexOf:Ir,inherits:TS,isArray:st,isFunction:ar,isObject:lr,isString:$t,map:ct,merge:Yt,reduce:Du},Symbol.toStringTag,{value:"Module"}));function J_t(e){var t=Nr.extend(e);return Nr.registerClass(t),t}function eTt(e){var t=Yn.extend(e);return Yn.registerClass(t),t}function tTt(e){var t=gn.extend(e);return gn.registerClass(t),t}function rTt(e){var t=fn.extend(e);return fn.registerClass(t),t}function nTt(e){if(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].slice());return t}}function iTt(e,t){var r=e.label,n=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:nTt(n&&n.shape.points)}}var axe=["align","verticalAlign","width","height","fontSize"],vl=new Wd,cH=mn(),aTt=mn();function DR(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];t[i]!=null&&(e[i]=t[i])}}var MR=["x","y","rotation"],sTt=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(t,r,n,i,a){var s=i.style,o=i.__hostTarget,l=o.textConfig||{},u=i.getComputedTransform(),h=i.getBoundingRect().plain();Mr.applyTransform(h,h,u),u?vl.setLocalTransform(u):(vl.x=vl.y=vl.rotation=vl.originX=vl.originY=0,vl.scaleX=vl.scaleY=1),vl.rotation=Pu(vl.rotation);var f=i.__hostTarget,d;if(f){d=f.getBoundingRect().plain();var p=f.getComputedTransform();Mr.applyTransform(d,d,p)}var g=d&&f.getTextGuideLine();this._labelList.push({label:i,labelLine:g,seriesModel:n,dataIndex:t,dataType:r,layoutOption:a,computedLayoutOption:null,rect:h,hostRect:d,priority:d?d.width*d.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:g&&g.ignore,x:vl.x,y:vl.y,scaleX:vl.scaleX,scaleY:vl.scaleY,rotation:vl.rotation,style:{x:s.x,y:s.y,align:s.align,verticalAlign:s.verticalAlign,width:s.width,height:s.height,fontSize:s.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},e.prototype.addLabelsOfSeries=function(t){var r=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");(ar(i)||ln(i).length)&&t.group.traverse(function(a){if(a.ignore)return!0;var s=a.getTextContent(),o=xr(a);s&&!s.disableLabelLayout&&r._addLabel(o.dataIndex,o.dataType,n,s,i)})},e.prototype.updateLayoutConfig=function(t){var r=t.getWidth(),n=t.getHeight();function i(b,_){return function(){Qfe(b,_)}}for(var a=0;a<this._labelList.length;a++){var s=this._labelList[a],o=s.label,l=o.__hostTarget,u=s.defaultAttr,h=void 0;ar(s.layoutOption)?h=s.layoutOption(iTt(s,l)):h=s.layoutOption,h=h||{},s.computedLayoutOption=h;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:h.x!=null||h.y!=null?null:u.attachedPos,rotation:h.rotate!=null?h.rotate*f:u.attachedRot,offset:[h.dx||0,h.dy||0]});var d=!1;if(h.x!=null?(o.x=Pt(h.x,r),o.setStyle("x",0),d=!0):(o.x=u.x,o.setStyle("x",u.style.x)),h.y!=null?(o.y=Pt(h.y,n),o.setStyle("y",0),d=!0):(o.y=u.y,o.setStyle("y",u.style.y)),h.labelLinePoints){var p=l.getTextGuideLine();p&&(p.setShape({points:h.labelLinePoints}),d=!1)}var g=cH(o);g.needsUpdateLabelLine=d,o.rotation=h.rotate!=null?h.rotate*f:u.rotation,o.scaleX=u.scaleX,o.scaleY=u.scaleY;for(var v=0;v<axe.length;v++){var m=axe[v];o.setStyle(m,h[m]!=null?h[m]:u.style[m])}if(h.draggable){if(o.draggable=!0,o.cursor="move",l){var y=s.seriesModel;if(s.dataIndex!=null){var x=s.seriesModel.getData(s.dataType);y=x.getItemModel(s.dataIndex)}o.on("drag",i(l,y.getModel("labelLine")))}}else o.off("drag"),o.cursor=u.cursor}},e.prototype.layout=function(t){var r=t.getWidth(),n=t.getHeight(),i=ede(this._labelList),a=Rn(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),s=Rn(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});Ect(a,0,r),rde(s,0,n);var o=Rn(i,function(l){return l.layoutOption.hideOverlap});nde(o)},e.prototype.processLabelsOverall=function(){var t=this;ae(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(s){if(s.ignore&&!s.forceLabelAnimation)return!0;var o=!i,l=s.getTextContent();!o&&l&&(o=cH(l).needsUpdateLabelLine),o&&t._updateLabelLine(s,n),a&&t._animateLabels(s,n)})})},e.prototype._updateLabelLine=function(t,r){var n=t.getTextContent(),i=xr(t),a=i.dataIndex;if(n&&a!=null){var s=r.getData(i.dataType),o=s.getItemModel(a),l={},u=s.getItemVisual(a,"style");if(u){var h=s.getVisual("drawType");l.stroke=u[h]}var f=o.getModel("labelLine");CF(t,EF(o),l),Qfe(t,f)}},e.prototype._animateLabels=function(t,r){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!F2(t))){var a=cH(n),s=a.oldLayout,o=xr(t),l=o.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},h=r.getData(o.dataType);if(s){n.attr(s);var d=t.prevStates;d&&(Ir(d,"select")>=0&&n.attr(a.oldLayoutSelect),Ir(d,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Sn(n,u,r,l)}else if(n.attr(u),!V2(n).valueAnimation){var f=Er(n.style.opacity,1);n.style.opacity=0,Si(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var p=a.oldLayoutSelect={};DR(p,u,MR),DR(p,n.states.select,MR)}if(n.states.emphasis){var g=a.oldLayoutEmphasis={};DR(g,u,MR),DR(g,n.states.emphasis,MR)}Oce(n,l,h,r,r)}if(i&&!i.ignore&&!i.invisible){var a=aTt(i),s=a.oldLayout,v={points:i.shape.points};s?(i.attr({shape:s}),Sn(i,{shape:v},r)):(i.setShape(v),i.style.strokePercent=0,Si(i,{style:{strokePercent:1}},r)),a.oldLayout=v}},e}(),hH=mn();function sxe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=hH(r).labelManager;i||(i=hH(r).labelManager=new sTt),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=hH(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var If=bf.CMD;function Mb(e,t){return Math.abs(e-t)<1e-5}function fH(e){var t=e.data,r=e.len(),n=[],i,a=0,s=0,o=0,l=0;function u(D,R){i&&i.length>2&&n.push(i),i=[D,R]}function h(D,R,M,O){Mb(D,M)&&Mb(R,O)||i.push(D,R,M,O,M,O)}function f(D,R,M,O,B,P){var $=Math.abs(R-D),F=Math.tan($/4)*4/3,G=R<D?-1:1,z=Math.cos(D),V=Math.sin(D),H=Math.cos(R),W=Math.sin(R),j=z*B+M,q=V*P+O,ie=H*B+M,X=W*P+O,te=B*F*G,K=P*F*G;i.push(j-te*V,q+K*z,ie+te*W,X-K*H,ie,X)}for(var d,p,g,v,m=0;m<r;){var y=t[m++],x=m===1;switch(x&&(a=t[m],s=t[m+1],o=a,l=s,(y===If.L||y===If.C||y===If.Q)&&(i=[o,l])),y){case If.M:a=o=t[m++],s=l=t[m++],u(o,l);break;case If.L:d=t[m++],p=t[m++],h(a,s,d,p),a=d,s=p;break;case If.C:i.push(t[m++],t[m++],t[m++],t[m++],a=t[m++],s=t[m++]);break;case If.Q:d=t[m++],p=t[m++],g=t[m++],v=t[m++],i.push(a+2/3*(d-a),s+2/3*(p-s),g+2/3*(d-g),v+2/3*(p-v),g,v),a=g,s=v;break;case If.A:var b=t[m++],_=t[m++],T=t[m++],w=t[m++],S=t[m++],E=t[m++]+S;m+=1;var A=!t[m++];d=Math.cos(S)*T+b,p=Math.sin(S)*w+_,x?(o=d,l=p,u(o,l)):h(a,s,d,p),a=Math.cos(E)*T+b,s=Math.sin(E)*w+_;for(var k=(A?-1:1)*Math.PI/2,L=S;A?L>E:L<E;L+=k){var I=A?Math.max(L+k,E):Math.min(L+k,E);f(L,I,b,_,T,w)}break;case If.R:o=a=t[m++],l=s=t[m++],d=o+t[m++],p=l+t[m++],u(d,l),h(d,l,d,p),h(d,p,o,p),h(o,p,o,l),h(o,l,d,l);break;case If.Z:i&&h(a,s,o,l),a=o,s=l;break}}return i&&i.length>2&&n.push(i),n}function dH(e,t,r,n,i,a,s,o,l,u){if(Mb(e,r)&&Mb(t,n)&&Mb(i,s)&&Mb(a,o)){l.push(s,o);return}var h=2/u,f=h*h,d=s-e,p=o-t,g=Math.sqrt(d*d+p*p);d/=g,p/=g;var v=r-e,m=n-t,y=i-s,x=a-o,b=v*v+m*m,_=y*y+x*x;if(b<f&&_<f){l.push(s,o);return}var T=d*v+p*m,w=-d*y-p*x,S=b-T*T,E=_-w*w;if(S<f&&T>=0&&E<f&&w>=0){l.push(s,o);return}var A=[],k=[];j0(e,r,i,s,.5,A),j0(t,n,a,o,.5,k),dH(A[0],k[0],A[1],k[1],A[2],k[2],A[3],k[3],l,u),dH(A[4],k[4],A[5],k[5],A[6],k[6],A[7],k[7],l,u)}function oTt(e,t){var r=fH(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],s=[],o=a[0],l=a[1];s.push(o,l);for(var u=2;u<a.length;){var h=a[u++],f=a[u++],d=a[u++],p=a[u++],g=a[u++],v=a[u++];dH(o,l,h,f,d,p,g,v,s,t),o=g,l=v}n.push(s)}return n}function oxe(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),s=Math.ceil(Math.sqrt(a*r)),o=Math.floor(r/s);o===0&&(o=1,s=r);for(var l=[],u=0;u<s;u++)l.push(o);var h=s*o,f=r-h;if(f>0)for(var u=0;u<f;u++)l[u%s]+=1;return l}function lxe(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,s=e.endAngle,o=Math.abs(s-a),l=o*i,u=i-n,h=l>Math.abs(u),f=oxe([l,u],h?0:1,t),d=(h?o:u)/f.length,p=0;p<f.length;p++)for(var g=(h?u:o)/f[p],v=0;v<f[p];v++){var m={};h?(m.startAngle=a+d*p,m.endAngle=a+d*(p+1),m.r0=n+g*v,m.r=n+g*(v+1)):(m.startAngle=a+g*v,m.endAngle=a+g*(v+1),m.r0=n+d*p,m.r=n+d*(p+1)),m.clockwise=e.clockwise,m.cx=e.cx,m.cy=e.cy,r.push(m)}}function lTt(e,t,r){for(var n=e.width,i=e.height,a=n>i,s=oxe([n,i],a?0:1,t),o=a?"width":"height",l=a?"height":"width",u=a?"x":"y",h=a?"y":"x",f=e[o]/s.length,d=0;d<s.length;d++)for(var p=e[l]/s[d],g=0;g<s[d];g++){var v={};v[u]=d*f,v[h]=g*p,v[o]=f,v[l]=p,v.x+=e.x,v.y+=e.y,r.push(v)}}function uxe(e,t,r,n){return e*n-r*t}function uTt(e,t,r,n,i,a,s,o){var l=r-e,u=n-t,h=s-i,f=o-a,d=uxe(h,f,l,u);if(Math.abs(d)<1e-6)return null;var p=e-i,g=t-a,v=uxe(p,g,h,f)/d;return v<0||v>1?null:new Pr(v*l+e,v*u+t)}function cTt(e,t,r){var n=new Pr;Pr.sub(n,r,t),n.normalize();var i=new Pr;Pr.sub(i,e,t);var a=i.dot(n);return a}function Ib(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function hTt(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var s=e[a],o=e[(a+1)%n],l=uTt(s[0],s[1],o[0],o[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:cTt(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(m,y){return m.projPt-y.projPt});var u=i[0],h=i[i.length-1];if(h.idx<u.idx){var f=u;u=h,h=f}for(var d=[u.pt.x,u.pt.y],p=[h.pt.x,h.pt.y],g=[d],v=[p],a=u.idx+1;a<=h.idx;a++)Ib(g,e[a].slice());Ib(g,p),Ib(g,d);for(var a=h.idx+1;a<=u.idx+n;a++)Ib(v,e[a%n].slice());return Ib(v,d),Ib(v,p),[{points:g},{points:v}]}function cxe(e){var t=e.points,r=[],n=[];uL(t,r,n);var i=new Mr(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,s=i.height,o=i.x,l=i.y,u=new Pr,h=new Pr;return a>s?(u.x=h.x=o+a/2,u.y=l,h.y=l+s):(u.y=h.y=l+s/2,u.x=o,h.x=o+a),hTt(t,u,h)}function IR(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);IR(e,a[0],i,n),IR(e,a[1],r-i,n)}return n}function fTt(e,t){for(var r=[],n=0;n<t;n++)r.push(_$(e));return r}function dTt(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function pTt(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function gTt(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":lTt(n,t,r),i=hn;break;case"sector":lxe(n,t,r),i=$o;break;case"circle":lxe({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=$o;break;default:var a=e.getComputedTransform(),s=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,o=ct(oTt(e.getUpdatedPathProxy(),s),function(y){return pTt(y)}),l=o.length;if(l===0)IR(cxe,{points:o[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:o[u]});else{var h=0,f=ct(o,function(y){var x=[],b=[];uL(y,x,b);var _=(b[1]-x[1])*(b[0]-x[0]);return h+=_,{poly:y,area:_}});f.sort(function(y,x){return x.area-y.area});for(var d=t,u=0;u<l;u++){var p=f[u];if(d<=0)break;var g=u===l-1?d:Math.ceil(p.area/h*t);g<0||(IR(cxe,{points:p.poly},g,r),d-=g)}}i=Fo;break}if(!i)return fTt(e,t);for(var v=[],u=0;u<r.length;u++){var m=new i;m.setShape(r[u]),dTt(e,m),v.push(m)}return v}function vTt(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],s=r<n?e:t,o=Math.min(r,n),l=Math.abs(n-r)/6,u=(o-2)/6,h=Math.ceil(l/u)+1,f=[s[0],s[1]],d=l,p=2;p<o;){var g=s[p-2],v=s[p-1],m=s[p++],y=s[p++],x=s[p++],b=s[p++],_=s[p++],T=s[p++];if(d<=0){f.push(m,y,x,b,_,T);continue}for(var w=Math.min(d,h-1)+1,S=1;S<=w;S++){var E=S/w;j0(g,m,x,_,E,i),j0(v,y,b,T,E,a),g=i[3],v=a[3],f.push(i[1],a[1],i[2],a[2],g,v),m=i[5],y=a[5],x=i[6],b=a[6]}d-=w-1}return s===e?[f,t]:[e,f]}function hxe(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],s=0;s<t.length;)a[s++]=n,a[s++]=i;return a}function mTt(e,t){for(var r,n,i,a=[],s=[],o=0;o<Math.max(e.length,t.length);o++){var l=e[o],u=t[o],h=void 0,f=void 0;l?u?(r=vTt(l,u),h=r[0],f=r[1],n=h,i=f):(f=hxe(i||l,l),h=l):(h=hxe(n||u,u),f=u),a.push(h),s.push(f)}return[a,s]}function fxe(e){for(var t=0,r=0,n=0,i=e.length,a=0,s=i-2;a<i;s=a,a+=2){var o=e[s],l=e[s+1],u=e[a],h=e[a+1],f=o*h-u*l;t+=f,r+=(o+u)*f,n+=(l+h)*f}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function yTt(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,s=0,o=e.length,l=o-2,u=0;u<i;u++){for(var h=u*6,f=0,d=0;d<o;d+=2){var p=d===0?h:(h+d-2)%l+2,g=e[p]-r[0],v=e[p+1]-r[1],m=t[d]-n[0],y=t[d+1]-n[1],x=m-g,b=y-v;f+=x*x+b*b}f<a&&(a=f,s=u)}return s}function xTt(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function bTt(e,t,r,n){for(var i=[],a,s=0;s<e.length;s++){var o=e[s],l=t[s],u=fxe(o),h=fxe(l);a==null&&(a=u[2]<0!=h[2]<0);var f=[],d=[],p=0,g=1/0,v=[],m=o.length;a&&(o=xTt(o));for(var y=yTt(o,l,u,h)*6,x=m-2,b=0;b<x;b+=2){var _=(y+b)%x+2;f[b+2]=o[_]-u[0],f[b+3]=o[_+1]-u[1]}f[0]=o[y]-u[0],f[1]=o[y+1]-u[1];for(var T=n/r,w=-n/2;w<=n/2;w+=T){for(var S=Math.sin(w),E=Math.cos(w),A=0,b=0;b<o.length;b+=2){var k=f[b],L=f[b+1],I=l[b]-h[0],D=l[b+1]-h[1],R=I*E-D*S,M=I*S+D*E;v[b]=R,v[b+1]=M;var O=R-k,B=M-L;A+=O*O+B*B}if(A<g){g=A,p=w;for(var P=0;P<v.length;P++)d[P]=v[P]}}i.push({from:f,to:d,fromCp:u,toCp:h,rotation:-p})}return i}function PR(e){return e.__isCombineMorphing}var dxe="__mOriginal_";function NR(e,t,r){var n=dxe+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,s=r.after,o=r.before;e[t]=function(){var l=arguments,u;return o&&o.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),s&&s.apply(this,l),u}}function w3(e,t){var r=dxe+t;e[r]&&(e[t]=e[r],e[r]=null)}function pxe(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],s=n[i+1];n[i++]=t[0]*a+t[2]*s+t[4],n[i++]=t[1]*a+t[3]*s+t[5]}}function gxe(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=mTt(fH(r),fH(n)),a=i[0],s=i[1],o=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}o&&pxe(a,o),l&&pxe(s,l),NR(t,"updateTransform",{replace:u}),t.transform=null;var h=bTt(a,s,10,Math.PI),f=[];NR(t,"buildPath",{replace:function(d){for(var p=t.__morphT,g=1-p,v=[],m=0;m<h.length;m++){var y=h[m],x=y.from,b=y.to,_=y.rotation*p,T=y.fromCp,w=y.toCp,S=Math.sin(_),E=Math.cos(_);PS(v,T,w,p);for(var A=0;A<x.length;A+=2){var k=x[A],L=x[A+1],I=b[A],D=b[A+1],R=k*g+I*p,M=L*g+D*p;f[A]=R*E-M*S+v[0],f[A+1]=R*S+M*E+v[1]}var O=f[0],B=f[1];d.moveTo(O,B);for(var A=2;A<x.length;){var I=f[A++],D=f[A++],P=f[A++],$=f[A++],F=f[A++],G=f[A++];O===I&&B===D&&P===F&&$===G?d.lineTo(F,G):d.bezierCurveTo(I,D,P,$,F,G),O=F,B=G}}}})}function pH(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;gxe(e,t),t.__morphT=0;function a(){w3(t,"buildPath"),w3(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},tr({during:function(s){t.dirtyShape(),i&&i(s)},done:function(){a(),n&&n()}},r)),t}function _Tt(e,t,r,n,i,a){var s=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var o=0,l,u=(1<<s)/2;u>0;u/=2){var h=0,f=0;(e&u)>0&&(h=1),(t&u)>0&&(f=1),o+=u*u*(3*h^f),f===0&&(h===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return o}function OR(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=ct(e,function(o){var l=o.getBoundingRect(),u=o.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(h,t),r=Math.min(f,r),n=Math.max(h,n),i=Math.max(f,i),[h,f]}),s=ct(a,function(o,l){return{cp:o,z:_Tt(o[0],o[1],t,r,n,i),path:e[l]}});return s.sort(function(o,l){return o.z-l.z}).map(function(o){return o.path})}function vxe(e){return gTt(e.path,e.count)}function gH(){return{fromIndividuals:[],toIndividuals:[],count:0}}function TTt(e,t,r){var n=[];function i(T){for(var w=0;w<T.length;w++){var S=T[w];PR(S)?i(S.childrenRef()):S instanceof nn&&n.push(S)}}i(e);var a=n.length;if(!a)return gH();var s=r.dividePath||vxe,o=s({path:t,count:a});if(o.length!==a)return console.error("Invalid morphing: unmatched splitted path"),gH();n=OR(n),o=OR(o);for(var l=r.done,u=r.during,h=r.individualDelay,f=new Wd,d=0;d<a;d++){var p=n[d],g=o[d];g.parent=t,g.copyTransform(f),h||gxe(p,g)}t.__isCombineMorphing=!0,t.childrenRef=function(){return o};function v(T){for(var w=0;w<o.length;w++)o[w].addSelfToZr(T)}NR(t,"addSelfToZr",{after:function(T){v(T)}}),NR(t,"removeSelfFromZr",{after:function(T){for(var w=0;w<o.length;w++)o[w].removeSelfFromZr(T)}});function m(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,w3(t,"addSelfToZr"),w3(t,"removeSelfFromZr")}var y=o.length;if(h)for(var x=y,b=function(){x--,x===0&&(m(),l&&l())},d=0;d<y;d++){var _=h?tr({delay:(r.delay||0)+h(d,y,n[d],o[d]),done:b},r):r;pH(n[d],o[d],_)}else t.__morphT=0,t.animateTo({__morphT:1},tr({during:function(T){for(var w=0;w<y;w++){var S=o[w];S.__morphT=t.__morphT,S.dirtyShape()}u&&u(T)},done:function(){m();for(var T=0;T<e.length;T++)w3(e[T],"updateTransform");l&&l()}},r));return t.__zr&&v(t.__zr),{fromIndividuals:n,toIndividuals:o,count:y}}function wTt(e,t,r){var n=t.length,i=[],a=r.dividePath||vxe;function s(p){for(var g=0;g<p.length;g++){var v=p[g];PR(v)?s(v.childrenRef()):v instanceof nn&&i.push(v)}}if(PR(e)){s(e.childrenRef());var o=i.length;if(o<n)for(var l=0,u=o;u<n;u++)i.push(_$(i[l++%o]));i.length=n}else{i=a({path:e,count:n});for(var h=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(h);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),gH()}i=OR(i),t=OR(t);for(var f=r.individualDelay,u=0;u<n;u++){var d=f?tr({delay:(r.delay||0)+f(u,n,i[u],t[u])},r):r;pH(i[u],t[u],d)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function mxe(e){return st(e[0])}function yxe(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,s=void 0;for(s=0;s<a;s++)r[s%n].many.push(t[i][s])}for(var o=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[o].many;if(l.length<=1)if(o)o=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[o].many=l.slice(0,u),o++}return r}var STt={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=_$(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function vH(e,t,r,n,i,a){if(!e.length||!t.length)return;var s=$2("update",n,i);if(!(s&&s.duration>0))return;var o=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},s),u,h;mxe(e)&&(u=e,h=t),mxe(t)&&(u=t,h=e);function f(y,x,b,_,T){var w=y.many,S=y.one;if(w.length===1&&!T){var E=x?w[0]:S,A=x?S:w[0];if(PR(E))f({many:[E],one:A},!0,b,_,!0);else{var k=o?tr({delay:o(b,_)},l):l;pH(E,A,k),a(E,A,E,A,k)}}else for(var L=tr({dividePath:STt[r],individualDelay:o&&function(B,P,$,F){return o(B+b,_)}},l),I=x?TTt(w,S,L):wTt(S,w,L),D=I.fromIndividuals,R=I.toIndividuals,M=D.length,O=0;O<M;O++){var k=o?tr({delay:o(O,M)},l):l;a(D[O],R[O],x?w[O]:y.one,x?y.one:w[O],k)}}for(var d=u?u===e:e.length>t.length,p=u?yxe(h,u):yxe(d?t:e,[d?e:t]),g=0,v=0;v<p.length;v++)g+=p[v].many.length;for(var m=0,v=0;v<p.length;v++)f(p[v],d,m,g),m+=p[v].many.length}function gy(e){if(!e)return[];if(st(e)){for(var t=[],r=0;r<e.length;r++)t.push(gy(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof nn&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var xxe=1e4,CTt=0,bxe=1,_xe=2,ETt=mn();function ATt(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function kTt(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function Txe(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=ATt(e,i);if(a){var s=kTt(e,t,a);return s}var o=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(o&&o[l])return o[l]+"";if(!n)return r||e.getId(t)}function wxe(e){var t=[];return ae(e,function(r){var n=r.data,i=r.dataGroupId;if(!(n.count()>xxe))for(var a=n.getIndices(),s=0;s<a.length;s++)t.push({data:n,groupId:Txe(n,s,i,!1),childGroupId:Txe(n,s,i,!0),divide:r.divide,dataIndex:s})}),t}function mH(e,t,r){e.traverse(function(n){n instanceof nn&&Si(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function yH(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function Pb(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function LTt(e,t,r){var n=$2("update",r,t);n&&e.traverse(function(i){if(i instanceof uc){var a=kot(i);a&&i.animateFrom({style:a},n)}})}function RTt(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function Sxe(e,t,r){var n=wxe(e),i=wxe(t);function a(b,_,T,w,S){(T||b)&&_.animateFrom({style:T&&T!==b?it(it({},T.style),b.style):b.style},S)}var s=!1,o=CTt,l=Qt(),u=Qt();n.forEach(function(b){b.groupId&&l.set(b.groupId,!0),b.childGroupId&&u.set(b.childGroupId,!0)});for(var h=0;h<i.length;h++){var f=i[h].groupId;if(u.get(f)){o=bxe;break}var d=i[h].childGroupId;if(d&&l.get(d)){o=_xe;break}}function p(b,_){return function(T){var w=T.data,S=T.dataIndex;return _?w.getId(S):b?o===bxe?T.childGroupId:T.groupId:o===_xe?T.childGroupId:T.groupId}}var g=RTt(n,i),v={};if(!g)for(var h=0;h<i.length;h++){var m=i[h],y=m.data.getItemGraphicEl(m.dataIndex);y&&(v[y.id]=!0)}function x(b,_){var T=n[_],w=i[b],S=w.data.hostModel,E=T.data.getItemGraphicEl(T.dataIndex),A=w.data.getItemGraphicEl(w.dataIndex);if(E===A){A&&LTt(A,w.dataIndex,S);return}E&&v[E.id]||A&&(Pb(A),E?(Pb(E),yH(E),s=!0,vH(gy(E),gy(A),w.divide,S,b,a)):mH(A,S,b))}new Qd(n,i,p(!0,g),p(!1,g),null,"multiple").update(x).updateManyToOne(function(b,_){var T=i[b],w=T.data,S=w.hostModel,E=w.getItemGraphicEl(T.dataIndex),A=Rn(ct(_,function(k){return n[k].data.getItemGraphicEl(n[k].dataIndex)}),function(k){return k&&k!==E&&!v[k.id]});E&&(Pb(E),A.length?(ae(A,function(k){Pb(k),yH(k)}),s=!0,vH(gy(A),gy(E),T.divide,S,b,a)):mH(E,S,T.dataIndex))}).updateOneToMany(function(b,_){var T=n[_],w=T.data.getItemGraphicEl(T.dataIndex);if(!(w&&v[w.id])){var S=Rn(ct(b,function(A){return i[A].data.getItemGraphicEl(i[A].dataIndex)}),function(A){return A&&A!==w}),E=i[b[0]].data.hostModel;S.length&&(ae(S,function(A){return Pb(A)}),w?(Pb(w),yH(w),s=!0,vH(gy(w),gy(S),T.divide,E,b[0],a)):ae(S,function(A){return mH(A,E,b[0])}))}}).updateManyToMany(function(b,_){new Qd(_,b,function(T){return n[T].data.getId(n[T].dataIndex)},function(T){return i[T].data.getId(i[T].dataIndex)}).update(function(T,w){x(b[T],_[w])}).execute()}).execute(),s&&ae(t,function(b){var _=b.data,T=_.hostModel,w=T&&r.getViewOfSeriesModel(T),S=$2("update",T,0);w&&T.isAnimationEnabled()&&S&&S.duration>0&&w.group.traverse(function(E){E instanceof nn&&!E.animators.length&&E.animateFrom({style:{opacity:0}},S)})})}function Cxe(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function Exe(e){return st(e)?e.sort().join(","):e}function wg(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function DTt(e,t){var r=Qt(),n=Qt(),i=Qt();return ae(e.oldSeries,function(a,s){var o=e.oldDataGroupIds[s],l=e.oldData[s],u=Cxe(a),h=Exe(u);n.set(h,{dataGroupId:o,data:l}),st(u)&&ae(u,function(f){i.set(f,{key:h,dataGroupId:o,data:l})})}),ae(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var s=a.get("dataGroupId"),o=a.getData(),l=Cxe(a),u=Exe(l),h=n.get(u);if(h)r.set(u,{oldSeries:[{dataGroupId:h.dataGroupId,divide:wg(h.data),data:h.data}],newSeries:[{dataGroupId:s,divide:wg(o),data:o}]});else if(st(l)){var f=[];ae(l,function(g){var v=n.get(g);v.data&&f.push({dataGroupId:v.dataGroupId,divide:wg(v.data),data:v.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:s,data:o,divide:wg(o)}]})}else{var d=i.get(l);if(d){var p=r.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:wg(d.data)}],newSeries:[]},r.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:o,divide:wg(o)})}}}}),r}function Axe(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function MTt(e,t,r,n){var i=[],a=[];ae(ii(e.from),function(s){var o=Axe(t.oldSeries,s);o>=0&&i.push({dataGroupId:t.oldDataGroupIds[o],data:t.oldData[o],divide:wg(t.oldData[o]),groupIdDim:s.dimension})}),ae(ii(e.to),function(s){var o=Axe(r.updatedSeries,s);if(o>=0){var l=r.updatedSeries[o].getData();a.push({dataGroupId:t.oldDataGroupIds[o],data:l,divide:wg(l),groupIdDim:s.dimension})}}),i.length>0&&a.length>0&&Sxe(i,a,n)}function ITt(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){ae(ii(n.seriesTransition),function(i){ae(ii(i.to),function(a){for(var s=n.updatedSeries,o=0;o<s.length;o++)(a.seriesIndex!=null&&a.seriesIndex===s[o].seriesIndex||a.seriesId!=null&&a.seriesId===s[o].id)&&(s[o][QL]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=ETt(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)ae(ii(a),function(p){MTt(p,i,n,r)});else{var s=DTt(i,n);ae(s.keys(),function(p){var g=s.get(p);Sxe(g.oldSeries,g.newSeries,r)})}ae(n.updatedSeries,function(p){p[QL]&&(p[QL]=!1)})}for(var o=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],h=i.oldData=[],f=0;f<o.length;f++){var d=o[f].getData();d.count()<xxe&&(l.push(o[f]),u.push(o[f].get("dataGroupId")),h.push(d))}})}var xH=Math.sin,bH=Math.cos,kxe=Math.PI,vy=Math.PI*2,PTt=180/kxe,Lxe=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,i,a,s){this._add("C",t,r,n,i,a,s)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,s){this.ellipse(t,r,n,n,0,i,a,s)},e.prototype.ellipse=function(t,r,n,i,a,s,o,l){var u=o-s,h=!l,f=Math.abs(u),d=Z0(f-vy)||(h?u>=vy:-u>=vy),p=u>0?u%vy:u%vy+vy,g=!1;d?g=!0:Z0(f)?g=!1:g=p>=kxe==!!h;var v=t+n*bH(s),m=r+i*xH(s);this._start&&this._add("M",v,m);var y=Math.round(a*PTt);if(d){var x=1/this._p,b=(h?1:-1)*(vy-x);this._add("A",n,i,y,1,+h,t+n*bH(s+b),r+i*xH(s+b)),x>.01&&this._add("A",n,i,y,0,+h,v,m)}else{var _=t+n*bH(o),T=r+i*xH(o);this._add("A",n,i,y,+g,+h,_,T)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,i,a,s,o,l,u){for(var h=[],f=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p)){this._invalid=!0;return}h.push(Math.round(p*f)/f)}this._d.push(t+h.join(" ")),this._start=t==="Z"},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),_H="none",NTt=Math.round;function OTt(e){var t=e.fill;return t!=null&&t!==_H}function BTt(e){var t=e.stroke;return t!=null&&t!==_H}var TH=["lineCap","miterLimit","lineJoin"],$Tt=ct(TH,function(e){return"stroke-"+e.toLowerCase()});function FTt(e,t,r,n){var i=t.opacity==null?1:t.opacity;if(r instanceof ms){e("opacity",i);return}if(OTt(t)){var a=GS(t.fill);e("fill",a.color);var s=t.fillOpacity!=null?t.fillOpacity*a.opacity*i:a.opacity*i;s<1&&e("fill-opacity",s)}else e("fill",_H);if(BTt(t)){var o=GS(t.stroke);e("stroke",o.color);var l=t.strokeNoScale?r.getLineScale():1,u=l?(t.lineWidth||0)/l:0,h=t.strokeOpacity!=null?t.strokeOpacity*o.opacity*i:o.opacity*i,f=t.strokeFirst;if(u!==1&&e("stroke-width",u),f&&e("paint-order",f?"stroke":"fill"),h<1&&e("stroke-opacity",h),t.lineDash){var d=ZF(r),p=d[0],g=d[1];p&&(g=NTt(g||0),e("stroke-dasharray",p.join(",")),(g||n)&&e("stroke-dashoffset",g))}for(var v=0;v<TH.length;v++){var m=TH[v];if(t[m]!==cL[m]){var y=t[m]||cL[m];y&&e($Tt[v],y)}}}}var Rxe="http://www.w3.org/2000/svg",Dxe="http://www.w3.org/1999/xlink",zTt="http://www.w3.org/2000/xmlns/",GTt="http://www.w3.org/XML/1998/namespace",Mxe="ecmeta_";function Ixe(e){return document.createElementNS(Rxe,e)}function _s(e,t,r,n,i){return{tag:e,attrs:r||{},children:n,text:i,key:t}}function VTt(e,t){var r=[];if(t)for(var n in t){var i=t[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),r.push(a))}return"<"+e+" "+r.join(" ")+">"}function HTt(e){return"</"+e+">"}function wH(e,t){t=t||{};var r=t.newline?`
82
82
  `:"";function n(i){var a=i.children,s=i.tag,o=i.attrs,l=i.text;return VTt(s,o)+(s!=="style"?wa(l):l||"")+(a?""+r+ct(a,function(u){return n(u)}).join(r)+r:"")+HTt(s)}return n(e)}function WTt(e,t,r){r=r||{};var n=r.newline?`
83
- `:"",i=" {"+n,a=n+"}",s=ct(ln(e),function(l){return l+i+ct(ln(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),o=ct(ln(t),function(l){return"@keyframes "+l+i+ct(ln(t[l]),function(u){return u+i+ct(ln(t[l][u]),function(h){var f=t[l][u][h];return h==="d"&&(f='path("'+f+'")'),h+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!s&&!o?"":["<![CDATA[",s,o,"]]>"].join(n)}function SH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Pxe(e,t,r,n){return _s("svg","root",{width:e,height:t,xmlns:Rxe,"xmlns:xlink":Dxe,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var UTt=0;function Nxe(){return UTt++}var Oxe={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"},my="transform-origin";function qTt(e,t,r){var n=it({},e.shape);it(n,t),e.buildPath(r,n);var i=new Lxe;return i.reset(eue(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function YTt(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[my]=r+"px "+n+"px")}var XTt={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Bxe(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function jTt(e,t,r){var n=e.shape.paths,i={},a,s;if(ae(n,function(l){var u=SH(r.zrId);u.animation=!0,BR(l,{},u,!0);var h=u.cssAnims,f=u.cssNodes,d=ln(h),p=d.length;if(p){s=d[p-1];var g=h[s];for(var v in g){var m=g[v];i[v]=i[v]||{d:""},i[v].d+=m.d||""}for(var y in f){var x=f[y].animation;x.indexOf(s)>=0&&(a=x)}}}),!!a){t.d=!1;var o=Bxe(i,r);return a.replace(s,o)}}function $xe(e){return $t(e)?Oxe[e]?"cubic-bezier("+Oxe[e]+")":_B(e)?e:"":""}function BR(e,t,r,n){var i=e.animators,a=i.length,s=[];if(e instanceof TL){var o=jTt(e,t,r);if(o)s.push(o);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var h=i[u],f=[h.getMaxTime()/1e3+"s"],d=$xe(h.getClip().easing),p=h.getDelay();d?f.push(d):f.push("linear"),p&&f.push(p/1e3+"s"),h.getLoop()&&f.push("infinite");var g=f.join(" ");l[g]=l[g]||[g,[]],l[g][1].push(h)}function v(x){var b=x[1],_=b.length,T={},w={},S={},E="animation-timing-function";function A(ie,X,te){for(var K=ie.getTracks(),Q=ie.getMaxTime(),ce=0;ce<K.length;ce++){var fe=K[ce];if(fe.needsAnimate()){var Le=fe.keyframes,Be=fe.propName;if(te&&(Be=te(Be)),Be)for(var ze=0;ze<Le.length;ze++){var le=Le[ze],pe=Math.round(le.time/Q*100)+"%",_e=$xe(le.easing),he=le.rawValue;($t(he)||_n(he))&&(X[pe]=X[pe]||{},X[pe][Be]=le.rawValue,_e&&(X[pe][E]=_e))}}}}for(var k=0;k<_;k++){var L=b[k],I=L.targetName;I?I==="shape"&&A(L,w):!n&&A(L,T)}for(var D in T){var R={};Ble(R,e),it(R,T[D]);var M=tue(R),O=T[D][E];S[D]=M?{transform:M}:{},YTt(S[D],R),O&&(S[D][E]=O)}var B,P=!0;for(var D in w){S[D]=S[D]||{};var $=!B,O=w[D][E];$&&(B=new bf);var F=B.len();B.reset(),S[D].d=qTt(e,w[D],B);var G=B.len();if(!$&&F!==G){P=!1;break}O&&(S[D][E]=O)}if(!P)for(var D in S)delete S[D].d;if(!n)for(var k=0;k<_;k++){var L=b[k],I=L.targetName;I==="style"&&A(L,S,function(K){return XTt[K]})}for(var z=ln(S),V=!0,H,k=1;k<z.length;k++){var W=z[k-1],j=z[k];if(S[W][my]!==S[j][my]){V=!1;break}H=S[W][my]}if(V&&H){for(var D in S)S[D][my]&&delete S[D][my];t[my]=H}if(Rn(z,function(ie){return ln(S[ie]).length>0}).length){var q=Bxe(S,r);return q+" "+x[0]+" both"}}for(var m in l){var o=v(l[m]);o&&s.push(o)}if(s.length){var y=r.zrId+"-cls-"+Nxe();r.cssNodes["."+y]={animation:s.join(",")},t.class=y}}function KTt(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};Fxe(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var s=e.style&&e.style.fill,o=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&o||s;l&&(a=Yk(l))}var u=i.lineWidth;if(u){var h=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/h}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),Fxe(n,t,r)}}function Fxe(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+Nxe(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var S3=Math.round;function zxe(e){return e&&$t(e.src)}function Gxe(e){return e&&ar(e.toDataURL)}function CH(e,t,r,n){FTt(function(i,a){var s=i==="fill"||i==="stroke";s&&Jle(a)?Yxe(t,e,i,n):s&&kB(a)?Xxe(r,e,i,n):e[i]=a,s&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),nwt(r,e,n)}function EH(e,t){var r=Sde(t);r&&(r.each(function(n,i){n!=null&&(e[(Mxe+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[Mxe+"silent"]="true"))}function Vxe(e){return Z0(e[0]-1)&&Z0(e[1])&&Z0(e[2])&&Z0(e[3]-1)}function ZTt(e){return Z0(e[4])&&Z0(e[5])}function AH(e,t,r){if(t&&!(ZTt(t)&&Vxe(t))){var n=1e4;e.transform=Vxe(t)?"translate("+S3(t[4]*n)/n+" "+S3(t[5]*n)/n+")":Dat(t)}}function Hxe(e,t,r){for(var n=e.points,i=[],a=0;a<n.length;a++)i.push(S3(n[a][0]*r)/r),i.push(S3(n[a][1]*r)/r);t.points=i.join(" ")}function Wxe(e){return!e.smooth}function QTt(e){var t=ct(e,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<t.length;a++){var s=t[a],o=r[s[0]];o!=null&&(n[s[1]]=S3(o*i)/i)}}}var JTt={circle:[QTt(["cx","cy","r"])],polyline:[Hxe,Wxe],polygon:[Hxe,Wxe]};function ewt(e){for(var t=e.animators,r=0;r<t.length;r++)if(t[r].targetName==="shape")return!0;return!1}function Uxe(e,t){var r=e.style,n=e.shape,i=JTt[e.type],a={},s=t.animation,o="path",l=e.style.strokePercent,u=t.compress&&eue(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](n))&&!(s&&ewt(e))&&!(l<1)){o=e.type;var h=Math.pow(10,u);i[0](n,a,h)}else{var f=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;f&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),g=e,v=g.__svgPathBuilder;(g.__svgPathVersion!==p||!v||l!==g.__svgPathStrokePercent)&&(v||(v=g.__svgPathBuilder=new Lxe),v.reset(u),d.rebuildPath(v,l),v.generateStr(),g.__svgPathVersion=p,g.__svgPathStrokePercent=l),a.d=v.getStr()}return AH(a,e.transform),CH(a,r,e,t),EH(a,e),t.animation&&BR(e,a,t),t.emphasis&&KTt(e,a,t),_s(o,e.id+"",a)}function twt(e,t){var r=e.style,n=r.image;if(n&&!$t(n)&&(zxe(n)?n=n.src:Gxe(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,s=r.width,o=r.height,l={href:n,width:s,height:o};return i&&(l.x=i),a&&(l.y=a),AH(l,e.transform),CH(l,r,e,t),EH(l,e),t.animation&&BR(e,l,t),_s("image",e.id+"",l)}}function rwt(e,t){var r=e.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||z0,a=r.x||0,s=Iat(r.y||0,$k(i),r.textBaseline),o=Mat[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":o};if(Tue(r)){var u="",h=r.fontStyle,f=bue(r.fontSize);if(!parseFloat(f))return;var d=r.fontFamily||cle,p=r.fontWeight;u+="font-size:"+f+";font-family:"+d+";",h&&h!=="normal"&&(u+="font-style:"+h+";"),p&&p!=="normal"&&(u+="font-weight:"+p+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),s&&(l.y=s),AH(l,e.transform),CH(l,r,e,t),EH(l,e),t.animation&&BR(e,l,t),_s("text",e.id+"",l,void 0,n)}}function qxe(e,t){if(e instanceof nn)return Uxe(e,t);if(e instanceof ms)return twt(e,t);if(e instanceof A2)return rwt(e,t)}function nwt(e,t,r){var n=e.style;if(Pat(n)){var i=Nat(e),a=r.shadowCache,s=a[i];if(!s){var o=e.getGlobalScale(),l=o[0],u=o[1];if(!l||!u)return;var h=n.shadowOffsetX||0,f=n.shadowOffsetY||0,d=n.shadowBlur,p=GS(n.shadowColor),g=p.opacity,v=p.color,m=d/2/l,y=d/2/u,x=m+" "+y;s=r.zrId+"-s"+r.shadowIdx++,r.defs[s]=_s("filter",s,{id:s,x:"-100%",y:"-100%",width:"300%",height:"300%"},[_s("feDropShadow","",{dx:h/l,dy:f/u,stdDeviation:x,"flood-color":v,"flood-opacity":g})]),a[i]=s}t.filter=Kk(s)}}function Yxe(e,t,r,n){var i=e[r],a,s={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(Zle(i))a="linearGradient",s.x1=i.x,s.y1=i.y,s.x2=i.x2,s.y2=i.y2;else if(Qle(i))a="radialGradient",s.cx=Er(i.x,.5),s.cy=Er(i.y,.5),s.r=Er(i.r,.5);else return;for(var o=i.colorStops,l=[],u=0,h=o.length;u<h;++u){var f=AB(o[u].offset)*100+"%",d=o[u].color,p=GS(d),g=p.color,v=p.opacity,m={offset:f};m["stop-color"]=g,v<1&&(m["stop-opacity"]=v),l.push(_s("stop",u+"",m))}var y=_s(a,"",s,l),x=wH(y),b=n.gradientCache,_=b[x];_||(_=n.zrId+"-g"+n.gradientIdx++,b[x]=_,s.id=_,n.defs[_]=_s(a,_,s,l)),t[r]=Kk(_)}function Xxe(e,t,r,n){var i=e.style[r],a=e.getBoundingRect(),s={},o=i.repeat,l=o==="no-repeat",u=o==="repeat-x",h=o==="repeat-y",f;if(Kle(i)){var d=i.imageWidth,p=i.imageHeight,g=void 0,v=i.image;if($t(v)?g=v:zxe(v)?g=v.src:Gxe(v)&&(g=v.toDataURL()),typeof Image>"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";No(d,m),No(p,m)}else if(d==null||p==null){var y=function(k,L){if(k){var I=k.elm,D=d||L.width,R=p||L.height;k.tag==="pattern"&&(u?(R=1,D/=a.width):h&&(D=1,R/=a.height)),k.attrs.width=D,k.attrs.height=R,I&&(I.setAttribute("width",D),I.setAttribute("height",R))}},x=dB(g,null,e,function(k){l||y(w,k),y(f,k)});x&&x.width&&x.height&&(d=d||x.width,p=p||x.height)}f=_s("image","img",{href:g,width:d,height:p}),s.width=d,s.height=p}else i.svgElement&&(f=cr(i.svgElement),s.width=i.svgWidth,s.height=i.svgHeight);if(f){var b,_;l?b=_=1:u?(_=1,b=s.width/a.width):h?(b=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(s.width=b),_!=null&&!isNaN(_)&&(s.height=_);var T=tue(i);T&&(s.patternTransform=T);var w=_s("pattern","",s,[f]),S=wH(w),E=n.patternCache,A=E[S];A||(A=n.zrId+"-p"+n.patternIdx++,E[S]=A,s.id=A,w=n.defs[A]=_s("pattern",A,s,[f])),t[r]=Kk(A)}}function iwt(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var s={id:a};n[e.id]=a,i[a]=_s("clipPath",a,s,[Uxe(e,r)])}t["clip-path"]=Kk(a)}function jxe(e){return document.createTextNode(e)}function yy(e,t,r){e.insertBefore(t,r)}function Kxe(e,t){e.removeChild(t)}function Zxe(e,t){e.appendChild(t)}function Qxe(e){return e.parentNode}function Jxe(e){return e.nextSibling}function kH(e,t){e.textContent=t}var e2e=58,awt=120,swt=_s("","");function LH(e){return e===void 0}function Pf(e){return e!==void 0}function owt(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(n[a]=i)}return n}function C3(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function E3(e){var t,r=e.children,n=e.tag;if(Pf(n)){var i=e.elm=Ixe(n);if(RH(swt,e),st(r))for(t=0;t<r.length;++t){var a=r[t];a!=null&&Zxe(i,E3(a))}else Pf(e.text)&&!lr(e.text)&&Zxe(i,jxe(e.text))}else e.elm=jxe(e.text);return e.elm}function t2e(e,t,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&yy(e,E3(a),t)}}function $R(e,t,r,n){for(;r<=n;++r){var i=t[r];if(i!=null)if(Pf(i.tag)){var a=Qxe(i.elm);Kxe(a,i.elm)}else Kxe(e,i.elm)}}function RH(e,t){var r,n=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(r in a){var s=a[r],o=i[r];o!==s&&(s===!0?n.setAttribute(r,""):s===!1?n.removeAttribute(r):r==="style"?n.style.cssText=s:r.charCodeAt(0)!==awt?n.setAttribute(r,s):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(zTt,r,s):r.charCodeAt(3)===e2e?n.setAttributeNS(GTt,r,s):r.charCodeAt(5)===e2e?n.setAttributeNS(Dxe,r,s):n.setAttribute(r,s))}for(r in i)r in a||n.removeAttribute(r)}}function lwt(e,t,r){for(var n=0,i=0,a=t.length-1,s=t[0],o=t[a],l=r.length-1,u=r[0],h=r[l],f,d,p,g;n<=a&&i<=l;)s==null?s=t[++n]:o==null?o=t[--a]:u==null?u=r[++i]:h==null?h=r[--l]:C3(s,u)?(Nb(s,u),s=t[++n],u=r[++i]):C3(o,h)?(Nb(o,h),o=t[--a],h=r[--l]):C3(s,h)?(Nb(s,h),yy(e,s.elm,Jxe(o.elm)),s=t[++n],h=r[--l]):C3(o,u)?(Nb(o,u),yy(e,o.elm,s.elm),o=t[--a],u=r[++i]):(LH(f)&&(f=owt(t,n,a)),d=f[u.key],LH(d)?yy(e,E3(u),s.elm):(p=t[d],p.tag!==u.tag?yy(e,E3(u),s.elm):(Nb(p,u),t[d]=void 0,yy(e,p.elm,s.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(g=r[l+1]==null?null:r[l+1].elm,t2e(e,g,r,i,l)):$R(e,t,n,a))}function Nb(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(RH(e,t),LH(t.text)?Pf(n)&&Pf(i)?n!==i&&lwt(r,n,i):Pf(i)?(Pf(e.text)&&kH(r,""),t2e(r,null,i,0,i.length-1)):Pf(n)?$R(r,n,0,n.length-1):Pf(e.text)&&kH(r,""):e.text!==t.text&&(Pf(n)&&$R(r,n,0,n.length-1),kH(r,t.text)))}function uwt(e,t){if(C3(e,t))Nb(e,t);else{var r=e.elm,n=Qxe(r);E3(t),n!==null&&(yy(n,t.elm,Jxe(r)),$R(n,[e],0,0))}return t}var cwt=0,hwt=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=r2e(),this.configLayer=r2e(),this.storage=r,this._opts=n=it({},n),this.root=t,this._id="zr"+cwt++,this._oldVNode=Pxe(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Ixe("svg");RH(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",uwt(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return qxe(t,SH(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=SH(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var s=[],o=this._bgVNode=fwt(n,i,this._backgroundColor,a);o&&s.push(o);var l=t.compress?null:this._mainVNode=_s("g","main",{},[]);this._paintList(r,a,l?l.children:s),l&&s.push(l);var u=ct(ln(a.defs),function(d){return a.defs[d]});if(u.length&&s.push(_s("defs","defs",{},u)),t.animation){var h=WTt(a.cssNodes,a.cssAnims,{newline:!0});if(h){var f=_s("style","stl",{},[],h);s.push(f)}}return Pxe(n,i,s,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},wH(this.renderToVNode({animation:Er(t.cssAnimation,!0),emphasis:Er(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Er(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],s=0,o,l,u=0,h=0;h<i;h++){var f=t[h];if(!f.invisible){var d=f.__clipPaths,p=d&&d.length||0,g=l&&l.length||0,v=void 0;for(v=Math.max(p-1,g-1);v>=0&&!(d&&l&&d[v]===l[v]);v--);for(var m=g-1;m>v;m--)s--,o=a[s-1];for(var y=v+1;y<p;y++){var x={};iwt(d[y],x,r);var b=_s("g","clip-g-"+u++,x,[]);(o?o.children:n).push(b),a[s++]=b,o=b}l=d;var _=qxe(f,r);_&&(o?o.children:n).push(_)}}},e.prototype.resize=function(t,r){var n=this._opts,i=this.root,a=this._viewport;if(t!=null&&(n.width=t),r!=null&&(n.height=r),i&&a&&(a.style.display="none",t=hb(i,0,n),r=hb(i,1,n),a.style.display=""),this._width!==t||this._height!==r){if(this._width=t,this._height=r,a){var s=a.style;s.width=t+"px",s.height=r+"px"}if(kB(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute("width",t),o.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",r))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var r=this.renderToString(),n="data:image/svg+xml;";return t?(r=Bat(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},e}();function r2e(e){return function(){}}function fwt(e,t,r,n){var i;if(r&&r!=="none")if(i=_s("rect","bg",{width:e,height:t,x:"0",y:"0"}),Jle(r))Yxe({fill:r},i.attrs,"fill",n);else if(kB(r))Xxe({style:{fill:r},dirty:ga,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",n);else{var a=GS(r),s=a.color,o=a.opacity;i.attrs.fill=s,o<1&&(i.attrs["fill-opacity"]=o)}return i}function n2e(e){e.registerPainter("svg",hwt)}function i2e(e,t,r){var n=rh.createCanvas(),i=t.getWidth(),a=t.getHeight(),s=n.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=i+"px",s.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}var DH=function(e){Ye(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var s;i=i||nL,typeof r=="string"?s=i2e(r,n,i):lr(r)&&(s=r,r=s.id),a.id=r,a.dom=s;var o=s.style;return o&&(cB(s),s.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=i2e("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],o=this.maxRepaintRectCount,l=!1,u=new Mr(0,0,0,0);function h(x){if(!(!x.isFinite()||x.isZero()))if(s.length===0){var b=new Mr(0,0,0,0);b.copy(x),s.push(b)}else{for(var _=!1,T=1/0,w=0,S=0;S<s.length;++S){var E=s[S];if(E.intersect(x)){var A=new Mr(0,0,0,0);A.copy(E),A.union(x),s[S]=A,_=!0;break}else if(l){u.copy(x),u.union(E);var k=x.width*x.height,L=E.width*E.height,I=u.width*u.height,D=I-k-L;D<T&&(T=D,w=S)}}if(l&&(s[w].union(x),_=!0),!_){var b=new Mr(0,0,0,0);b.copy(x),s.push(b)}l||(l=s.length>=o)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var d=r[f];if(d){var p=d.shouldBePainted(i,a,!0,!0),g=d.__isRendered&&(d.__dirty&Iu||!p)?d.getPrevPaintRect():null;g&&h(g);var v=p&&(d.__dirty&Iu||!d.__isRendered)?d.getPaintRect():null;v&&h(v)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var d=n[f],p=d&&d.shouldBePainted(i,a,!0,!0);if(d&&(!p||!d.__zr)&&d.__isRendered){var g=d.getPrevPaintRect();g&&h(g)}}var m;do{m=!1;for(var f=0;f<s.length;){if(s[f].isZero()){s.splice(f,1);continue}for(var y=f+1;y<s.length;)s[f].intersect(s[y])?(m=!0,s[f].union(s[y]),s.splice(y,1)):y++;f++}}while(m);return this._paintRects=s,s},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,s=a.style,o=this.domBack;s&&(s.width=r+"px",s.height=n+"px"),a.width=r*i,a.height=n*i,o&&(o.width=r*i,o.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(r,n,i){var a=this.dom,s=this.ctx,o=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!r,h=this.lastFrameAlpha,f=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,o/f,l/f));var p=this.domBack;function g(v,m,y,x){if(s.clearRect(v,m,y,x),n&&n!=="transparent"){var b=void 0;if(wS(n)){var _=n.global||n.__width===y&&n.__height===x;b=_&&n.__canvasGradient||KF(s,n,{x:0,y:0,width:y,height:x}),n.__canvasGradient=b,n.__width=y,n.__height=x}else vle(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,b=QF(s,n,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));s.save(),s.fillStyle=b||n,s.fillRect(v,m,y,x),s.restore()}u&&(s.save(),s.globalAlpha=h,s.drawImage(p,v,m,y,x),s.restore())}!i||u?g(0,0,o,l):i.length&&ae(i,function(v){g(v.x*f,v.y*f,v.width*f,v.height*f)})},t}(lc),a2e=1e5,xy=314159,FR=.01,dwt=.001;function pwt(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function gwt(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var vwt=function(){function e(t,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=it({},n||{}),this.dpr=n.devicePixelRatio||nL,this._singleCanvas=a,this.root=t;var s=t.style;s&&(cB(t),t.innerHTML=""),this.storage=r;var o=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var h=t,f=h.width,d=h.height;n.width!=null&&(f=n.width),n.height!=null&&(d=n.height),this.dpr=n.devicePixelRatio||1,h.width=f*this.dpr,h.height=d*this.dpr,this._width=f,this._height=d;var p=new DH(h,this,this.dpr);p.__builtin__=!0,p.initContext(),l[xy]=p,p.zlevel=xy,o.push(xy),this._domRoot=t}else{this._width=hb(t,0,n),this._height=hb(t,1,n);var u=this._domRoot=gwt(this._width,this._height);t.appendChild(u)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,t,this._redrawId);for(var a=0;a<i.length;a++){var s=i[a],o=this._layers[s];if(!o.__builtin__&&o.refresh){var l=a===0?this._backgroundColor:null;o.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var r=t.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,s=0;s<r;s++){var o=t[s];o.__inHover&&(n||(n=this._hoverlayer=this.getLayer(a2e)),a||(a=n.ctx,a.save()),Qm(a,o,i,s===r-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(a2e)},e.prototype.paintOne=function(t,r){HC(t,r)},e.prototype._paintList=function(t,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,r,n),s=a.finished,o=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(t),s)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Xm(function(){l._paintList(t,r,n,i)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(xy).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,r,n)})},e.prototype._doPaintList=function(t,r,n){for(var i=this,a=[],s=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var l=this._zlevelList[o],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var h=!0,f=!1,d=function(v){var m=a[v],y=m.ctx,x=s&&m.createRepaintRects(t,r,p._width,p._height),b=n?m.__startIndex:m.__drawIndex,_=!n&&m.incremental&&Date.now,T=_&&Date.now(),w=m.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,w,x);else if(b===m.__startIndex){var S=t[b];(!S.incremental||!S.notClear||n)&&m.clear(!1,w,x)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=m.__startIndex);var E,A=function(D){var R={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(E=b;E<m.__endIndex;E++){var M=t[E];if(M.__inHover&&(f=!0),i._doPaintEl(M,m,s,D,R,E===m.__endIndex-1),_){var O=Date.now()-T;if(O>15)break}}R.prevElClipPaths&&y.restore()};if(x)if(x.length===0)E=m.__endIndex;else for(var k=p.dpr,L=0;L<x.length;++L){var I=x[L];y.save(),y.beginPath(),y.rect(I.x*k,I.y*k,I.width*k,I.height*k),y.clip(),A(I),y.restore()}else y.save(),A(),y.restore();m.__drawIndex=E,m.__drawIndex<m.__endIndex&&(h=!1)},p=this,g=0;g<a.length;g++)d(g);return rn.wxa&&ae(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:h,needsRefreshHover:f}},e.prototype._doPaintEl=function(t,r,n,i,a,s){var o=r.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(Qm(o,t,a,s),t.setPrevPaintRect(l))}else Qm(o,t,a,s)},e.prototype.getLayer=function(t,r){this._singleCanvas&&!this._needsManuallyCompositing&&(t=xy);var n=this._layers[t];return n||(n=new DH("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?Yt(n,this._layerConfig[t],!0):this._layerConfig[t-FR]&&Yt(n,this._layerConfig[t-FR],!0),r&&(n.virtual=r),this.insertLayer(t,n),n.initContext()),n},e.prototype.insertLayer=function(t,r){var n=this._layers,i=this._zlevelList,a=i.length,s=this._domRoot,o=null,l=-1;if(!n[t]&&pwt(r)){if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);o=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(o){var u=o.dom;u.nextSibling?s.insertBefore(r.dom,u.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 n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(r,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],s=this._layers[a];s.__builtin__&&t.call(r,s,a)}},e.prototype.eachOtherLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],s=this._layers[a];s.__builtin__||t.call(r,s,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(f,d){f.__dirty=f.__used=!1});function r(f){a&&(a.__endIndex!==f&&(a.__dirty=!0),a.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0,o,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,h=void 0;o!==u&&(o=u,s=0),i.incremental?(h=this.getLayer(u+dwt,this._needsManuallyCompositing),h.incremental=!0,s=1):h=this.getLayer(u+(s>0?FR:0),this._needsManuallyCompositing),h.__builtin__||Ak("ZLevel "+u+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,r(l),a=h),i.__dirty&Iu&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,d){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__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,ae(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?Yt(n[t],r,!0):n[t]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+FR){var s=this._layers[a];Yt(s,n[t],!0)}}}},e.prototype.delLayer=function(t){var r=this._layers,n=this._zlevelList,i=r[t];i&&(i.dom.parentNode.removeChild(i.dom),delete r[t],n.splice(Ir(n,t),1))},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),r!=null&&(i.height=r),t=hb(a,0,i),r=hb(a,1,i),n.style.display="",this._width!==t||r!==this._height){n.style.width=t+"px",n.style.height=r+"px";for(var s in this._layers)this._layers.hasOwnProperty(s)&&this._layers[s].resize(t,r);this.refresh(!0)}this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this.getLayer(xy).resize(t,r)}return this},e.prototype.clearLayer=function(t){var r=this._layers[t];r&&r.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[xy].dom;var r=new DH("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var n=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,i,a):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var s={inHover:!1,viewWidth:this._width,viewHeight:this._height},o=this.storage.getDisplayList(!0),l=0,u=o.length;l<u;l++){var h=o[l];Qm(n,h,s,l===u-1)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function s2e(e){e.registerPainter("canvas",vwt)}En([Ufe,_mt,Bmt,p1t,Gmt,Ugt,Ogt,Rgt,iyt,wfe,Zmt,Qpt,Fvt,gyt,sde,lpt,cmt,R0e,Dyt,_yt,E0t,ugt,D_t,Eb,Q2t,_xt,i_t,uH,xge,Rxt,sye,R1e,Lbt,wbt,mbt,zve,ixt,I0e,mxt,cbt,u1e,m2t,Qye,rxe,E_t,sxe,ITt,s2e,n2e]);let mwt=null;const ywt=()=>mwt??=Promise.resolve().then(()=>E5t),xwt={en:{spec:["Charts (fenced): ```chart <ECharts option JSON>```.",'Example: ```chart {"xAxis":{"type":"category","data":["A","B"]},"yAxis":{"type":"value"},"series":[{"type":"bar","data":[1,2]}]}```',"When gl mode is enabled, 3D types are available: bar3D, scatter3D, surface, line3D, globe, map3D (WebGL, live-only)."].join(`
84
- `)},"zh-CN":{spec:["图表(围栏代码块):```chart <ECharts option JSON>```。",'示例:```chart {"xAxis":{"type":"category","data":["A","B"]},"yAxis":{"type":"value"},"series":[{"type":"bar","data":[1,2]}]}```',"启用 gl 模式后可用 3D 类型:bar3D、scatter3D、surface、line3D、globe、map3D(WebGL,仅实时渲染)。"].join(`
83
+ `:"",i=" {"+n,a=n+"}",s=ct(ln(e),function(l){return l+i+ct(ln(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),o=ct(ln(t),function(l){return"@keyframes "+l+i+ct(ln(t[l]),function(u){return u+i+ct(ln(t[l][u]),function(h){var f=t[l][u][h];return h==="d"&&(f='path("'+f+'")'),h+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!s&&!o?"":["<![CDATA[",s,o,"]]>"].join(n)}function SH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Pxe(e,t,r,n){return _s("svg","root",{width:e,height:t,xmlns:Rxe,"xmlns:xlink":Dxe,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var UTt=0;function Nxe(){return UTt++}var Oxe={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"},my="transform-origin";function qTt(e,t,r){var n=it({},e.shape);it(n,t),e.buildPath(r,n);var i=new Lxe;return i.reset(eue(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function YTt(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[my]=r+"px "+n+"px")}var XTt={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Bxe(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function jTt(e,t,r){var n=e.shape.paths,i={},a,s;if(ae(n,function(l){var u=SH(r.zrId);u.animation=!0,BR(l,{},u,!0);var h=u.cssAnims,f=u.cssNodes,d=ln(h),p=d.length;if(p){s=d[p-1];var g=h[s];for(var v in g){var m=g[v];i[v]=i[v]||{d:""},i[v].d+=m.d||""}for(var y in f){var x=f[y].animation;x.indexOf(s)>=0&&(a=x)}}}),!!a){t.d=!1;var o=Bxe(i,r);return a.replace(s,o)}}function $xe(e){return $t(e)?Oxe[e]?"cubic-bezier("+Oxe[e]+")":_B(e)?e:"":""}function BR(e,t,r,n){var i=e.animators,a=i.length,s=[];if(e instanceof TL){var o=jTt(e,t,r);if(o)s.push(o);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var h=i[u],f=[h.getMaxTime()/1e3+"s"],d=$xe(h.getClip().easing),p=h.getDelay();d?f.push(d):f.push("linear"),p&&f.push(p/1e3+"s"),h.getLoop()&&f.push("infinite");var g=f.join(" ");l[g]=l[g]||[g,[]],l[g][1].push(h)}function v(x){var b=x[1],_=b.length,T={},w={},S={},E="animation-timing-function";function A(ie,X,te){for(var K=ie.getTracks(),Q=ie.getMaxTime(),ce=0;ce<K.length;ce++){var fe=K[ce];if(fe.needsAnimate()){var Le=fe.keyframes,Be=fe.propName;if(te&&(Be=te(Be)),Be)for(var ze=0;ze<Le.length;ze++){var le=Le[ze],pe=Math.round(le.time/Q*100)+"%",_e=$xe(le.easing),he=le.rawValue;($t(he)||_n(he))&&(X[pe]=X[pe]||{},X[pe][Be]=le.rawValue,_e&&(X[pe][E]=_e))}}}}for(var k=0;k<_;k++){var L=b[k],I=L.targetName;I?I==="shape"&&A(L,w):!n&&A(L,T)}for(var D in T){var R={};Ble(R,e),it(R,T[D]);var M=tue(R),O=T[D][E];S[D]=M?{transform:M}:{},YTt(S[D],R),O&&(S[D][E]=O)}var B,P=!0;for(var D in w){S[D]=S[D]||{};var $=!B,O=w[D][E];$&&(B=new bf);var F=B.len();B.reset(),S[D].d=qTt(e,w[D],B);var G=B.len();if(!$&&F!==G){P=!1;break}O&&(S[D][E]=O)}if(!P)for(var D in S)delete S[D].d;if(!n)for(var k=0;k<_;k++){var L=b[k],I=L.targetName;I==="style"&&A(L,S,function(K){return XTt[K]})}for(var z=ln(S),V=!0,H,k=1;k<z.length;k++){var W=z[k-1],j=z[k];if(S[W][my]!==S[j][my]){V=!1;break}H=S[W][my]}if(V&&H){for(var D in S)S[D][my]&&delete S[D][my];t[my]=H}if(Rn(z,function(ie){return ln(S[ie]).length>0}).length){var q=Bxe(S,r);return q+" "+x[0]+" both"}}for(var m in l){var o=v(l[m]);o&&s.push(o)}if(s.length){var y=r.zrId+"-cls-"+Nxe();r.cssNodes["."+y]={animation:s.join(",")},t.class=y}}function KTt(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};Fxe(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var s=e.style&&e.style.fill,o=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&o||s;l&&(a=Yk(l))}var u=i.lineWidth;if(u){var h=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/h}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),Fxe(n,t,r)}}function Fxe(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+Nxe(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var S3=Math.round;function zxe(e){return e&&$t(e.src)}function Gxe(e){return e&&ar(e.toDataURL)}function CH(e,t,r,n){FTt(function(i,a){var s=i==="fill"||i==="stroke";s&&Jle(a)?Yxe(t,e,i,n):s&&kB(a)?Xxe(r,e,i,n):e[i]=a,s&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),nwt(r,e,n)}function EH(e,t){var r=Sde(t);r&&(r.each(function(n,i){n!=null&&(e[(Mxe+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[Mxe+"silent"]="true"))}function Vxe(e){return Z0(e[0]-1)&&Z0(e[1])&&Z0(e[2])&&Z0(e[3]-1)}function ZTt(e){return Z0(e[4])&&Z0(e[5])}function AH(e,t,r){if(t&&!(ZTt(t)&&Vxe(t))){var n=1e4;e.transform=Vxe(t)?"translate("+S3(t[4]*n)/n+" "+S3(t[5]*n)/n+")":Dat(t)}}function Hxe(e,t,r){for(var n=e.points,i=[],a=0;a<n.length;a++)i.push(S3(n[a][0]*r)/r),i.push(S3(n[a][1]*r)/r);t.points=i.join(" ")}function Wxe(e){return!e.smooth}function QTt(e){var t=ct(e,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<t.length;a++){var s=t[a],o=r[s[0]];o!=null&&(n[s[1]]=S3(o*i)/i)}}}var JTt={circle:[QTt(["cx","cy","r"])],polyline:[Hxe,Wxe],polygon:[Hxe,Wxe]};function ewt(e){for(var t=e.animators,r=0;r<t.length;r++)if(t[r].targetName==="shape")return!0;return!1}function Uxe(e,t){var r=e.style,n=e.shape,i=JTt[e.type],a={},s=t.animation,o="path",l=e.style.strokePercent,u=t.compress&&eue(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](n))&&!(s&&ewt(e))&&!(l<1)){o=e.type;var h=Math.pow(10,u);i[0](n,a,h)}else{var f=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;f&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),g=e,v=g.__svgPathBuilder;(g.__svgPathVersion!==p||!v||l!==g.__svgPathStrokePercent)&&(v||(v=g.__svgPathBuilder=new Lxe),v.reset(u),d.rebuildPath(v,l),v.generateStr(),g.__svgPathVersion=p,g.__svgPathStrokePercent=l),a.d=v.getStr()}return AH(a,e.transform),CH(a,r,e,t),EH(a,e),t.animation&&BR(e,a,t),t.emphasis&&KTt(e,a,t),_s(o,e.id+"",a)}function twt(e,t){var r=e.style,n=r.image;if(n&&!$t(n)&&(zxe(n)?n=n.src:Gxe(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,s=r.width,o=r.height,l={href:n,width:s,height:o};return i&&(l.x=i),a&&(l.y=a),AH(l,e.transform),CH(l,r,e,t),EH(l,e),t.animation&&BR(e,l,t),_s("image",e.id+"",l)}}function rwt(e,t){var r=e.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||z0,a=r.x||0,s=Iat(r.y||0,$k(i),r.textBaseline),o=Mat[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":o};if(Tue(r)){var u="",h=r.fontStyle,f=bue(r.fontSize);if(!parseFloat(f))return;var d=r.fontFamily||cle,p=r.fontWeight;u+="font-size:"+f+";font-family:"+d+";",h&&h!=="normal"&&(u+="font-style:"+h+";"),p&&p!=="normal"&&(u+="font-weight:"+p+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),s&&(l.y=s),AH(l,e.transform),CH(l,r,e,t),EH(l,e),t.animation&&BR(e,l,t),_s("text",e.id+"",l,void 0,n)}}function qxe(e,t){if(e instanceof nn)return Uxe(e,t);if(e instanceof ms)return twt(e,t);if(e instanceof A2)return rwt(e,t)}function nwt(e,t,r){var n=e.style;if(Pat(n)){var i=Nat(e),a=r.shadowCache,s=a[i];if(!s){var o=e.getGlobalScale(),l=o[0],u=o[1];if(!l||!u)return;var h=n.shadowOffsetX||0,f=n.shadowOffsetY||0,d=n.shadowBlur,p=GS(n.shadowColor),g=p.opacity,v=p.color,m=d/2/l,y=d/2/u,x=m+" "+y;s=r.zrId+"-s"+r.shadowIdx++,r.defs[s]=_s("filter",s,{id:s,x:"-100%",y:"-100%",width:"300%",height:"300%"},[_s("feDropShadow","",{dx:h/l,dy:f/u,stdDeviation:x,"flood-color":v,"flood-opacity":g})]),a[i]=s}t.filter=Kk(s)}}function Yxe(e,t,r,n){var i=e[r],a,s={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(Zle(i))a="linearGradient",s.x1=i.x,s.y1=i.y,s.x2=i.x2,s.y2=i.y2;else if(Qle(i))a="radialGradient",s.cx=Er(i.x,.5),s.cy=Er(i.y,.5),s.r=Er(i.r,.5);else return;for(var o=i.colorStops,l=[],u=0,h=o.length;u<h;++u){var f=AB(o[u].offset)*100+"%",d=o[u].color,p=GS(d),g=p.color,v=p.opacity,m={offset:f};m["stop-color"]=g,v<1&&(m["stop-opacity"]=v),l.push(_s("stop",u+"",m))}var y=_s(a,"",s,l),x=wH(y),b=n.gradientCache,_=b[x];_||(_=n.zrId+"-g"+n.gradientIdx++,b[x]=_,s.id=_,n.defs[_]=_s(a,_,s,l)),t[r]=Kk(_)}function Xxe(e,t,r,n){var i=e.style[r],a=e.getBoundingRect(),s={},o=i.repeat,l=o==="no-repeat",u=o==="repeat-x",h=o==="repeat-y",f;if(Kle(i)){var d=i.imageWidth,p=i.imageHeight,g=void 0,v=i.image;if($t(v)?g=v:zxe(v)?g=v.src:Gxe(v)&&(g=v.toDataURL()),typeof Image>"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";No(d,m),No(p,m)}else if(d==null||p==null){var y=function(k,L){if(k){var I=k.elm,D=d||L.width,R=p||L.height;k.tag==="pattern"&&(u?(R=1,D/=a.width):h&&(D=1,R/=a.height)),k.attrs.width=D,k.attrs.height=R,I&&(I.setAttribute("width",D),I.setAttribute("height",R))}},x=dB(g,null,e,function(k){l||y(w,k),y(f,k)});x&&x.width&&x.height&&(d=d||x.width,p=p||x.height)}f=_s("image","img",{href:g,width:d,height:p}),s.width=d,s.height=p}else i.svgElement&&(f=cr(i.svgElement),s.width=i.svgWidth,s.height=i.svgHeight);if(f){var b,_;l?b=_=1:u?(_=1,b=s.width/a.width):h?(b=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(s.width=b),_!=null&&!isNaN(_)&&(s.height=_);var T=tue(i);T&&(s.patternTransform=T);var w=_s("pattern","",s,[f]),S=wH(w),E=n.patternCache,A=E[S];A||(A=n.zrId+"-p"+n.patternIdx++,E[S]=A,s.id=A,w=n.defs[A]=_s("pattern",A,s,[f])),t[r]=Kk(A)}}function iwt(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var s={id:a};n[e.id]=a,i[a]=_s("clipPath",a,s,[Uxe(e,r)])}t["clip-path"]=Kk(a)}function jxe(e){return document.createTextNode(e)}function yy(e,t,r){e.insertBefore(t,r)}function Kxe(e,t){e.removeChild(t)}function Zxe(e,t){e.appendChild(t)}function Qxe(e){return e.parentNode}function Jxe(e){return e.nextSibling}function kH(e,t){e.textContent=t}var e2e=58,awt=120,swt=_s("","");function LH(e){return e===void 0}function Pf(e){return e!==void 0}function owt(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(n[a]=i)}return n}function C3(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function E3(e){var t,r=e.children,n=e.tag;if(Pf(n)){var i=e.elm=Ixe(n);if(RH(swt,e),st(r))for(t=0;t<r.length;++t){var a=r[t];a!=null&&Zxe(i,E3(a))}else Pf(e.text)&&!lr(e.text)&&Zxe(i,jxe(e.text))}else e.elm=jxe(e.text);return e.elm}function t2e(e,t,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&yy(e,E3(a),t)}}function $R(e,t,r,n){for(;r<=n;++r){var i=t[r];if(i!=null)if(Pf(i.tag)){var a=Qxe(i.elm);Kxe(a,i.elm)}else Kxe(e,i.elm)}}function RH(e,t){var r,n=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(r in a){var s=a[r],o=i[r];o!==s&&(s===!0?n.setAttribute(r,""):s===!1?n.removeAttribute(r):r==="style"?n.style.cssText=s:r.charCodeAt(0)!==awt?n.setAttribute(r,s):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(zTt,r,s):r.charCodeAt(3)===e2e?n.setAttributeNS(GTt,r,s):r.charCodeAt(5)===e2e?n.setAttributeNS(Dxe,r,s):n.setAttribute(r,s))}for(r in i)r in a||n.removeAttribute(r)}}function lwt(e,t,r){for(var n=0,i=0,a=t.length-1,s=t[0],o=t[a],l=r.length-1,u=r[0],h=r[l],f,d,p,g;n<=a&&i<=l;)s==null?s=t[++n]:o==null?o=t[--a]:u==null?u=r[++i]:h==null?h=r[--l]:C3(s,u)?(Nb(s,u),s=t[++n],u=r[++i]):C3(o,h)?(Nb(o,h),o=t[--a],h=r[--l]):C3(s,h)?(Nb(s,h),yy(e,s.elm,Jxe(o.elm)),s=t[++n],h=r[--l]):C3(o,u)?(Nb(o,u),yy(e,o.elm,s.elm),o=t[--a],u=r[++i]):(LH(f)&&(f=owt(t,n,a)),d=f[u.key],LH(d)?yy(e,E3(u),s.elm):(p=t[d],p.tag!==u.tag?yy(e,E3(u),s.elm):(Nb(p,u),t[d]=void 0,yy(e,p.elm,s.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(g=r[l+1]==null?null:r[l+1].elm,t2e(e,g,r,i,l)):$R(e,t,n,a))}function Nb(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(RH(e,t),LH(t.text)?Pf(n)&&Pf(i)?n!==i&&lwt(r,n,i):Pf(i)?(Pf(e.text)&&kH(r,""),t2e(r,null,i,0,i.length-1)):Pf(n)?$R(r,n,0,n.length-1):Pf(e.text)&&kH(r,""):e.text!==t.text&&(Pf(n)&&$R(r,n,0,n.length-1),kH(r,t.text)))}function uwt(e,t){if(C3(e,t))Nb(e,t);else{var r=e.elm,n=Qxe(r);E3(t),n!==null&&(yy(n,t.elm,Jxe(r)),$R(n,[e],0,0))}return t}var cwt=0,hwt=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=r2e(),this.configLayer=r2e(),this.storage=r,this._opts=n=it({},n),this.root=t,this._id="zr"+cwt++,this._oldVNode=Pxe(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Ixe("svg");RH(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",uwt(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return qxe(t,SH(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=SH(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var s=[],o=this._bgVNode=fwt(n,i,this._backgroundColor,a);o&&s.push(o);var l=t.compress?null:this._mainVNode=_s("g","main",{},[]);this._paintList(r,a,l?l.children:s),l&&s.push(l);var u=ct(ln(a.defs),function(d){return a.defs[d]});if(u.length&&s.push(_s("defs","defs",{},u)),t.animation){var h=WTt(a.cssNodes,a.cssAnims,{newline:!0});if(h){var f=_s("style","stl",{},[],h);s.push(f)}}return Pxe(n,i,s,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},wH(this.renderToVNode({animation:Er(t.cssAnimation,!0),emphasis:Er(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Er(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],s=0,o,l,u=0,h=0;h<i;h++){var f=t[h];if(!f.invisible){var d=f.__clipPaths,p=d&&d.length||0,g=l&&l.length||0,v=void 0;for(v=Math.max(p-1,g-1);v>=0&&!(d&&l&&d[v]===l[v]);v--);for(var m=g-1;m>v;m--)s--,o=a[s-1];for(var y=v+1;y<p;y++){var x={};iwt(d[y],x,r);var b=_s("g","clip-g-"+u++,x,[]);(o?o.children:n).push(b),a[s++]=b,o=b}l=d;var _=qxe(f,r);_&&(o?o.children:n).push(_)}}},e.prototype.resize=function(t,r){var n=this._opts,i=this.root,a=this._viewport;if(t!=null&&(n.width=t),r!=null&&(n.height=r),i&&a&&(a.style.display="none",t=hb(i,0,n),r=hb(i,1,n),a.style.display=""),this._width!==t||this._height!==r){if(this._width=t,this._height=r,a){var s=a.style;s.width=t+"px",s.height=r+"px"}if(kB(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute("width",t),o.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",r))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var r=this.renderToString(),n="data:image/svg+xml;";return t?(r=Bat(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},e}();function r2e(e){return function(){}}function fwt(e,t,r,n){var i;if(r&&r!=="none")if(i=_s("rect","bg",{width:e,height:t,x:"0",y:"0"}),Jle(r))Yxe({fill:r},i.attrs,"fill",n);else if(kB(r))Xxe({style:{fill:r},dirty:ga,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",n);else{var a=GS(r),s=a.color,o=a.opacity;i.attrs.fill=s,o<1&&(i.attrs["fill-opacity"]=o)}return i}function n2e(e){e.registerPainter("svg",hwt)}function i2e(e,t,r){var n=rh.createCanvas(),i=t.getWidth(),a=t.getHeight(),s=n.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=i+"px",s.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}var DH=function(e){Ye(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var s;i=i||nL,typeof r=="string"?s=i2e(r,n,i):lr(r)&&(s=r,r=s.id),a.id=r,a.dom=s;var o=s.style;return o&&(cB(s),s.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=i2e("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],o=this.maxRepaintRectCount,l=!1,u=new Mr(0,0,0,0);function h(x){if(!(!x.isFinite()||x.isZero()))if(s.length===0){var b=new Mr(0,0,0,0);b.copy(x),s.push(b)}else{for(var _=!1,T=1/0,w=0,S=0;S<s.length;++S){var E=s[S];if(E.intersect(x)){var A=new Mr(0,0,0,0);A.copy(E),A.union(x),s[S]=A,_=!0;break}else if(l){u.copy(x),u.union(E);var k=x.width*x.height,L=E.width*E.height,I=u.width*u.height,D=I-k-L;D<T&&(T=D,w=S)}}if(l&&(s[w].union(x),_=!0),!_){var b=new Mr(0,0,0,0);b.copy(x),s.push(b)}l||(l=s.length>=o)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var d=r[f];if(d){var p=d.shouldBePainted(i,a,!0,!0),g=d.__isRendered&&(d.__dirty&Iu||!p)?d.getPrevPaintRect():null;g&&h(g);var v=p&&(d.__dirty&Iu||!d.__isRendered)?d.getPaintRect():null;v&&h(v)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var d=n[f],p=d&&d.shouldBePainted(i,a,!0,!0);if(d&&(!p||!d.__zr)&&d.__isRendered){var g=d.getPrevPaintRect();g&&h(g)}}var m;do{m=!1;for(var f=0;f<s.length;){if(s[f].isZero()){s.splice(f,1);continue}for(var y=f+1;y<s.length;)s[f].intersect(s[y])?(m=!0,s[f].union(s[y]),s.splice(y,1)):y++;f++}}while(m);return this._paintRects=s,s},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,s=a.style,o=this.domBack;s&&(s.width=r+"px",s.height=n+"px"),a.width=r*i,a.height=n*i,o&&(o.width=r*i,o.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(r,n,i){var a=this.dom,s=this.ctx,o=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!r,h=this.lastFrameAlpha,f=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,o/f,l/f));var p=this.domBack;function g(v,m,y,x){if(s.clearRect(v,m,y,x),n&&n!=="transparent"){var b=void 0;if(wS(n)){var _=n.global||n.__width===y&&n.__height===x;b=_&&n.__canvasGradient||KF(s,n,{x:0,y:0,width:y,height:x}),n.__canvasGradient=b,n.__width=y,n.__height=x}else vle(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,b=QF(s,n,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));s.save(),s.fillStyle=b||n,s.fillRect(v,m,y,x),s.restore()}u&&(s.save(),s.globalAlpha=h,s.drawImage(p,v,m,y,x),s.restore())}!i||u?g(0,0,o,l):i.length&&ae(i,function(v){g(v.x*f,v.y*f,v.width*f,v.height*f)})},t}(lc),a2e=1e5,xy=314159,FR=.01,dwt=.001;function pwt(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function gwt(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var vwt=function(){function e(t,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=it({},n||{}),this.dpr=n.devicePixelRatio||nL,this._singleCanvas=a,this.root=t;var s=t.style;s&&(cB(t),t.innerHTML=""),this.storage=r;var o=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var h=t,f=h.width,d=h.height;n.width!=null&&(f=n.width),n.height!=null&&(d=n.height),this.dpr=n.devicePixelRatio||1,h.width=f*this.dpr,h.height=d*this.dpr,this._width=f,this._height=d;var p=new DH(h,this,this.dpr);p.__builtin__=!0,p.initContext(),l[xy]=p,p.zlevel=xy,o.push(xy),this._domRoot=t}else{this._width=hb(t,0,n),this._height=hb(t,1,n);var u=this._domRoot=gwt(this._width,this._height);t.appendChild(u)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,t,this._redrawId);for(var a=0;a<i.length;a++){var s=i[a],o=this._layers[s];if(!o.__builtin__&&o.refresh){var l=a===0?this._backgroundColor:null;o.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var r=t.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,s=0;s<r;s++){var o=t[s];o.__inHover&&(n||(n=this._hoverlayer=this.getLayer(a2e)),a||(a=n.ctx,a.save()),Qm(a,o,i,s===r-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(a2e)},e.prototype.paintOne=function(t,r){HC(t,r)},e.prototype._paintList=function(t,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,r,n),s=a.finished,o=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(t),s)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Xm(function(){l._paintList(t,r,n,i)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(xy).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,r,n)})},e.prototype._doPaintList=function(t,r,n){for(var i=this,a=[],s=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var l=this._zlevelList[o],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var h=!0,f=!1,d=function(v){var m=a[v],y=m.ctx,x=s&&m.createRepaintRects(t,r,p._width,p._height),b=n?m.__startIndex:m.__drawIndex,_=!n&&m.incremental&&Date.now,T=_&&Date.now(),w=m.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,w,x);else if(b===m.__startIndex){var S=t[b];(!S.incremental||!S.notClear||n)&&m.clear(!1,w,x)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=m.__startIndex);var E,A=function(D){var R={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(E=b;E<m.__endIndex;E++){var M=t[E];if(M.__inHover&&(f=!0),i._doPaintEl(M,m,s,D,R,E===m.__endIndex-1),_){var O=Date.now()-T;if(O>15)break}}R.prevElClipPaths&&y.restore()};if(x)if(x.length===0)E=m.__endIndex;else for(var k=p.dpr,L=0;L<x.length;++L){var I=x[L];y.save(),y.beginPath(),y.rect(I.x*k,I.y*k,I.width*k,I.height*k),y.clip(),A(I),y.restore()}else y.save(),A(),y.restore();m.__drawIndex=E,m.__drawIndex<m.__endIndex&&(h=!1)},p=this,g=0;g<a.length;g++)d(g);return rn.wxa&&ae(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:h,needsRefreshHover:f}},e.prototype._doPaintEl=function(t,r,n,i,a,s){var o=r.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(Qm(o,t,a,s),t.setPrevPaintRect(l))}else Qm(o,t,a,s)},e.prototype.getLayer=function(t,r){this._singleCanvas&&!this._needsManuallyCompositing&&(t=xy);var n=this._layers[t];return n||(n=new DH("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?Yt(n,this._layerConfig[t],!0):this._layerConfig[t-FR]&&Yt(n,this._layerConfig[t-FR],!0),r&&(n.virtual=r),this.insertLayer(t,n),n.initContext()),n},e.prototype.insertLayer=function(t,r){var n=this._layers,i=this._zlevelList,a=i.length,s=this._domRoot,o=null,l=-1;if(!n[t]&&pwt(r)){if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);o=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(o){var u=o.dom;u.nextSibling?s.insertBefore(r.dom,u.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 n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(r,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],s=this._layers[a];s.__builtin__&&t.call(r,s,a)}},e.prototype.eachOtherLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],s=this._layers[a];s.__builtin__||t.call(r,s,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(f,d){f.__dirty=f.__used=!1});function r(f){a&&(a.__endIndex!==f&&(a.__dirty=!0),a.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0,o,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,h=void 0;o!==u&&(o=u,s=0),i.incremental?(h=this.getLayer(u+dwt,this._needsManuallyCompositing),h.incremental=!0,s=1):h=this.getLayer(u+(s>0?FR:0),this._needsManuallyCompositing),h.__builtin__||Ak("ZLevel "+u+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,r(l),a=h),i.__dirty&Iu&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,d){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__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,ae(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?Yt(n[t],r,!0):n[t]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+FR){var s=this._layers[a];Yt(s,n[t],!0)}}}},e.prototype.delLayer=function(t){var r=this._layers,n=this._zlevelList,i=r[t];i&&(i.dom.parentNode.removeChild(i.dom),delete r[t],n.splice(Ir(n,t),1))},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),r!=null&&(i.height=r),t=hb(a,0,i),r=hb(a,1,i),n.style.display="",this._width!==t||r!==this._height){n.style.width=t+"px",n.style.height=r+"px";for(var s in this._layers)this._layers.hasOwnProperty(s)&&this._layers[s].resize(t,r);this.refresh(!0)}this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this.getLayer(xy).resize(t,r)}return this},e.prototype.clearLayer=function(t){var r=this._layers[t];r&&r.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[xy].dom;var r=new DH("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var n=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,i,a):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var s={inHover:!1,viewWidth:this._width,viewHeight:this._height},o=this.storage.getDisplayList(!0),l=0,u=o.length;l<u;l++){var h=o[l];Qm(n,h,s,l===u-1)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function s2e(e){e.registerPainter("canvas",vwt)}En([Ufe,_mt,Bmt,p1t,Gmt,Ugt,Ogt,Rgt,iyt,wfe,Zmt,Qpt,Fvt,gyt,sde,lpt,cmt,R0e,Dyt,_yt,E0t,ugt,D_t,Eb,Q2t,_xt,i_t,uH,xge,Rxt,sye,R1e,Lbt,wbt,mbt,zve,ixt,I0e,mxt,cbt,u1e,m2t,Qye,rxe,E_t,sxe,ITt,s2e,n2e]);let mwt=null;const ywt=()=>mwt??=Promise.resolve().then(()=>E5t),xwt={en:{spec:["Charts: a fenced `chart` block with the ECharts option JSON on the lines inside it.","","```chart",'{"xAxis":{"type":"category","data":["A","B"]},"yAxis":{"type":"value"},"series":[{"type":"bar","data":[1,2]}]}',"```","","When gl mode is enabled, 3D types are available: bar3D, scatter3D, surface, line3D, globe, map3D (WebGL, live-only)."].join(`
84
+ `)},"zh-CN":{spec:["图表:一个 `chart` 围栏代码块,ECharts option JSON 写在围栏里面的行上。","","```chart",'{"xAxis":{"type":"category","data":["A","B"]},"yAxis":{"type":"value"},"series":[{"type":"bar","data":[1,2]}]}',"```","","启用 gl 模式后可用 3D 类型:bar3D、scatter3D、surface、line3D、globe、map3D(WebGL,仅实时渲染)。"].join(`
85
85
  `)}};function bwt(e){return wk(xwt,e,"spec")}function _wt(e={}){const t=e.width==="container",r=typeof e.width=="number"?e.width:600,n=e.height??400,i=e.gl??!1,a=i||t||(e.interactive??!1),s=u=>{const h=Math.floor(u.clientWidth||u.getBoundingClientRect().width);return h>0?h:r},o=(u,h)=>{if(!t||typeof ResizeObserver>"u")return;const f=new ResizeObserver(()=>{const d=s(u);d>0&&h.resize({width:d})});return f.observe(u),()=>f.disconnect()};return{name:"chart",nodeRenderers:{chart:(u,h)=>{const f=h?.theme==="dark"?"dark":void 0,{data:d,complete:p}=znt(u.content??"");if(!p||d==null||typeof d!="object")return{kind:"html",html:"<div data-aigui-chart-loading></div>"};if(i){const v=d;return{kind:"mount",mount:m=>{let y,x=!1,b;return ywt().then(()=>{x||(y=pb(m,f,{width:t?s(m):r,height:n}),y.setOption(v),b=o(m,y))}).catch(()=>{y?.dispose(),y=void 0}),()=>{x=!0,b?.(),y?.dispose()}}}}if(a){const v=d;return{kind:"mount",mount:m=>{const y=pb(m,f,{renderer:"svg",width:t?s(m):r,height:n});try{y.setOption(v)}catch{y.dispose();return}const x=o(m,y);return()=>{x?.(),y.dispose()}}}}let g;try{return g=pb(null,f??null,{renderer:"svg",ssr:!0,width:r,height:n}),g.setOption(d),{kind:"html",html:g.renderToSVGString()}}catch(v){return{kind:"html",html:`<pre data-aigui-chart-error>${String(v?.message??v)}</pre>`}}finally{g?.dispose()}}},promptSpec:u=>bwt(u)}}En([Ufe,wfe,sde,R0e,Eb,uH,sye,R1e,u1e,Qye,rxe,n2e]);const o2e=1024*1024,MH=12,l2e=32,u2e=500,c2e=512,by=256,Twt=8*1024,wwt=new Set(["title","panels"]),Swt=new Set(["title","columns","rows","chart","sql","note","error","source"]),Cwt=["[data-aigui-dashboard]{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));margin:1rem 0}","[data-aigui-dashboard-title]{grid-column:1/-1;font-size:1.05rem;font-weight:600;margin:0}","[data-aigui-panel]{border:1px solid color-mix(in srgb,currentColor 16%,transparent);border-radius:.5rem;padding:.9rem;min-width:0}","[data-aigui-panel-title]{font-weight:600;font-size:.95rem;margin:0 0 .55rem}","[data-aigui-panel] table{border-collapse:collapse;width:100%;font-size:.85rem;font-variant-numeric:tabular-nums}","[data-aigui-panel] th,[data-aigui-panel] td{padding:.35rem .5rem;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:left;white-space:nowrap}","[data-aigui-panel] th{font-weight:600;opacity:.7;font-size:.78rem}","[data-aigui-panel] td[data-num],[data-aigui-panel] th[data-num]{text-align:right}","[data-aigui-panel] td[data-null]{opacity:.45;font-style:italic}","[data-aigui-panel-chart]{margin-top:.6rem;max-width:100%}","[data-aigui-panel-error]{padding:.55rem .7rem;border-left:3px solid color-mix(in srgb,currentColor 45%,transparent);opacity:.8;font-size:.85rem}","[data-aigui-panel-note]{margin-top:.5rem;font-size:.78rem;opacity:.7}","[data-aigui-panel-sql]{margin-top:.6rem;font-size:.78rem}","[data-aigui-panel-sql] summary{cursor:pointer;opacity:.75}","[data-aigui-panel-sql] pre{margin:.35rem 0 0;padding:.5rem .6rem;overflow-x:auto;border-radius:.4rem;background:color-mix(in srgb,currentColor 7%,transparent);white-space:pre-wrap;word-break:break-word}","[data-aigui-dashboard-invalid]{margin:1rem 0;opacity:.72}"].join(`
86
86
  `);function Ewt(e){return(e??"en").toLowerCase().startsWith("zh")?["看板(BI dashboard):当用户要「看板 / 大屏 / 几张图一起看」时,通过应用提供的看板机制(工具或接口)**由你决定版面**:","- 看板标题、有哪几块板(最多 12 块,再多拆第二张);","- 每块板的标题、看哪个指标、按什么维度切、什么时间粒度;","- 每块板画成什么:类目对比用 bar,时间趋势用 line,单个数或明细只出表。","**不要自己产出 ```dashboard 围栏**。行、SQL、以及某块板被治理拒绝的理由,都由应用按真实查询结果填写并附加。","不要把看板里的数字重新打进正文。指着某块板说它显示了什么。"].join(`
87
87
  `):["Dashboards: when the user asks for a dashboard / several charts at once, use the application's dashboard mechanism (tool or API) — **you decide the layout**:","- the dashboard title and which panels exist (at most 12; split a second board beyond that);","- each panel's title, which metric, sliced by which dimensions, at what time grain;","- how each panel reads best: bar for category comparison, line for trends over time, table-only for single figures or detail.","**Never emit a ```dashboard fence yourself.** Rows, SQL, and per-panel governance refusals are filled in by the application from the queries it really ran.","Do not retype figures from a dashboard into your prose. Refer to a panel and describe what it shows."].join(`
@@ -346,8 +346,8 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
346
346
  `),chemistry:"Chemistry: use mhchem inside maths — `$\\ce{2H2 + O2 -> 2H2O}$` for reactions and `$\\pu{22.4 L}$` for quantities with units."},"zh-CN":{spec:["数学公式:用 TeX 书写 —— 行内写 `$...$`,独立成行的公式写 `$$...$$`。","所有公式、变量和单位都用数学公式表示,不要用文字或纯文本描述:写 `$v = d/t$`,不要写 v = d/t。","正文里表示货币的美元符号必须转义为 `\\$`。禁止用 HTML、MathML 或图片表示数学内容。"].join(`
347
347
  `),chemistry:"化学:在数学公式内使用 mhchem —— 反应式写 `$\\ce{2H2 + O2 -> 2H2O}$`,带单位的量写 `$\\pu{22.4 L}$`。"}};function MCt(e,t={}){const r=wk(Jbe,e,"spec");return t.chemistry?`${r}
348
348
  ${wk(Jbe,e,"chemistry")}`:r}function ICt(e={}){return e.chemistry&&Promise.resolve().then(()=>A5t).catch(()=>{}),{name:"katex",css:e.css??DCt,promptSpec:t=>MCt(t,{chemistry:e.chemistry}),extendParser:t=>{t.inline.ruler.after("escape","math_inline",LCt),t.block.ruler.after("blockquote","math_block",RCt,{alt:["paragraph","reference","blockquote","list"]}),t.renderer.rules.math_inline=(r,n)=>Zbe(r[n].content,!1),t.renderer.rules.math_block=(r,n)=>Zbe(r[n].content,!0)+`
349
- `}}}const PCt=new Set(["default","base","dark","forest","neutral","neo","neo-dark","redux","redux-dark","redux-color","redux-dark-color","null"]);let NCt=0,OCt=null,e_e,t_e=Promise.resolve();const BCt=()=>OCt??=Promise.resolve().then(()=>nFt).then(({default:e})=>e);function $Ct(e){const t=t_e.then(e,e);return t_e=t.then(()=>{},()=>{}),t}function FCt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function zCt(e){typeof document>"u"||(document.getElementById(`d${e}`)?.remove(),document.getElementById(e)?.remove())}function r_e(){return{kind:"html",html:`<pre data-aigui-mermaid-error>${FCt("Diagram could not be rendered.")}</pre>`}}const GCt={en:{spec:["Diagrams (fenced): ```mermaid <Mermaid diagram syntax>```.","Supported examples include flowchart, sequenceDiagram, classDiagram (UML), stateDiagram-v2, erDiagram, journey, gantt, pie, mindmap, timeline, and gitGraph.","Use concise labels and valid Mermaid syntax. Never emit HTML, scripts, click handlers, URLs, initialization directives, remote resources, or credentials."].join(`
350
- `)},"zh-CN":{spec:["图示(围栏代码块):```mermaid <Mermaid 图示语法>```。","可用类型包括 flowchart、sequenceDiagram、classDiagram(UML)、stateDiagram-v2、erDiagram、journey、gantt、pie、mindmap、timeline、gitGraph。","标签保持简洁,语法必须合法。禁止输出 HTML、脚本、点击回调、URL、初始化指令、远程资源或任何凭据。"].join(`
349
+ `}}}const PCt=new Set(["default","base","dark","forest","neutral","neo","neo-dark","redux","redux-dark","redux-color","redux-dark-color","null"]);let NCt=0,OCt=null,e_e,t_e=Promise.resolve();const BCt=()=>OCt??=Promise.resolve().then(()=>nFt).then(({default:e})=>e);function $Ct(e){const t=t_e.then(e,e);return t_e=t.then(()=>{},()=>{}),t}function FCt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function zCt(e){typeof document>"u"||(document.getElementById(`d${e}`)?.remove(),document.getElementById(e)?.remove())}function r_e(){return{kind:"html",html:`<pre data-aigui-mermaid-error>${FCt("Diagram could not be rendered.")}</pre>`}}const GCt={en:{spec:["Diagrams: one fenced block, the Mermaid diagram syntax on the lines inside it.","","```mermaid","<Mermaid diagram syntax>","```","","Supported examples include flowchart, sequenceDiagram, classDiagram (UML), stateDiagram-v2, erDiagram, journey, gantt, pie, mindmap, timeline, and gitGraph.","Use concise labels and valid Mermaid syntax. Never emit HTML, scripts, click handlers, URLs, initialization directives, remote resources, or credentials."].join(`
350
+ `)},"zh-CN":{spec:["图示:一个围栏代码块,Mermaid 图示语法写在围栏里面的行上。","","```mermaid","<Mermaid 图示语法>","```","","可用类型包括 flowchart、sequenceDiagram、classDiagram(UML)、stateDiagram-v2、erDiagram、journey、gantt、pie、mindmap、timeline、gitGraph。","标签保持简洁,语法必须合法。禁止输出 HTML、脚本、点击回调、URL、初始化指令、远程资源或任何凭据。"].join(`
351
351
  `)}};function VCt(e){return wk(GCt,e,"spec")}function HCt(e={}){const t=e.theme??"default",r=e.maxSourceBytes??64*1024;if(!Number.isSafeInteger(r)||r<=0)throw new TypeError("maxSourceBytes must be a positive safe integer");const n=new WeakMap;return{name:"mermaid",nodeRenderers:{mermaid:(a,s)=>{const o=s?.theme,l=o==="dark"?"dark":o&&PCt.has(o)?o:t,u=n.get(a);if(u&&u.theme===l)return u.output;const h=$Ct(async()=>{try{if(new TextEncoder().encode(a.content??"").byteLength>r)return r_e();const f=await BCt();e_e!==l&&(f.initialize({startOnLoad:!1,theme:l,securityLevel:"strict"}),e_e=l);const d=`aigui-mermaid-${NCt++}`;try{const{svg:p}=await f.render(d,a.content??"");return{kind:"html",html:p,trusted:!0}}finally{zCt(d)}}catch{return r_e()}});return n.set(a,{theme:l,output:h}),h}},promptSpec:a=>VCt(a)}}const WCt=720;function UCt(e=WCt){const t=Math.max(200,e-32);return[_wt({interactive:!1,width:t,height:Math.round(t*.625)}),HCt(),ICt({css:""}),Awt()]}const qCt="[data-aigui-async-pending]",YCt="[data-aigui-async-error]";function XCt(e,t){return new Promise(r=>{let n=0;const i=new MutationObserver(a);function a(){window.clearTimeout(n),n=window.setTimeout(s,t)}function s(){if(e.querySelector(qCt)){a();return}i.disconnect(),r()}i.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),a()})}function n_e(){return new Promise(e=>window.requestAnimationFrame(()=>e()))}window.__aiguiRenderBlock=async(e,t={})=>{const r=document.getElementById("root");r.replaceChildren(),Cit(r,{plugins:UCt(t.width),theme:t.theme}).push(e),await XCt(r,t.quietMs??150),await document.fonts.ready,await n_e(),await n_e();const i=r.getBoundingClientRect();return{width:Math.ceil(i.width),height:Math.ceil(i.height),failed:r.querySelector(YCt)!==null}},En([s2e,uH]);const jCt={init:function(){return pb.apply(null,arguments)}};En(sxe);const i_e=Object.freeze(Object.defineProperty({__proto__:null,Axis:Uo,ChartView:fn,ComponentModel:Nr,ComponentView:Yn,List:Pi,Model:yn,PRIORITY:Tpe,SeriesModel:gn,color:Rat,connect:Bft,dataTool:Vft,default:jCt,dependencies:bft,disConnect:$ft,disconnect:Bpe,dispose:Fft,env:rn,extendChartView:rTt,extendComponentModel:J_t,extendComponentView:eTt,extendSeriesModel:tTt,format:Z_t,getCoordinateSystemDimensions:mz,getInstanceByDom:dz,getInstanceById:zft,getMap:k6,graphic:K_t,helper:Y_t,init:pb,innerDrawElementOnCanvas:HC,matrix:rat,number:X_t,parseGeoJSON:JC,parseGeoJson:JC,registerAction:mh,registerCoordinateSystem:zpe,registerLayout:Gpe,registerLoading:xz,registerLocale:J$,registerMap:Hpe,registerPostInit:$pe,registerPostUpdate:Fpe,registerPreprocessor:gz,registerProcessor:vz,registerTheme:pz,registerTransform:Wpe,registerUpdateLifecycle:A6,registerVisual:gg,setCanvasCreator:Gft,setPlatformAPI:hle,throttle:t6,time:j_t,use:En,util:Q_t,vector:yat,version:xft,zrUtil:Fit,zrender:fht},Symbol.toStringTag,{value:"Module"}));function a_e(e,t,r){typeof t=="object"&&(r=t,t=null);var n=this,i;if(!(e instanceof Function)){i=[];for(var a in e)e.hasOwnProperty(a)&&i.push(a)}var s=function(l){if(n.apply(this,arguments),e instanceof Function?s_e(this,e.call(this,l)):KCt(this,e,i),this.constructor===s)for(var u=s.__initializers__,h=0;h<u.length;h++)u[h].apply(this,arguments)};s.__super__=n,n.__initializers__?s.__initializers__=n.__initializers__.slice():s.__initializers__=[],t&&s.__initializers__.push(t);var o=function(){};return o.prototype=n.prototype,s.prototype=new o,s.prototype.constructor=s,s_e(s.prototype,r),s.extend=n.extend,s.derive=n.extend,s}function s_e(e,t){if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function KCt(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];e[i]=t[i]}}const ZCt={extend:a_e,derive:a_e};function QCt(e,t){this.action=e,this.context=t}var LW={trigger:function(e){if(this.hasOwnProperty("__handlers__")&&this.__handlers__.hasOwnProperty(e)){var t=this.__handlers__[e],r=t.length,n=-1,i=arguments;switch(i.length){case 1:for(;++n<r;)t[n].action.call(t[n].context);return;case 2:for(;++n<r;)t[n].action.call(t[n].context,i[1]);return;case 3:for(;++n<r;)t[n].action.call(t[n].context,i[1],i[2]);return;case 4:for(;++n<r;)t[n].action.call(t[n].context,i[1],i[2],i[3]);return;case 5:for(;++n<r;)t[n].action.call(t[n].context,i[1],i[2],i[3],i[4]);return;default:for(;++n<r;)t[n].action.apply(t[n].context,Array.prototype.slice.call(i,1));return}}},on:function(e,t,r){if(!(!e||!t)){var n=this.__handlers__||(this.__handlers__={});if(!n[e])n[e]=[];else if(this.has(e,t))return;var i=new QCt(t,r||this);return n[e].push(i),this}},once:function(e,t,r){if(!e||!t)return;var n=this;function i(){n.off(e,i),t.apply(this,arguments)}return this.on(e,i,r)},before:function(e,t,r){if(!(!e||!t))return e="before"+e,this.on(e,t,r)},after:function(e,t,r){if(!(!e||!t))return e="after"+e,this.on(e,t,r)},success:function(e,t){return this.once("success",e,t)},error:function(e,t){return this.once("error",e,t)},off:function(e,t){var r=this.__handlers__||(this.__handlers__={});if(!t){r[e]=[];return}if(r[e]){for(var n=r[e],i=[],a=0;a<n.length;a++)t&&n[a].action!==t&&i.push(n[a]);r[e]=i}return this},has:function(e,t){var r=this.__handlers__;if(!r||!r[e])return!1;for(var n=r[e],i=0;i<n.length;i++)if(n[i].action===t)return!0}},JCt=0,e3t=Array.prototype,t3t=e3t.forEach,Aa={genGUID:function(){return++JCt},relative2absolute:function(e,t){if(!t||e.match(/^\//))return e;for(var r=e.split("/"),n=t.split("/"),i=r[0];i==="."||i==="..";)i===".."&&n.pop(),r.shift(),i=r[0];return n.join("/")+"/"+r.join("/")},extend:function(e,t){if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},defaults:function(e,t){if(t)for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e},extendWithPropList:function(e,t,r){if(t)for(var n=0;n<r.length;n++){var i=r[n];e[i]=t[i]}return e},defaultsWithPropList:function(e,t,r){if(t)for(var n=0;n<r.length;n++){var i=r[n];e[i]==null&&(e[i]=t[i])}return e},each:function(e,t,r){if(e&&t)if(e.forEach&&e.forEach===t3t)e.forEach(t,r);else if(e.length===+e.length)for(var n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(r,e[a],a,e)},isObject:function(e){return e===Object(e)},isArray:function(e){return Array.isArray(e)},isArrayLike:function(e){return e?e.length===+e.length:!1},clone:function(e){if(Aa.isObject(e)){if(Aa.isArray(e))return e.slice();if(Aa.isArrayLike(e)){for(var t=new e.constructor(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}else return Aa.extend({},e)}else return e}},Us=function(){this.__uid__=Aa.genGUID()};Us.__initializers__=[function(e){Aa.extend(this,e)}],Aa.extend(Us,ZCt),Aa.extend(Us.prototype,LW);var vD=1e-6,qs=Array,Ub=Math.random,Ue={};Ue.create=function(){var e=new qs(3);return e[0]=0,e[1]=0,e[2]=0,e},Ue.clone=function(e){var t=new qs(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},Ue.fromValues=function(e,t,r){var n=new qs(3);return n[0]=e,n[1]=t,n[2]=r,n},Ue.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},Ue.set=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e},Ue.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e},Ue.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},Ue.sub=Ue.subtract,Ue.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e},Ue.mul=Ue.multiply,Ue.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e},Ue.div=Ue.divide,Ue.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},Ue.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},Ue.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e},Ue.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e},Ue.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)},Ue.dist=Ue.distance,Ue.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i},Ue.sqrDist=Ue.squaredDistance,Ue.length=function(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)},Ue.len=Ue.length,Ue.squaredLength=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n},Ue.sqrLen=Ue.squaredLength,Ue.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},Ue.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},Ue.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e},Ue.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},Ue.cross=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=r[0],o=r[1],l=r[2];return e[0]=i*l-a*o,e[1]=a*s-n*l,e[2]=n*o-i*s,e},Ue.lerp=function(e,t,r,n){var i=t[0],a=t[1],s=t[2];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=s+n*(r[2]-s),e},Ue.random=function(e,t){t=t||1;var r=Ub()*2*Math.PI,n=Ub()*2-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e},Ue.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=r[3]*n+r[7]*i+r[11]*a+r[15];return s=s||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/s,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/s,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/s,e},Ue.transformMat3=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e},Ue.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=r[0],o=r[1],l=r[2],u=r[3],h=u*n+o*a-l*i,f=u*i+l*n-s*a,d=u*a+s*i-o*n,p=-s*n-o*i-l*a;return e[0]=h*u+p*-s+f*-l-d*-o,e[1]=f*u+p*-o+d*-s-h*-l,e[2]=d*u+p*-l+h*-o-f*-s,e},Ue.rotateX=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},Ue.rotateY=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},Ue.rotateZ=function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},Ue.forEach=function(){var e=Ue.create();return function(t,r,n,i,a,s){var o,l;for(r||(r=3),n||(n=0),i?l=Math.min(i*r+n,t.length):l=t.length,o=n;o<l;o+=r)e[0]=t[o],e[1]=t[o+1],e[2]=t[o+2],a(e,e,s),t[o]=e[0],t[o+1]=e[1],t[o+2]=e[2];return t}}(),Ue.angle=function(e,t){var r=Ue.fromValues(e[0],e[1],e[2]),n=Ue.fromValues(t[0],t[1],t[2]);Ue.normalize(r,r),Ue.normalize(n,n);var i=Ue.dot(r,n);return i>1?0:Math.acos(i)};var ht=function(e,t,r){e=e||0,t=t||0,r=r||0,this.array=Ue.fromValues(e,t,r),this._dirty=!0};ht.prototype={constructor:ht,add:function(e){return Ue.add(this.array,this.array,e.array),this._dirty=!0,this},set:function(e,t,r){return this.array[0]=e,this.array[1]=t,this.array[2]=r,this._dirty=!0,this},setArray:function(e){return this.array[0]=e[0],this.array[1]=e[1],this.array[2]=e[2],this._dirty=!0,this},clone:function(){return new ht(this.x,this.y,this.z)},copy:function(e){return Ue.copy(this.array,e.array),this._dirty=!0,this},cross:function(e,t){return Ue.cross(this.array,e.array,t.array),this._dirty=!0,this},dist:function(e){return Ue.dist(this.array,e.array)},distance:function(e){return Ue.distance(this.array,e.array)},div:function(e){return Ue.div(this.array,this.array,e.array),this._dirty=!0,this},divide:function(e){return Ue.divide(this.array,this.array,e.array),this._dirty=!0,this},dot:function(e){return Ue.dot(this.array,e.array)},len:function(){return Ue.len(this.array)},length:function(){return Ue.length(this.array)},lerp:function(e,t,r){return Ue.lerp(this.array,e.array,t.array,r),this._dirty=!0,this},min:function(e){return Ue.min(this.array,this.array,e.array),this._dirty=!0,this},max:function(e){return Ue.max(this.array,this.array,e.array),this._dirty=!0,this},mul:function(e){return Ue.mul(this.array,this.array,e.array),this._dirty=!0,this},multiply:function(e){return Ue.multiply(this.array,this.array,e.array),this._dirty=!0,this},negate:function(){return Ue.negate(this.array,this.array),this._dirty=!0,this},normalize:function(){return Ue.normalize(this.array,this.array),this._dirty=!0,this},random:function(e){return Ue.random(this.array,e),this._dirty=!0,this},scale:function(e){return Ue.scale(this.array,this.array,e),this._dirty=!0,this},scaleAndAdd:function(e,t){return Ue.scaleAndAdd(this.array,this.array,e.array,t),this._dirty=!0,this},sqrDist:function(e){return Ue.sqrDist(this.array,e.array)},squaredDistance:function(e){return Ue.squaredDistance(this.array,e.array)},sqrLen:function(){return Ue.sqrLen(this.array)},squaredLength:function(){return Ue.squaredLength(this.array)},sub:function(e){return Ue.sub(this.array,this.array,e.array),this._dirty=!0,this},subtract:function(e){return Ue.subtract(this.array,this.array,e.array),this._dirty=!0,this},transformMat3:function(e){return Ue.transformMat3(this.array,this.array,e.array),this._dirty=!0,this},transformMat4:function(e){return Ue.transformMat4(this.array,this.array,e.array),this._dirty=!0,this},transformQuat:function(e){return Ue.transformQuat(this.array,this.array,e.array),this._dirty=!0,this},applyProjection:function(e){var t=this.array;if(e=e.array,e[15]===0){var r=-1/t[2];t[0]=e[0]*t[0]*r,t[1]=e[5]*t[1]*r,t[2]=(e[10]*t[2]+e[14])*r}else t[0]=e[0]*t[0]+e[12],t[1]=e[5]*t[1]+e[13],t[2]=e[10]*t[2]+e[14];return this._dirty=!0,this},eulerFromQuat:function(e,t){ht.eulerFromQuat(this,e,t)},eulerFromMat3:function(e,t){ht.eulerFromMat3(this,e,t)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var mD=Object.defineProperty;if(mD){var RW=ht.prototype;mD(RW,"x",{get:function(){return this.array[0]},set:function(e){this.array[0]=e,this._dirty=!0}}),mD(RW,"y",{get:function(){return this.array[1]},set:function(e){this.array[1]=e,this._dirty=!0}}),mD(RW,"z",{get:function(){return this.array[2]},set:function(e){this.array[2]=e,this._dirty=!0}})}ht.add=function(e,t,r){return Ue.add(e.array,t.array,r.array),e._dirty=!0,e},ht.set=function(e,t,r,n){Ue.set(e.array,t,r,n),e._dirty=!0},ht.copy=function(e,t){return Ue.copy(e.array,t.array),e._dirty=!0,e},ht.cross=function(e,t,r){return Ue.cross(e.array,t.array,r.array),e._dirty=!0,e},ht.dist=function(e,t){return Ue.distance(e.array,t.array)},ht.distance=ht.dist,ht.div=function(e,t,r){return Ue.divide(e.array,t.array,r.array),e._dirty=!0,e},ht.divide=ht.div,ht.dot=function(e,t){return Ue.dot(e.array,t.array)},ht.len=function(e){return Ue.length(e.array)},ht.lerp=function(e,t,r,n){return Ue.lerp(e.array,t.array,r.array,n),e._dirty=!0,e},ht.min=function(e,t,r){return Ue.min(e.array,t.array,r.array),e._dirty=!0,e},ht.max=function(e,t,r){return Ue.max(e.array,t.array,r.array),e._dirty=!0,e},ht.mul=function(e,t,r){return Ue.multiply(e.array,t.array,r.array),e._dirty=!0,e},ht.multiply=ht.mul,ht.negate=function(e,t){return Ue.negate(e.array,t.array),e._dirty=!0,e},ht.normalize=function(e,t){return Ue.normalize(e.array,t.array),e._dirty=!0,e},ht.random=function(e,t){return Ue.random(e.array,t),e._dirty=!0,e},ht.scale=function(e,t,r){return Ue.scale(e.array,t.array,r),e._dirty=!0,e},ht.scaleAndAdd=function(e,t,r,n){return Ue.scaleAndAdd(e.array,t.array,r.array,n),e._dirty=!0,e},ht.sqrDist=function(e,t){return Ue.sqrDist(e.array,t.array)},ht.squaredDistance=ht.sqrDist,ht.sqrLen=function(e){return Ue.sqrLen(e.array)},ht.squaredLength=ht.sqrLen,ht.sub=function(e,t,r){return Ue.subtract(e.array,t.array,r.array),e._dirty=!0,e},ht.subtract=ht.sub,ht.transformMat3=function(e,t,r){return Ue.transformMat3(e.array,t.array,r.array),e._dirty=!0,e},ht.transformMat4=function(e,t,r){return Ue.transformMat4(e.array,t.array,r.array),e._dirty=!0,e},ht.transformQuat=function(e,t,r){return Ue.transformQuat(e.array,t.array,r.array),e._dirty=!0,e};function Ec(e,t,r){return e<t?t:e>r?r:e}var pi=Math.atan2,Ac=Math.asin,qb=Math.abs;ht.eulerFromQuat=function(e,t,d){e._dirty=!0,t=t.array;var n=e.array,i=t[0],a=t[1],s=t[2],o=t[3],l=i*i,u=a*a,h=s*s,f=o*o,d=(d||"XYZ").toUpperCase();switch(d){case"XYZ":n[0]=pi(2*(i*o-a*s),f-l-u+h),n[1]=Ac(Ec(2*(i*s+a*o),-1,1)),n[2]=pi(2*(s*o-i*a),f+l-u-h);break;case"YXZ":n[0]=Ac(Ec(2*(i*o-a*s),-1,1)),n[1]=pi(2*(i*s+a*o),f-l-u+h),n[2]=pi(2*(i*a+s*o),f-l+u-h);break;case"ZXY":n[0]=Ac(Ec(2*(i*o+a*s),-1,1)),n[1]=pi(2*(a*o-s*i),f-l-u+h),n[2]=pi(2*(s*o-i*a),f-l+u-h);break;case"ZYX":n[0]=pi(2*(i*o+s*a),f-l-u+h),n[1]=Ac(Ec(2*(a*o-i*s),-1,1)),n[2]=pi(2*(i*a+s*o),f+l-u-h);break;case"YZX":n[0]=pi(2*(i*o-s*a),f-l+u-h),n[1]=pi(2*(a*o-i*s),f+l-u-h),n[2]=Ac(Ec(2*(i*a+s*o),-1,1));break;case"XZY":n[0]=pi(2*(i*o+a*s),f-l+u-h),n[1]=pi(2*(i*s+a*o),f+l-u-h),n[2]=Ac(Ec(2*(s*o-i*a),-1,1));break;default:console.warn("Unkown order: "+d)}return e},ht.eulerFromMat3=function(e,t,g){var n=t.array,i=n[0],a=n[3],s=n[6],o=n[1],l=n[4],u=n[7],h=n[2],f=n[5],d=n[8],p=e.array,g=(g||"XYZ").toUpperCase();switch(g){case"XYZ":p[1]=Ac(Ec(s,-1,1)),qb(s)<.99999?(p[0]=pi(-u,d),p[2]=pi(-a,i)):(p[0]=pi(f,l),p[2]=0);break;case"YXZ":p[0]=Ac(-Ec(u,-1,1)),qb(u)<.99999?(p[1]=pi(s,d),p[2]=pi(o,l)):(p[1]=pi(-h,i),p[2]=0);break;case"ZXY":p[0]=Ac(Ec(f,-1,1)),qb(f)<.99999?(p[1]=pi(-h,d),p[2]=pi(-a,l)):(p[1]=0,p[2]=pi(o,i));break;case"ZYX":p[1]=Ac(-Ec(h,-1,1)),qb(h)<.99999?(p[0]=pi(f,d),p[2]=pi(o,i)):(p[0]=0,p[2]=pi(-a,l));break;case"YZX":p[2]=Ac(Ec(o,-1,1)),qb(o)<.99999?(p[0]=pi(-u,l),p[1]=pi(-h,i)):(p[0]=0,p[1]=pi(s,d));break;case"XZY":p[2]=Ac(-Ec(a,-1,1)),qb(a)<.99999?(p[0]=pi(f,l),p[1]=pi(s,i)):(p[0]=pi(-u,d),p[1]=0);break;default:console.warn("Unkown order: "+g)}return e._dirty=!0,e},Object.defineProperties(ht,{POSITIVE_X:{get:function(){return new ht(1,0,0)}},NEGATIVE_X:{get:function(){return new ht(-1,0,0)}},POSITIVE_Y:{get:function(){return new ht(0,1,0)}},NEGATIVE_Y:{get:function(){return new ht(0,-1,0)}},POSITIVE_Z:{get:function(){return new ht(0,0,1)}},NEGATIVE_Z:{get:function(){return new ht(0,0,-1)}},UP:{get:function(){return new ht(0,1,0)}},ZERO:{get:function(){return new ht}}});var wt={};wt.create=function(){var e=new qs(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e},wt.clone=function(e){var t=new qs(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},wt.fromValues=function(e,t,r,n){var i=new qs(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i},wt.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},wt.set=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e},wt.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e},wt.subtract=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e},wt.sub=wt.subtract,wt.multiply=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},wt.mul=wt.multiply,wt.divide=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e},wt.div=wt.divide,wt.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},wt.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},wt.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},wt.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},wt.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+a*a)},wt.dist=wt.distance,wt.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a},wt.sqrDist=wt.squaredDistance,wt.length=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)},wt.len=wt.length,wt.squaredLength=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i},wt.sqrLen=wt.squaredLength,wt.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},wt.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},wt.normalize=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=r*r+n*n+i*i+a*a;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s),e},wt.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},wt.lerp=function(e,t,r,n){var i=t[0],a=t[1],s=t[2],o=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=s+n*(r[2]-s),e[3]=o+n*(r[3]-o),e},wt.random=function(e,t){return t=t||1,e[0]=Ub(),e[1]=Ub(),e[2]=Ub(),e[3]=Ub(),wt.normalize(e,e),wt.scale(e,e,t),e},wt.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*s,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*s,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*s,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*s,e},wt.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=r[0],o=r[1],l=r[2],u=r[3],h=u*n+o*a-l*i,f=u*i+l*n-s*a,d=u*a+s*i-o*n,p=-s*n-o*i-l*a;return e[0]=h*u+p*-s+f*-l-d*-o,e[1]=f*u+p*-o+d*-s-h*-l,e[2]=d*u+p*-l+h*-o-f*-s,e},wt.forEach=function(){var e=wt.create();return function(t,r,n,i,a,s){var o,l;for(r||(r=4),n||(n=0),i?l=Math.min(i*r+n,t.length):l=t.length,o=n;o<l;o+=r)e[0]=t[o],e[1]=t[o+1],e[2]=t[o+2],e[3]=t[o+3],a(e,e,s),t[o]=e[0],t[o+1]=e[1],t[o+2]=e[2],t[o+3]=e[3];return t}}();var kr={};kr.create=function(){var e=new qs(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},kr.fromMat4=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e},kr.clone=function(e){var t=new qs(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},kr.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},kr.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},kr.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e},kr.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],h=t[8],f=h*s-o*u,d=-h*a+o*l,p=u*a-s*l,g=r*f+n*d+i*p;return g?(g=1/g,e[0]=f*g,e[1]=(-h*n+i*u)*g,e[2]=(o*n-i*s)*g,e[3]=d*g,e[4]=(h*r-i*l)*g,e[5]=(-o*r+i*a)*g,e[6]=p*g,e[7]=(-u*r+n*l)*g,e[8]=(s*r-n*a)*g,e):null},kr.adjoint=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],h=t[8];return e[0]=s*h-o*u,e[1]=i*u-n*h,e[2]=n*o-i*s,e[3]=o*l-a*h,e[4]=r*h-i*l,e[5]=i*a-r*o,e[6]=a*u-s*l,e[7]=n*l-r*u,e[8]=r*s-n*a,e},kr.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*(u*a-s*l)+r*(-u*i+s*o)+n*(l*i-a*o)},kr.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],f=t[8],d=r[0],p=r[1],g=r[2],v=r[3],m=r[4],y=r[5],x=r[6],b=r[7],_=r[8];return e[0]=d*n+p*s+g*u,e[1]=d*i+p*o+g*h,e[2]=d*a+p*l+g*f,e[3]=v*n+m*s+y*u,e[4]=v*i+m*o+y*h,e[5]=v*a+m*l+y*f,e[6]=x*n+b*s+_*u,e[7]=x*i+b*o+_*h,e[8]=x*a+b*l+_*f,e},kr.mul=kr.multiply,kr.translate=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],f=t[8],d=r[0],p=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=s,e[4]=o,e[5]=l,e[6]=d*n+p*s+u,e[7]=d*i+p*o+h,e[8]=d*a+p*l+f,e},kr.rotate=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],f=t[8],d=Math.sin(r),p=Math.cos(r);return e[0]=p*n+d*s,e[1]=p*i+d*o,e[2]=p*a+d*l,e[3]=p*s-d*n,e[4]=p*o-d*i,e[5]=p*l-d*a,e[6]=u,e[7]=h,e[8]=f,e},kr.scale=function(e,t,r){var n=r[0],i=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},kr.fromMat2d=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},kr.fromQuat=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=r+r,o=n+n,l=i+i,u=r*s,h=n*s,f=n*o,d=i*s,p=i*o,g=i*l,v=a*s,m=a*o,y=a*l;return e[0]=1-f-g,e[3]=h-y,e[6]=d+m,e[1]=h+y,e[4]=1-u-g,e[7]=p-v,e[2]=d-m,e[5]=p+v,e[8]=1-u-f,e},kr.normalFromMat4=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],h=t[8],f=t[9],d=t[10],p=t[11],g=t[12],v=t[13],m=t[14],y=t[15],x=r*o-n*s,b=r*l-i*s,_=r*u-a*s,T=n*l-i*o,w=n*u-a*o,S=i*u-a*l,E=h*v-f*g,A=h*m-d*g,k=h*y-p*g,L=f*m-d*v,I=f*y-p*v,D=d*y-p*m,R=x*D-b*I+_*L+T*k-w*A+S*E;return R?(R=1/R,e[0]=(o*D-l*I+u*L)*R,e[1]=(l*k-s*D-u*A)*R,e[2]=(s*I-o*k+u*E)*R,e[3]=(i*I-n*D-a*L)*R,e[4]=(r*D-i*k+a*A)*R,e[5]=(n*k-r*I-a*E)*R,e[6]=(v*S-m*w+y*T)*R,e[7]=(m*_-g*S-y*b)*R,e[8]=(g*w-v*_+y*x)*R,e):null},kr.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+Math.pow(e[6],2)+Math.pow(e[7],2)+Math.pow(e[8],2))};var Zt={};Zt.create=function(){var e=new qs(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},Zt.rotationTo=function(){var e=Ue.create(),t=Ue.fromValues(1,0,0),r=Ue.fromValues(0,1,0);return function(n,i,a){var s=Ue.dot(i,a);return s<-.999999?(Ue.cross(e,t,i),Ue.length(e)<1e-6&&Ue.cross(e,r,i),Ue.normalize(e,e),Zt.setAxisAngle(n,e,Math.PI),n):s>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(Ue.cross(e,i,a),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=1+s,Zt.normalize(n,n))}}(),Zt.setAxes=function(){var e=kr.create();return function(t,r,n,i){return e[0]=n[0],e[3]=n[1],e[6]=n[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-r[0],e[5]=-r[1],e[8]=-r[2],Zt.normalize(t,Zt.fromMat3(t,e))}}(),Zt.clone=wt.clone,Zt.fromValues=wt.fromValues,Zt.copy=wt.copy,Zt.set=wt.set,Zt.identity=function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},Zt.setAxisAngle=function(e,t,r){r=r*.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e},Zt.add=wt.add,Zt.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=r[0],l=r[1],u=r[2],h=r[3];return e[0]=n*h+s*o+i*u-a*l,e[1]=i*h+s*l+a*o-n*u,e[2]=a*h+s*u+n*l-i*o,e[3]=s*h-n*o-i*l-a*u,e},Zt.mul=Zt.multiply,Zt.scale=wt.scale,Zt.rotateX=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],s=t[3],o=Math.sin(r),l=Math.cos(r);return e[0]=n*l+s*o,e[1]=i*l+a*o,e[2]=a*l-i*o,e[3]=s*l-n*o,e},Zt.rotateY=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],s=t[3],o=Math.sin(r),l=Math.cos(r);return e[0]=n*l-a*o,e[1]=i*l+s*o,e[2]=a*l+n*o,e[3]=s*l-i*o,e},Zt.rotateZ=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],s=t[3],o=Math.sin(r),l=Math.cos(r);return e[0]=n*l+i*o,e[1]=i*l-n*o,e[2]=a*l+s*o,e[3]=s*l-a*o,e},Zt.calculateW=function(e,t){var r=t[0],n=t[1],i=t[2];return e[0]=r,e[1]=n,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),e},Zt.dot=wt.dot,Zt.lerp=wt.lerp,Zt.slerp=function(e,t,r,n){var i=t[0],a=t[1],s=t[2],o=t[3],l=r[0],u=r[1],h=r[2],f=r[3],d,p,g,v,m;return p=i*l+a*u+s*h+o*f,p<0&&(p=-p,l=-l,u=-u,h=-h,f=-f),1-p>1e-6?(d=Math.acos(p),g=Math.sin(d),v=Math.sin((1-n)*d)/g,m=Math.sin(n*d)/g):(v=1-n,m=n),e[0]=v*i+m*l,e[1]=v*a+m*u,e[2]=v*s+m*h,e[3]=v*o+m*f,e},Zt.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=r*r+n*n+i*i+a*a,o=s?1/s:0;return e[0]=-r*o,e[1]=-n*o,e[2]=-i*o,e[3]=a*o,e},Zt.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},Zt.length=wt.length,Zt.len=Zt.length,Zt.squaredLength=wt.squaredLength,Zt.sqrLen=Zt.squaredLength,Zt.normalize=wt.normalize,Zt.fromMat3=function(e,t){var r=t[0]+t[4]+t[8],n;if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);var a=(i+1)%3,s=(i+2)%3;n=Math.sqrt(t[i*3+i]-t[a*3+a]-t[s*3+s]+1),e[i]=.5*n,n=.5/n,e[3]=(t[a*3+s]-t[s*3+a])*n,e[a]=(t[a*3+i]+t[i*3+a])*n,e[s]=(t[s*3+i]+t[i*3+s])*n}return e};var Zn=function(e,t,r,n){e=e||0,t=t||0,r=r||0,n=n===void 0?1:n,this.array=Zt.fromValues(e,t,r,n),this._dirty=!0};Zn.prototype={constructor:Zn,add:function(e){return Zt.add(this.array,this.array,e.array),this._dirty=!0,this},calculateW:function(){return Zt.calculateW(this.array,this.array),this._dirty=!0,this},set:function(e,t,r,n){return this.array[0]=e,this.array[1]=t,this.array[2]=r,this.array[3]=n,this._dirty=!0,this},setArray:function(e){return this.array[0]=e[0],this.array[1]=e[1],this.array[2]=e[2],this.array[3]=e[3],this._dirty=!0,this},clone:function(){return new Zn(this.x,this.y,this.z,this.w)},conjugate:function(){return Zt.conjugate(this.array,this.array),this._dirty=!0,this},copy:function(e){return Zt.copy(this.array,e.array),this._dirty=!0,this},dot:function(e){return Zt.dot(this.array,e.array)},fromMat3:function(e){return Zt.fromMat3(this.array,e.array),this._dirty=!0,this},fromMat4:function(){var e=kr.create();return function(t){return kr.fromMat4(e,t.array),kr.transpose(e,e),Zt.fromMat3(this.array,e),this._dirty=!0,this}}(),identity:function(){return Zt.identity(this.array),this._dirty=!0,this},invert:function(){return Zt.invert(this.array,this.array),this._dirty=!0,this},len:function(){return Zt.len(this.array)},length:function(){return Zt.length(this.array)},lerp:function(e,t,r){return Zt.lerp(this.array,e.array,t.array,r),this._dirty=!0,this},mul:function(e){return Zt.mul(this.array,this.array,e.array),this._dirty=!0,this},mulLeft:function(e){return Zt.multiply(this.array,e.array,this.array),this._dirty=!0,this},multiply:function(e){return Zt.multiply(this.array,this.array,e.array),this._dirty=!0,this},multiplyLeft:function(e){return Zt.multiply(this.array,e.array,this.array),this._dirty=!0,this},normalize:function(){return Zt.normalize(this.array,this.array),this._dirty=!0,this},rotateX:function(e){return Zt.rotateX(this.array,this.array,e),this._dirty=!0,this},rotateY:function(e){return Zt.rotateY(this.array,this.array,e),this._dirty=!0,this},rotateZ:function(e){return Zt.rotateZ(this.array,this.array,e),this._dirty=!0,this},rotationTo:function(e,t){return Zt.rotationTo(this.array,e.array,t.array),this._dirty=!0,this},setAxes:function(e,t,r){return Zt.setAxes(this.array,e.array,t.array,r.array),this._dirty=!0,this},setAxisAngle:function(e,t){return Zt.setAxisAngle(this.array,e.array,t),this._dirty=!0,this},slerp:function(e,t,r){return Zt.slerp(this.array,e.array,t.array,r),this._dirty=!0,this},sqrLen:function(){return Zt.sqrLen(this.array)},squaredLength:function(){return Zt.squaredLength(this.array)},fromEuler:function(e,t){return Zn.fromEuler(this,e,t)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var P3=Object.defineProperty;if(P3){var yD=Zn.prototype;P3(yD,"x",{get:function(){return this.array[0]},set:function(e){this.array[0]=e,this._dirty=!0}}),P3(yD,"y",{get:function(){return this.array[1]},set:function(e){this.array[1]=e,this._dirty=!0}}),P3(yD,"z",{get:function(){return this.array[2]},set:function(e){this.array[2]=e,this._dirty=!0}}),P3(yD,"w",{get:function(){return this.array[3]},set:function(e){this.array[3]=e,this._dirty=!0}})}Zn.add=function(e,t,r){return Zt.add(e.array,t.array,r.array),e._dirty=!0,e},Zn.set=function(e,t,r,n,i){Zt.set(e.array,t,r,n,i),e._dirty=!0},Zn.copy=function(e,t){return Zt.copy(e.array,t.array),e._dirty=!0,e},Zn.calculateW=function(e,t){return Zt.calculateW(e.array,t.array),e._dirty=!0,e},Zn.conjugate=function(e,t){return Zt.conjugate(e.array,t.array),e._dirty=!0,e},Zn.identity=function(e){return Zt.identity(e.array),e._dirty=!0,e},Zn.invert=function(e,t){return Zt.invert(e.array,t.array),e._dirty=!0,e},Zn.dot=function(e,t){return Zt.dot(e.array,t.array)},Zn.len=function(e){return Zt.length(e.array)},Zn.lerp=function(e,t,r,n){return Zt.lerp(e.array,t.array,r.array,n),e._dirty=!0,e},Zn.slerp=function(e,t,r,n){return Zt.slerp(e.array,t.array,r.array,n),e._dirty=!0,e},Zn.mul=function(e,t,r){return Zt.multiply(e.array,t.array,r.array),e._dirty=!0,e},Zn.multiply=Zn.mul,Zn.rotateX=function(e,t,r){return Zt.rotateX(e.array,t.array,r),e._dirty=!0,e},Zn.rotateY=function(e,t,r){return Zt.rotateY(e.array,t.array,r),e._dirty=!0,e},Zn.rotateZ=function(e,t,r){return Zt.rotateZ(e.array,t.array,r),e._dirty=!0,e},Zn.setAxisAngle=function(e,t,r){return Zt.setAxisAngle(e.array,t.array,r),e._dirty=!0,e},Zn.normalize=function(e,t){return Zt.normalize(e.array,t.array),e._dirty=!0,e},Zn.sqrLen=function(e){return Zt.sqrLen(e.array)},Zn.squaredLength=Zn.sqrLen,Zn.fromMat3=function(e,t){return Zt.fromMat3(e.array,t.array),e._dirty=!0,e},Zn.setAxes=function(e,t,r,n){return Zt.setAxes(e.array,t.array,r.array,n.array),e._dirty=!0,e},Zn.rotationTo=function(e,t,r){return Zt.rotationTo(e.array,t.array,r.array),e._dirty=!0,e},Zn.fromEuler=function(e,t,h){e._dirty=!0,t=t.array;var n=e.array,i=Math.cos(t[0]/2),a=Math.cos(t[1]/2),s=Math.cos(t[2]/2),o=Math.sin(t[0]/2),l=Math.sin(t[1]/2),u=Math.sin(t[2]/2),h=(h||"XYZ").toUpperCase();switch(h){case"XYZ":n[0]=o*a*s+i*l*u,n[1]=i*l*s-o*a*u,n[2]=i*a*u+o*l*s,n[3]=i*a*s-o*l*u;break;case"YXZ":n[0]=o*a*s+i*l*u,n[1]=i*l*s-o*a*u,n[2]=i*a*u-o*l*s,n[3]=i*a*s+o*l*u;break;case"ZXY":n[0]=o*a*s-i*l*u,n[1]=i*l*s+o*a*u,n[2]=i*a*u+o*l*s,n[3]=i*a*s-o*l*u;break;case"ZYX":n[0]=o*a*s-i*l*u,n[1]=i*l*s+o*a*u,n[2]=i*a*u-o*l*s,n[3]=i*a*s+o*l*u;break;case"YZX":n[0]=o*a*s+i*l*u,n[1]=i*l*s+o*a*u,n[2]=i*a*u-o*l*s,n[3]=i*a*s-o*l*u;break;case"XZY":n[0]=o*a*s-i*l*u,n[1]=i*l*s-o*a*u,n[2]=i*a*u+o*l*s,n[3]=i*a*s+o*l*u;break}};var St={};St.create=function(){var e=new qs(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},St.clone=function(e){var t=new qs(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},St.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},St.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},St.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],s=t[7],o=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=s,e[14]=o}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},St.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],h=t[8],f=t[9],d=t[10],p=t[11],g=t[12],v=t[13],m=t[14],y=t[15],x=r*o-n*s,b=r*l-i*s,_=r*u-a*s,T=n*l-i*o,w=n*u-a*o,S=i*u-a*l,E=h*v-f*g,A=h*m-d*g,k=h*y-p*g,L=f*m-d*v,I=f*y-p*v,D=d*y-p*m,R=x*D-b*I+_*L+T*k-w*A+S*E;return R?(R=1/R,e[0]=(o*D-l*I+u*L)*R,e[1]=(i*I-n*D-a*L)*R,e[2]=(v*S-m*w+y*T)*R,e[3]=(d*w-f*S-p*T)*R,e[4]=(l*k-s*D-u*A)*R,e[5]=(r*D-i*k+a*A)*R,e[6]=(m*_-g*S-y*b)*R,e[7]=(h*S-d*_+p*b)*R,e[8]=(s*I-o*k+u*E)*R,e[9]=(n*k-r*I-a*E)*R,e[10]=(g*w-v*_+y*x)*R,e[11]=(f*_-h*w-p*x)*R,e[12]=(o*A-s*L-l*E)*R,e[13]=(r*L-n*A+i*E)*R,e[14]=(v*b-g*T-m*x)*R,e[15]=(h*T-f*b+d*x)*R,e):null},St.adjoint=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],h=t[8],f=t[9],d=t[10],p=t[11],g=t[12],v=t[13],m=t[14],y=t[15];return e[0]=o*(d*y-p*m)-f*(l*y-u*m)+v*(l*p-u*d),e[1]=-(n*(d*y-p*m)-f*(i*y-a*m)+v*(i*p-a*d)),e[2]=n*(l*y-u*m)-o*(i*y-a*m)+v*(i*u-a*l),e[3]=-(n*(l*p-u*d)-o*(i*p-a*d)+f*(i*u-a*l)),e[4]=-(s*(d*y-p*m)-h*(l*y-u*m)+g*(l*p-u*d)),e[5]=r*(d*y-p*m)-h*(i*y-a*m)+g*(i*p-a*d),e[6]=-(r*(l*y-u*m)-s*(i*y-a*m)+g*(i*u-a*l)),e[7]=r*(l*p-u*d)-s*(i*p-a*d)+h*(i*u-a*l),e[8]=s*(f*y-p*v)-h*(o*y-u*v)+g*(o*p-u*f),e[9]=-(r*(f*y-p*v)-h*(n*y-a*v)+g*(n*p-a*f)),e[10]=r*(o*y-u*v)-s*(n*y-a*v)+g*(n*u-a*o),e[11]=-(r*(o*p-u*f)-s*(n*p-a*f)+h*(n*u-a*o)),e[12]=-(s*(f*m-d*v)-h*(o*m-l*v)+g*(o*d-l*f)),e[13]=r*(f*m-d*v)-h*(n*m-i*v)+g*(n*d-i*f),e[14]=-(r*(o*m-l*v)-s*(n*m-i*v)+g*(n*l-i*o)),e[15]=r*(o*d-l*f)-s*(n*d-i*f)+h*(n*l-i*o),e},St.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t*s-r*a,x=t*o-n*a,b=t*l-i*a,_=r*o-n*s,T=r*l-i*s,w=n*l-i*o,S=u*g-h*p,E=u*v-f*p,A=u*m-d*p,k=h*v-f*g,L=h*m-d*g,I=f*m-d*v;return y*I-x*L+b*k+_*A-T*E+w*S},St.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],f=t[8],d=t[9],p=t[10],g=t[11],v=t[12],m=t[13],y=t[14],x=t[15],b=r[0],_=r[1],T=r[2],w=r[3];return e[0]=b*n+_*o+T*f+w*v,e[1]=b*i+_*l+T*d+w*m,e[2]=b*a+_*u+T*p+w*y,e[3]=b*s+_*h+T*g+w*x,b=r[4],_=r[5],T=r[6],w=r[7],e[4]=b*n+_*o+T*f+w*v,e[5]=b*i+_*l+T*d+w*m,e[6]=b*a+_*u+T*p+w*y,e[7]=b*s+_*h+T*g+w*x,b=r[8],_=r[9],T=r[10],w=r[11],e[8]=b*n+_*o+T*f+w*v,e[9]=b*i+_*l+T*d+w*m,e[10]=b*a+_*u+T*p+w*y,e[11]=b*s+_*h+T*g+w*x,b=r[12],_=r[13],T=r[14],w=r[15],e[12]=b*n+_*o+T*f+w*v,e[13]=b*i+_*l+T*d+w*m,e[14]=b*a+_*u+T*p+w*y,e[15]=b*s+_*h+T*g+w*x,e},St.multiplyAffine=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[4],o=t[5],l=t[6],u=t[8],h=t[9],f=t[10],d=t[12],p=t[13],g=t[14],v=r[0],m=r[1],y=r[2];return e[0]=v*n+m*s+y*u,e[1]=v*i+m*o+y*h,e[2]=v*a+m*l+y*f,v=r[4],m=r[5],y=r[6],e[4]=v*n+m*s+y*u,e[5]=v*i+m*o+y*h,e[6]=v*a+m*l+y*f,v=r[8],m=r[9],y=r[10],e[8]=v*n+m*s+y*u,e[9]=v*i+m*o+y*h,e[10]=v*a+m*l+y*f,v=r[12],m=r[13],y=r[14],e[12]=v*n+m*s+y*u+d,e[13]=v*i+m*o+y*h+p,e[14]=v*a+m*l+y*f+g,e},St.mul=St.multiply,St.mulAffine=St.multiplyAffine,St.translate=function(e,t,r){var n=r[0],i=r[1],a=r[2],s,o,l,u,h,f,d,p,g,v,m,y;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(s=t[0],o=t[1],l=t[2],u=t[3],h=t[4],f=t[5],d=t[6],p=t[7],g=t[8],v=t[9],m=t[10],y=t[11],e[0]=s,e[1]=o,e[2]=l,e[3]=u,e[4]=h,e[5]=f,e[6]=d,e[7]=p,e[8]=g,e[9]=v,e[10]=m,e[11]=y,e[12]=s*n+h*i+g*a+t[12],e[13]=o*n+f*i+v*a+t[13],e[14]=l*n+d*i+m*a+t[14],e[15]=u*n+p*i+y*a+t[15]),e},St.scale=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},St.rotate=function(e,t,r,n){var i=n[0],a=n[1],s=n[2],o=Math.sqrt(i*i+a*a+s*s),l,u,h,f,d,p,g,v,m,y,x,b,_,T,w,S,E,A,k,L,I,D,R,M;return Math.abs(o)<vD?null:(o=1/o,i*=o,a*=o,s*=o,l=Math.sin(r),u=Math.cos(r),h=1-u,f=t[0],d=t[1],p=t[2],g=t[3],v=t[4],m=t[5],y=t[6],x=t[7],b=t[8],_=t[9],T=t[10],w=t[11],S=i*i*h+u,E=a*i*h+s*l,A=s*i*h-a*l,k=i*a*h-s*l,L=a*a*h+u,I=s*a*h+i*l,D=i*s*h+a*l,R=a*s*h-i*l,M=s*s*h+u,e[0]=f*S+v*E+b*A,e[1]=d*S+m*E+_*A,e[2]=p*S+y*E+T*A,e[3]=g*S+x*E+w*A,e[4]=f*k+v*L+b*I,e[5]=d*k+m*L+_*I,e[6]=p*k+y*L+T*I,e[7]=g*k+x*L+w*I,e[8]=f*D+v*R+b*M,e[9]=d*D+m*R+_*M,e[10]=p*D+y*R+T*M,e[11]=g*D+x*R+w*M,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)},St.rotateX=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],s=t[5],o=t[6],l=t[7],u=t[8],h=t[9],f=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=s*i+h*n,e[6]=o*i+f*n,e[7]=l*i+d*n,e[8]=u*i-a*n,e[9]=h*i-s*n,e[10]=f*i-o*n,e[11]=d*i-l*n,e},St.rotateY=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],s=t[1],o=t[2],l=t[3],u=t[8],h=t[9],f=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=s*i-h*n,e[2]=o*i-f*n,e[3]=l*i-d*n,e[8]=a*n+u*i,e[9]=s*n+h*i,e[10]=o*n+f*i,e[11]=l*n+d*i,e},St.rotateZ=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],s=t[1],o=t[2],l=t[3],u=t[4],h=t[5],f=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*n,e[1]=s*i+h*n,e[2]=o*i+f*n,e[3]=l*i+d*n,e[4]=u*i-a*n,e[5]=h*i-s*n,e[6]=f*i-o*n,e[7]=d*i-l*n,e},St.fromRotationTranslation=function(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=n+n,l=i+i,u=a+a,h=n*o,f=n*l,d=n*u,p=i*l,g=i*u,v=a*u,m=s*o,y=s*l,x=s*u;return e[0]=1-(p+v),e[1]=f+x,e[2]=d-y,e[3]=0,e[4]=f-x,e[5]=1-(h+v),e[6]=g+m,e[7]=0,e[8]=d+y,e[9]=g-m,e[10]=1-(h+p),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},St.fromQuat=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=r+r,o=n+n,l=i+i,u=r*s,h=n*s,f=n*o,d=i*s,p=i*o,g=i*l,v=a*s,m=a*o,y=a*l;return e[0]=1-f-g,e[1]=h+y,e[2]=d-m,e[3]=0,e[4]=h-y,e[5]=1-u-g,e[6]=p+v,e[7]=0,e[8]=d+m,e[9]=p-v,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},St.frustum=function(e,t,r,n,i,a,s){var o=1/(r-t),l=1/(i-n),u=1/(a-s);return e[0]=a*2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*o,e[9]=(i+n)*l,e[10]=(s+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=s*a*2*u,e[15]=0,e},St.perspective=function(e,t,r,n,i){var a=1/Math.tan(t/2),s=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*s,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*s,e[15]=0,e},St.ortho=function(e,t,r,n,i,a,s){var o=1/(t-r),l=1/(n-i),u=1/(a-s);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*o,e[13]=(i+n)*l,e[14]=(s+a)*u,e[15]=1,e},St.lookAt=function(e,t,r,n){var i,a,s,o,l,u,h,f,d,p,g=t[0],v=t[1],m=t[2],y=n[0],x=n[1],b=n[2],_=r[0],T=r[1],w=r[2];return Math.abs(g-_)<vD&&Math.abs(v-T)<vD&&Math.abs(m-w)<vD?St.identity(e):(h=g-_,f=v-T,d=m-w,p=1/Math.sqrt(h*h+f*f+d*d),h*=p,f*=p,d*=p,i=x*d-b*f,a=b*h-y*d,s=y*f-x*h,p=Math.sqrt(i*i+a*a+s*s),p?(p=1/p,i*=p,a*=p,s*=p):(i=0,a=0,s=0),o=f*s-d*a,l=d*i-h*s,u=h*a-f*i,p=Math.sqrt(o*o+l*l+u*u),p?(p=1/p,o*=p,l*=p,u*=p):(o=0,l=0,u=0),e[0]=i,e[1]=o,e[2]=h,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=d,e[11]=0,e[12]=-(i*g+a*v+s*m),e[13]=-(o*g+l*v+u*m),e[14]=-(h*g+f*v+d*m),e[15]=1,e)},St.frob=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+Math.pow(e[6],2)+Math.pow(e[7],2)+Math.pow(e[8],2)+Math.pow(e[9],2)+Math.pow(e[10],2)+Math.pow(e[11],2)+Math.pow(e[12],2)+Math.pow(e[13],2)+Math.pow(e[14],2)+Math.pow(e[15],2))};var Kt=function(){this._axisX=new ht,this._axisY=new ht,this._axisZ=new ht,this.array=St.create(),this._dirty=!0};Kt.prototype={constructor:Kt,setArray:function(e){for(var t=0;t<this.array.length;t++)this.array[t]=e[t];return this._dirty=!0,this},adjoint:function(){return St.adjoint(this.array,this.array),this._dirty=!0,this},clone:function(){return new Kt().copy(this)},copy:function(e){return St.copy(this.array,e.array),this._dirty=!0,this},determinant:function(){return St.determinant(this.array)},fromQuat:function(e){return St.fromQuat(this.array,e.array),this._dirty=!0,this},fromRotationTranslation:function(e,t){return St.fromRotationTranslation(this.array,e.array,t.array),this._dirty=!0,this},fromMat2d:function(e){return Kt.fromMat2d(this,e),this},frustum:function(e,t,r,n,i,a){return St.frustum(this.array,e,t,r,n,i,a),this._dirty=!0,this},identity:function(){return St.identity(this.array),this._dirty=!0,this},invert:function(){return St.invert(this.array,this.array),this._dirty=!0,this},lookAt:function(e,t,r){return St.lookAt(this.array,e.array,t.array,r.array),this._dirty=!0,this},mul:function(e){return St.mul(this.array,this.array,e.array),this._dirty=!0,this},mulLeft:function(e){return St.mul(this.array,e.array,this.array),this._dirty=!0,this},multiply:function(e){return St.multiply(this.array,this.array,e.array),this._dirty=!0,this},multiplyLeft:function(e){return St.multiply(this.array,e.array,this.array),this._dirty=!0,this},ortho:function(e,t,r,n,i,a){return St.ortho(this.array,e,t,r,n,i,a),this._dirty=!0,this},perspective:function(e,t,r,n){return St.perspective(this.array,e,t,r,n),this._dirty=!0,this},rotate:function(e,t){return St.rotate(this.array,this.array,e,t.array),this._dirty=!0,this},rotateX:function(e){return St.rotateX(this.array,this.array,e),this._dirty=!0,this},rotateY:function(e){return St.rotateY(this.array,this.array,e),this._dirty=!0,this},rotateZ:function(e){return St.rotateZ(this.array,this.array,e),this._dirty=!0,this},scale:function(e){return St.scale(this.array,this.array,e.array),this._dirty=!0,this},translate:function(e){return St.translate(this.array,this.array,e.array),this._dirty=!0,this},transpose:function(){return St.transpose(this.array,this.array),this._dirty=!0,this},decomposeMatrix:function(){var e=Ue.create(),t=Ue.create(),r=Ue.create(),n=kr.create();return function(i,a,s){var o=this.array;Ue.set(e,o[0],o[1],o[2]),Ue.set(t,o[4],o[5],o[6]),Ue.set(r,o[8],o[9],o[10]);var l=Ue.length(e),u=Ue.length(t),h=Ue.length(r),f=this.determinant();f<0&&(l=-l),i&&i.set(l,u,h),s.set(o[12],o[13],o[14]),kr.fromMat4(n,o),n[0]/=l,n[1]/=l,n[2]/=l,n[3]/=u,n[4]/=u,n[5]/=u,n[6]/=h,n[7]/=h,n[8]/=h,Zt.fromMat3(a.array,n),Zt.normalize(a.array,a.array),a._dirty=!0,s._dirty=!0}}(),toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var xD=Object.defineProperty;if(xD){var DW=Kt.prototype;xD(DW,"z",{get:function(){var e=this.array;return this._axisZ.set(e[8],e[9],e[10]),this._axisZ},set:function(e){var t=this.array;e=e.array,t[8]=e[0],t[9]=e[1],t[10]=e[2],this._dirty=!0}}),xD(DW,"y",{get:function(){var e=this.array;return this._axisY.set(e[4],e[5],e[6]),this._axisY},set:function(e){var t=this.array;e=e.array,t[4]=e[0],t[5]=e[1],t[6]=e[2],this._dirty=!0}}),xD(DW,"x",{get:function(){var e=this.array;return this._axisX.set(e[0],e[1],e[2]),this._axisX},set:function(e){var t=this.array;e=e.array,t[0]=e[0],t[1]=e[1],t[2]=e[2],this._dirty=!0}})}Kt.adjoint=function(e,t){return St.adjoint(e.array,t.array),e._dirty=!0,e},Kt.copy=function(e,t){return St.copy(e.array,t.array),e._dirty=!0,e},Kt.determinant=function(e){return St.determinant(e.array)},Kt.identity=function(e){return St.identity(e.array),e._dirty=!0,e},Kt.ortho=function(e,t,r,n,i,a,s){return St.ortho(e.array,t,r,n,i,a,s),e._dirty=!0,e},Kt.perspective=function(e,t,r,n,i){return St.perspective(e.array,t,r,n,i),e._dirty=!0,e},Kt.lookAt=function(e,t,r,n){return St.lookAt(e.array,t.array,r.array,n.array),e._dirty=!0,e},Kt.invert=function(e,t){return St.invert(e.array,t.array),e._dirty=!0,e},Kt.mul=function(e,t,r){return St.mul(e.array,t.array,r.array),e._dirty=!0,e},Kt.multiply=Kt.mul,Kt.fromQuat=function(e,t){return St.fromQuat(e.array,t.array),e._dirty=!0,e},Kt.fromRotationTranslation=function(e,t,r){return St.fromRotationTranslation(e.array,t.array,r.array),e._dirty=!0,e},Kt.fromMat2d=function(n,r){n._dirty=!0;var r=r.array,n=n.array;return n[0]=r[0],n[4]=r[2],n[12]=r[4],n[1]=r[1],n[5]=r[3],n[13]=r[5],n},Kt.rotate=function(e,t,r,n){return St.rotate(e.array,t.array,r,n.array),e._dirty=!0,e},Kt.rotateX=function(e,t,r){return St.rotateX(e.array,t.array,r),e._dirty=!0,e},Kt.rotateY=function(e,t,r){return St.rotateY(e.array,t.array,r),e._dirty=!0,e},Kt.rotateZ=function(e,t,r){return St.rotateZ(e.array,t.array,r),e._dirty=!0,e},Kt.scale=function(e,t,r){return St.scale(e.array,t.array,r.array),e._dirty=!0,e},Kt.transpose=function(e,t){return St.transpose(e.array,t.array),e._dirty=!0,e},Kt.translate=function(e,t,r){return St.translate(e.array,t.array,r.array),e._dirty=!0,e};var Ig=Ue.set,bD=Ue.copy,Ys=function(e,t){this.min=e||new ht(1/0,1/0,1/0),this.max=t||new ht(-1/0,-1/0,-1/0),this.vertices=null};Ys.prototype={constructor:Ys,updateFromVertices:function(e){if(e.length>0){var t=this.min,r=this.max,n=t.array,i=r.array;bD(n,e[0]),bD(i,e[0]);for(var a=1;a<e.length;a++){var s=e[a];s[0]<n[0]&&(n[0]=s[0]),s[1]<n[1]&&(n[1]=s[1]),s[2]<n[2]&&(n[2]=s[2]),s[0]>i[0]&&(i[0]=s[0]),s[1]>i[1]&&(i[1]=s[1]),s[2]>i[2]&&(i[2]=s[2])}t._dirty=!0,r._dirty=!0}},union:function(e){var t=this.min,r=this.max;return Ue.min(t.array,t.array,e.min.array),Ue.max(r.array,r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},intersection:function(e){var t=this.min,r=this.max;return Ue.max(t.array,t.array,e.min.array),Ue.min(r.array,r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},intersectBoundingBox:function(e){var t=this.min.array,r=this.max.array,n=e.min.array,i=e.max.array;return!(t[0]>i[0]||t[1]>i[1]||t[2]>i[2]||r[0]<n[0]||r[1]<n[1]||r[2]<n[2])},containBoundingBox:function(e){var t=this.min.array,r=this.max.array,n=e.min.array,i=e.max.array;return t[0]<=n[0]&&t[1]<=n[1]&&t[2]<=n[2]&&r[0]>=i[0]&&r[1]>=i[1]&&r[2]>=i[2]},containPoint:function(e){var t=this.min.array,r=this.max.array,n=e.array;return t[0]<=n[0]&&t[1]<=n[1]&&t[2]<=n[2]&&r[0]>=n[0]&&r[1]>=n[1]&&r[2]>=n[2]},isFinite:function(){var e=this.min.array,t=this.max.array;return isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])&&isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])},applyTransform:function(e){this.transformFrom(this,e)},transformFrom:function(){var e=Ue.create(),t=Ue.create(),r=Ue.create(),n=Ue.create(),i=Ue.create(),a=Ue.create();return function(s,o){var l=s.min.array,u=s.max.array,h=o.array;return e[0]=h[0]*l[0],e[1]=h[1]*l[0],e[2]=h[2]*l[0],t[0]=h[0]*u[0],t[1]=h[1]*u[0],t[2]=h[2]*u[0],r[0]=h[4]*l[1],r[1]=h[5]*l[1],r[2]=h[6]*l[1],n[0]=h[4]*u[1],n[1]=h[5]*u[1],n[2]=h[6]*u[1],i[0]=h[8]*l[2],i[1]=h[9]*l[2],i[2]=h[10]*l[2],a[0]=h[8]*u[2],a[1]=h[9]*u[2],a[2]=h[10]*u[2],l=this.min.array,u=this.max.array,l[0]=Math.min(e[0],t[0])+Math.min(r[0],n[0])+Math.min(i[0],a[0])+h[12],l[1]=Math.min(e[1],t[1])+Math.min(r[1],n[1])+Math.min(i[1],a[1])+h[13],l[2]=Math.min(e[2],t[2])+Math.min(r[2],n[2])+Math.min(i[2],a[2])+h[14],u[0]=Math.max(e[0],t[0])+Math.max(r[0],n[0])+Math.max(i[0],a[0])+h[12],u[1]=Math.max(e[1],t[1])+Math.max(r[1],n[1])+Math.max(i[1],a[1])+h[13],u[2]=Math.max(e[2],t[2])+Math.max(r[2],n[2])+Math.max(i[2],a[2])+h[14],this.min._dirty=!0,this.max._dirty=!0,this}}(),applyProjection:function(e){var t=this.min.array,r=this.max.array,n=e.array,i=t[0],a=t[1],s=t[2],o=r[0],l=r[1],u=t[2],h=r[0],f=r[1],d=r[2];if(n[15]===1)t[0]=n[0]*i+n[12],t[1]=n[5]*a+n[13],r[2]=n[10]*s+n[14],r[0]=n[0]*h+n[12],r[1]=n[5]*f+n[13],t[2]=n[10]*d+n[14];else{var p=-1/s;t[0]=n[0]*i*p,t[1]=n[5]*a*p,r[2]=(n[10]*s+n[14])*p,p=-1/u,r[0]=n[0]*o*p,r[1]=n[5]*l*p,p=-1/d,t[2]=(n[10]*d+n[14])*p}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var e=this.vertices;if(!e){e=[];for(var t=0;t<8;t++)e[t]=Ue.fromValues(0,0,0);this.vertices=e}var r=this.min.array,n=this.max.array;return Ig(e[0],r[0],r[1],r[2]),Ig(e[1],r[0],n[1],r[2]),Ig(e[2],n[0],r[1],r[2]),Ig(e[3],n[0],n[1],r[2]),Ig(e[4],r[0],r[1],n[2]),Ig(e[5],r[0],n[1],n[2]),Ig(e[6],n[0],r[1],n[2]),Ig(e[7],n[0],n[1],n[2]),this},copy:function(e){var t=this.min,r=this.max;return bD(t.array,e.min.array),bD(r.array,e.max.array),t._dirty=!0,r._dirty=!0,this},clone:function(){var e=new Ys;return e.copy(this),e}};var r3t=0,zf=Us.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},function(){this.name||(this.name=(this.type||"NODE")+"_"+r3t++),this.position||(this.position=new ht),this.rotation||(this.rotation=new Zn),this.scale||(this.scale=new ht(1,1,1)),this.worldTransform=new Kt,this.localTransform=new Kt,this._children=[]},{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(e){var t=this._scene;if(t){var r=t._nodeRepository;delete r[this.name],r[e]=this}this.name=e},add:function(e){var t=e._parent;if(t!==this){t&&t.remove(e),e._parent=this,this._children.push(e);var r=this._scene;r&&r!==e.scene&&e.traverse(this._addSelfToScene,this),e._needsUpdateWorldTransform=!0}},remove:function(e){var t=this._children,r=t.indexOf(e);r<0||(t.splice(r,1),e._parent=null,this._scene&&e.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var e=this._children,t=0;t<e.length;t++)e[t]._parent=null,this._scene&&e[t].traverse(this._removeSelfFromScene,this);this._children=[]},getScene:function(){return this._scene},getParent:function(){return this._parent},_removeSelfFromScene:function(e){e._scene.removeFromScene(e),e._scene=null},_addSelfToScene:function(e){this._scene.addToScene(e),e._scene=this._scene},isAncestor:function(e){for(var t=e._parent;t;){if(t===this)return!0;t=t._parent}return!1},children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},getChildByName:function(e){for(var t=this._children,r=0;r<t.length;r++)if(t[r].name===e)return t[r]},getDescendantByName:function(e){for(var t=this._children,r=0;r<t.length;r++){var n=t[r];if(n.name===e)return n;var i=n.getDescendantByName(e);if(i)return i}},queryNode:function(e){if(e){for(var t=e.split("/"),r=this,n=0;n<t.length;n++){var i=t[n];if(i){for(var a=!1,s=r._children,o=0;o<s.length;o++){var l=s[o];if(l.name===i){r=l,a=!0;break}}if(!a)return}}return r}},getPath:function(e){if(!this._parent)return"/";for(var t=this._parent,r=this.name;t._parent&&(r=t.name+"/"+r,t._parent!=e);)t=t._parent;return!t._parent&&e?null:r},traverse:function(e,t){e.call(t,this);for(var r=this._children,n=0,i=r.length;n<i;n++)r[n].traverse(e,t)},eachChild:function(e,t){for(var r=this._children,n=0,i=r.length;n<i;n++){var a=r[n];e.call(t,a,n)}},setLocalTransform:function(e){St.copy(this.localTransform.array,e.array),this.decomposeLocalTransform()},decomposeLocalTransform:function(e){var t=e?null:this.scale;this.localTransform.decomposeMatrix(t,this.rotation,this.position)},setWorldTransform:function(e){St.copy(this.worldTransform.array,e.array),this.decomposeWorldTransform()},decomposeWorldTransform:function(){var e=St.create();return function(t){var r=this.localTransform,n=this.worldTransform;this._parent?(St.invert(e,this._parent.worldTransform.array),St.multiply(r.array,e,n.array)):St.copy(r.array,n.array);var i=t?null:this.scale;r.decomposeMatrix(i,this.rotation,this.position)}}(),transformNeedsUpdate:function(){return this.position._dirty||this.rotation._dirty||this.scale._dirty},updateLocalTransform:function(){var e=this.position,t=this.rotation,r=this.scale;if(this.transformNeedsUpdate()){var n=this.localTransform.array;St.fromRotationTranslation(n,t.array,e.array),St.scale(n,n,r.array),t._dirty=!1,r._dirty=!1,e._dirty=!1,this._needsUpdateWorldTransform=!0}},_updateWorldTransformTopDown:function(){var e=this.localTransform.array,t=this.worldTransform.array;this._parent?St.multiplyAffine(t,this._parent.worldTransform.array,e):St.copy(t,e)},updateWorldTransform:function(){for(var e=this;e&&e.getParent()&&e.getParent().transformNeedsUpdate();)e=e.getParent();e.update()},update:function(e){this.autoUpdateLocalTransform?this.updateLocalTransform():e=!0,(e||this._needsUpdateWorldTransform)&&(this._updateWorldTransformTopDown(),e=!0,this._needsUpdateWorldTransform=!1);for(var t=this._children,r=0,n=t.length;r<n;r++)t[r].update(e)},getBoundingBox:function(){function e(i){return!i.invisible&&i.geometry}var t=new Ys,r=new Kt,n=new Kt;return function(i,a){return a=a||new Ys,this._parent?Kt.invert(n,this._parent.worldTransform):Kt.identity(n),this.traverse(function(s){s.geometry&&s.geometry.boundingBox&&(t.copy(s.geometry.boundingBox),Kt.multiply(r,n,s.worldTransform),t.applyTransform(r),a.union(t))},this,e),a}}(),getWorldPosition:function(e){this.transformNeedsUpdate()&&this.updateWorldTransform();var t=this.worldTransform.array;if(e){var r=e.array;return r[0]=t[12],r[1]=t[13],r[2]=t[14],e}else return new ht(t[12],t[13],t[14])},clone:function(){var e=new this.constructor,t=this._children;e.setName(this.name),e.position.copy(this.position),e.rotation.copy(this.rotation),e.scale.copy(this.scale);for(var r=0;r<t.length;r++)e.add(t[r].clone());return e},rotateAround:function(){var e=new ht,t=new Kt;return function(r,n,i){e.copy(this.position).subtract(r);var a=this.localTransform;a.identity(),a.translate(r),a.rotate(i,n),t.fromRotationTranslation(this.rotation,e),a.multiply(t),a.scale(this.scale),this.decomposeLocalTransform(),this._needsUpdateWorldTransform=!0}}(),lookAt:function(){var e=new Kt;return function(t,r){e.lookAt(this.position,t,r||this.localTransform.y).invert(),this.setLocalTransform(e),this.target=t}}()});const _t={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CW:2304,CCW:2305,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_2D:3553,TEXTURE_CUBE_MAP:34067,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FRAMEBUFFER:36160,RENDERBUFFER:36161,DEPTH_STENCIL:34041,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306};var _l=zf.extend({material:null,geometry:null,mode:_t.TRIANGLES,_renderInfo:null},{__program:null,lightGroup:0,renderOrder:0,culling:!0,cullFace:_t.BACK,frontFace:_t.CCW,frustumCulling:!0,receiveShadow:!0,castShadow:!0,ignorePicking:!1,ignorePreZ:!1,ignoreGBuffer:!1,isRenderable:function(){return this.geometry&&this.material&&this.material.shader&&!this.invisible&&this.geometry.vertexCount>0},beforeRender:function(e){},afterRender:function(e,t){},getBoundingBox:function(e,t){return t=zf.prototype.getBoundingBox.call(this,e,t),this.geometry&&this.geometry.boundingBox&&t.union(this.geometry.boundingBox),t},clone:function(){var e=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"];return function(){var t=zf.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var r=0;r<e.length;r++){var n=e[r];t[n]!==this[n]&&(t[n]=this[n])}return t}}()});_l.POINTS=_t.POINTS,_l.LINES=_t.LINES,_l.LINE_LOOP=_t.LINE_LOOP,_l.LINE_STRIP=_t.LINE_STRIP,_l.TRIANGLES=_t.TRIANGLES,_l.TRIANGLE_STRIP=_t.TRIANGLE_STRIP,_l.TRIANGLE_FAN=_t.TRIANGLE_FAN,_l.BACK=_t.BACK,_l.FRONT=_t.FRONT,_l.FRONT_AND_BACK=_t.FRONT_AND_BACK,_l.CW=_t.CW,_l.CCW=_t.CCW;var Ss=_l.extend({skeleton:null,joints:null},function(){this.joints||(this.joints=[])},{offsetMatrix:null,isInstancedMesh:function(){return!1},isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var e=_l.prototype.clone.call(this);return e.skeleton=this.skeleton,this.joints&&(e.joints=this.joints.slice()),e}});Ss.POINTS=_t.POINTS,Ss.LINES=_t.LINES,Ss.LINE_LOOP=_t.LINE_LOOP,Ss.LINE_STRIP=_t.LINE_STRIP,Ss.TRIANGLES=_t.TRIANGLES,Ss.TRIANGLE_STRIP=_t.TRIANGLE_STRIP,Ss.TRIANGLE_FAN=_t.TRIANGLE_FAN,Ss.BACK=_t.BACK,Ss.FRONT=_t.FRONT,Ss.FRONT_AND_BACK=_t.FRONT_AND_BACK,Ss.CW=_t.CW,Ss.CCW=_t.CCW;var o_e=["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear","OES_standard_derivatives","OES_vertex_array_object","OES_element_index_uint","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","EXT_texture_filter_anisotropic","EXT_shader_texture_lod","WEBGL_draw_buffers","EXT_frag_depth","EXT_sRGB","ANGLE_instanced_arrays"],l_e=["MAX_TEXTURE_SIZE","MAX_CUBE_MAP_TEXTURE_SIZE"];function n3t(e){for(var t={},r={},n=0;n<o_e.length;n++){var i=o_e[n];s(i)}for(var n=0;n<l_e.length;n++){var a=l_e[n];r[a]=e.getParameter(e[a])}this.getExtension=function(o){return o in t||s(o),t[o]},this.getParameter=function(o){return r[o]};function s(o){if(e.getExtension){var l=e.getExtension(o);l||(l=e.getExtension("MOZ_"+o)),l||(l=e.getExtension("WEBKIT_"+o)),t[o]=l}}}function i3t(e){var t=new XMLHttpRequest;t.open("get",e.url),t.responseType=e.responseType||"text",e.onprogress&&(t.onprogress=function(r){if(r.lengthComputable){var n=r.loaded/r.total;e.onprogress(n,r.loaded,r.total)}else e.onprogress(null)}),t.onload=function(r){t.status>=400?e.onerror&&e.onerror():e.onload&&e.onload(t.response)},e.onerror&&(t.onerror=e.onerror),t.send(null)}const a3t={get:i3t};var MW,Gn={};Gn.supportWebGL=function(){if(MW==null)try{var e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)throw new Error}catch{MW=!1}return MW},Gn.Int8Array=typeof Int8Array>"u"?Array:Int8Array,Gn.Uint8Array=typeof Uint8Array>"u"?Array:Uint8Array,Gn.Uint16Array=typeof Uint16Array>"u"?Array:Uint16Array,Gn.Uint32Array=typeof Uint32Array>"u"?Array:Uint32Array,Gn.Int16Array=typeof Int16Array>"u"?Array:Int16Array,Gn.Float32Array=typeof Float32Array>"u"?Array:Float32Array,Gn.Float64Array=typeof Float64Array>"u"?Array:Float64Array;var Cy={};typeof window<"u"?Cy=window:typeof globalThis<"u"&&(Cy=globalThis),Gn.requestAnimationFrame=Cy.requestAnimationFrame||Cy.msRequestAnimationFrame||Cy.mozRequestAnimationFrame||Cy.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},Gn.createCanvas=function(){return document.createElement("canvas")},Gn.createImage=function(){return new Cy.Image},Gn.request={get:a3t.get},Gn.addEventListener=function(e,t,r,n){e.addEventListener(t,r,n)},Gn.removeEventListener=function(e,t,r){e.removeEventListener(t,r)};var Cs=function(){this.head=null,this.tail=null,this._length=0};Cs.prototype.insert=function(e){var t=new Cs.Entry(e);return this.insertEntry(t),t},Cs.prototype.insertAt=function(e,t){if(!(e<0)){for(var r=this.head,n=0;r&&n!=e;)r=r.next,n++;if(r){var i=new Cs.Entry(t),a=r.prev;a?(a.next=i,i.prev=a):this.head=i,i.next=r,r.prev=i}else this.insert(t)}},Cs.prototype.insertBeforeEntry=function(e,t){var r=new Cs.Entry(e),n=t.prev;n?(n.next=r,r.prev=n):this.head=r,r.next=t,t.prev=r,this._length++},Cs.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,this.tail=e):this.head=this.tail=e,this._length++},Cs.prototype.remove=function(e){var t=e.prev,r=e.next;t?t.next=r:this.head=r,r?r.prev=t:this.tail=t,e.next=e.prev=null,this._length--},Cs.prototype.removeAt=function(e){if(!(e<0)){for(var t=this.head,r=0;t&&r!=e;)t=t.next,r++;if(t)return this.remove(t),t.value}},Cs.prototype.getHead=function(){if(this.head)return this.head.value},Cs.prototype.getTail=function(){if(this.tail)return this.tail.value},Cs.prototype.getAt=function(e){if(!(e<0)){for(var t=this.head,r=0;t&&r!=e;)t=t.next,r++;return t.value}},Cs.prototype.indexOf=function(e){for(var t=this.head,r=0;t;){if(t.value===e)return r;t=t.next,r++}},Cs.prototype.length=function(){return this._length},Cs.prototype.isEmpty=function(){return this._length===0},Cs.prototype.forEach=function(e,t){for(var r=this.head,n=0,i=typeof t<"u";r;)i?e.call(t,r.value,n):e(r.value,n),r=r.next,n++},Cs.prototype.clear=function(){this.tail=this.head=null,this._length=0},Cs.Entry=function(e){this.value=e,this.next=null,this.prev=null};var Ey=function(e){this._list=new Cs,this._map={},this._maxSize=e||10};Ey.prototype.setMaxSize=function(e){this._maxSize=e},Ey.prototype.put=function(e,t){if(!this._map.hasOwnProperty(e)){var r=this._list.length();if(r>=this._maxSize&&r>0){var n=this._list.head;this._list.remove(n),delete this._map[n.key]}var i=this._list.insert(t);i.key=e,this._map[e]=i}},Ey.prototype.get=function(e){var t=this._map[e];if(this._map.hasOwnProperty(e))return t!==this._list.tail&&(this._list.remove(t),this._list.insertEntry(t)),t.value},Ey.prototype.remove=function(e){var t=this._map[e];typeof t<"u"&&(delete this._map[e],this._list.remove(t))},Ey.prototype.clear=function(){this._list.clear(),this._map={}};var ji={},u_e={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function bh(e){return e=Math.round(e),e<0?0:e>255?255:e}function s3t(e){return e=Math.round(e),e<0?0:e>360?360:e}function N3(e){return e<0?0:e>1?1:e}function IW(e){return e.length&&e.charAt(e.length-1)==="%"?bh(parseFloat(e)/100*255):bh(parseInt(e,10))}function Yb(e){return e.length&&e.charAt(e.length-1)==="%"?N3(parseFloat(e)/100):N3(parseFloat(e))}function PW(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function Pg(e,t,r){return e+(t-e)*r}function _h(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function NW(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var c_e=new Ey(20),_D=null;function Xb(e,t){_D&&NW(_D,t),_D=c_e.put(e,_D||t.slice())}ji.parse=function(e,t){if(e){t=t||[];var r=c_e.get(e);if(r)return NW(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in u_e)return NW(t,u_e[n]),Xb(e,t),t;if(n.charAt(0)==="#"){if(n.length===4){var i=parseInt(n.substr(1),16);if(!(i>=0&&i<=4095)){_h(t,0,0,0,1);return}return _h(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,1),Xb(e,t),t}else if(n.length===7){var i=parseInt(n.substr(1),16);if(!(i>=0&&i<=16777215)){_h(t,0,0,0,1);return}return _h(t,(i&16711680)>>16,(i&65280)>>8,i&255,1),Xb(e,t),t}return}var a=n.indexOf("("),s=n.indexOf(")");if(a!==-1&&s+1===n.length){var o=n.substr(0,a),l=n.substr(a+1,s-(a+1)).split(","),u=1;switch(o){case"rgba":if(l.length!==4){_h(t,0,0,0,1);return}u=Yb(l.pop());case"rgb":if(l.length!==3){_h(t,0,0,0,1);return}return _h(t,IW(l[0]),IW(l[1]),IW(l[2]),u),Xb(e,t),t;case"hsla":if(l.length!==4){_h(t,0,0,0,1);return}return l[3]=Yb(l[3]),OW(l,t),Xb(e,t),t;case"hsl":if(l.length!==3){_h(t,0,0,0,1);return}return OW(l,t),Xb(e,t),t;default:return}}_h(t,0,0,0,1)}},ji.parseToFloat=function(e,t){if(t=ji.parse(e,t),!!t)return t[0]/=255,t[1]/=255,t[2]/=255,t};function OW(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=Yb(e[1]),i=Yb(e[2]),a=i<=.5?i*(n+1):i+n-i*n,s=i*2-a;return t=t||[],_h(t,bh(PW(s,a,r+1/3)*255),bh(PW(s,a,r)*255),bh(PW(s,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function o3t(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=a-i,o=(a+i)/2,l,u;if(s===0)l=0,u=0;else{o<.5?u=s/(a+i):u=s/(2-a-i);var h=((a-t)/6+s/2)/s,f=((a-r)/6+s/2)/s,d=((a-n)/6+s/2)/s;t===a?l=d-f:r===a?l=1/3+h-d:n===a&&(l=2/3+f-h),l<0&&(l+=1),l>1&&(l-=1)}var p=[l*360,u,o];return e[3]!=null&&p.push(e[3]),p}}ji.lift=function(e,t){var r=ji.parse(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0;return ji.stringify(r,r.length===4?"rgba":"rgb")}},ji.toHex=function(e){var t=ji.parse(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},ji.fastLerp=function(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),s=t[i],o=t[a],l=n-i;return r[0]=bh(Pg(s[0],o[0],l)),r[1]=bh(Pg(s[1],o[1],l)),r[2]=bh(Pg(s[2],o[2],l)),r[3]=N3(Pg(s[3],o[3],l)),r}},ji.fastMapToColor=ji.fastLerp,ji.lerp=function(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),s=ji.parse(t[i]),o=ji.parse(t[a]),l=n-i,u=ji.stringify([bh(Pg(s[0],o[0],l)),bh(Pg(s[1],o[1],l)),bh(Pg(s[2],o[2],l)),N3(Pg(s[3],o[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}},ji.mapToColor=ji.lerp,ji.modifyHSL=function(e,t,r,n){if(e=ji.parse(e),e)return e=o3t(e),t!=null&&(e[0]=s3t(t)),r!=null&&(e[1]=Yb(r)),n!=null&&(e[2]=Yb(n)),ji.stringify(OW(e),"rgba")},ji.modifyAlpha=function(e,t){if(e=ji.parse(e),e&&t!=null)return e[3]=N3(t),ji.stringify(e,"rgba")},ji.stringify=function(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}};var l3t=ji.parseToFloat,BW={};function h_e(e){var t=Object.keys(e);t.sort();for(var r=[],n=0;n<t.length;n++){var i=t[n],a=e[i];a===null?r.push(i):r.push(i+" "+a.toString())}return r.join(`
352
352
  `)}function u3t(e,t,r){r.sort();for(var n=[],i=0;i<r.length;i++){var a=r[i];n.push(a)}var s=h_e(e)+`
353
353
  `+h_e(t)+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-gui/image",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "Render AIGUI markdown blocks (charts, diagrams, math, tables, cards) to PNG in a headless browser.",
5
5
  "keywords": [
6
6
  "llm",
@@ -52,12 +52,12 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "katex": "^0.16.9",
55
- "@ai-gui/core": "0.32.0",
56
- "@ai-gui/vanilla": "0.32.0",
57
- "@ai-gui/plugin-chart": "0.32.0",
58
- "@ai-gui/plugin-katex": "0.32.0",
59
- "@ai-gui/plugin-mermaid": "0.32.0",
60
- "@ai-gui/plugin-dashboard": "0.32.0"
55
+ "@ai-gui/vanilla": "0.34.0",
56
+ "@ai-gui/core": "0.34.0",
57
+ "@ai-gui/plugin-chart": "0.34.0",
58
+ "@ai-gui/plugin-mermaid": "0.34.0",
59
+ "@ai-gui/plugin-katex": "0.34.0",
60
+ "@ai-gui/plugin-dashboard": "0.34.0"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "playwright": "^1.48.0"