@questdb/web-console 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_LICENSES.txt +717 -303
- package/dist/assets/index-B0NErtb0.js +1059 -0
- package/dist/assets/index-DLj61pTx.js +7008 -0
- package/dist/assets/{tiktoken-CTBgcTlC.js → tiktoken-D_XIXzTZ.js} +1 -1
- package/dist/assets/{vendor-DsPrTxrp.js → vendor-BHoUroWS.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +5 -3
- package/dist/assets/index-Cg4NZQY-.js +0 -7079
- package/dist/assets/index-DH6Mra5W.js +0 -1055
|
@@ -126,4 +126,4 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
126
126
|
|
|
127
127
|
`:"<br/>",b=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,h)?this._updatePosition(s,g,a[0],a[1],this._tooltipContent,h):this._showTooltipContent(s,b,h,Math.random()+"",a[0],a[1],g,null,y)})},t.prototype._showSeriesItemTooltip=function(e,r,i){var o=this._ecModel,a=Bt(r),s=a.seriesIndex,u=o.getSeriesByIndex(s),h=a.dataModel||u,p=a.dataIndex,f=a.dataType,y=h.getData(f),g=this._renderMode,v=e.positionDefault,_=Xl([y.getItemModel(p),h,u&&(u.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=_.get("trigger");if(!(m!=null&&m!=="item")){var b=h.getDataParams(p,f),w=new Ky;b.marker=w.makeTooltipMarker("item",fo(b.color),g);var k=KS(h.formatTooltip(p,!1,f)),T=_.get("order"),C=_.get("valueFormatter"),I=k.frag,A=I?pk(C?ut({valueFormatter:C},I):I,w,g,T,o.get("useUTC"),_.get("textStyle")):k.text,E="item_"+h.name+"_"+p;this._showOrMove(_,function(){this._showTooltipContent(_,A,b,E,e.offsetX,e.offsetY,e.position,e.target,w)}),i({type:"showTip",dataIndexInside:p,dataIndex:y.getRawIndex(p),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,r,i){var o=this._renderMode==="html",a=Bt(r),s=a.tooltipConfig,u=s.option||{},h=u.encodeHTMLContent;if(gt(u)){var p=u;u={content:p,formatter:p},h=!0}h&&o&&u.content&&(u=Ht(u),u.content=tn(u.content));var f=[u],y=this._ecModel.getComponent(a.componentMainType,a.componentIndex);y&&f.push(y),f.push({formatter:u.content});var g=e.positionDefault,v=Xl(f,this._tooltipModel,g?{position:g}:null),_=v.get("content"),m=Math.random()+"",b=new Ky;this._showOrMove(v,function(){var w=Ht(v.get("formatterParams")||{});this._showTooltipContent(v,_,w,m,e.offsetX,e.offsetY,e.position,r,b)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,r,i,o,a,s,u,h,p){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var f=this._tooltipContent;f.setEnterable(e.get("enterable"));var y=e.get("formatter");u=u||e.get("position");var g=r,v=this._getNearestPoint([a,s],i,e.get("trigger"),e.get("borderColor")),_=v.color;if(y)if(gt(y)){var m=e.ecModel.get("useUTC"),b=pt(i)?i[0]:i,w=b&&b.axisType&&b.axisType.indexOf("time")>=0;g=y,w&&(g=Dh(b.axisValue,g,m)),g=vS(g,i,!0)}else if(At(y)){var k=le(function(T,C){T===this._ticket&&(f.setContent(C,p,e,_,u),this._updatePosition(e,u,a,s,f,i,h))},this);this._ticket=o,g=y(i,o,k)}else g=y;f.setContent(g,p,e,_,u),f.show(e,_),this._updatePosition(e,u,a,s,f,i,h)}},t.prototype._getNearestPoint=function(e,r,i,o){if(i==="axis"||pt(r))return{color:o||(this._renderMode==="html"?"#fff":"none")};if(!pt(r))return{color:o||r.color||r.borderColor}},t.prototype._updatePosition=function(e,r,i,o,a,s,u){var h=this._api.getWidth(),p=this._api.getHeight();r=r||e.get("position");var f=a.getSize(),y=e.get("align"),g=e.get("verticalAlign"),v=u&&u.getBoundingRect().clone();if(u&&v.applyTransform(u.transform),At(r)&&(r=r([i,o],s,a.el,v,{viewSize:[h,p],contentSize:f.slice()})),pt(r))i=De(r[0],h),o=De(r[1],p);else if(mt(r)){var _=r;_.width=f[0],_.height=f[1];var m=Cl(_,{width:h,height:p});i=m.x,o=m.y,y=null,g=null}else if(gt(r)&&u){var b=qB(r,v,f,e.get("borderWidth"));i=b[0],o=b[1]}else{var b=WB(i,o,a,h,p,y?null:20,g?null:20);i=b[0],o=b[1]}if(y&&(i-=aM(y)?f[0]/2:y==="right"?f[0]:0),g&&(o-=aM(g)?f[1]/2:g==="bottom"?f[1]:0),Q2(e)){var b=$B(i,o,a,h,p);i=b[0],o=b[1]}a.moveTo(i,o)},t.prototype._updateContentNotChangedOnAxis=function(e,r){var i=this._lastDataByCoordSys,o=this._cbParamsList,a=!!i&&i.length===e.length;return a&&R(i,function(s,u){var h=s.dataByAxis||[],p=e[u]||{},f=p.dataByAxis||[];a=a&&h.length===f.length,a&&R(h,function(y,g){var v=f[g]||{},_=y.seriesDataIndices||[],m=v.seriesDataIndices||[];a=a&&y.value===v.value&&y.axisType===v.axisType&&y.axisId===v.axisId&&_.length===m.length,a&&R(_,function(b,w){var k=m[w];a=a&&b.seriesIndex===k.seriesIndex&&b.dataIndex===k.dataIndex}),o&&R(y.seriesDataIndices,function(b){var w=b.seriesIndex,k=r[w],T=o[w];k&&T&&T.data!==k.data&&(a=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=r,!!a},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,r){Tt.node||!r.getDom()||(nv(this,"_updatePosition"),this._tooltipContent.dispose(),Qv("itemTooltip",r))},t.type="tooltip",t})(On);function Xl(n,t,e){var r=t.ecModel,i;e?(i=new fe(e,r,r),i=new fe(t.option,i,r)):i=t;for(var o=n.length-1;o>=0;o--){var a=n[o];a&&(a instanceof fe&&(a=a.get("tooltip",!0)),gt(a)&&(a={formatter:a}),a&&(i=new fe(a,i,r)))}return i}function oM(n,t){return n.dispatchAction||le(t.dispatchAction,t)}function WB(n,t,e,r,i,o,a){var s=e.getSize(),u=s[0],h=s[1];return o!=null&&(n+u+o+2>r?n-=u+o:n+=o),a!=null&&(t+h+a>i?t-=h+a:t+=a),[n,t]}function $B(n,t,e,r,i){var o=e.getSize(),a=o[0],s=o[1];return n=Math.min(n+a,r)-a,t=Math.min(t+s,i)-s,n=Math.max(n,0),t=Math.max(t,0),[n,t]}function qB(n,t,e,r){var i=e[0],o=e[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,u=0,h=t.width,p=t.height;switch(n){case"inside":s=t.x+h/2-i/2,u=t.y+p/2-o/2;break;case"top":s=t.x+h/2-i/2,u=t.y-o-a;break;case"bottom":s=t.x+h/2-i/2,u=t.y+p+a;break;case"left":s=t.x-i-a,u=t.y+p/2-o/2;break;case"right":s=t.x+h+a,u=t.y+p/2-o/2}return[s,u]}function aM(n){return n==="center"||n==="middle"}function XB(n,t,e){var r=zg(n).queryOptionMap,i=r.keys()[0];if(!(!i||i==="series")){var o=cl(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(a){var s=e.getViewOfComponentModel(a),u;if(s.group.traverse(function(h){var p=Bt(h).tooltipConfig;if(p&&p.name===n.name)return u=h,!0}),u)return{componentMainType:i,componentIndex:a.componentIndex,el:u}}}}function YB(n){xi(Z2),n.registerComponentModel(OB),n.registerComponentView(UB),n.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Je),n.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Je)}var ZB=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t})(Qt),QB=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,r,i){if(this.group.removeAll(),!!e.get("show")){var o=this.group,a=e.getModel("textStyle"),s=e.getModel("subtextStyle"),u=e.get("textAlign"),h=Ot(e.get("textBaseline"),e.get("textVerticalAlign")),p=new Le({style:yi(a,{text:e.get("text"),fill:a.getTextColor()},{disableBox:!0}),z2:10}),f=p.getBoundingRect(),y=e.get("subtext"),g=new Le({style:yi(s,{text:y,fill:s.getTextColor(),y:f.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=e.get("link"),_=e.get("sublink"),m=e.get("triggerEvent",!0);p.silent=!v&&!m,g.silent=!_&&!m,v&&p.on("click",function(){mS(v,"_"+e.get("target"))}),_&&g.on("click",function(){mS(_,"_"+e.get("subtarget"))}),Bt(p).eventData=Bt(g).eventData=m?{componentType:"title",componentIndex:e.componentIndex}:null,o.add(p),y&&o.add(g);var b=o.getBoundingRect(),w=e.getBoxLayoutParams();w.width=b.width,w.height=b.height;var k=Cl(w,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));u||(u=e.get("left")||e.get("right"),u==="middle"&&(u="center"),u==="right"?k.x+=k.width:u==="center"&&(k.x+=k.width/2)),h||(h=e.get("top")||e.get("bottom"),h==="center"&&(h="middle"),h==="bottom"?k.y+=k.height:h==="middle"&&(k.y+=k.height/2),h=h||"top"),o.x=k.x,o.y=k.y,o.markRedraw();var T={align:u,verticalAlign:h};p.setStyle(T),g.setStyle(T),b=o.getBoundingRect();var C=k.margin,I=e.getItemStyle(["color","opacity"]);I.fill=e.get("backgroundColor");var A=new xe({shape:{x:b.x-C[3],y:b.y-C[0],width:b.width+C[1]+C[3],height:b.height+C[0]+C[2],r:e.get("borderRadius")},style:I,subPixelOptimize:!0,silent:!0});o.add(A)}},t.type="title",t})(On);function KB(n){n.registerComponentModel(ZB),n.registerComponentView(QB)}var JB=(function(){function n(){}return n.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},n.prototype.getCoordSysModel=function(){},n})(),Yl=pe();function sM(n,t){var e=xt(t,function(r){return n.scale.parse(r)});return n.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function tF(n){var t=n.getLabelModel().get("customValues");if(t){var e=Xa(n),r=n.scale.getExtent(),i=sM(n,t),o=_e(i,function(a){return a>=r[0]&&a<=r[1]});return{labels:xt(o,function(a){var s={value:a};return{formattedLabel:e(s),rawLabel:n.scale.getLabel(s),tickValue:a}})}}return n.type==="category"?nF(n):iF(n)}function eF(n,t){var e=n.getTickModel().get("customValues");if(e){var r=n.scale.getExtent(),i=sM(n,e);return{ticks:_e(i,function(o){return o>=r[0]&&o<=r[1]})}}return n.type==="category"?rF(n,t):{ticks:xt(n.scale.getTicks(),function(o){return o.value})}}function nF(n){var t=n.getLabelModel(),e=lM(n,t);return!t.get("show")||n.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function lM(n,t){var e=uM(n,"labels"),r=Yv(t),i=cM(e,r);if(i)return i;var o,a;return At(r)?o=fM(n,r):(a=r==="auto"?oF(n):r,o=pM(n,a)),hM(e,r,{labels:o,labelCategoryInterval:a})}function rF(n,t){var e=uM(n,"ticks"),r=Yv(t),i=cM(e,r);if(i)return i;var o,a;if((!t.get("show")||n.scale.isBlank())&&(o=[]),At(r))o=fM(n,r,!0);else if(r==="auto"){var s=lM(n,n.getLabelModel());a=s.labelCategoryInterval,o=xt(s.labels,function(u){return u.tickValue})}else a=r,o=pM(n,a,!0);return hM(e,r,{ticks:o,tickCategoryInterval:a})}function iF(n){var t=n.scale.getTicks(),e=Xa(n);return{labels:xt(t,function(r,i){return{level:r.level,formattedLabel:e(r,i),rawLabel:n.scale.getLabel(r),tickValue:r.value}})}}function uM(n,t){return Yl(n)[t]||(Yl(n)[t]=[])}function cM(n,t){for(var e=0;e<n.length;e++)if(n[e].key===t)return n[e].value}function hM(n,t,e){return n.push({key:t,value:e}),e}function oF(n){var t=Yl(n).autoInterval;return t??(Yl(n).autoInterval=n.calculateCategoryInterval())}function aF(n){var t=sF(n),e=Xa(n),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=n.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var u=o[0],h=n.dataToCoord(u+1)-n.dataToCoord(u),p=Math.abs(h*Math.cos(r)),f=Math.abs(h*Math.sin(r)),y=0,g=0;u<=o[1];u+=s){var v=0,_=0,m=Ig(e({value:u}),t.font,"center","top");v=m.width*1.3,_=m.height*1.3,y=Math.max(y,v,7),g=Math.max(g,_,7)}var b=y/p,w=g/f;isNaN(b)&&(b=1/0),isNaN(w)&&(w=1/0);var k=Math.max(0,Math.floor(Math.min(b,w))),T=Yl(n.model),C=n.getExtent(),I=T.lastAutoInterval,A=T.lastTickCount;return I!=null&&A!=null&&Math.abs(I-k)<=1&&Math.abs(A-a)<=1&&I>k&&T.axisExtent0===C[0]&&T.axisExtent1===C[1]?k=I:(T.lastTickCount=a,T.lastAutoInterval=k,T.axisExtent0=C[0],T.axisExtent1=C[1]),k}function sF(n){var t=n.getLabelModel();return{axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function pM(n,t,e){var r=Xa(n),i=n.scale,o=i.getExtent(),a=n.getLabelModel(),s=[],u=Math.max((t||0)+1,1),h=o[0],p=i.count();h!==0&&u>1&&p/u>2&&(h=Math.round(Math.ceil(h/u)*u));var f=A2(n),y=a.get("showMinLabel")||f,g=a.get("showMaxLabel")||f;y&&h!==o[0]&&_(o[0]);for(var v=h;v<=o[1];v+=u)_(v);g&&v-u!==o[1]&&_(o[1]);function _(m){var b={value:m};s.push(e?m:{formattedLabel:r(b),rawLabel:i.getLabel(b),tickValue:m})}return s}function fM(n,t,e){var r=n.scale,i=Xa(n),o=[];return R(r.getTicks(),function(a){var s=r.getLabel(a),u=a.value;t(a.value,s)&&o.push(e?u:{formattedLabel:i(a),rawLabel:s,tickValue:u})}),o}var dM=[0,1],lF=(function(){function n(t,e,r){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=r||[0,0]}return n.prototype.contain=function(t){var e=this._extent,r=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=r&&t<=i},n.prototype.containData=function(t){return this.scale.contain(t)},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.getPixelPrecision=function(t){return pP(t||this.scale.getExtent(),this._extent)},n.prototype.setExtent=function(t,e){var r=this._extent;r[0]=t,r[1]=e},n.prototype.dataToCoord=function(t,e){var r=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(r=r.slice(),gM(r,i.count())),_x(t,dM,r,e)},n.prototype.coordToData=function(t,e){var r=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(r=r.slice(),gM(r,i.count()));var o=_x(t,r,dM,e);return this.scale.scale(o)},n.prototype.pointToData=function(t,e){},n.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),r=eF(this,e),i=r.ticks,o=xt(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),a=e.get("alignWithLabel");return uF(this,o,a,t.clamp),o},n.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var r=this.scale.getMinorTicks(e),i=xt(r,function(o){return xt(o,function(a){return{coord:this.dataToCoord(a),tickValue:a}},this)},this);return i},n.prototype.getViewLabels=function(){return tF(this).labels},n.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},n.prototype.getTickModel=function(){return this.model.getModel("axisTick")},n.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),r=e[1]-e[0]+(this.onBand?1:0);r===0&&(r=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/r},n.prototype.calculateCategoryInterval=function(){return aF(this)},n})();function gM(n,t){var e=n[1]-n[0],r=t,i=e/r/2;n[0]+=i,n[1]-=i}function uF(n,t,e,r){var i=t.length;if(!n.onBand||e||!i)return;var o=n.getExtent(),a,s;if(i===1)t[0].coord=o[0],a=t[1]={coord:o[1],tickValue:t[0].tickValue};else{var u=t[i-1].tickValue-t[0].tickValue,h=(t[i-1].coord-t[0].coord)/u;R(t,function(g){g.coord-=h/2});var p=n.scale.getExtent();s=1+p[1]-t[i-1].tickValue,a={coord:t[i-1].coord+h*s,tickValue:p[1]+1},t.push(a)}var f=o[0]>o[1];y(t[0].coord,o[0])&&(r?t[0].coord=o[0]:t.shift()),r&&y(o[0],t[0].coord)&&t.unshift({coord:o[0]}),y(o[1],a.coord)&&(r?a.coord=o[1]:t.pop()),r&&y(a.coord,o[1])&&t.push({coord:o[1]});function y(g,v){return g=be(g),v=be(v),f?g>v:g<v}}var Zl=Math.PI*2,ko=pi.CMD,cF=["top","right","bottom","left"];function hF(n,t,e,r,i){var o=e.width,a=e.height;switch(n){case"top":r.set(e.x+o/2,e.y-t),i.set(0,-1);break;case"bottom":r.set(e.x+o/2,e.y+a+t),i.set(0,1);break;case"left":r.set(e.x-t,e.y+a/2),i.set(-1,0);break;case"right":r.set(e.x+o+t,e.y+a/2),i.set(1,0);break}}function pF(n,t,e,r,i,o,a,s,u){a-=n,s-=t;var h=Math.sqrt(a*a+s*s);a/=h,s/=h;var p=a*e+n,f=s*e+t;if(Math.abs(r-i)%Zl<1e-4)return u[0]=p,u[1]=f,h-e;if(o){var y=r;r=Ar(i),i=Ar(y)}else r=Ar(r),i=Ar(i);r>i&&(i+=Zl);var g=Math.atan2(s,a);if(g<0&&(g+=Zl),g>=r&&g<=i||g+Zl>=r&&g+Zl<=i)return u[0]=p,u[1]=f,h-e;var v=e*Math.cos(r)+n,_=e*Math.sin(r)+t,m=e*Math.cos(i)+n,b=e*Math.sin(i)+t,w=(v-a)*(v-a)+(_-s)*(_-s),k=(m-a)*(m-a)+(b-s)*(b-s);return w<k?(u[0]=v,u[1]=_,Math.sqrt(w)):(u[0]=m,u[1]=b,Math.sqrt(k))}function Jv(n,t,e,r,i,o,a,s){var u=i-n,h=o-t,p=e-n,f=r-t,y=Math.sqrt(p*p+f*f);p/=y,f/=y;var g=u*p+h*f,v=g/y;s&&(v=Math.min(Math.max(v,0),1)),v*=y;var _=a[0]=n+v*p,m=a[1]=t+v*f;return Math.sqrt((_-i)*(_-i)+(m-o)*(m-o))}function yM(n,t,e,r,i,o,a){e<0&&(n=n+e,e=-e),r<0&&(t=t+r,r=-r);var s=n+e,u=t+r,h=a[0]=Math.min(Math.max(i,n),s),p=a[1]=Math.min(Math.max(o,t),u);return Math.sqrt((h-i)*(h-i)+(p-o)*(p-o))}var qn=[];function fF(n,t,e){var r=yM(t.x,t.y,t.width,t.height,n.x,n.y,qn);return e.set(qn[0],qn[1]),r}function dF(n,t,e){for(var r=0,i=0,o=0,a=0,s,u,h=1/0,p=t.data,f=n.x,y=n.y,g=0;g<p.length;){var v=p[g++];g===1&&(r=p[g],i=p[g+1],o=r,a=i);var _=h;switch(v){case ko.M:o=p[g++],a=p[g++],r=o,i=a;break;case ko.L:_=Jv(r,i,p[g],p[g+1],f,y,qn,!0),r=p[g++],i=p[g++];break;case ko.C:_=jb(r,i,p[g++],p[g++],p[g++],p[g++],p[g],p[g+1],f,y,qn),r=p[g++],i=p[g++];break;case ko.Q:_=$b(r,i,p[g++],p[g++],p[g],p[g+1],f,y,qn),r=p[g++],i=p[g++];break;case ko.A:var m=p[g++],b=p[g++],w=p[g++],k=p[g++],T=p[g++],C=p[g++];g+=1;var I=!!(1-p[g++]);s=Math.cos(T)*w+m,u=Math.sin(T)*k+b,g<=1&&(o=s,a=u);var A=(f-m)*k/w+m;_=pF(m,b,k,T,T+C,I,A,y,qn),r=Math.cos(T+C)*w+m,i=Math.sin(T+C)*k+b;break;case ko.R:o=r=p[g++],a=i=p[g++];var E=p[g++],P=p[g++];_=yM(o,a,E,P,f,y,qn);break;case ko.Z:_=Jv(r,i,o,a,f,y,qn,!0),r=o,i=a;break}_<h&&(h=_,e.set(qn[0],qn[1]))}return h}var Co=new Rt,Ce=new Rt,fn=new Rt,Ya=new Rt,Ql=new Rt;function vM(n,t){if(n){var e=n.getTextGuideLine(),r=n.getTextContent();if(r&&e){var i=n.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=i.candidates||cF,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var u=1/0,h=i.anchor,p=n.getComputedTransform(),f=p&&vc([],p),y=t.get("length2")||0;h&&fn.copy(h);for(var g=0;g<a.length;g++){var v=a[g];hF(v,0,s,Co,Ya),Rt.scaleAndAdd(Ce,Co,Ya,y),Ce.transform(f);var _=n.getBoundingRect(),m=h?h.distance(Ce):n instanceof Zt?dF(Ce,n.path,fn):fF(Ce,_,fn);m<u&&(u=m,Ce.transform(p),fn.transform(p),fn.toArray(o[0]),Ce.toArray(o[1]),Co.toArray(o[2]))}gF(o,t.get("minTurnAngle")),e.setShape({points:o})}}}var mM=[],Mo=new Rt;function gF(n,t){if(t<=180&&t>0){t=t/180*Math.PI,Co.fromArray(n[0]),Ce.fromArray(n[1]),fn.fromArray(n[2]),Rt.sub(Ya,Co,Ce),Rt.sub(Ql,fn,Ce);var e=Ya.len(),r=Ql.len();if(!(e<.001||r<.001)){Ya.scale(1/e),Ql.scale(1/r);var i=Ya.dot(Ql),o=Math.cos(t);if(o<i){var a=Jv(Ce.x,Ce.y,fn.x,fn.y,Co.x,Co.y,mM,!1);Mo.fromArray(mM),Mo.scaleAndAdd(Ql,a/Math.tan(Math.PI-t));var s=fn.x!==Ce.x?(Mo.x-Ce.x)/(fn.x-Ce.x):(Mo.y-Ce.y)/(fn.y-Ce.y);if(isNaN(s))return;s<0?Rt.copy(Mo,Ce):s>1&&Rt.copy(Mo,fn),Mo.toArray(n[1])}}}}function tm(n,t,e,r){var i=e==="normal",o=i?n:n.ensureState(e);o.ignore=t;var a=r.get("smooth");a&&a===!0&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();i?n.useStyle(s):o.style=s}function yF(n,t){var e=t.smooth,r=t.points;if(r)if(n.moveTo(r[0][0],r[0][1]),e>0&&r.length>=3){var i=$d(r[0],r[1]),o=$d(r[1],r[2]);if(!i||!o){n.lineTo(r[1][0],r[1][1]),n.lineTo(r[2][0],r[2][1]);return}var a=Math.min(i,o)*e,s=qd([],r[1],r[0],a/i),u=qd([],r[1],r[2],a/o),h=qd([],s,u,.5);n.bezierCurveTo(s[0],s[1],s[0],s[1],h[0],h[1]),n.bezierCurveTo(u[0],u[1],u[0],u[1],r[2][0],r[2][1])}else for(var p=1;p<r.length;p++)n.lineTo(r[p][0],r[p][1])}function vF(n,t,e){var r=n.getTextGuideLine(),i=n.getTextContent();if(!i){r&&n.removeTextGuideLine();return}for(var o=t.normal,a=o.get("show"),s=i.ignore,u=0;u<eh.length;u++){var h=eh[u],p=t[h],f=h==="normal";if(p){var y=p.get("show"),g=f?s:Ot(i.states[h]&&i.states[h].ignore,s);if(g||!Ot(y,a)){var v=f?r:r&&r.states[h];v&&(v.ignore=!0),r&&tm(r,!0,h,p);continue}r||(r=new ph,n.setTextGuideLine(r),!f&&(s||!a)&&tm(r,!0,"normal",t.normal),n.stateProxy&&(r.stateProxy=n.stateProxy)),tm(r,!1,h,p)}}if(r){qt(r.style,e),r.style.fill=null;var _=o.get("showAbove"),m=n.textGuideLineConfig=n.textGuideLineConfig||{};m.showAbove=_||!1,r.buildPath=yF}}function mF(n,t){t=t||"labelLine";for(var e={normal:n.getModel(t)},r=0;r<Mn.length;r++){var i=Mn[r];e[i]=n.getModel([i,t])}return e}function _F(n){if(n){for(var t=[],e=0;e<n.length;e++)t.push(n[e].slice());return t}}function bF(n,t){var e=n.label,r=t&&t.getTextGuideLine();return{dataIndex:n.dataIndex,dataType:n.dataType,seriesIndex:n.seriesModel.seriesIndex,text:n.label.style.text,rect:n.hostRect,labelRect:n.rect,align:e.style.align,verticalAlign:e.style.verticalAlign,labelLinePoints:_F(r&&r.shape.points)}}var _M=["align","verticalAlign","width","height","fontSize"],We=new Hc,em=pe(),xF=pe();function yp(n,t,e){for(var r=0;r<e.length;r++){var i=e[r];t[i]!=null&&(n[i]=t[i])}}var vp=["x","y","rotation"],wF=(function(){function n(){this._labelList=[],this._chartViewList=[]}return n.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},n.prototype._addLabel=function(t,e,r,i,o){var a=i.style,s=i.__hostTarget,u=s.textConfig||{},h=i.getComputedTransform(),p=i.getBoundingRect().plain();Gt.applyTransform(p,p,h),h?We.setLocalTransform(h):(We.x=We.y=We.rotation=We.originX=We.originY=0,We.scaleX=We.scaleY=1),We.rotation=Ar(We.rotation);var f=i.__hostTarget,y;if(f){y=f.getBoundingRect().plain();var g=f.getComputedTransform();Gt.applyTransform(y,y,g)}var v=y&&f.getTextGuideLine();this._labelList.push({label:i,labelLine:v,seriesModel:r,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:p,hostRect:y,priority:y?y.width*y.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:v&&v.ignore,x:We.x,y:We.y,scaleX:We.scaleX,scaleY:We.scaleY,rotation:We.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:i.cursor,attachedPos:u.position,attachedRot:u.rotation}})},n.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var r=t.__model,i=r.get("labelLayout");(At(i)||ae(i).length)&&t.group.traverse(function(o){if(o.ignore)return!0;var a=o.getTextContent(),s=Bt(o);a&&!a.disableLabelLayout&&e._addLabel(s.dataIndex,s.dataType,r,a,i)})},n.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),r=t.getHeight();function i(k,T){return function(){vM(k,T)}}for(var o=0;o<this._labelList.length;o++){var a=this._labelList[o],s=a.label,u=s.__hostTarget,h=a.defaultAttr,p=void 0;At(a.layoutOption)?p=a.layoutOption(bF(a,u)):p=a.layoutOption,p=p||{},a.computedLayoutOption=p;var f=Math.PI/180;u&&u.setTextConfig({local:!1,position:p.x!=null||p.y!=null?null:h.attachedPos,rotation:p.rotate!=null?p.rotate*f:h.attachedRot,offset:[p.dx||0,p.dy||0]});var y=!1;if(p.x!=null?(s.x=De(p.x,e),s.setStyle("x",0),y=!0):(s.x=h.x,s.setStyle("x",h.style.x)),p.y!=null?(s.y=De(p.y,r),s.setStyle("y",0),y=!0):(s.y=h.y,s.setStyle("y",h.style.y)),p.labelLinePoints){var g=u.getTextGuideLine();g&&(g.setShape({points:p.labelLinePoints}),y=!1)}var v=em(s);v.needsUpdateLabelLine=y,s.rotation=p.rotate!=null?p.rotate*f:h.rotation,s.scaleX=h.scaleX,s.scaleY=h.scaleY;for(var _=0;_<_M.length;_++){var m=_M[_];s.setStyle(m,p[m]!=null?p[m]:h.style[m])}if(p.draggable){if(s.draggable=!0,s.cursor="move",u){var b=a.seriesModel;if(a.dataIndex!=null){var w=a.seriesModel.getData(a.dataType);b=w.getItemModel(a.dataIndex)}s.on("drag",i(u,b.getModel("labelLine")))}}else s.off("drag"),s.cursor=h.cursor}},n.prototype.layout=function(t){var e=t.getWidth(),r=t.getHeight(),i=O2(this._labelList),o=_e(i,function(u){return u.layoutOption.moveOverlap==="shiftX"}),a=_e(i,function(u){return u.layoutOption.moveOverlap==="shiftY"});eB(o,0,e),nB(a,0,r);var s=_e(i,function(u){return u.layoutOption.hideOverlap});P2(s)},n.prototype.processLabelsOverall=function(){var t=this;R(this._chartViewList,function(e){var r=e.__model,i=e.ignoreLabelLineUpdate,o=r.isAnimationEnabled();e.group.traverse(function(a){if(a.ignore&&!a.forceLabelAnimation)return!0;var s=!i,u=a.getTextContent();!s&&u&&(s=em(u).needsUpdateLabelLine),s&&t._updateLabelLine(a,r),o&&t._animateLabels(a,r)})})},n.prototype._updateLabelLine=function(t,e){var r=t.getTextContent(),i=Bt(t),o=i.dataIndex;if(r&&o!=null){var a=e.getData(i.dataType),s=a.getItemModel(o),u={},h=a.getItemVisual(o,"style");if(h){var p=a.getVisual("drawType");u.stroke=h[p]}var f=s.getModel("labelLine");vF(t,mF(s),u),vM(t,f)}},n.prototype._animateLabels=function(t,e){var r=t.getTextContent(),i=t.getTextGuideLine();if(r&&(t.forceLabelAnimation||!r.ignore&&!r.invisible&&!t.disableLabelAnimation&&!Aa(t))){var o=em(r),a=o.oldLayout,s=Bt(t),u=s.dataIndex,h={x:r.x,y:r.y,rotation:r.rotation},p=e.getData(s.dataType);if(a){r.attr(a);var f=t.prevStates;f&&(Xt(f,"select")>=0&&r.attr(o.oldLayoutSelect),Xt(f,"emphasis")>=0&&r.attr(o.oldLayoutEmphasis)),ze(r,h,e,u)}else if(r.attr(h),!Oa(r).valueAnimation){var y=Ot(r.style.opacity,1);r.style.opacity=0,Tn(r,{style:{opacity:y}},e,u)}if(o.oldLayout=h,r.states.select){var g=o.oldLayoutSelect={};yp(g,h,vp),yp(g,r.states.select,vp)}if(r.states.emphasis){var v=o.oldLayoutEmphasis={};yp(v,h,vp),yp(v,r.states.emphasis,vp)}WL(r,u,p,e,e)}if(i&&!i.ignore&&!i.invisible){var o=xF(i),a=o.oldLayout,_={points:i.shape.points};a?(i.attr({shape:a}),ze(i,{shape:_},e)):(i.setShape(_),i.style.strokePercent=0,Tn(i,{style:{strokePercent:1}},e)),o.oldLayout=_}},n})(),nm=pe();function SF(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,r){var i=nm(e).labelManager;i||(i=nm(e).labelManager=new wF),i.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(t,e,r){var i=nm(e).labelManager;r.updatedSeries.forEach(function(o){i.addLabelsOfSeries(e.getViewOfSeriesModel(o))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}function bM(n,t,e){var r=la.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",n)),r.width=i*e,r.height=o*e,r}var rm=(function(n){te(t,n);function t(e,r,i){var o=n.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null;var a;i=i||Fc,typeof e=="string"?a=bM(e,r,i):mt(e)&&(a=e,e=a.id),o.id=e,o.dom=a;var s=a.style;return s&&(xb(a),a.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),o.painter=r,o.dpr=i,o}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 e=this.dpr;this.domBack=bM("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,r,i,o){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var a=[],s=this.maxRepaintRectCount,u=!1,h=new Gt(0,0,0,0);function p(w){if(!(!w.isFinite()||w.isZero()))if(a.length===0){var k=new Gt(0,0,0,0);k.copy(w),a.push(k)}else{for(var T=!1,C=1/0,I=0,A=0;A<a.length;++A){var E=a[A];if(E.intersect(w)){var P=new Gt(0,0,0,0);P.copy(E),P.union(w),a[A]=P,T=!0;break}else if(u){h.copy(w),h.union(E);var L=w.width*w.height,N=E.width*E.height,F=h.width*h.height,G=F-L-N;G<C&&(C=G,I=A)}}if(u&&(a[I].union(w),T=!0),!T){var k=new Gt(0,0,0,0);k.copy(w),a.push(k)}u||(u=a.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var y=e[f];if(y){var g=y.shouldBePainted(i,o,!0,!0),v=y.__isRendered&&(y.__dirty&cn||!g)?y.getPrevPaintRect():null;v&&p(v);var _=g&&(y.__dirty&cn||!y.__isRendered)?y.getPaintRect():null;_&&p(_)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var y=r[f],g=y&&y.shouldBePainted(i,o,!0,!0);if(y&&(!g||!y.__zr)&&y.__isRendered){var v=y.getPrevPaintRect();v&&p(v)}}var m;do{m=!1;for(var f=0;f<a.length;){if(a[f].isZero()){a.splice(f,1);continue}for(var b=f+1;b<a.length;)a[f].intersect(a[b])?(m=!0,a[f].union(a[b]),a.splice(b,1)):b++;f++}}while(m);return this._paintRects=a,a},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,r){var i=this.dpr,o=this.dom,a=o.style,s=this.domBack;a&&(a.width=e+"px",a.height=r+"px"),o.width=e*i,o.height=r*i,s&&(s.width=e*i,s.height=r*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(e,r,i){var o=this.dom,a=this.ctx,s=o.width,u=o.height;r=r||this.clearColor;var h=this.motionBlur&&!e,p=this.lastFrameAlpha,f=this.dpr,y=this;h&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,s/f,u/f));var g=this.domBack;function v(_,m,b,w){if(a.clearRect(_,m,b,w),r&&r!=="transparent"){var k=void 0;if(pc(r)){var T=r.global||r.__width===b&&r.__height===w;k=T&&r.__canvasGradient||ov(a,r,{x:0,y:0,width:b,height:w}),r.__canvasGradient=k,r.__width=b,r.__height=w}else qO(r)&&(r.scaleX=r.scaleX||f,r.scaleY=r.scaleY||f,k=av(a,r,{dirty:function(){y.setUnpainted(),y.painter.refresh()}}));a.save(),a.fillStyle=k||r,a.fillRect(_,m,b,w),a.restore()}h&&(a.save(),a.globalAlpha=p,a.drawImage(g,_,m,b,w),a.restore())}!i||h?v(0,0,s,u):i.length&&R(i,function(_){v(_.x*f,_.y*f,_.width*f,_.height*f)})},t})(ar),xM=1e5,To=314159,mp=.01,kF=.001;function CF(n){return n?n.__builtin__?!0:!(typeof n.resize!="function"||typeof n.refresh!="function"):!1}function MF(n,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+n+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var TF=(function(){function n(t,e,r,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=r=ut({},r||{}),this.dpr=r.devicePixelRatio||Fc,this._singleCanvas=o,this.root=t;var a=t.style;a&&(xb(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var u=this._layers;if(o){var h=t,p=h.width,f=h.height;r.width!=null&&(p=r.width),r.height!=null&&(f=r.height),this.dpr=r.devicePixelRatio||1,h.width=p*this.dpr,h.height=f*this.dpr,this._width=p,this._height=f;var y=new rm(h,this,this.dpr);y.__builtin__=!0,y.initContext(),u[To]=y,y.zlevel=To,s.push(To),this._domRoot=t}else{this._width=Yh(t,0,r),this._height=Yh(t,1,r);var g=this._domRoot=MF(this._width,this._height);t.appendChild(g)}}return n.prototype.getType=function(){return"canvas"},n.prototype.isSingleCanvas=function(){return this._singleCanvas},n.prototype.getViewportRoot=function(){return this._domRoot},n.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},n.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),r=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,r,t,this._redrawId);for(var o=0;o<i.length;o++){var a=i[o],s=this._layers[a];if(!s.__builtin__&&s.refresh){var u=o===0?this._backgroundColor:null;s.refresh(u)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},n.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},n.prototype._paintHoverList=function(t){var e=t.length,r=this._hoverlayer;if(r&&r.clear(),!!e){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o,a=0;a<e;a++){var s=t[a];s.__inHover&&(r||(r=this._hoverlayer=this.getLayer(xM)),o||(o=r.ctx,o.save()),_o(o,s,i,a===e-1))}o&&o.restore()}},n.prototype.getHoverLayer=function(){return this.getLayer(xM)},n.prototype.paintOne=function(t,e){Zk(t,e)},n.prototype._paintList=function(t,e,r,i){if(this._redrawId===i){r=r||!1,this._updateLayerStatus(t);var o=this._doPaintList(t,e,r),a=o.finished,s=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),a)this.eachLayer(function(h){h.afterBrush&&h.afterBrush()});else{var u=this;xc(function(){u._paintList(t,e,r,i)})}}},n.prototype._compositeManually=function(){var t=this.getLayer(To).ctx,e=this._domRoot.width,r=this._domRoot.height;t.clearRect(0,0,e,r),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,r)})},n.prototype._doPaintList=function(t,e,r){for(var i=this,o=[],a=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var u=this._zlevelList[s],h=this._layers[u];h.__builtin__&&h!==this._hoverlayer&&(h.__dirty||r)&&o.push(h)}for(var p=!0,f=!1,y=function(_){var m=o[_],b=m.ctx,w=a&&m.createRepaintRects(t,e,g._width,g._height),k=r?m.__startIndex:m.__drawIndex,T=!r&&m.incremental&&Date.now,C=T&&Date.now(),I=m.zlevel===g._zlevelList[0]?g._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,I,w);else if(k===m.__startIndex){var A=t[k];(!A.incremental||!A.notClear||r)&&m.clear(!1,I,w)}k===-1&&(console.error("For some unknown reason. drawIndex is -1"),k=m.__startIndex);var E,P=function(G){var X={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(E=k;E<m.__endIndex;E++){var Y=t[E];if(Y.__inHover&&(f=!0),i._doPaintEl(Y,m,a,G,X,E===m.__endIndex-1),T){var nt=Date.now()-C;if(nt>15)break}}X.prevElClipPaths&&b.restore()};if(w)if(w.length===0)E=m.__endIndex;else for(var L=g.dpr,N=0;N<w.length;++N){var F=w[N];b.save(),b.beginPath(),b.rect(F.x*L,F.y*L,F.width*L,F.height*L),b.clip(),P(F),b.restore()}else b.save(),P(),b.restore();m.__drawIndex=E,m.__drawIndex<m.__endIndex&&(p=!1)},g=this,v=0;v<o.length;v++)y(v);return Tt.wxa&&R(this._layers,function(_){_&&_.ctx&&_.ctx.draw&&_.ctx.draw()}),{finished:p,needsRefreshHover:f}},n.prototype._doPaintEl=function(t,e,r,i,o,a){var s=e.ctx;if(r){var u=t.getPaintRect();(!i||u&&u.intersect(i))&&(_o(s,t,o,a),t.setPrevPaintRect(u))}else _o(s,t,o,a)},n.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=To);var r=this._layers[t];return r||(r=new rm("zr_"+t,this,this.dpr),r.zlevel=t,r.__builtin__=!0,this._layerConfig[t]?$t(r,this._layerConfig[t],!0):this._layerConfig[t-mp]&&$t(r,this._layerConfig[t-mp],!0),e&&(r.virtual=e),this.insertLayer(t,r),r.initContext()),r},n.prototype.insertLayer=function(t,e){var r=this._layers,i=this._zlevelList,o=i.length,a=this._domRoot,s=null,u=-1;if(!r[t]&&CF(e)){if(o>0&&t>i[0]){for(u=0;u<o-1&&!(i[u]<t&&i[u+1]>t);u++);s=r[i[u]]}if(i.splice(u+1,0,t),r[t]=e,!e.virtual)if(s){var h=s.dom;h.nextSibling?a.insertBefore(e.dom,h.nextSibling):a.appendChild(e.dom)}else a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom);e.painter||(e.painter=this)}},n.prototype.eachLayer=function(t,e){for(var r=this._zlevelList,i=0;i<r.length;i++){var o=r[i];t.call(e,this._layers[o],o)}},n.prototype.eachBuiltinLayer=function(t,e){for(var r=this._zlevelList,i=0;i<r.length;i++){var o=r[i],a=this._layers[o];a.__builtin__&&t.call(e,a,o)}},n.prototype.eachOtherLayer=function(t,e){for(var r=this._zlevelList,i=0;i<r.length;i++){var o=r[i],a=this._layers[o];a.__builtin__||t.call(e,a,o)}},n.prototype.getLayers=function(){return this._layers},n.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(f,y){f.__dirty=f.__used=!1});function e(f){o&&(o.__endIndex!==f&&(o.__dirty=!0),o.__endIndex=f)}if(this._singleCanvas)for(var r=1;r<t.length;r++){var i=t[r];if(i.zlevel!==t[r-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var o=null,a=0,s,u;for(u=0;u<t.length;u++){var i=t[u],h=i.zlevel,p=void 0;s!==h&&(s=h,a=0),i.incremental?(p=this.getLayer(h+kF,this._needsManuallyCompositing),p.incremental=!0,a=1):p=this.getLayer(h+(a>0?mp:0),this._needsManuallyCompositing),p.__builtin__||Hd("ZLevel "+h+" has been used by unkown layer "+p.id),p!==o&&(p.__used=!0,p.__startIndex!==u&&(p.__dirty=!0),p.__startIndex=u,p.incremental?p.__drawIndex=-1:p.__drawIndex=u,e(u),o=p),i.__dirty&cn&&!i.__inHover&&(p.__dirty=!0,p.incremental&&p.__drawIndex<0&&(p.__drawIndex=u))}e(u),this.eachBuiltinLayer(function(f,y){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(t){t.clear()},n.prototype.setBackgroundColor=function(t){this._backgroundColor=t,R(this._layers,function(e){e.setUnpainted()})},n.prototype.configLayer=function(t,e){if(e){var r=this._layerConfig;r[t]?$t(r[t],e,!0):r[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];if(o===t||o===t+mp){var a=this._layers[o];$t(a,r[t],!0)}}}},n.prototype.delLayer=function(t){var e=this._layers,r=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],r.splice(Xt(r,t),1))},n.prototype.resize=function(t,e){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var i=this._opts,o=this.root;if(t!=null&&(i.width=t),e!=null&&(i.height=e),t=Yh(o,0,i),e=Yh(o,1,i),r.style.display="",this._width!==t||e!==this._height){r.style.width=t+"px",r.style.height=e+"px";for(var a in this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(To).resize(t,e)}return this},n.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},n.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},n.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[To].dom;var e=new rm("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var r=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,o=e.dom.height;this.eachLayer(function(f){f.__builtin__?r.drawImage(f.dom,0,0,i,o):f.renderToCanvas&&(r.save(),f.renderToCanvas(r),r.restore())})}else for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),u=0,h=s.length;u<h;u++){var p=s[u];_o(r,p,a,u===h-1)}return e.dom},n.prototype.getWidth=function(){return this._width},n.prototype.getHeight=function(){return this._height},n})();function IF(n){n.registerPainter("canvas",TF)}var DF=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,r,i){n.prototype.init.call(this,e,r,i),this._sourceManager=new ok(this),ak(this)},t.prototype.mergeOption=function(e,r){n.prototype.mergeOption.call(this,e,r),ak(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:gr},t})(Qt),AF=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t})(On);function OF(n){n.registerComponentModel(DF),n.registerComponentView(AF)}var EF=(function(n){Mt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t})(Qt),im=(function(n){Mt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Hn).models[0]},t.type="cartesian2dAxis",t})(Qt);ir(im,JB);var wM={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},PF=$t({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},wM),om=$t({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},wM),NF=$t({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},om),LF=qt({logBase:10},om);const RF={category:PF,value:om,time:NF,log:LF};var zF={value:1,category:1,time:1,log:1};function SM(n,t,e,r){R(zF,function(i,o){var a=$t($t({},RF[o],!0),r,!0),s=(function(u){Mt(h,u);function h(){var p=u!==null&&u.apply(this,arguments)||this;return p.type=t+"Axis."+o,p}return h.prototype.mergeDefaultAndTheme=function(p,f){var y=Ml(this),g=y?zh(p):{},v=f.getTheme();$t(p,v.get(o+"Axis")),$t(p,this.getDefaultOption()),p.type=kM(p),y&&La(p,g,y)},h.prototype.optionUpdated=function(){var p=this.option;p.type==="category"&&(this.__ordinalMeta=jv.createByAxisModel(this))},h.prototype.getCategories=function(p){var f=this.option;if(f.type==="category")return p?f.data:this.__ordinalMeta.categories},h.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},h.type=t+"Axis."+o,h.defaultOption=a,h})(e);n.registerComponentModel(s)}),n.registerSubTypeDefaulter(t+"Axis",kM)}function kM(n){return n.type||(n.data?"category":"value")}var BF=(function(){function n(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return n.prototype.getAxis=function(t){return this._axes[t]},n.prototype.getAxes=function(){return xt(this._dimList,function(t){return this._axes[t]},this)},n.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),_e(this.getAxes(),function(e){return e.scale.type===t})},n.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},n})(),am=["x","y"];function CM(n){return n.type==="interval"||n.type==="time"}var FF=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=am,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!CM(e)||!CM(r))){var i=e.getExtent(),o=r.getExtent(),a=this.dataToPoint([i[0],o[0]]),s=this.dataToPoint([i[1],o[1]]),u=i[1]-i[0],h=o[1]-o[0];if(!(!u||!h)){var p=(s[0]-a[0])/u,f=(s[1]-a[1])/h,y=a[0]-i[0]*p,g=a[1]-o[0]*f,v=this._transform=[p,0,0,f,y,g];this._invTransform=vc([],v)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var r=this.getAxis("x"),i=this.getAxis("y");return r.contain(r.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,r){var i=this.dataToPoint(e),o=this.dataToPoint(r),a=this.getArea(),s=new Gt(i[0],i[1],o[0]-i[0],o[1]-i[1]);return a.intersect(s)},t.prototype.dataToPoint=function(e,r,i){i=i||[];var o=e[0],a=e[1];if(this._transform&&o!=null&&isFinite(o)&&a!=null&&isFinite(a))return _n(i,e,this._transform);var s=this.getAxis("x"),u=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(o,r)),i[1]=u.toGlobalCoord(u.dataToCoord(a,r)),i},t.prototype.clampData=function(e,r){var i=this.getAxis("x").scale,o=this.getAxis("y").scale,a=i.getExtent(),s=o.getExtent(),u=i.parse(e[0]),h=o.parse(e[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(a[0],a[1]),u),Math.max(a[0],a[1])),r[1]=Math.min(Math.max(Math.min(s[0],s[1]),h),Math.max(s[0],s[1])),r},t.prototype.pointToData=function(e,r){var i=[];if(this._invTransform)return _n(i,e,this._invTransform);var o=this.getAxis("x"),a=this.getAxis("y");return i[0]=o.coordToData(o.toLocalCoord(e[0]),r),i[1]=a.coordToData(a.toLocalCoord(e[1]),r),i},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var r=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),o=Math.min(r[0],r[1])-e,a=Math.min(i[0],i[1])-e,s=Math.max(r[0],r[1])-o+e,u=Math.max(i[0],i[1])-a+e;return new Gt(o,a,s,u)},t})(BF),HF=(function(n){Mt(t,n);function t(e,r,i,o,a){var s=n.call(this,e,r,i)||this;return s.index=0,s.type=o||"value",s.position=a||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),e&&r[0]>r[1]&&r.reverse(),r},t.prototype.pointToData=function(e,r){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),r)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(lF),sm=Math.log;function VF(n,t,e){var r=qa.prototype,i=r.getTicks.call(e),o=r.getTicks.call(e,!0),a=i.length-1,s=r.getInterval.call(e),u=I2(n,t),h=u.extent,p=u.fixMin,f=u.fixMax;if(n.type==="log"){var y=sm(n.base);h=[sm(h[0])/y,sm(h[1])/y]}n.setExtent(h[0],h[1]),n.calcNiceExtent({splitNumber:a,fixMin:p,fixMax:f});var g=r.getExtent.call(n);p&&(h[0]=g[0]),f&&(h[1]=g[1]);var v=r.getInterval.call(n),_=h[0],m=h[1];if(p&&f)v=(m-_)/a;else if(p)for(m=h[0]+v*a;m<h[1]&&isFinite(m)&&isFinite(h[1]);)v=Wv(v),m=h[0]+v*a;else if(f)for(_=h[1]-v*a;_>h[0]&&isFinite(_)&&isFinite(h[0]);)v=Wv(v),_=h[1]-v*a;else{var b=n.getTicks().length-1;b>a&&(v=Wv(v));var w=v*a;m=Math.ceil(h[1]/v)*v,_=be(m-w),_<0&&h[0]>=0?(_=0,m=be(w)):m>0&&h[1]<=0&&(m=0,_=-be(w))}var k=(i[0].value-o[0].value)/s,T=(i[a].value-o[a].value)/s;r.setExtent.call(n,_+v*k,m+v*T),r.setInterval.call(n,v),(k||T)&&r.setNiceExtent.call(n,_+v,m-v)}var GF=(function(){function n(t,e,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=am,this._initCartesian(t,e,r),this.model=t}return n.prototype.getRect=function(){return this._rect},n.prototype.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model);function i(a){var s,u=ae(a),h=u.length;if(h){for(var p=[],f=h-1;f>=0;f--){var y=+u[f],g=a[y],v=g.model,_=g.scale;Uv(_)&&v.get("alignTicks")&&v.get("interval")==null?p.push(g):(D2(_,v),Uv(_)&&(s=g))}p.length&&(s||(s=p.pop(),D2(s.scale,s.model)),R(p,function(m){VF(m.scale,m.model,s.scale)}))}}i(r.x),i(r.y);var o={};R(r.x,function(a){MM(r,"y",a,o)}),R(r.y,function(a){MM(r,"x",a,o)}),this.resize(this.model,e)},n.prototype.resize=function(t,e,r){var i=t.getBoxLayoutParams(),o=!r&&t.get("containLabel"),a=Cl(i,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var s=this._axesList;u(),o&&(R(s,function(h){if(!h.model.get(["axisLabel","inside"])){var p=K4(h);if(p){var f=h.isHorizontal()?"height":"width",y=h.model.get(["axisLabel","margin"]);a[f]-=p[f]+y,h.position==="top"?a.y+=p.height+y:h.position==="left"&&(a.x+=p.width+y)}}}),u()),R(this._coordsList,function(h){h.calcAffineTransform()});function u(){R(s,function(h){var p=h.isHorizontal(),f=p?[0,a.width]:[0,a.height],y=h.inverse?1:0;h.setExtent(f[y],f[1-y]),jF(h,p?a.x:a.y)})}},n.prototype.getAxis=function(t,e){var r=this._axesMap[t];if(r!=null)return r[e||0]},n.prototype.getAxes=function(){return this._axesList.slice()},n.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}mt(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},n.prototype.getCartesians=function(){return this._coordsList.slice()},n.prototype.convertToPixel=function(t,e,r){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(r):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(r)):null},n.prototype.convertFromPixel=function(t,e,r){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(r):i.axis?i.axis.coordToData(i.axis.toLocalCoord(r)):null},n.prototype._findConvertTarget=function(t){var e=t.seriesModel,r=t.xAxisModel||e&&e.getReferringComponents("xAxis",Hn).models[0],i=t.yAxisModel||e&&e.getReferringComponents("yAxis",Hn).models[0],o=t.gridModel,a=this._coordsList,s,u;if(e)s=e.coordinateSystem,Xt(a,s)<0&&(s=null);else if(r&&i)s=this.getCartesian(r.componentIndex,i.componentIndex);else if(r)u=this.getAxis("x",r.componentIndex);else if(i)u=this.getAxis("y",i.componentIndex);else if(o){var h=o.coordinateSystem;h===this&&(s=this._coordsList[0])}return{cartesian:s,axis:u}},n.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},n.prototype._initCartesian=function(t,e,r){var i=this,o=this,a={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},u={x:0,y:0};if(e.eachComponent("xAxis",h("x"),this),e.eachComponent("yAxis",h("y"),this),!u.x||!u.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,R(s.x,function(p,f){R(s.y,function(y,g){var v="x"+f+"y"+g,_=new FF(v);_.master=i,_.model=t,i._coordsMap[v]=_,i._coordsList.push(_),_.addAxis(p),_.addAxis(y)})});function h(p){return function(f,y){if(lm(f,t)){var g=f.get("position");p==="x"?g!=="top"&&g!=="bottom"&&(g=a.bottom?"top":"bottom"):g!=="left"&&g!=="right"&&(g=a.left?"right":"left"),a[g]=!0;var v=new HF(p,Z4(f),[0,0],f.get("type"),g),_=v.type==="category";v.onBand=_&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=o,v.index=y,o._axesList.push(v),s[p][y]=v,u[p]++}}}},n.prototype._updateScale=function(t,e){R(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var o=i.model.get("categorySortInfo");i.scale.setSortInfo(o)}}),t.eachSeries(function(i){if(H2(i)){var o=V2(i),a=o.xAxisModel,s=o.yAxisModel;if(!lm(a,e)||!lm(s,e))return;var u=this.getCartesian(a.componentIndex,s.componentIndex),h=i.getData(),p=u.getAxis("x"),f=u.getAxis("y");r(h,p),r(h,f)}},this);function r(i,o){R(tB(i,o.dim),function(a){o.scale.unionExtentFromData(i,a)})}},n.prototype.getTooltipAxes=function(t){var e=[],r=[];return R(this.getCartesians(),function(i){var o=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),a=i.getOtherAxis(o);Xt(e,o)<0&&e.push(o),Xt(r,a)<0&&r.push(a)}),{baseAxes:e,otherAxes:r}},n.create=function(t,e){var r=[];return t.eachComponent("grid",function(i,o){var a=new n(i,t,e);a.name="grid_"+o,a.resize(i,e,!0),i.coordinateSystem=a,r.push(a)}),t.eachSeries(function(i){if(H2(i)){var o=V2(i),a=o.xAxisModel,s=o.yAxisModel,u=a.getCoordSysModel(),h=u.coordinateSystem;i.coordinateSystem=h.getCartesian(a.componentIndex,s.componentIndex)}}),r},n.dimensions=am,n})();function lm(n,t){return n.getCoordSysModel()===t}function MM(n,t,e,r){e.getAxesOnZeroOf=function(){return o?[o]:[]};var i=n[t],o,a=e.model,s=a.get(["axisLine","onZero"]),u=a.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(u!=null)TM(i[u])&&(o=i[u]);else for(var h in i)if(i.hasOwnProperty(h)&&TM(i[h])&&!r[p(i[h])]){o=i[h];break}o&&(r[p(o)]=!0);function p(f){return f.dim+"_"+f.index}}function TM(n){return n&&n.type!=="category"&&n.type!=="time"&&Q4(n)}function jF(n,t){var e=n.getExtent(),r=e[0]+e[1];n.toGlobalCoord=n.dim==="x"?function(i){return i+t}:function(i){return r-i+t},n.toLocalCoord=n.dim==="x"?function(i){return i-t}:function(i){return r-i+t}}var um=pe();function UF(n,t,e,r){var i=e.axis;if(!i.scale.isBlank()){var o=e.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),u=r.coordinateSystem.getRect(),h=i.getTicksCoords({tickModel:o,clamp:!0});if(h.length){var p=s.length,f=um(n).splitAreaColors,y=Lt(),g=0;if(f)for(var v=0;v<h.length;v++){var _=f.get(h[v].tickValue);if(_!=null){g=(_+(p-1)*v)%p;break}}var m=i.toGlobalCoord(h[0].coord),b=a.getAreaStyle();s=pt(s)?s:[s];for(var v=1;v<h.length;v++){var w=i.toGlobalCoord(h[v].coord),k=void 0,T=void 0,C=void 0,I=void 0;i.isHorizontal()?(k=m,T=u.y,C=w-k,I=u.height,m=k+C):(k=u.x,T=m,C=u.width,I=w-T,m=T+I);var A=h[v-1].tickValue;A!=null&&y.set(A,g),t.add(new xe({anid:A!=null?"area_"+A:null,shape:{x:k,y:T,width:C,height:I},style:qt({fill:s[g]},b),autoBatch:!0,silent:!0})),g=(g+1)%p}um(n).splitAreaColors=y}}}function WF(n){um(n).splitAreaColors=null}var $F=["axisLine","axisTickLabel","axisName"],qF=["splitArea","splitLine","minorSplitLine"],IM=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,r,i,o){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new Ie,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),u=Zv(s,e),h=new Ti(e,ut({handleAutoShown:function(f){for(var y=s.coordinateSystem.getCartesians(),g=0;g<y.length;g++)if(Uv(y[g].getOtherAxis(e.axis).scale))return!0;return!1}},u));R($F,h.add,h),this._axisGroup.add(h.getGroup()),R(qF,function(f){e.get([f,"show"])&&XF[f](this,this._axisGroup,e,s)},this);var p=o&&o.type==="changeAxisOrder"&&o.isInitSort;p||jw(a,this._axisGroup,e),n.prototype.render.call(this,e,r,i,o)}},t.prototype.remove=function(){WF(this)},t.type="cartesianAxis",t})(y2),XF={splitLine:function(n,t,e,r){var i=e.axis;if(!i.scale.isBlank()){var o=e.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color"),u=o.get("showMinLine")!==!1,h=o.get("showMaxLine")!==!1;s=pt(s)?s:[s];for(var p=r.coordinateSystem.getRect(),f=i.isHorizontal(),y=0,g=i.getTicksCoords({tickModel:o}),v=[],_=[],m=a.getLineStyle(),b=0;b<g.length;b++){var w=i.toGlobalCoord(g[b].coord);if(!(b===0&&!u||b===g.length-1&&!h)){var k=g[b].tickValue;f?(v[0]=w,v[1]=p.y,_[0]=w,_[1]=p.y+p.height):(v[0]=p.x,v[1]=w,_[0]=p.x+p.width,_[1]=w);var T=y++%s.length,C=new gi({anid:k!=null?"line_"+k:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:_[0],y2:_[1]},style:qt({stroke:s[T]},m),silent:!0});bl(C.shape,m.lineWidth),t.add(C)}}}},minorSplitLine:function(n,t,e,r){var i=e.axis,o=e.getModel("minorSplitLine"),a=o.getModel("lineStyle"),s=r.coordinateSystem.getRect(),u=i.isHorizontal(),h=i.getMinorTicksCoords();if(h.length)for(var p=[],f=[],y=a.getLineStyle(),g=0;g<h.length;g++)for(var v=0;v<h[g].length;v++){var _=i.toGlobalCoord(h[g][v].coord);u?(p[0]=_,p[1]=s.y,f[0]=_,f[1]=s.y+s.height):(p[0]=s.x,p[1]=_,f[0]=s.x+s.width,f[1]=_);var m=new gi({anid:"minor_line_"+h[g][v].tickValue,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:f[0],y2:f[1]},style:y,silent:!0});bl(m.shape,y.lineWidth),t.add(m)}},splitArea:function(n,t,e,r){UF(n,t,e,r)}},DM=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t})(IM),YF=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=DM.type,e}return t.type="yAxis",t})(IM),ZF=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,r){this.group.removeAll(),e.get("show")&&this.group.add(new xe({shape:e.coordinateSystem.getRect(),style:qt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(On),AM={offset:0};function QF(n){n.registerComponentView(ZF),n.registerComponentModel(EF),n.registerCoordinateSystem("cartesian2d",GF),SM(n,"x",im,AM),SM(n,"y",im,AM),n.registerComponentView(DM),n.registerComponentView(YF),n.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function KF(n){xi(QF),xi(Z2)}function JF(n,t){var e=Nh(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),n=new xe({shape:{x:n.x-e[3],y:n.y-e[0],width:n.width+e[1]+e[3],height:n.height+e[0]+e[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1}),n}var t6=function(n,t){if(t==="all")return{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:n.getLocaleModel().get(["legend","selector","inverse"])}},cm=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,r,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,r){n.prototype.mergeOption.call(this,e,r),this._updateSelector(e)},t.prototype._updateSelector=function(e){var r=e.selector,i=this.ecModel;r===!0&&(r=e.selector=["all","inverse"]),pt(r)&&R(r,function(o,a){gt(o)&&(o={type:o}),r[a]=$t(o,t6(i,o.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var r=!1,i=0;i<e.length;i++){var o=e[i].get("name");if(this.isSelected(o)){this.select(o),r=!0;break}}!r&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var r=[],i=[];e.eachRawSeries(function(u){var h=u.name;i.push(h);var p;if(u.legendVisualProvider){var f=u.legendVisualProvider,y=f.getAllNames();e.isSeriesFiltered(u)||(i=i.concat(y)),y.length?r=r.concat(y):p=!0}else p=!0;p&&Lg(u)&&r.push(u.name)}),this._availableNames=i;var o=this.get("data")||r,a=Lt(),s=xt(o,function(u){return(gt(u)||se(u))&&(u={name:u}),a.get(u.name)?null:(a.set(u.name,!0),new fe(u,this,this.ecModel))},this);this._data=_e(s,function(u){return!!u})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var r=this.option.selected,i=this.get("selectedMode");if(i==="single"){var o=this._data;R(o,function(a){r[a.get("name")]=!1})}r[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var r=this.option.selected;r.hasOwnProperty(e)||(r[e]=!0),this[r[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,r=this.option.selected;R(e,function(i){r[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,r=this.option.selected;R(e,function(i){var o=i.get("name",!0);r.hasOwnProperty(o)||(r[o]=!0),r[o]=!r[o]})},t.prototype.isSelected=function(e){var r=this.option.selected;return!(r.hasOwnProperty(e)&&!r[e])&&Xt(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t})(Qt),Za=Se,hm=R,_p=Ie,OM=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new _p),this.group.add(this._selectorGroup=new _p),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,r,i){var o=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var a=e.get("align"),s=e.get("orient");(!a||a==="auto")&&(a=e.get("left")==="right"&&s==="vertical"?"right":"left");var u=e.get("selector",!0),h=e.get("selectorPosition",!0);u&&(!h||h==="auto")&&(h=s==="horizontal"?"end":"start"),this.renderInner(a,e,r,i,u,s,h);var p=e.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},y=e.get("padding"),g=Cl(p,f,y),v=this.layoutInner(e,a,g,o,u,h),_=Cl(qt({width:v.width,height:v.height},p),f,y);this.group.x=_.x-v.x,this.group.y=_.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=JF(v,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,r,i,o,a,s,u){var h=this.getContentGroup(),p=Lt(),f=r.get("selectedMode"),y=[];i.eachRawSeries(function(g){!g.get("legendHoverLink")&&y.push(g.id)}),hm(r.getData(),function(g,v){var _=g.get("name");if(!this.newlineDisabled&&(_===""||_===`
|
|
128
128
|
`)){var m=new _p;m.newline=!0,h.add(m);return}var b=i.getSeriesByName(_)[0];if(!p.get(_))if(b){var w=b.getData(),k=w.getVisual("legendLineStyle")||{},T=w.getVisual("legendIcon"),C=w.getVisual("style"),I=this._createItem(b,_,v,g,r,e,k,C,T,f,o);I.on("click",Za(EM,_,null,o,y)).on("mouseover",Za(pm,b.name,null,o,y)).on("mouseout",Za(fm,b.name,null,o,y)),i.ssr&&I.eachChild(function(A){var E=Bt(A);E.seriesIndex=b.seriesIndex,E.dataIndex=v,E.ssrType="legend"}),p.set(_,!0)}else i.eachRawSeries(function(A){if(!p.get(_)&&A.legendVisualProvider){var E=A.legendVisualProvider;if(!E.containName(_))return;var P=E.indexOfName(_),L=E.getItemVisual(P,"style"),N=E.getItemVisual(P,"legendIcon"),F=Cr(L.fill);F&&F[3]===0&&(F[3]=.2,L=ut(ut({},L),{fill:Ac(F,"rgba")}));var G=this._createItem(A,_,v,g,r,e,{},L,N,f,o);G.on("click",Za(EM,null,_,o,y)).on("mouseover",Za(pm,null,_,o,y)).on("mouseout",Za(fm,null,_,o,y)),i.ssr&&G.eachChild(function(X){var Y=Bt(X);Y.seriesIndex=A.seriesIndex,Y.dataIndex=v,Y.ssrType="legend"}),p.set(_,!0)}},this)},this),a&&this._createSelector(a,r,o,s,u)},t.prototype._createSelector=function(e,r,i,o,a){var s=this.getSelectorGroup();hm(e,function(u){var h=u.type,p=new Le({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect",legendId:r.id})}});s.add(p);var f=r.getModel("selectorLabel"),y=r.getModel(["emphasis","selectorLabel"]);Sh(p,{normal:f,emphasis:y},{defaultText:u.title}),sy(p)})},t.prototype._createItem=function(e,r,i,o,a,s,u,h,p,f,y){var g=e.visualDrawType,v=a.get("itemWidth"),_=a.get("itemHeight"),m=a.isSelected(r),b=o.get("symbolRotate"),w=o.get("symbolKeepAspect"),k=o.get("icon");p=k||p||"roundRect";var T=e6(p,o,u,h,g,m,y),C=new _p,I=o.getModel("textStyle");if(At(e.getLegendIcon)&&(!k||k==="inherit"))C.add(e.getLegendIcon({itemWidth:v,itemHeight:_,icon:p,iconRotate:b,itemStyle:T.itemStyle,lineStyle:T.lineStyle,symbolKeepAspect:w}));else{var A=k==="inherit"&&e.getData().getVisual("symbol")?b==="inherit"?e.getData().getVisual("symbolRotate"):b:0;C.add(n6({itemWidth:v,itemHeight:_,icon:p,iconRotate:A,itemStyle:T.itemStyle,symbolKeepAspect:w}))}var E=s==="left"?v+5:-5,P=s,L=a.get("formatter"),N=r;gt(L)&&L?N=L.replace("{name}",r??""):At(L)&&(N=L(r));var F=m?I.getTextColor():o.get("inactiveColor");C.add(new Le({style:yi(I,{text:N,x:E,y:_/2,fill:F,align:P,verticalAlign:"middle"},{inheritColor:F})}));var G=new xe({shape:C.getBoundingRect(),style:{fill:"transparent"}}),X=o.getModel("tooltip");return X.get("show")&&bh({el:G,componentModel:a,itemName:r,itemTooltipOption:X.option}),C.add(G),C.eachChild(function(Y){Y.silent=!0}),G.silent=!f,this.getContentGroup().add(C),sy(C),C.__legendDataIndex=i,C},t.prototype.layoutInner=function(e,r,i,o,a,s){var u=this.getContentGroup(),h=this.getSelectorGroup();kl(e.get("orient"),u,e.get("itemGap"),i.width,i.height);var p=u.getBoundingRect(),f=[-p.x,-p.y];if(h.markRedraw(),u.markRedraw(),a){kl("horizontal",h,e.get("selectorItemGap",!0));var y=h.getBoundingRect(),g=[-y.x,-y.y],v=e.get("selectorButtonGap",!0),_=e.getOrient().index,m=_===0?"width":"height",b=_===0?"height":"width",w=_===0?"y":"x";s==="end"?g[_]+=p[m]+v:f[_]+=y[m]+v,g[1-_]+=p[b]/2-y[b]/2,h.x=g[0],h.y=g[1],u.x=f[0],u.y=f[1];var k={x:0,y:0};return k[m]=p[m]+v+y[m],k[b]=Math.max(p[b],y[b]),k[w]=Math.min(0,y[w]+g[1-_]),k}else return u.x=f[0],u.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(On);function e6(n,t,e,r,i,o,a){function s(m,b){m.lineWidth==="auto"&&(m.lineWidth=b.lineWidth>0?2:0),hm(m,function(w,k){m[k]==="inherit"&&(m[k]=b[k])})}var u=t.getModel("itemStyle"),h=u.getItemStyle(),p=n.lastIndexOf("empty",0)===0?"fill":"stroke",f=u.getShallow("decal");h.decal=!f||f==="inherit"?r.decal:lv(f,a),h.fill==="inherit"&&(h.fill=r[i]),h.stroke==="inherit"&&(h.stroke=r[p]),h.opacity==="inherit"&&(h.opacity=(i==="fill"?r:e).opacity),s(h,r);var y=t.getModel("lineStyle"),g=y.getLineStyle();if(s(g,e),h.fill==="auto"&&(h.fill=r.fill),h.stroke==="auto"&&(h.stroke=r.fill),g.stroke==="auto"&&(g.stroke=r.fill),!o){var v=t.get("inactiveBorderWidth"),_=h[p];h.lineWidth=v==="auto"?r.lineWidth>0&&_?2:0:h.lineWidth,h.fill=t.get("inactiveColor"),h.stroke=t.get("inactiveBorderColor"),g.stroke=y.get("inactiveColor"),g.lineWidth=y.get("inactiveWidth")}return{itemStyle:h,lineStyle:g}}function n6(n){var t=n.icon||"roundRect",e=Ga(t,0,0,n.itemWidth,n.itemHeight,n.itemStyle.fill,n.symbolKeepAspect);return e.setStyle(n.itemStyle),e.rotation=(n.iconRotate||0)*Math.PI/180,e.setOrigin([n.itemWidth/2,n.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function EM(n,t,e,r){fm(n,t,e,r),e.dispatchAction({type:"legendToggleSelect",name:n??t}),pm(n,t,e,r)}function PM(n){for(var t=n.getZr().storage.getDisplayList(),e,r=0,i=t.length;r<i&&!(e=t[r].states.emphasis);)r++;return e&&e.hoverLayer}function pm(n,t,e,r){PM(e)||e.dispatchAction({type:"highlight",seriesName:n,name:t,excludeSeriesId:r})}function fm(n,t,e,r){PM(e)||e.dispatchAction({type:"downplay",seriesName:n,name:t,excludeSeriesId:r})}function r6(n){var t=n.findComponents({mainType:"legend"});t&&t.length&&n.filterSeries(function(e){for(var r=0;r<t.length;r++)if(!t[r].isSelected(e.name))return!1;return!0})}function Kl(n,t,e){var r=n==="allSelect"||n==="inverseSelect",i={},o=[];e.eachComponent({mainType:"legend",query:t},function(s){r?s[n]():s[n](t.name),NM(s,i),o.push(s.componentIndex)});var a={};return e.eachComponent("legend",function(s){R(i,function(u,h){s[u?"select":"unSelect"](h)}),NM(s,a)}),r?{selected:a,legendIndex:o}:{name:t.name,selected:a}}function NM(n,t){var e=t||{};return R(n.getData(),function(r){var i=r.get("name");if(!(i===`
|
|
129
|
-
`||i==="")){var o=n.isSelected(i);Wi(e,i)?e[i]=e[i]&&o:e[i]=o}}),e}function i6(n){n.registerAction("legendToggleSelect","legendselectchanged",Se(Kl,"toggleSelected")),n.registerAction("legendAllSelect","legendselectall",Se(Kl,"allSelect")),n.registerAction("legendInverseSelect","legendinverseselect",Se(Kl,"inverseSelect")),n.registerAction("legendSelect","legendselected",Se(Kl,"select")),n.registerAction("legendUnSelect","legendunselected",Se(Kl,"unSelect"))}function LM(n){n.registerComponentModel(cm),n.registerComponentView(OM),n.registerProcessor(n.PRIORITY.PROCESSOR.SERIES_FILTER,r6),n.registerSubTypeDefaulter("legend",function(){return"plain"}),i6(n)}var o6=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,r,i){var o=zh(e);n.prototype.init.call(this,e,r,i),RM(this,e,o)},t.prototype.mergeOption=function(e,r){n.prototype.mergeOption.call(this,e,r),RM(this,this.option,e)},t.type="legend.scroll",t.defaultOption=tS(cm.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})(cm);function RM(n,t,e){var r=n.getOrient(),i=[1,1];i[r.index]=0,La(t,e,{type:"box",ignoreSize:!!i})}var zM=Ie,dm=["width","height"],gm=["x","y"],a6=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){n.prototype.init.call(this),this.group.add(this._containerGroup=new zM),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new zM)},t.prototype.resetInner=function(){n.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,r,i,o,a,s,u){var h=this;n.prototype.renderInner.call(this,e,r,i,o,a,s,u);var p=this._controllerGroup,f=r.get("pageIconSize",!0),y=pt(f)?f:[f,f];v("pagePrev",0);var g=r.getModel("pageTextStyle");p.add(new Le({name:"pageText",style:{text:"xx/xx",fill:g.getTextColor(),font:g.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(_,m){var b=_+"DataIndex",w=Sy(r.get("pageIcons",!0)[r.getOrient().name][m],{onclick:le(h._pageGo,h,b,r,o)},{x:-y[0]/2,y:-y[1]/2,width:y[0],height:y[1]});w.name=_,p.add(w)}},t.prototype.layoutInner=function(e,r,i,o,a,s){var u=this.getSelectorGroup(),h=e.getOrient().index,p=dm[h],f=gm[h],y=dm[1-h],g=gm[1-h];a&&kl("horizontal",u,e.get("selectorItemGap",!0));var v=e.get("selectorButtonGap",!0),_=u.getBoundingRect(),m=[-_.x,-_.y],b=Ht(i);a&&(b[p]=i[p]-_[p]-v);var w=this._layoutContentAndController(e,o,b,h,p,y,g,f);if(a){if(s==="end")m[h]+=w[p]+v;else{var k=_[p]+v;m[h]-=k,w[f]-=k}w[p]+=_[p]+v,m[1-h]+=w[g]+w[y]/2-_[y]/2,w[y]=Math.max(w[y],_[y]),w[g]=Math.min(w[g],_[g]+m[1-h]),u.x=m[0],u.y=m[1],u.markRedraw()}return w},t.prototype._layoutContentAndController=function(e,r,i,o,a,s,u,h){var p=this.getContentGroup(),f=this._containerGroup,y=this._controllerGroup;kl(e.get("orient"),p,e.get("itemGap"),o?i.width:null,o?null:i.height),kl("horizontal",y,e.get("pageButtonItemGap",!0));var g=p.getBoundingRect(),v=y.getBoundingRect(),_=this._showController=g[a]>i[a],m=[-g.x,-g.y];r||(m[o]=p[h]);var b=[0,0],w=[-v.x,-v.y],k=Ot(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(_){var T=e.get("pageButtonPosition",!0);T==="end"?w[o]+=i[a]-v[a]:b[o]+=v[a]+k}w[1-o]+=g[s]/2-v[s]/2,p.setPosition(m),f.setPosition(b),y.setPosition(w);var C={x:0,y:0};if(C[a]=_?i[a]:g[a],C[s]=Math.max(g[s],v[s]),C[u]=Math.min(0,v[u]+w[1-o]),f.__rectSize=i[a],_){var I={x:0,y:0};I[a]=Math.max(i[a]-v[a]-k,0),I[s]=C[s],f.setClipPath(new xe({shape:I})),f.__rectSize=I[a]}else y.eachChild(function(E){E.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(e);return A.pageIndex!=null&&ze(p,{x:A.contentPosition[0],y:A.contentPosition[1]},_?e:null),this._updatePageInfoView(e,A),C},t.prototype._pageGo=function(e,r,i){var o=this._getPageInfo(r)[e];o!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:o,legendId:r.id})},t.prototype._updatePageInfoView=function(e,r){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(p){var f=p+"DataIndex",y=r[f]!=null,g=i.childOfName(p);g&&(g.setStyle("fill",y?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),g.cursor=y?"pointer":"default")});var o=i.childOfName("pageText"),a=e.get("pageFormatter"),s=r.pageIndex,u=s!=null?s+1:0,h=r.pageCount;o&&a&&o.setStyle("text",gt(a)?a.replace("{current}",u==null?"":u+"").replace("{total}",h==null?"":h+""):a({current:u,total:h}))},t.prototype._getPageInfo=function(e){var r=e.get("scrollDataIndex",!0),i=this.getContentGroup(),o=this._containerGroup.__rectSize,a=e.getOrient().index,s=dm[a],u=gm[a],h=this._findTargetItemIndex(r),p=i.children(),f=p[h],y=p.length,g=y?1:0,v={contentPosition:[i.x,i.y],pageCount:g,pageIndex:g-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var _=T(f);v.contentPosition[a]=-_.s;for(var m=h+1,b=_,w=_,k=null;m<=y;++m)k=T(p[m]),(!k&&w.e>b.s+o||k&&!C(k,b.s))&&(w.i>b.i?b=w:b=k,b&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=b.i),++v.pageCount)),w=k;for(var m=h-1,b=_,w=_,k=null;m>=-1;--m)k=T(p[m]),(!k||!C(w,k.s))&&b.i<w.i&&(w=b,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=b.i),++v.pageCount,++v.pageIndex),b=k;return v;function T(I){if(I){var A=I.getBoundingRect(),E=A[u]+I[u];return{s:E,e:E+A[s],i:I.__legendDataIndex}}}function C(I,A){return I.e>=A&&I.s<=A+o}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var r,i=this.getContentGroup(),o;return i.eachChild(function(a,s){var u=a.__legendDataIndex;o==null&&u!=null&&(o=s),u===e&&(r=s)}),r??o},t.type="legend.scroll",t})(OM);function s6(n){n.registerAction("legendScroll","legendscroll",function(t,e){var r=t.scrollDataIndex;r!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(r)})})}function l6(n){xi(LM),n.registerComponentModel(o6),n.registerComponentView(a6),s6(n)}function u6(n){xi(LM),xi(l6)}export{q5 as $,UA as A,SA as B,lc as C,DA as D,PA as E,mA as F,ji as G,Ld as H,xi as I,t4 as J,x4 as K,YB as L,KB as M,dD as N,ye as O,iA as P,IF as Q,er as R,zn as S,OF as T,AO as U,SF as V,DO as W,u6 as X,KF as Y,OO as Z,sd as _,od as a,qA as a0,GA as a1,z_ as a2,F_ as a3,MA as a4,TO as a5,uA as a6,ne as b,II as c,bD as d,
|
|
129
|
+
`||i==="")){var o=n.isSelected(i);Wi(e,i)?e[i]=e[i]&&o:e[i]=o}}),e}function i6(n){n.registerAction("legendToggleSelect","legendselectchanged",Se(Kl,"toggleSelected")),n.registerAction("legendAllSelect","legendselectall",Se(Kl,"allSelect")),n.registerAction("legendInverseSelect","legendinverseselect",Se(Kl,"inverseSelect")),n.registerAction("legendSelect","legendselected",Se(Kl,"select")),n.registerAction("legendUnSelect","legendunselected",Se(Kl,"unSelect"))}function LM(n){n.registerComponentModel(cm),n.registerComponentView(OM),n.registerProcessor(n.PRIORITY.PROCESSOR.SERIES_FILTER,r6),n.registerSubTypeDefaulter("legend",function(){return"plain"}),i6(n)}var o6=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,r,i){var o=zh(e);n.prototype.init.call(this,e,r,i),RM(this,e,o)},t.prototype.mergeOption=function(e,r){n.prototype.mergeOption.call(this,e,r),RM(this,this.option,e)},t.type="legend.scroll",t.defaultOption=tS(cm.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})(cm);function RM(n,t,e){var r=n.getOrient(),i=[1,1];i[r.index]=0,La(t,e,{type:"box",ignoreSize:!!i})}var zM=Ie,dm=["width","height"],gm=["x","y"],a6=(function(n){Mt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){n.prototype.init.call(this),this.group.add(this._containerGroup=new zM),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new zM)},t.prototype.resetInner=function(){n.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,r,i,o,a,s,u){var h=this;n.prototype.renderInner.call(this,e,r,i,o,a,s,u);var p=this._controllerGroup,f=r.get("pageIconSize",!0),y=pt(f)?f:[f,f];v("pagePrev",0);var g=r.getModel("pageTextStyle");p.add(new Le({name:"pageText",style:{text:"xx/xx",fill:g.getTextColor(),font:g.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(_,m){var b=_+"DataIndex",w=Sy(r.get("pageIcons",!0)[r.getOrient().name][m],{onclick:le(h._pageGo,h,b,r,o)},{x:-y[0]/2,y:-y[1]/2,width:y[0],height:y[1]});w.name=_,p.add(w)}},t.prototype.layoutInner=function(e,r,i,o,a,s){var u=this.getSelectorGroup(),h=e.getOrient().index,p=dm[h],f=gm[h],y=dm[1-h],g=gm[1-h];a&&kl("horizontal",u,e.get("selectorItemGap",!0));var v=e.get("selectorButtonGap",!0),_=u.getBoundingRect(),m=[-_.x,-_.y],b=Ht(i);a&&(b[p]=i[p]-_[p]-v);var w=this._layoutContentAndController(e,o,b,h,p,y,g,f);if(a){if(s==="end")m[h]+=w[p]+v;else{var k=_[p]+v;m[h]-=k,w[f]-=k}w[p]+=_[p]+v,m[1-h]+=w[g]+w[y]/2-_[y]/2,w[y]=Math.max(w[y],_[y]),w[g]=Math.min(w[g],_[g]+m[1-h]),u.x=m[0],u.y=m[1],u.markRedraw()}return w},t.prototype._layoutContentAndController=function(e,r,i,o,a,s,u,h){var p=this.getContentGroup(),f=this._containerGroup,y=this._controllerGroup;kl(e.get("orient"),p,e.get("itemGap"),o?i.width:null,o?null:i.height),kl("horizontal",y,e.get("pageButtonItemGap",!0));var g=p.getBoundingRect(),v=y.getBoundingRect(),_=this._showController=g[a]>i[a],m=[-g.x,-g.y];r||(m[o]=p[h]);var b=[0,0],w=[-v.x,-v.y],k=Ot(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(_){var T=e.get("pageButtonPosition",!0);T==="end"?w[o]+=i[a]-v[a]:b[o]+=v[a]+k}w[1-o]+=g[s]/2-v[s]/2,p.setPosition(m),f.setPosition(b),y.setPosition(w);var C={x:0,y:0};if(C[a]=_?i[a]:g[a],C[s]=Math.max(g[s],v[s]),C[u]=Math.min(0,v[u]+w[1-o]),f.__rectSize=i[a],_){var I={x:0,y:0};I[a]=Math.max(i[a]-v[a]-k,0),I[s]=C[s],f.setClipPath(new xe({shape:I})),f.__rectSize=I[a]}else y.eachChild(function(E){E.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(e);return A.pageIndex!=null&&ze(p,{x:A.contentPosition[0],y:A.contentPosition[1]},_?e:null),this._updatePageInfoView(e,A),C},t.prototype._pageGo=function(e,r,i){var o=this._getPageInfo(r)[e];o!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:o,legendId:r.id})},t.prototype._updatePageInfoView=function(e,r){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(p){var f=p+"DataIndex",y=r[f]!=null,g=i.childOfName(p);g&&(g.setStyle("fill",y?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),g.cursor=y?"pointer":"default")});var o=i.childOfName("pageText"),a=e.get("pageFormatter"),s=r.pageIndex,u=s!=null?s+1:0,h=r.pageCount;o&&a&&o.setStyle("text",gt(a)?a.replace("{current}",u==null?"":u+"").replace("{total}",h==null?"":h+""):a({current:u,total:h}))},t.prototype._getPageInfo=function(e){var r=e.get("scrollDataIndex",!0),i=this.getContentGroup(),o=this._containerGroup.__rectSize,a=e.getOrient().index,s=dm[a],u=gm[a],h=this._findTargetItemIndex(r),p=i.children(),f=p[h],y=p.length,g=y?1:0,v={contentPosition:[i.x,i.y],pageCount:g,pageIndex:g-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var _=T(f);v.contentPosition[a]=-_.s;for(var m=h+1,b=_,w=_,k=null;m<=y;++m)k=T(p[m]),(!k&&w.e>b.s+o||k&&!C(k,b.s))&&(w.i>b.i?b=w:b=k,b&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=b.i),++v.pageCount)),w=k;for(var m=h-1,b=_,w=_,k=null;m>=-1;--m)k=T(p[m]),(!k||!C(w,k.s))&&b.i<w.i&&(w=b,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=b.i),++v.pageCount,++v.pageIndex),b=k;return v;function T(I){if(I){var A=I.getBoundingRect(),E=A[u]+I[u];return{s:E,e:E+A[s],i:I.__legendDataIndex}}}function C(I,A){return I.e>=A&&I.s<=A+o}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var r,i=this.getContentGroup(),o;return i.eachChild(function(a,s){var u=a.__legendDataIndex;o==null&&u!=null&&(o=s),u===e&&(r=s)}),r??o},t.type="legend.scroll",t})(OM);function s6(n){n.registerAction("legendScroll","legendscroll",function(t,e){var r=t.scrollDataIndex;r!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(r)})})}function l6(n){xi(LM),n.registerComponentModel(o6),n.registerComponentView(a6),s6(n)}function u6(n){xi(LM),xi(l6)}export{q5 as $,UA as A,SA as B,lc as C,DA as D,PA as E,mA as F,ji as G,Ld as H,xi as I,t4 as J,x4 as K,YB as L,KB as M,dD as N,ye as O,iA as P,IF as Q,er as R,zn as S,OF as T,AO as U,SF as V,DO as W,u6 as X,KF as Y,OO as Z,sd as _,od as a,qA as a0,GA as a1,z_ as a2,F_ as a3,MA as a4,TO as a5,uA as a6,ne as b,II as c,bD as d,cA as e,wd as f,Jo as g,_d as h,OI as i,JD as j,DI as k,j_ as l,gd as m,Gs as n,hd as o,kD as p,pD as q,id as r,HD as s,jD as t,ND as u,OD as v,$D as w,ID as x,s_ as y,mD as z};
|
package/dist/index.html
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<meta name="description"
|
|
10
10
|
content="QuestDB live demo. Query three large datasets and more than 2 billion rows in milliseconds with SQL" />
|
|
11
11
|
<title>QuestDB · Console</title>
|
|
12
|
-
<script type="module" crossorigin src="./assets/index-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-
|
|
12
|
+
<script type="module" crossorigin src="./assets/index-DLj61pTx.js"></script>
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-BHoUroWS.js">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-DhT2UWZo.css">
|
|
15
15
|
</head>
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@questdb/web-console",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"packageManager": "yarn@4.1.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "QuestDB Web Console",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@monaco-editor/react": "^4.7.0",
|
|
40
40
|
"@phosphor-icons/react": "^2.1.10",
|
|
41
41
|
"@popperjs/core": "2.4.2",
|
|
42
|
-
"@questdb/sql-parser": "0.1.
|
|
42
|
+
"@questdb/sql-parser": "0.1.14",
|
|
43
43
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
44
44
|
"@radix-ui/react-context-menu": "^2.2.16",
|
|
45
45
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
@@ -171,7 +171,9 @@
|
|
|
171
171
|
"@types/react": "17.0.2",
|
|
172
172
|
"react": "17.0.2",
|
|
173
173
|
"react-dom": "17.0.2",
|
|
174
|
-
"@monaco-editor/loader": "1.5.0"
|
|
174
|
+
"@monaco-editor/loader": "1.5.0",
|
|
175
|
+
"lodash": "4.18.1",
|
|
176
|
+
"lodash-es": "4.18.1"
|
|
175
177
|
},
|
|
176
178
|
"bundlewatch": {
|
|
177
179
|
"files": [
|