@databrainhq/plugin 0.12.32 → 0.12.33
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/webcomponents.es.js
CHANGED
|
@@ -81985,8 +81985,9 @@ const oGe = (n) => {
|
|
|
81985
81985
|
if (typeof c == "number")
|
|
81986
81986
|
return c;
|
|
81987
81987
|
try {
|
|
81988
|
-
if (c
|
|
81989
|
-
|
|
81988
|
+
if (typeof c == "string" && (c.includes(",") || c.includes(`
|
|
81989
|
+
`) || c.includes("\r") || c.includes('"')))
|
|
81990
|
+
return `"${c.replace(/"/g, '""')}"`;
|
|
81990
81991
|
} catch {
|
|
81991
81992
|
return c;
|
|
81992
81993
|
}
|
|
@@ -473,7 +473,8 @@ echarts.use([`+$+"]);":"Unknown series "+E))}return}if(f==="tooltip"){if(x){proc
|
|
|
473
473
|
${Array.isArray(l.value)?Dn(Tn(l.value[1],t.customSettings.numberFormatter),t.customSettings.labelPrefix||"",t.customSettings.labelSuffix||""):Dn(Tn(l.value,t.customSettings.numberFormatter),t.customSettings.labelPrefix||"",t.customSettings.labelSuffix||"")}
|
|
474
474
|
</span>
|
|
475
475
|
</div>
|
|
476
|
-
`).join("")}`,s},wu=n=>[{type:"inside",xAxisIndex:(n==null?void 0:n.zoomAxis)==="x"||(n==null?void 0:n.zoomAxis)==="xy"?[0]:"none",start:0,disabled:!(n!=null&&n.isZoomEnabled),filterMode:"none",zoomOnMouseWheel:(n==null?void 0:n.zoomOnMouseWheel)||"ctrl"},{type:"inside",yAxisIndex:(n==null?void 0:n.zoomAxis)==="y"||(n==null?void 0:n.zoomAxis)==="xy"?[0]:"none",start:0,disabled:!(n!=null&&n.isZoomEnabled),filterMode:"none",zoomOnMouseWheel:(n==null?void 0:n.zoomOnMouseWheel)||"ctrl"}],JM=({chartOptions:n,data:t=[],colors:e,selectedSeries:r})=>{var z,P,F,V,W,G,Z,Y,q,te,K,ne,oe,le,fe,ce,pe,xe,Ae,Se,Be,ze,dt,ge,Ee,Ve,ft,ut,De,je,ye,We,Ye,xt,_t,kt,Rt,yt,Oe,it,Ot,vn,_n,ir,Vr,Li,Kn,Ti,Tr,wr,ha,fi,qi,ra,eo,ia,ja,ba,to,aa,no,Ji,oa,Ki,Me,bt,jt,Wt,ct,ot,$t,Zt,$r,jr,Hr,ii,za,Uo,br,fc,So,qn,ko,bs,Fa,Ss,Ea,Kl,Sa,eu,tu,Us,_l,ro,io,pa,ws,_s,xs,xl,Gs,Go,dc,wo,vr,_o,Ys,Ml,er,Cl,Tl,Pn,Qs,_i,ji,va,Ms,di,zr,Dl,Ia,Gi,xo,nu,Ba,Yo,Du,ao,Cs,me,ke,gt,Ht,Dr,On,Xr,Di,qr,re,we,He,qe,wt,Kt,Pt,sn,Bn,gr,Fr,Ar,de,se,Ue,gn,hr,Yn,ea,zi,Qo,hc,uf,Bw,Vw,Eg,Ig,A0,E0,I0,Ng,Au,Hw,Lg,Ip,kg,Ww,Np,N0,Zo,Eu,wa,Al,cf,Lp,L0,ad,k0,R0,kp,od,Uw,Gw,O0,P0,$0,fh,sd,ld,ud,j0,Rg,Og,Pg,z0,F0,B0,Yw,Qw,Zw,V0,Xw,Zs,dh,H0,W0,U0,Rp,Iu,Op,G0,El,$g,hh,jg,Y0,Pp,ff,zg,Fg,Va,Bg,Q0,Z0,X0,q0,J0,Nu,ph,df,qw,vh,gh,Jw,K0,$p,Ai,pc,Lu,cd,eb,jp,mh,yh,hf,Vg,Hg,Kw,Wg,zp,Fp,Ug,pf,bh,vf,tb,Gg,Yg,e1,vc,Il,Sh,gc,ru,gf,ku,Qg,t1,Zg,Xs,wh,fd,Nn,mc,Fi,lr,ai,hi,iu,Qn,sa,Xo,qs,Yi,Js,yc,_h,Bp,nb,Ts,Ha,xh,Xg,qg,qo,bc,Jo,mf,dd,Ko,Mo,Ks,oo,Ru,Ds,Jg,Vp;const i=(n==null?void 0:n.chartType)===Ce.timeSeries?dne({data:t,timeStampKey:n.xAxis||"",valuekeys:n.yAxisList||[]}):!1;let a;e!=null&&e.length?a=[[.3,e[0]],[.7,e[1]],[1,e[2]]]:a=[[.3,"#37a2da"],[.7,"#67e0e3"],[1,"#fd666d"]];const o=be=>/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(be),s=((P=(z=n.customSettings)==null?void 0:z.gradients)==null?void 0:P.map(be=>{const Qe=[{offset:be.offset1>1?be.offset1/100:be.offset1,color:be.startColor},{offset:be.offset2>1?be.offset2/100:be.offset2,color:be.endColor}];switch(be.direction){case"left":return new po(1,0,0,0,Qe);case"right":return new po(0,0,1,0,Qe);case"top":return new po(0,1,0,0,Qe);case"bottom":return new po(0,0,0,1,Qe);default:return new po(0,0,1,0,Qe)}}))||[];let l="";if((F=n.customSettings)!=null&&F.isShowBarGradient&&((V=n.customSettings.barGradient)==null?void 0:V.offset1)!==void 0&&((W=n.customSettings.barGradient)==null?void 0:W.offset2)!==void 0&&o(n.customSettings.barGradient.startColor)&&o(n.customSettings.barGradient.endColor)){const be=[{offset:((G=n.customSettings.barGradient)==null?void 0:G.offset1)>1?((Z=n.customSettings)==null?void 0:Z.barGradient.offset1)/100:(Y=n.customSettings.barGradient)==null?void 0:Y.offset1,color:n.customSettings.barGradient.startColor||"#FF0000"},{offset:((q=n.customSettings.barGradient)==null?void 0:q.offset2)>1?((te=n.customSettings)==null?void 0:te.barGradient.offset2)/100:(K=n.customSettings.barGradient)==null?void 0:K.offset2,color:n.customSettings.barGradient.endColor||"#000000"}];switch(n.customSettings.barGradient.direction){case"left":l=new po(1,0,0,0,be);break;case"right":l=new po(0,0,1,0,be);break;case"top":l=new po(0,1,0,0,be);break;case"bottom":l=new po(0,0,0,1,be);break;default:l=new po(0,0,1,0,be)}}let u="";if((ne=n.customSettings)!=null&&ne.enableBackgroundGradient&&((oe=n.customSettings.backgroundGradient)==null?void 0:oe.offset1)!==void 0&&((le=n.customSettings.backgroundGradient)==null?void 0:le.offset2)!==void 0&&o(n.customSettings.backgroundGradient.startColor)&&o(n.customSettings.backgroundGradient.endColor)){const be=[{offset:((fe=n.customSettings.backgroundGradient)==null?void 0:fe.offset1)>1?((ce=n.customSettings)==null?void 0:ce.backgroundGradient.offset1)/100:(pe=n.customSettings.backgroundGradient)==null?void 0:pe.offset1,color:n.customSettings.backgroundGradient.startColor||"#FF0000"},{offset:((xe=n.customSettings.backgroundGradient)==null?void 0:xe.offset2)>1?((Ae=n.customSettings)==null?void 0:Ae.backgroundGradient.offset2)/100:(Se=n.customSettings.backgroundGradient)==null?void 0:Se.offset2,color:n.customSettings.backgroundGradient.endColor||"#000000"}];switch(n.customSettings.backgroundGradient.direction){case"left":u=new po(1,0,0,0,be);break;case"right":u=new po(0,0,1,0,be);break;case"top":u=new po(0,1,0,0,be);break;case"bottom":u=new po(0,0,0,1,be);break;default:u=new po(0,0,1,0,be)}}const{labels:c,datasets:f,funnelData:d,singleValueData:h,seriesData:p,xAxisData:g}=W$e({data:t,measure:n.measure,step:n.step,xAxis:n.xAxis,yAxisList:n.yAxisList,singleValue:n.singleValue,seriesField:n.seriesField,seriesType:((dt=(ze=(Be=n.timeSeriesSettings)==null?void 0:Be.seriesType)==null?void 0:ze[0])==null?void 0:dt.type)||"bar",isTimeSeries:i,fillXAxis:((ge=n.timeSeriesSettings)==null?void 0:ge.groupBySettings.fillXAxis)||!1,selectedFormat:(Ve=(Ee=n.timeSeriesSettings)==null?void 0:Ee.groupBySettings)!=null&&Ve.value.split("____").length?(ut=(ft=n.timeSeriesSettings)==null?void 0:ft.groupBySettings)==null?void 0:ut.value.split("____")[0]:((je=(De=n.timeSeriesSettings)==null?void 0:De.groupBySettings)==null?void 0:je.value)||"monthly",isDynamicXaxis:!!((ye=n==null?void 0:n.dynamicXAxis)!=null&&ye.isEnabled),isCumulativeBar:((We=n.customSettings)==null?void 0:We.cumulativeBar)||!1,chartType:n.chartType}),y=Y$e(t,((Ye=n.pivotTableSettings)==null?void 0:Ye.rows)||[],((xt=n.pivotTableSettings)==null?void 0:xt.columns)||[]),b=(_t=n.customSettings)!=null&&_t.showSelectLegend?p.filter(be=>r==null?void 0:r.includes(be.name)):[],S={...Gu.margins,...n.margins},x={...Gu.labelSettings,...n.labelSettings},M={...Gu.legendSettings,...n.legendSettings},_={...Gu.customSettings,...n.customSettings},T={...Gu.tableSettings,...n.tableSettings},A={...Gu.axisSettings,...n.axisSettings},L={...Gu.backGroundColor,...n.backGroundColor},O={...Gu.timeSeriesSettings,seriesType:((kt=n.yAxisList)==null?void 0:kt.map(be=>({column:be,type:"bar"})))||[],...n.timeSeriesSettings},k={...Gu.pivotTableSettings,...n.pivotTableSettings},E={...e!=null&&e.length?{color:[...s,...e]}:{}},$=_==null?void 0:_.chartZoom;switch(n.chartType){case Ce.line:{Object.assign(E,{...E,tooltip:{width:"200px",trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>{const Qe=Tn(be,_.numberFormatter);return Dn(Qe,_.labelPrefix,_.labelSuffix)},formatter:be=>Xf(be,n)},dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},backgroundColor:(Rt=n.customSettings)!=null&&Rt.enableBackgroundGradient?u:"",toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},xAxis:{type:"category",boundaryGap:!1,data:n.isMultiDimension&&n.seriesField!=="ungrouped"?g||[]:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Oe=(yt=n.labelSettings)==null?void 0:yt.XAxisStyle)==null?void 0:Oe.color)||"#000000",fontSize:((Ot=(it=n.labelSettings)==null?void 0:it.XAxisStyle)==null?void 0:Ot.size)||14,fontWeight:((_n=(vn=n.labelSettings)==null?void 0:vn.XAxisStyle)==null?void 0:_n.weight)||400,fontFamily:(Vr=(ir=n.labelSettings)==null?void 0:ir.XAxisStyle)==null?void 0:Vr.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Kn=(Li=n.labelSettings)==null?void 0:Li.YAxisStyle)==null?void 0:Kn.color)||"#000000",fontSize:((Tr=(Ti=n.labelSettings)==null?void 0:Ti.YAxisStyle)==null?void 0:Tr.size)||14,fontWeight:((ha=(wr=n.labelSettings)==null?void 0:wr.YAxisStyle)==null?void 0:ha.weight)||400,fontFamily:(qi=(fi=n.labelSettings)==null?void 0:fi.YAxisStyle)==null?void 0:qi.family,formatter:be=>{const Qe=Tn(be,_.numberFormatter);return Dn(Qe,_.labelPrefix,_.labelSuffix)}}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}},data:n.isMultiDimension&&n.seriesField!=="ungrouped"?p==null?void 0:p.map(be=>`${be.name}`||"line"):f==null?void 0:f.map(be=>be.label)},series:n.isMultiDimension&&n.seriesField!=="ungrouped"?b!=null&&b.length?b.map(be=>{var Qe;return{data:be.data,type:"line",showSymbol:!((Qe=n.customSettings)!=null&&Qe.showDynamicBehaviour),name:be.name||"line",label:{show:x.show,position:x.position,formatter(rt){const Ke=Tn(rt.data,_.numberFormatter);return Dn(Ke,_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"}}}):p.map(be=>{var Qe;return{data:be.data,type:"line",showSymbol:!((Qe=n.customSettings)!=null&&Qe.showDynamicBehaviour),name:be.name||"line",label:{show:x.show,position:x.position,formatter(rt){const Ke=Tn(rt.data,_.numberFormatter);return Dn(Ke,_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"}}}):f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"line",showSymbol:!((Qe=n.customSettings)!=null&&Qe.showDynamicBehaviour),name:be.label,label:{show:x.show,position:x.position,formatter(rt){const Ke=Tn(rt.data,_.numberFormatter);return Dn(Ke,_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"}}})});break}case Ce.bar:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},backgroundColor:(ra=n.customSettings)!=null&&ra.enableBackgroundGradient?u:"",dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:n.isMultiDimension&&n.seriesField!=="ungrouped"?g||[]:c,axisTick:{alignWithLabel:!0},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",interval:0,rotate:_.xRotation,hideOverlap:!0,color:((ia=(eo=n.labelSettings)==null?void 0:eo.XAxisStyle)==null?void 0:ia.color)||"#000000",fontSize:((ba=(ja=n.labelSettings)==null?void 0:ja.XAxisStyle)==null?void 0:ba.size)||14,fontWeight:((aa=(to=n.labelSettings)==null?void 0:to.XAxisStyle)==null?void 0:aa.weight)||400,fontFamily:(Ji=(no=n.labelSettings)==null?void 0:no.XAxisStyle)==null?void 0:Ji.family,formatter(be){return bi(be,x.truncateLabelValue||14)}},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Ki=(oa=n.labelSettings)==null?void 0:oa.YAxisStyle)==null?void 0:Ki.color)||"#000000",fontSize:((bt=(Me=n.labelSettings)==null?void 0:Me.YAxisStyle)==null?void 0:bt.size)||14,fontWeight:((Wt=(jt=n.labelSettings)==null?void 0:jt.YAxisStyle)==null?void 0:Wt.weight)||400,fontFamily:(ot=(ct=n.labelSettings)==null?void 0:ct.YAxisStyle)==null?void 0:ot.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{data:n.isMultiDimension&&n.seriesField!=="ungrouped"?p==null?void 0:p.map(be=>`${be.name}`||"series-bar"):f==null?void 0:f.map(be=>be.label),show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:n.isMultiDimension&&n.seriesField!=="ungrouped"?b!=null&&b.length?b.map(be=>{var Qe;return{data:be.data,type:"bar",showSymbol:!((Qe=n.customSettings)!=null&&Qe.showDynamicBehaviour),name:be.name||"line",label:{show:x.show,position:x.position,formatter(rt){const Ke=Tn(rt.data,_.numberFormatter);return Dn(Ke,_.labelPrefix,_.labelSuffix)}},itemStyle:{..._.coloredBars?{color:rt=>e==null?void 0:e[rt.dataIndex%e.length]}:{}},emphasis:{focus:"series"}}}):p.map(be=>{var Qe;return{data:be.data,type:"bar",name:be.name||"",barWidth:`${_.barWidth||0}%`,label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius,..._.coloredBars?{color:rt=>e==null?void 0:e[rt.dataIndex%e.length]}:{}}}}):f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"bar",name:be.label,barWidth:`${_.barWidth||0}%`,label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius,..._.coloredBars?{color:rt=>e==null?void 0:e[rt.dataIndex%e.length]}:{}}}})});break}case Ce.stack:{const be=(()=>{if(!f||!_.showFullStacked)return;const Qe={};return f.forEach(rt=>{const Ke=rt.data.map((Nt,Yt)=>{const mn=f.reduce((pn,Ln)=>pn+Ln.data[Yt],0);return(Nt/mn*100).toFixed(2)});Qe[rt.label]=Ke}),Qe})();Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},backgroundColor:($t=n.customSettings)!=null&&$t.enableBackgroundGradient?u:"",tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0},dataZoom:wu($),xAxis:{type:"category",data:n.isMultiDimension&&n.seriesField!=="ungrouped"?g||[]:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:(($r=(Zt=n.labelSettings)==null?void 0:Zt.XAxisStyle)==null?void 0:$r.color)||"#000000",fontSize:((Hr=(jr=n.labelSettings)==null?void 0:jr.XAxisStyle)==null?void 0:Hr.size)||14,fontWeight:((za=(ii=n.labelSettings)==null?void 0:ii.XAxisStyle)==null?void 0:za.weight)||400,fontFamily:(br=(Uo=n.labelSettings)==null?void 0:Uo.XAxisStyle)==null?void 0:br.family,formatter(Qe){return bi(Qe,x.truncateLabelValue||14)}}},yAxis:{type:"value",max:_.showFullStacked?100:void 0,position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((So=(fc=n.labelSettings)==null?void 0:fc.YAxisStyle)==null?void 0:So.color)||"#000000",fontSize:((ko=(qn=n.labelSettings)==null?void 0:qn.YAxisStyle)==null?void 0:ko.size)||14,fontWeight:((Fa=(bs=n.labelSettings)==null?void 0:bs.YAxisStyle)==null?void 0:Fa.weight)||400,fontFamily:(Ea=(Ss=n.labelSettings)==null?void 0:Ss.YAxisStyle)==null?void 0:Ea.family,formatter:Qe=>Qe===null||Qe===0?"0":Dn(Tn(Qe,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:n.isMultiDimension&&n.seriesField!=="ungrouped"?p==null?void 0:p.map(Qe=>`${Qe.name}`||"series-stack"):f==null?void 0:f.map(Qe=>Qe.label),formatter(Qe){return`{a|${bi(Qe,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Qe){return Qe.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:n.isMultiDimension&&n.seriesField!=="ungrouped"?b!=null&&b.length?b.map(Qe=>{var rt;return{data:Qe.data,type:"bar",stack:"total",name:Qe.name||"",barWidth:`${_.barWidth||0}%`,label:{show:x.show,position:x.position,formatter(Ke){return Dn(Tn(Ke.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(rt=n.customSettings)!=null&&rt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius},emphasis:{focus:"series"}}}):p.map(Qe=>{var rt;return{data:Qe.data,type:"bar",stack:"total",name:Qe.name||"",barWidth:`${_.barWidth||0}%`,label:{show:x.show,position:x.position,formatter(Ke){return Dn(Tn(Ke.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(rt=n.customSettings)!=null&&rt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius},emphasis:{focus:"series"}}}):f==null?void 0:f.map(Qe=>{var rt;return{data:_.showFullStacked?be[Qe.label]:Qe.data,type:"bar",name:Qe.label,stack:"x",barWidth:`${_.barWidth}%`,emphasis:{focus:"series"},label:{show:x.show,position:x.position,formatter(Ke){return Dn(Tn(Ke.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(rt=n.customSettings)!=null&&rt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius}}})});break}case Ce.area:{f==null||f.map(be=>Object.assign(be,{fill:!0})),Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Kl=n.customSettings)!=null&&Kl.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((eu=(Sa=n.labelSettings)==null?void 0:Sa.XAxisStyle)==null?void 0:eu.color)||"#000000",fontSize:((Us=(tu=n.labelSettings)==null?void 0:tu.XAxisStyle)==null?void 0:Us.size)||14,fontWeight:((ro=(_l=n.labelSettings)==null?void 0:_l.XAxisStyle)==null?void 0:ro.weight)||400,fontFamily:(pa=(io=n.labelSettings)==null?void 0:io.XAxisStyle)==null?void 0:pa.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}}],yAxis:[{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((_s=(ws=n.labelSettings)==null?void 0:ws.YAxisStyle)==null?void 0:_s.color)||"#000000",fontSize:((xl=(xs=n.labelSettings)==null?void 0:xs.YAxisStyle)==null?void 0:xl.size)||14,fontWeight:((Go=(Gs=n.labelSettings)==null?void 0:Gs.YAxisStyle)==null?void 0:Go.weight)||400,fontFamily:(wo=(dc=n.labelSettings)==null?void 0:dc.YAxisStyle)==null?void 0:wo.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}}],series:f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"line",name:be.label,stack:"Total",smooth:!0,showSymbol:!1,areaStyle:{},emphasis:{focus:"series"},label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})});break}case Ce.boxplot:{const be=[],Qe=[];f==null||f.map(rt=>{be.push(rt.data),Qe.push(rt.label)}),Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(vr=n.customSettings)!=null&&vr.enableBackgroundGradient?u:"",title:[{text:"Box Plot",left:"center"}],legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(rt=>rt.label),formatter(rt){return`{a|${bi(rt,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(rt){return rt.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},dataset:[{source:be},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:rt=>Dn(Tn(rt,_.numberFormatter),_.labelPrefix,_.labelSuffix)},dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Ys=(_o=n.labelSettings)==null?void 0:_o.XAxisStyle)==null?void 0:Ys.color)||"#000000",fontSize:((er=(Ml=n.labelSettings)==null?void 0:Ml.XAxisStyle)==null?void 0:er.size)||14,fontWeight:((Tl=(Cl=n.labelSettings)==null?void 0:Cl.XAxisStyle)==null?void 0:Tl.weight)||400,fontFamily:(Qs=(Pn=n.labelSettings)==null?void 0:Pn.XAxisStyle)==null?void 0:Qs.family}},yAxis:{type:"value",position:A.axis,splitArea:{show:!0},splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((ji=(_i=n.labelSettings)==null?void 0:_i.YAxisStyle)==null?void 0:ji.color)||"#000000",fontSize:((Ms=(va=n.labelSettings)==null?void 0:va.YAxisStyle)==null?void 0:Ms.size)||14,fontWeight:((zr=(di=n.labelSettings)==null?void 0:di.YAxisStyle)==null?void 0:zr.weight)||400,fontFamily:(Ia=(Dl=n.labelSettings)==null?void 0:Dl.YAxisStyle)==null?void 0:Ia.family,formatter:rt=>rt===null||rt===0?"0":Dn(Tn(rt,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]});break}case Ce.bubble:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Gi=n.customSettings)!=null&&Gi.enableBackgroundGradient?u:"",grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,formatter:be=>Xf(be,n)},dataZoom:wu($),xAxis:{type:"category",data:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((nu=(xo=n.labelSettings)==null?void 0:xo.XAxisStyle)==null?void 0:nu.color)||"#000000",fontSize:((Yo=(Ba=n.labelSettings)==null?void 0:Ba.XAxisStyle)==null?void 0:Yo.size)||14,fontWeight:((ao=(Du=n.labelSettings)==null?void 0:Du.XAxisStyle)==null?void 0:ao.weight)||400,fontFamily:(me=(Cs=n.labelSettings)==null?void 0:Cs.XAxisStyle)==null?void 0:me.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((gt=(ke=n.labelSettings)==null?void 0:ke.YAxisStyle)==null?void 0:gt.color)||"#000000",fontSize:((Dr=(Ht=n.labelSettings)==null?void 0:Ht.YAxisStyle)==null?void 0:Dr.size)||14,fontWeight:((Xr=(On=n.labelSettings)==null?void 0:On.YAxisStyle)==null?void 0:Xr.weight)||400,fontFamily:(qr=(Di=n.labelSettings)==null?void 0:Di.YAxisStyle)==null?void 0:qr.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:f==null?void 0:f.map(be=>{var Qe;return{symbolSize:rt=>rt*((n.percentageSize?n.percentageSize:50)/100),data:be.data,type:"scatter",name:be.label,label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})});break}case Ce.combo:{let be;const Qe=((re=n.yAxisList)==null?void 0:re.filter(Ke=>{var Nt;return!((Nt=n==null?void 0:n.comboBarList)!=null&&Nt.includes(Ke))}))||[];let rt;_!=null&&_.isStackBar&&((we=n.comboBarList)!=null&&we.length)?(be=[{show:!0,type:"value",name:((He=_.comboStackAxisSymbols)==null?void 0:He.name)||"stack",min:0,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((wt=(qe=n.labelSettings)==null?void 0:qe.YAxisStyle)==null?void 0:wt.color)||"#000000",fontSize:((Pt=(Kt=n.labelSettings)==null?void 0:Kt.YAxisStyle)==null?void 0:Pt.size)||14,fontWeight:((Bn=(sn=n.labelSettings)==null?void 0:sn.YAxisStyle)==null?void 0:Bn.weight)||400,fontFamily:(Fr=(gr=n.labelSettings)==null?void 0:gr.YAxisStyle)==null?void 0:Fr.family,formatter:Ke=>{var Nt,Yt;return Ke===null||Ke===0?"0":Dn(Tn(Ke,_.numberFormatter),((Nt=_.comboStackAxisSymbols)==null?void 0:Nt.prefix)||"",((Yt=_.comboStackAxisSymbols)==null?void 0:Yt.suffix)||"")}}}],rt=(Ar=n.comboBarList)==null?void 0:Ar.map((Ke,Nt)=>{var Yt;return{type:"bar",..._.isStackBar?{stack:"x"}:{},data:t.map(mn=>mn[Ke]),name:Ke,label:{show:x.show,position:x.position,..._.isStackBar?{formatter(mn){var pn,Ln;return Dn(Tn(mn.data,_.numberFormatter),(pn=_.comboStackAxisSymbols)==null?void 0:pn.prefix,(Ln=_.comboStackAxisSymbols)==null?void 0:Ln.suffix)}}:{formatter(mn){var pn,Ln;return Dn(Tn(mn.data,_.numberFormatter),(pn=_.comboAxisSymbols[Nt])==null?void 0:pn.prefix,(Ln=_.comboAxisSymbols[Nt])==null?void 0:Ln.suffix)}}},showBackground:L.show,backgroundStyle:{color:(Yt=n.customSettings)!=null&&Yt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}}),Qe.length&&(be.push(...Qe.map((Ke,Nt)=>{var mn,pn,Ln,gi,pi,Wa,Jr,el;const Yt=_.comboAxisSymbols.filter(so=>so.name===Ke);return{show:!0,type:"value",name:Ke,min:0,position:Nt>1?"left":"right",offset:Nt>0?60:0,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none",lineStyle:{color:e==null?void 0:e[n.comboBarList.length+Nt]}},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((pn=(mn=n.labelSettings)==null?void 0:mn.YAxisStyle)==null?void 0:pn.color)||"#000000",fontSize:((gi=(Ln=n.labelSettings)==null?void 0:Ln.YAxisStyle)==null?void 0:gi.size)||14,fontWeight:((Wa=(pi=n.labelSettings)==null?void 0:pi.YAxisStyle)==null?void 0:Wa.weight)||400,fontFamily:(el=(Jr=n.labelSettings)==null?void 0:Jr.YAxisStyle)==null?void 0:el.family,formatter:so=>{var Co,As;return so===null||so===0?"0":Dn(Tn(so,_.numberFormatter),((Co=Yt[0])==null?void 0:Co.prefix)||"",((As=Yt[0])==null?void 0:As.suffix)||"")}}}})),rt.push(...Qe.map((Ke,Nt)=>{var Yt;return{type:"line",yAxisIndex:Nt+1,data:t.map(mn=>mn[Ke]),name:Ke,label:{show:x.show,position:x.position,formatter(mn){var pn,Ln;return Dn(Tn(mn.data,_.numberFormatter),(pn=_.comboAxisSymbols[Nt])==null?void 0:pn.prefix,(Ln=_.comboAxisSymbols[Nt])==null?void 0:Ln.suffix)}},showBackground:L.show,backgroundStyle:{color:(Yt=n.customSettings)!=null&&Yt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})))):(be=(de=n.yAxisList)==null?void 0:de.map((Ke,Nt)=>{var mn,pn,Ln,gi,pi,Wa,Jr,el;const Yt=_.comboAxisSymbols.filter(so=>so.name===Ke);return{show:!0,type:"value",name:Ke,min:0,position:Nt>2?"left":"",offset:Nt>1?60:0,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none",lineStyle:{color:e==null?void 0:e[Nt]}},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((pn=(mn=n.labelSettings)==null?void 0:mn.YAxisStyle)==null?void 0:pn.color)||"#000000",fontSize:((gi=(Ln=n.labelSettings)==null?void 0:Ln.YAxisStyle)==null?void 0:gi.size)||14,fontWeight:((Wa=(pi=n.labelSettings)==null?void 0:pi.YAxisStyle)==null?void 0:Wa.weight)||400,fontFamily:(el=(Jr=n.labelSettings)==null?void 0:Jr.YAxisStyle)==null?void 0:el.family,formatter:so=>{var Co,As;return so===null||so===0?"0":Dn(Tn(so,_.numberFormatter),((Co=Yt[0])==null?void 0:Co.prefix)||"",((As=Yt[0])==null?void 0:As.suffix)||"")}}}}),rt=(se=n.yAxisList)==null?void 0:se.map((Ke,Nt)=>{var Yt,mn,pn;return{type:(Yt=n==null?void 0:n.comboBarList)!=null&&Yt.includes(Ke)?"bar":"line",..._.isStackBar&&((mn=n==null?void 0:n.comboBarList)!=null&&mn.includes(Ke))?{stack:"x"}:{yAxisIndex:Nt},data:t.map(Ln=>Ln[Ke]),name:Ke,label:{show:x.show,position:x.position,formatter(Ln){var gi,pi;return Dn(Tn(Ln.data,_.numberFormatter),(gi=_.comboAxisSymbols[Nt])==null?void 0:gi.prefix,(pi=_.comboAxisSymbols[Nt])==null?void 0:pi.suffix)}},showBackground:L.show,backgroundStyle:{color:(pn=n.customSettings)!=null&&pn.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})),Object.assign(E,{...E,grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},backgroundColor:(Ue=n.customSettings)!=null&&Ue.enableBackgroundGradient?u:"",toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,formatter:Ke=>Xf(Ke,n),axisPointer:{type:"cross",crossStyle:{color:"#999"}}},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(Ke=>Ke.label),formatter(Ke){return`{a|${bi(Ke,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Ke){return Ke.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},xAxis:[{type:"category",data:c,axisPointer:{type:"shadow"},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((hr=(gn=n.labelSettings)==null?void 0:gn.XAxisStyle)==null?void 0:hr.color)||"#000000",fontSize:((ea=(Yn=n.labelSettings)==null?void 0:Yn.XAxisStyle)==null?void 0:ea.size)||14,fontWeight:((Qo=(zi=n.labelSettings)==null?void 0:zi.XAxisStyle)==null?void 0:Qo.weight)||400,fontFamily:(uf=(hc=n.labelSettings)==null?void 0:hc.XAxisStyle)==null?void 0:uf.family,formatter(Ke){return bi(Ke,x.truncateLabelValue||14)}}}],yAxis:be,series:rt});break}case Ce.pie:{const be=()=>{var Nt,Yt,mn;return{type:"pie",radius:"80%",data:(f==null?void 0:f.map((pn,Ln)=>({value:pn.data,name:c[Ln]||"undefined"})))||[],selectedMode:(Nt=n.customSettings)==null?void 0:Nt.selectedMode,selectedOffset:(Yt=n.customSettings)==null?void 0:Yt.selectedOffset,label:{show:x.show},labelLine:{show:(mn=n.labelSettings)==null?void 0:mn.showLabelLine,smooth:.2,length:10,length2:20}}},Qe=()=>{let Ke=100;const Nt=[];return f==null||f.map(Yt=>{const mn=[];let pn=0;Yt.data.map(Ln=>{const gi={value:Ln,name:c[pn]};mn.push(gi),pn+=1}),Nt.push([Yt.label,mn])}),Nt.map(Yt=>{var mn,pn,Ln;return Ke-=20,{name:Yt[0],type:"pie",radius:`${Ke}%`,data:Yt[1],selectedMode:(mn=n.customSettings)==null?void 0:mn.selectedMode,selectedOffset:(pn=n.customSettings)==null?void 0:pn.selectedOffset,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:x.show,position:x.position,formatter(gi){return Dn(Tn(gi.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},labelLine:{show:(Ln=n.labelSettings)==null?void 0:Ln.showLabelLine,smooth:.2,length:10,length2:20}}})},rt=f!=null&&f.length&&((Vw=(Bw=f[0])==null?void 0:Bw.data)==null?void 0:Vw.length)>1?Qe():be();Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Eg=n.customSettings)!=null&&Eg.enableBackgroundGradient?u:"",tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:Ke=>Dn(Tn(Ke,_.numberFormatter),_.labelPrefix,_.labelSuffix)},legend:{data:f!=null&&f.length&&((A0=(Ig=f[0])==null?void 0:Ig.data)==null?void 0:A0.length)>1||f==null?void 0:f[0],show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(Ke){return`{a|${bi(Ke,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Ke){return Ke.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:rt});break}case Ce.rose:{const be=()=>{var Nt,Yt,mn,pn;return{type:"pie",radius:"80%",data:(f==null?void 0:f.map((Ln,gi)=>({value:Ln.data,name:c[gi]||"undefined"})))||[],roseType:((Nt=n.customSettings)==null?void 0:Nt.roseType)||"radius",selectedMode:(Yt=n.customSettings)==null?void 0:Yt.selectedMode,selectedOffset:(mn=n.customSettings)==null?void 0:mn.selectedOffset,label:{show:x.show},labelLine:{show:(pn=n.labelSettings)==null?void 0:pn.showLabelLine,smooth:.2,length:10,length2:20}}},Qe=()=>{let Ke=100;const Nt=[];return f==null||f.map(Yt=>{const mn=[];let pn=0;Yt.data.map(Ln=>{const gi={value:Ln,name:c[pn]};mn.push(gi),pn+=1}),Nt.push([Yt.label,mn])}),Nt.map(Yt=>{var mn,pn,Ln,gi;return Ke-=20,{name:Yt[0],type:"pie",radius:`${Ke}%`,data:Yt[1],selectedMode:(mn=n.customSettings)==null?void 0:mn.selectedMode,selectedOffset:(pn=n.customSettings)==null?void 0:pn.selectedOffset,roseType:((Ln=n.customSettings)==null?void 0:Ln.roseType)||"radius",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:x.show,position:x.position,formatter(pi){return`${pi.name}: ${Dn(Tn(pi.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}`}},labelLine:{show:(gi=n.labelSettings)==null?void 0:gi.showLabelLine,smooth:.2,length:10,length2:20}}})},rt=f!=null&&f.length&&((I0=(E0=f[0])==null?void 0:E0.data)==null?void 0:I0.length)>1?Qe():be();Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Ng=n.customSettings)!=null&&Ng.enableBackgroundGradient?u:"",tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:Ke=>Dn(Tn(Ke,_.numberFormatter),_.labelPrefix,_.labelSuffix)},legend:{data:f!=null&&f.length&&((Hw=(Au=f[0])==null?void 0:Au.data)==null?void 0:Hw.length)>1||f==null?void 0:f[0],show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(Ke){return`{a|${bi(Ke,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Ke){return Ke.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:rt});break}case Ce.doughnut:{const be=()=>{var Nt;const Ke=f==null?void 0:f.map((Yt,mn)=>({value:Yt.data,name:c[mn]||"undefined"}));return{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:x.show,position:x.position,formatter(Yt){return Dn(Tn(Yt.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},data:Ke||[],labelLine:{show:(Nt=n.labelSettings)==null?void 0:Nt.showLabelLine,smooth:.2,length:10,length2:20}}},Qe=()=>{const Ke=[];let Nt=70,Yt=100;return f==null||f.map(mn=>{const pn=[];let Ln=0;mn.data.map(gi=>{const pi={value:gi,name:c[Ln]};pn.push(pi),Ln+=1}),Ke.push([mn.label,pn])}),Ke.map(mn=>{var pn;return Nt-=20,Yt-=20,{name:mn[0],type:"pie",radius:[`${Nt}%`,`${Yt}%`],avoidLabelOverlap:!1,label:{show:x.show,position:x.position,formatter(Ln){return Dn(Tn(Ln.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},data:mn[1],labelLine:{show:(pn=n.labelSettings)==null?void 0:pn.showLabelLine,smooth:.2,length:10,length2:20}}})},rt=c.length>1?Qe():be();Object.assign(E,{toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:Ke=>Dn(Tn(Ke,_.numberFormatter),_.labelPrefix,_.labelSuffix)},backgroundColor:(Lg=n.customSettings)!=null&&Lg.enableBackgroundGradient?u:"",legend:{data:c.length>1||f==null?void 0:f[0],show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(Ke){return`{a|${bi(Ke,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Ke){return Ke.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:rt});break}case Ce.row:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Ip=n.customSettings)!=null&&Ip.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Ww=(kg=n.labelSettings)==null?void 0:kg.XAxisStyle)==null?void 0:Ww.color)||"#000000",fontSize:((N0=(Np=n.labelSettings)==null?void 0:Np.XAxisStyle)==null?void 0:N0.size)||14,fontWeight:((Eu=(Zo=n.labelSettings)==null?void 0:Zo.XAxisStyle)==null?void 0:Eu.weight)||400,fontFamily:(Al=(wa=n.labelSettings)==null?void 0:wa.XAxisStyle)==null?void 0:Al.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},yAxis:{type:"category",data:c,position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Lp=(cf=n.labelSettings)==null?void 0:cf.YAxisStyle)==null?void 0:Lp.color)||"#000000",fontSize:((ad=(L0=n.labelSettings)==null?void 0:L0.YAxisStyle)==null?void 0:ad.size)||14,fontWeight:((R0=(k0=n.labelSettings)==null?void 0:k0.YAxisStyle)==null?void 0:R0.weight)||400,fontFamily:(od=(kp=n.labelSettings)==null?void 0:kp.YAxisStyle)==null?void 0:od.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},series:f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"bar",name:be.label,barWidth:`${_.barWidth}%`,emphasis:{focus:"series"},label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius,..._.coloredBars?{color:rt=>e==null?void 0:e[rt.dataIndex%e.length]}:{}}}})});break}case Ce.histogram:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Uw=n.customSettings)!=null&&Uw.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},xAxis:[{type:"category",data:c,axisTick:{alignWithLabel:!0},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((O0=(Gw=n.labelSettings)==null?void 0:Gw.XAxisStyle)==null?void 0:O0.color)||"#000000",fontSize:(($0=(P0=n.labelSettings)==null?void 0:P0.XAxisStyle)==null?void 0:$0.size)||14,fontWeight:((sd=(fh=n.labelSettings)==null?void 0:fh.XAxisStyle)==null?void 0:sd.weight)||400,fontFamily:(ud=(ld=n.labelSettings)==null?void 0:ld.XAxisStyle)==null?void 0:ud.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}}],yAxis:[{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Rg=(j0=n.labelSettings)==null?void 0:j0.YAxisStyle)==null?void 0:Rg.color)||"#000000",fontSize:((Pg=(Og=n.labelSettings)==null?void 0:Og.YAxisStyle)==null?void 0:Pg.size)||14,fontWeight:((F0=(z0=n.labelSettings)==null?void 0:z0.YAxisStyle)==null?void 0:F0.weight)||400,fontFamily:(Yw=(B0=n.labelSettings)==null?void 0:B0.YAxisStyle)==null?void 0:Yw.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}}],series:[{name:(Qw=f==null?void 0:f[0])==null?void 0:Qw.label,type:"bar",barWidth:"100%",data:(Zw=f==null?void 0:f[0])==null?void 0:Zw.data,label:{show:x.show,position:x.position,formatter(be){return Tn(be.data,_.numberFormatter)}},showBackground:L.show,backgroundStyle:{color:(V0=n.customSettings)!=null&&V0.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{..._.coloredBars?{color:be=>e==null?void 0:e[be.dataIndex%e.length]}:{}}}]});break}case Ce.funnel:{let be=0;if(d.length>=1&&typeof d[0].value=="number")for(let Qe=0;Qe<d.length;Qe+=1)d[Qe].value>be&&(be=d[Qe].value);Object.assign(E,{...E,tooltip:{trigger:"item",className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,formatter:_.showConversionRate?Qe=>{var Ke,Nt;let rt=100;return Qe.dataIndex>0&&(rt=(((Ke=d[Qe.dataIndex])==null?void 0:Ke.value)||0)/(((Nt=d[Qe.dataIndex-1])==null?void 0:Nt.value)||1)*100),`${Qe.name}: ${rt.toFixed(0)}%`}:_.showLabelValues?"{b}: {c}":_.labelFormat||"{b}",backgroundColor:"black",textStyle:{color:"white"}},backgroundColor:(Xw=n.customSettings)!=null&&Xw.enableBackgroundGradient?u:"",legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:d,formatter(Qe){return`{a|${bi(Qe,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Qe){return Qe.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:[{name:"Funnel",type:"funnel",left:"10%",progressive:1e3,progressiveThreshold:3e3,top:60,bottom:60,width:"80%",height:"70%",min:0,max:be,sort:"descending",gap:((Zs=n.customSettings)==null?void 0:Zs.stepPadding)||10,itemStyle:(dh=n.customSettings)!=null&&dh.showFunnelShadow?{borderColor:"#fff",borderWidth:1,shadowBlur:20,shadowColor:"rgba(0, 0, 0, 0.3)",shadowOffsetY:10}:{},emphasis:{itemStyle:{shadowBlur:30,shadowColor:"rgba(0, 0, 0, 0.5)",shadowOffsetY:15}},label:{show:x.show,position:x.position,formatter:_.showConversionRate?Qe=>{var Ke,Nt;let rt=100;return Qe.dataIndex>0&&(rt=(((Ke=d[Qe.dataIndex])==null?void 0:Ke.value)||0)/(((Nt=d[Qe.dataIndex-1])==null?void 0:Nt.value)||1)*100),`${Qe.name}: ${rt.toFixed(0)}%`}:_.showLabelValues?"{b}: {c}":_.labelFormat||"{b}"},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},data:(d==null?void 0:d.length)>20?d.slice(0,20):d}]});break}case Ce.gauge:{const be=((H0=n==null?void 0:n.gaugeSettings)==null?void 0:H0.metric)||"",Qe=((W0=n.gaugeSettings)==null?void 0:W0.dimensions)||[],rt=[],Ke=[];let Nt,Yt=0,mn=!1;if(t.length===1&&(Nt=t[0],mn=Object.keys(Nt).every(pn=>typeof Nt[pn]=="number"),mn&&(Yt=Nt[be],rt.push({value:Nt[be],name:be,title:{show:!1},detail:{show:!1}}))),t.length!==1&&be.length){const pn=t[0][be];mn=!0,Yt=pn,rt.push({value:pn,name:be,title:{show:!1},detail:{show:!1}})}if(be.length&&Qe.length){const Ln=xF(t,Qe,[be])[be],gi=Ln.length;for(let pi=0;pi<gi;pi+=1)if(Ke.includes(Ln[pi].name)){for(let Wa=0;Wa<rt.length;Wa+=1)if(rt[Wa].value===Ln[pi].name){rt[Wa].name+=`, (${Ln[pi].parent.replaceAll("/",",")})`;break}}else{Ke.push(Ln[pi].name);const Wa={value:Ln[pi].name,name:`(${Ln[pi].parent.replaceAll("/",",")})`,title:{show:!1},detail:{show:!1}};rt.push(Wa)}}Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(U0=n.customSettings)!=null&&U0.enableBackgroundGradient?u:"",legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(pn){return`{a|${bi(pn,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(pn){return pn.name},backgroundColor:"black",textStyle:{color:"white"}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},tooltip:{show:!0,backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0},series:[{type:"gauge",startAngle:190,endAngle:-10,center:["50%","75%"],radius:"100%",anchor:{show:!0,showAbove:!0,size:12,itemStyle:{color:"#FAC858"}},pointer:{length:"100%",width:rt.length===1?10:4},axisLine:{lineStyle:{width:30,color:a}},axisTick:{show:!0,distance:-30,length:8,lineStyle:{color:"#fff",width:2}},splitLine:{distance:-30,length:30,lineStyle:{color:"#fff",width:4}},axisLabel:{distance:-20,color:"#999",rotate:5,fontSize:10,formatter(pn){return Dn(Tn(pn,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},data:rt,title:{fontSize:14},min:0,max:mn?Yt+Yt/2:Math.max(...Ke)+Math.min(...Ke),detail:{width:40,height:14,fontSize:14,color:"#fff",backgroundColor:"inherit",borderRadius:3,formatter:"{value}%"}}]});break}case Ce.sankey:{if((Rp=n.sankeyValues)!=null&&Rp.length){const[be,Qe,rt]=n.sankeyValues,{links:Ke,nodes:Nt}=U$e({data:t,source:be,target:Qe,value:rt});Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Iu=n.customSettings)!=null&&Iu.enableBackgroundGradient?u:"",tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:Yt=>Dn(Tn(Yt,_.numberFormatter),_.labelPrefix,_.labelSuffix)},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:Nt,label:{show:x.show,position:x.position,formatter:x.truncateLabelValue?Yt=>bi(Yt.data.name,x.truncateLabelValue||14):void 0},links:Ke,showBackground:L.show,backgroundStyle:{color:(Op=n.customSettings)!=null&&Op.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})}break}case Ce.singleValue:{const be=h[0]&&Dn(Tn(h[0],_.numberFormatter),_.labelPrefix,_.labelSuffix),Qe=(G0=t==null?void 0:t[_.comparisonTimePeriod||0])==null?void 0:G0[(n==null?void 0:n.singleValue)||""],rt=h!=null&&h[0]?`${(((h==null?void 0:h[0])-Qe)/Qe*100).toFixed(2)} %`:null,Ke=_.comparisonValueShow&&_.comparisonTimePeriod&&_.comparisonTimePeriod>0&&_.comparisonTimeGrain!=="NONE"&&(n==null?void 0:n.singleValue)&&((El=t==null?void 0:t[0])==null?void 0:El._timestamp);Object.assign(E,{settings:{fontSize:_.fontSize||30,subHeaderFontSize:_.subHeaderFontSize||14,subHeaderShow:_.subHeaderShow||!1,displayText:_.displayText||"",comparisonTimePeriod:_.comparisonTimePeriod||30,comparisonTimeColumn:_.comparisonTimeColumn||"",comparisonValueShow:_.comparisonValueShow||!1,comparisonValueFontSize:_.comparisonValueFontSize||12,comparisonTimeGrain:_.comparisonTimeGrain||"",comparisonSuffix:_.comparisonSuffix||"",fontColor:_.singleValueFontColor||"#000000",suffix:_.singleValueSuffix||"",prefix:_.singleValuePrefix||""},value:be,comparisonValue:Ke?rt:void 0,trendLineOptions:rt&&_.isShowTrendLine?{...E,tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0},grid:{left:"0%",bottom:"0%",top:"0%",right:"0%",containLabel:!0},toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},xAxis:{type:"category",boundaryGap:!1,splitLine:{show:!1},axisLine:{show:!1},axisLabel:{show:!1}},yAxis:{type:"value",position:A.axis,splitLine:{show:!1},axisLine:{show:!1},axisLabel:{show:!1}},color:e,legend:{show:!1},series:[{data:t==null?void 0:t.map(Nt=>[Nt==null?void 0:Nt._timestamp,Nt==null?void 0:Nt[n.singleValue||""]]),type:"line",smooth:.6,symbol:"none",lineStyle:{color:"#5470C6",width:5},areaStyle:{},name:(n==null?void 0:n.singleValue)||"total",label:{show:!1}}]}:void 0});break}case Ce.waterfall:{let be;if(f!=null&&f.length){const Qe=($g=f[0])==null?void 0:$g.data,rt=[Qe[0]];if(Qe.length)for(let Ke=1;Ke<Qe.length-1;Ke++)rt.push(rt[Ke-1]-Qe[Ke]);rt.push(Qe[Qe.length-1]),be={labels:c,datasets:[Qe,rt]}}Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(hh=n.customSettings)!=null&&hh.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,formatter(Qe){const rt=Qe[1];return`${rt.name}<br/>${Dn(Tn(rt.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}`}},dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:be==null?void 0:be.labels,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Y0=(jg=n.labelSettings)==null?void 0:jg.XAxisStyle)==null?void 0:Y0.color)||"#000000",fontSize:((ff=(Pp=n.labelSettings)==null?void 0:Pp.XAxisStyle)==null?void 0:ff.size)||14,fontWeight:((Fg=(zg=n.labelSettings)==null?void 0:zg.XAxisStyle)==null?void 0:Fg.weight)||400,fontFamily:(Bg=(Va=n.labelSettings)==null?void 0:Va.XAxisStyle)==null?void 0:Bg.family,formatter(Qe){return bi(Qe,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Z0=(Q0=n.labelSettings)==null?void 0:Q0.YAxisStyle)==null?void 0:Z0.color)||"#000000",fontSize:((q0=(X0=n.labelSettings)==null?void 0:X0.YAxisStyle)==null?void 0:q0.size)||14,fontWeight:((Nu=(J0=n.labelSettings)==null?void 0:J0.YAxisStyle)==null?void 0:Nu.weight)||400,fontFamily:(df=(ph=n.labelSettings)==null?void 0:ph.YAxisStyle)==null?void 0:df.family,formatter:Qe=>Qe===null||Qe===0?"0":Dn(Tn(Qe,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:be==null?void 0:be.datasets[1],showBackground:L.show,backgroundStyle:{color:(qw=n.customSettings)!=null&&qw.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}},{name:"Life Cost",type:"bar",stack:"Total",label:{show:x.show,position:x.position,formatter(Qe){return Dn(Tn(Qe.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},data:be==null?void 0:be.datasets[0]}]});break}case Ce.horizontalStack:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(vh=n.customSettings)!=null&&vh.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Jw=(gh=n.labelSettings)==null?void 0:gh.XAxisStyle)==null?void 0:Jw.color)||"#000000",fontSize:(($p=(K0=n.labelSettings)==null?void 0:K0.XAxisStyle)==null?void 0:$p.size)||14,fontWeight:((pc=(Ai=n.labelSettings)==null?void 0:Ai.XAxisStyle)==null?void 0:pc.weight)||400,fontFamily:(cd=(Lu=n.labelSettings)==null?void 0:Lu.XAxisStyle)==null?void 0:cd.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},yAxis:{type:"category",data:c,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},position:A.axis,axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((jp=(eb=n.labelSettings)==null?void 0:eb.YAxisStyle)==null?void 0:jp.color)||"#000000",fontSize:((yh=(mh=n.labelSettings)==null?void 0:mh.YAxisStyle)==null?void 0:yh.size)||14,fontWeight:((Vg=(hf=n.labelSettings)==null?void 0:hf.YAxisStyle)==null?void 0:Vg.weight)||400,fontFamily:(Kw=(Hg=n.labelSettings)==null?void 0:Hg.YAxisStyle)==null?void 0:Kw.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},series:f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"bar",stack:"x",name:be.label,barWidth:`${_.barWidth}%`,emphasis:{focus:"series"},label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius}}})});break}case Ce.table:{const be=[];if(f){const Qe=[],rt=[];f.map(Ke=>{Qe.push(Ke.label),rt.push(Ke.data)});for(let Ke=0;Ke<((Wg=rt[0])==null?void 0:Wg.length);Ke+=1){const Nt={};for(let Yt=0;Yt<Qe.length;Yt+=1)Nt[Qe[Yt]]=rt[Yt][Ke];be.push(Nt)}}Object.assign(E,{data:be,tableSettings:T});break}case Ce.horizontalStackTable:{const be=[];if(f){const Qe=[],rt=[];f.map(Ke=>{Qe.push(Ke.label),rt.push(Ke.data)});for(let Ke=0;Ke<((zp=rt[0])==null?void 0:zp.length);Ke+=1){const Nt={};for(let Yt=0;Yt<Qe.length;Yt+=1)Nt[Qe[Yt]]=rt[Yt][Ke];be.push(Nt)}}Object.assign(E,{data:be,tableSettings:T,colors:e});break}case Ce.pivot:{Object.assign(E,{pivotTableSettings:k});break}case Ce.treeMap:{const be=QQ;Object.assign(E,{...E,tooltip:{backgroundColor:"black",textStyle:{color:"white"},formatter(rt){const Ke=rt.value,Nt=rt.treePathInfo,Yt=[];for(let mn=1;mn<Nt.length;mn++)Yt.push(Nt[mn].name);return[`<div>${be.encodeHTML(Yt.join("-"))}</div>`,`value: ${be.addCommas(Ke)}`].join("")}},series:[{type:"treemap",visibleMin:600,label:{show:!0,formatter:"{b}"},upperLabel:{show:!0,height:30},itemStyle:{borderColor:"#fff"},levels:(()=>[{itemStyle:{borderWidth:0,gapWidth:5}},{itemStyle:{gapWidth:1}},{colorSaturation:[.35,.5],itemStyle:{gapWidth:1,borderColorSaturation:.6}}])(),data:y}]});break}case Ce.stepped:{const be=["start","middle","end"];let Qe=2;Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Fp=n.customSettings)!=null&&Fp.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:rt=>Dn(Tn(rt,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:rt=>Xf(rt,n)},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(rt=>rt.label),formatter(rt){return`{a|${bi(rt,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(rt){return rt.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((pf=(Ug=n.labelSettings)==null?void 0:Ug.XAxisStyle)==null?void 0:pf.color)||"#000000",fontSize:((vf=(bh=n.labelSettings)==null?void 0:bh.XAxisStyle)==null?void 0:vf.size)||14,fontWeight:((Gg=(tb=n.labelSettings)==null?void 0:tb.XAxisStyle)==null?void 0:Gg.weight)||400,fontFamily:(e1=(Yg=n.labelSettings)==null?void 0:Yg.XAxisStyle)==null?void 0:e1.family,formatter(rt){return bi(rt,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Il=(vc=n.labelSettings)==null?void 0:vc.YAxisStyle)==null?void 0:Il.color)||"#000000",fontSize:((gc=(Sh=n.labelSettings)==null?void 0:Sh.YAxisStyle)==null?void 0:gc.size)||14,fontWeight:((gf=(ru=n.labelSettings)==null?void 0:ru.YAxisStyle)==null?void 0:gf.weight)||400,fontFamily:(Qg=(ku=n.labelSettings)==null?void 0:ku.YAxisStyle)==null?void 0:Qg.family,formatter:rt=>rt===null||rt===0?"0":Dn(Tn(rt,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},series:f==null?void 0:f.map(rt=>{var Ke;return Qe===0?Qe=1:Qe===1?Qe=2:Qe=0,{name:rt.label,type:"line",step:be[Qe],data:rt.data,areaStyle:{},label:{show:x.show,position:x.position,formatter(Nt){return Dn(Tn(Nt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Ke=n.customSettings)!=null&&Ke.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})});break}case Ce.scatter:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(t1=n.customSettings)!=null&&t1.enableBackgroundGradient?u:"",grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,formatter:be=>Xf(be,n)},dataZoom:wu($),xAxis:{type:"category",data:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Xs=(Zg=n.labelSettings)==null?void 0:Zg.XAxisStyle)==null?void 0:Xs.color)||"#000000",fontSize:((fd=(wh=n.labelSettings)==null?void 0:wh.XAxisStyle)==null?void 0:fd.size)||14,fontWeight:((mc=(Nn=n.labelSettings)==null?void 0:Nn.XAxisStyle)==null?void 0:mc.weight)||400,fontFamily:(lr=(Fi=n.labelSettings)==null?void 0:Fi.XAxisStyle)==null?void 0:lr.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((hi=(ai=n.labelSettings)==null?void 0:ai.YAxisStyle)==null?void 0:hi.color)||"#000000",fontSize:((Qn=(iu=n.labelSettings)==null?void 0:iu.YAxisStyle)==null?void 0:Qn.size)||14,fontWeight:((Xo=(sa=n.labelSettings)==null?void 0:sa.YAxisStyle)==null?void 0:Xo.weight)||400,fontFamily:(Yi=(qs=n.labelSettings)==null?void 0:qs.YAxisStyle)==null?void 0:Yi.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:f==null?void 0:f.map(be=>{var Qe;return{symbolSize:10,data:be.data,type:"scatter",name:be.label,label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})});break}case Ce.timeSeries:{if(!i)break;Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Js=n.customSettings)!=null&&Js.enableBackgroundGradient?u:"",grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none"},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),xAxis:{type:"category",axisTick:{alignWithLabel:!0},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((_h=(yc=n.labelSettings)==null?void 0:yc.XAxisStyle)==null?void 0:_h.color)||"#000000",fontSize:((nb=(Bp=n.labelSettings)==null?void 0:Bp.XAxisStyle)==null?void 0:nb.size)||14,fontWeight:((Ha=(Ts=n.labelSettings)==null?void 0:Ts.XAxisStyle)==null?void 0:Ha.weight)||400,fontFamily:(Xg=(xh=n.labelSettings)==null?void 0:xh.XAxisStyle)==null?void 0:Xg.family,interval:0,rotate:_.xRotation,hideOverlap:!0,formatter(be){return bi(be||"",x.truncateLabelValue||14)}},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},data:g||[]},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((qo=(qg=n.labelSettings)==null?void 0:qg.YAxisStyle)==null?void 0:qo.color)||"#000000",fontSize:((Jo=(bc=n.labelSettings)==null?void 0:bc.YAxisStyle)==null?void 0:Jo.size)||14,fontWeight:((dd=(mf=n.labelSettings)==null?void 0:mf.YAxisStyle)==null?void 0:dd.weight)||400,fontFamily:(Mo=(Ko=n.labelSettings)==null?void 0:Ko.YAxisStyle)==null?void 0:Mo.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:n.isMultiDimension&&n.seriesField!=="ungrouped"?p==null?void 0:p.map(be=>`${be.name}`||"series-bar"):n.yAxisList,formatter(be){return`{a|${bi(be||"",M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:n.isMultiDimension&&n.seriesField!=="ungrouped"?b!=null&&b.length?b.map(be=>{var Qe,rt,Ke,Nt,Yt,mn,pn,Ln,gi,pi,Wa,Jr,el;return{data:(be==null?void 0:be.data)||[],type:((rt=(Qe=O==null?void 0:O.seriesType)==null?void 0:Qe[0])==null?void 0:rt.type)==="area"?"line":((Nt=(Ke=O==null?void 0:O.seriesType)==null?void 0:Ke[0])==null?void 0:Nt.type)==="stack"?"bar":((mn=(Yt=O==null?void 0:O.seriesType)==null?void 0:Yt[0])==null?void 0:mn.type)||"bar",name:(be==null?void 0:be.name)||"series",...((Ln=(pn=O==null?void 0:O.seriesType)==null?void 0:pn[0])==null?void 0:Ln.type)==="stack"?{stack:"total"}:{},label:{show:x.show,position:x.position,formatter(so){return Dn(Tn(so.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"},...((pi=(gi=O==null?void 0:O.seriesType)==null?void 0:gi[0])==null?void 0:pi.type)==="area"?{areaStyle:{}}:{areaStyle:{opacity:0}},...((Jr=(Wa=O==null?void 0:O.seriesType)==null?void 0:Wa[0])==null?void 0:Jr.type)==="bar"?{barWidth:`${(_==null?void 0:_.barWidth)||0}%`,showBackground:L==null?void 0:L.show,backgroundStyle:{color:(el=n.customSettings)!=null&&el.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_==null?void 0:_.barRadius}}:{}}}):p.map(be=>{var Qe,rt,Ke,Nt,Yt,mn,pn,Ln,gi,pi,Wa,Jr,el;return{data:(be==null?void 0:be.data)||[],type:((rt=(Qe=O==null?void 0:O.seriesType)==null?void 0:Qe[0])==null?void 0:rt.type)==="area"?"line":((Nt=(Ke=O==null?void 0:O.seriesType)==null?void 0:Ke[0])==null?void 0:Nt.type)==="stack"?"bar":((mn=(Yt=O==null?void 0:O.seriesType)==null?void 0:Yt[0])==null?void 0:mn.type)||"bar",name:(be==null?void 0:be.name)||"series",...((Ln=(pn=O==null?void 0:O.seriesType)==null?void 0:pn[0])==null?void 0:Ln.type)==="stack"?{stack:"total"}:{},label:{show:x.show,position:x.position,formatter(so){return Dn(Tn(so.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"},...((pi=(gi=O==null?void 0:O.seriesType)==null?void 0:gi[0])==null?void 0:pi.type)==="area"?{areaStyle:{}}:{areaStyle:{opacity:0}},...((Jr=(Wa=O==null?void 0:O.seriesType)==null?void 0:Wa[0])==null?void 0:Jr.type)==="bar"?{barWidth:`${(_==null?void 0:_.barWidth)||0}%`,showBackground:L==null?void 0:L.show,backgroundStyle:{color:(el=n.customSettings)!=null&&el.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_==null?void 0:_.barRadius}}:{}}}):G$e({dataArray:t,timeStampKey:n.xAxis||"",valuekeys:n.yAxisList||[],type:((Ks=O.seriesType[0])==null?void 0:Ks.type)||"bar",groupBy:(oo=O.groupBySettings)!=null&&oo.value.split("____").length?(Ru=O.groupBySettings)==null?void 0:Ru.value.split("____")[0]:((Ds=O.groupBySettings)==null?void 0:Ds.value)||"monthly",labelSettings:x,backGroundColor:L,customSettings:_,fillXAxis:((Jg=O.groupBySettings)==null?void 0:Jg.fillXAxis)||!1,isCumulativeBar:((Vp=n.customSettings)==null?void 0:Vp.cumulativeBar)||!1})});break}}return E},Z$e=({data:n,pivotTableSettings:t,onChartReady:e})=>{ae.useEffect(()=>{(n!=null&&n.length||t)&&(e==null||e())},[n,e,t]);const r=(t==null?void 0:t.rows)||[],i=(t==null?void 0:t.columns)||[],a=xF(n,i,r);return N.jsx("div",{className:Zf.tableData,children:N.jsx("div",{className:Zf.tableScroll,children:N.jsx("div",{className:Zf.tableSet,children:N.jsxs("table",{role:"grid",border:2,children:[N.jsxs("thead",{children:[N.jsxs("tr",{className:Zf.row,children:[N.jsx("th",{className:Zf.tableHeadCol,children:"metric"}),r.map(o=>N.jsx("td",{colSpan:n.length,rowSpan:1,className:Zf.tableMetricHeadCol,children:o},o))]}),i.map((o,s)=>N.jsxs("tr",{className:Zf.row,children:[N.jsx("td",{className:Zf.tableHeadCol,children:o}),r.map(()=>a[o].map((l,u)=>N.jsx("td",{colSpan:l.count,rowSpan:1,className:Zf.tableHeadCol,children:l.name},u)))]},s))]}),N.jsx("tbody",{children:N.jsxs("tr",{children:[N.jsx("th",{colSpan:1,className:Zf.tableHeadCol,children:"Total (Sum)"}),r.map(o=>a[o].map((s,l)=>N.jsx("td",{role:"gridcell",className:Zf.tableRowCol,children:mg(s.name,!0)},l)))]})})]})})})})},fr={"table-loader-container":"_table-loader-container_1p7zj_1",tableData:"_tableData_1p7zj_7",tableScroll:"_tableScroll_1p7zj_13",tableHeadCol:"_tableHeadCol_1p7zj_19",resizer:"_resizer_1p7zj_25",resizing:"_resizing_1p7zj_37",tableRow:"_tableRow_1p7zj_43",tableRowCol:"_tableRowCol_1p7zj_49",truncateText:"_truncateText_1p7zj_57",row:"_row_1p7zj_65",container:"_container_1p7zj_71",table:"_table_1p7zj_1",previewTable:"_previewTable_1p7zj_83",preview:"_preview_1p7zj_83",searchButton:"_searchButton_1p7zj_95",previewText:"_previewText_1p7zj_101",noData:"_noData_1p7zj_107",error:"_error_1p7zj_113",errorMsg:"_errorMsg_1p7zj_119",tableIcon:"_tableIcon_1p7zj_125",stripedRow:"_stripedRow_1p7zj_131",rowHover:"_rowHover_1p7zj_137",rightBorder:"_rightBorder_1p7zj_143",searchContainer:"_searchContainer_1p7zj_149",sortButton:"_sortButton_1p7zj_155",searchTab:"_searchTab_1p7zj_161",searchTabInput:"_searchTabInput_1p7zj_167",searchTabIcon:"_searchTabIcon_1p7zj_173",noDataHead:"_noDataHead_1p7zj_179",noDataBody:"_noDataBody_1p7zj_185",showSort:"_showSort_1p7zj_191",noSort:"_noSort_1p7zj_197",pagination:"_pagination_1p7zj_203",rowStyle:"_rowStyle_1p7zj_209",rowText:"_rowText_1p7zj_215",rowsDropdown:"_rowsDropdown_1p7zj_221",pageStyle:"_pageStyle_1p7zj_227",buttonContainer:"_buttonContainer_1p7zj_233",button:"_button_1p7zj_233",paginationWrapper:"_paginationWrapper_1p7zj_251",current:"_current_1p7zj_257",textTruncate:"_textTruncate_1p7zj_263",badge:"_badge_1p7zj_269",list:"_list_1p7zj_275",badgeDiv:"_badgeDiv_1p7zj_281",listItem:"_listItem_1p7zj_287",listItemDiv:"_listItemDiv_1p7zj_293",truncateIcon:"_truncateIcon_1p7zj_299",loadMore:"_loadMore_1p7zj_305",loadMoreIcon:"_loadMoreIcon_1p7zj_311",listVal:"_listVal_1p7zj_317"},X$e=({value:n,onChange:t,debounce:e=500,...r})=>{const[i,a]=ae.useState(n);return ae.useEffect(()=>{a(n)},[n]),ae.useEffect(()=>{const o=setTimeout(()=>{t(i)},e);return()=>clearTimeout(o)},[e,t,i]),N.jsxs("div",{className:`${fr.searchTab} ${r.className||""}`,children:[N.jsx("input",{...r,value:i,onChange:o=>a(o.target.value),className:fr.searchTabInput}),i.toString().length?"":N.jsx(d2,{className:fr.searchTabIcon,color:"#C7C7C7",width:"30px",height:"30px"})]})},q$e=n=>N.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...n,children:N.jsx("path",{fill:"currentColor",d:"m16 28l-7-7l1.41-1.41L16 25.17l5.59-5.58L23 21l-7 7zm0-24l7 7l-1.41 1.41L16 6.83l-5.59 5.58L9 11l7-7z"})}),J$e=n=>N.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...n,children:N.jsx("path",{fill:"currentColor",d:"m16 4l7 7l-1.4 1.4L16 6.8l-5.6 5.6L9 11z"})}),K$e=n=>N.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...n,children:N.jsx("path",{fill:"currentColor",d:"m16 28l-7-7l1.4-1.4l5.6 5.6l5.6-5.6L23 21z"})}),eje=ane(),tje=(n,t,e)=>{const r=n.getValue(e),i=t.getValue(e);if(typeof r=="number"&&typeof i=="number")return r<i?-1:1;if(typeof r=="boolean"&&typeof i=="boolean")return r?1:-1;const a=new Date(r),o=new Date(i);return a.toString()!=="Invalid Date"?a.getTime()<o.getTime()?-1:1:r<i?-1:1},fw=({data:n,isLoading:t,error:e,tableSettings:r,tableName:i,className:a="",onColumnSizingChange:o,onChartReady:s,onChangePage:l,isExternalChart:u,isEnableNextBtn:c,isEnablePrevBtn:f,paginationInfo:d={limit:10,offset:0,totalRecords:10},setChartSettings:h,isInfiniteScroll:p,onLoadMore:g,hasMoreData:y})=>{var xe,Ae;const[b,S]=ae.useState(","),[x,M]=ae.useState(",");ae.useEffect(()=>{r!=null&&r.badgeSeparator?S(r.badgeSeparator):S(",")},[r==null?void 0:r.badgeSeparator]),ae.useEffect(()=>{r!=null&&r.listSeparator?M(r.listSeparator):M(",")},[r==null?void 0:r.listSeparator]);const{badgeDivStyle:_,listDivStyle:T,headerStyle:A}=ae.useMemo(()=>{const Se=(r==null?void 0:r.lineGap)==="small"?"1.5rem":(r==null?void 0:r.lineGap)==="medium"?"1.9rem":"2.5rem",Be=(r==null?void 0:r.lineGap)==="small"?"0.7rem":(r==null?void 0:r.lineGap)==="medium"?"0.85":"1rem";return{badgeDivStyle:{width:"100%",height:Se,fontSize:Be,display:"flex",alignItems:"center",justifyContent:r!=null&&r.contentAlignment?`${r.contentAlignment}`:"",gap:1},listDivStyle:{width:"100%",fontSize:Be,display:"flex",alignItems:"start",justifyContent:"center",flexDirection:"column",gap:1,height:"80px",flexWrap:"wrap"},headerStyle:{width:"100%",color:"#182c60",fontSize:Be,height:Se,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"500"}}},[r==null?void 0:r.lineGap,r==null?void 0:r.contentAlignment]),L=(Se,Be,ze)=>{if(Be&&ze&&Object.keys(Be).includes(Se)&&Object.keys(ze).includes(Se))return{backgroundColor:Be[Se],color:ze[Se]};if(Be&&Object.keys(Be).includes(Se))return{backgroundColor:Be[Se]};if(ze&&Object.keys(ze).includes(Se))return{color:ze[Se]}},[O,k]=ae.useState([]),[E,$]=ae.useState({}),[z,P]=ae.useState({label:((xe=Gu.tableSettings)==null?void 0:xe.defaultRowSize)||"10",value:((Ae=Gu.tableSettings)==null?void 0:Ae.defaultRowSize)||"10"}),[F,V]=ae.useState(50),[W,G]=ae.useState(r==null?void 0:r.columnSizing),[Z,Y]=ae.useState(""),[q,te]=ae.useState({pageIndex:0,pageSize:10});ae.useEffect(()=>{o==null||o(W)},[W]),ae.useEffect(()=>{if(!(r!=null&&r.defaultRowSize))return;const Se=O_.find(Be=>Be.value===r.defaultRowSize);if(Se)Number(Se.value)>1e3?P(O_.at(-1)):P(Se);else{const Be=O_.find(ze=>{var dt;return ze.value===((dt=Gu.tableSettings)==null?void 0:dt.defaultRowSize)});P(Be)}},[r==null?void 0:r.defaultRowSize]);const K=ae.useMemo(()=>!n||!Array.isArray(n)?[]:n,[n]),ne=ae.useMemo(()=>Object.keys(K[0]||{}).map(Se=>eje.accessor(Se,{header:()=>Se,cell:Be=>{const ze=Be.row.original[Se];return typeof ze=="object"?JSON.stringify(ze):typeof ze=="boolean"?ze?"true":"false":ze},sortingFn:"manualSorting"})),[K[0]]),oe=une({data:K,columns:ne,state:{sorting:O,globalFilter:Z,pagination:q,...W?{columnSizing:W}:{}},sortingFns:{manualSorting:tje},enableGlobalFilter:!0,onRowSelectionChange:$,onSortingChange:k,getCoreRowModel:one(),getFilteredRowModel:sne(),getSortedRowModel:lne(),onGlobalFilterChange:Y,onPaginationChange:te,manualPagination:!0,debugTable:!1,enableColumnResizing:!0,columnResizeMode:"onChange",onColumnSizingChange:G});ae.useEffect(()=>{oe.setPageSize(Number(z.value))},[z,oe]);const le=ae.useMemo(()=>{const{pageIndex:Se,pageSize:Be}=oe.getState().pagination,ze=Z?oe.getRowModel().rows.length:(n==null?void 0:n.length)||0,dt=ze===0?0:Be*Se+1,ge=ze<=Be*(Se+1)?ze:Be*(Se+1);return{from:dt,to:ge,total:ze}},[Z,n,oe.getState().pagination,oe.getRowModel().rows.length]);let fe;if(u){const Se=mg(d.totalRecords,!0).toString().split(".");Se.length>1&&[...Se[1]].some(Be=>parseInt(Be,10)>0)?fe=mg(d.totalRecords,!0):fe=mg(d.totalRecords,!1)}ae.useEffect(()=>{oe.getIsSomeColumnsVisible()&&(s==null||s())},[oe.getIsSomeColumnsVisible()]);const ce=(Se,Be)=>Be!=null&&Be.includes(Se)?fr.badge:"",pe=(Se,Be)=>Be!=null&&Be.includes(Se)?fr.list:"";return N.jsx("div",{className:`${fr.container} ${a}`,children:N.jsxs("div",{className:fr.previewTable,children:[r!=null&&r.enableTableSearch||r!=null&&r.showTableTitle?N.jsxs("div",{className:r.showTableTitle?fr.preview:fr.searchButton,children:[r.showTableTitle&&N.jsx(St,{styleClass:"font-14c",variant:"h1",className:fr.previewText,children:i}),r.enableTableSearch&&N.jsx(X$e,{value:Z,onChange:Se=>Y(String(Se)),placeholder:"Search"})]}):null,N.jsxs("div",{className:fr.tableData,children:[t&&!(n!=null&&n.length)&&N.jsx("div",{className:fr["table-loader-container"],children:N.jsx(Cp,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(n!=null&&n.length)&&N.jsx(lF,{style:{height:"100%"},children:N.jsxs("table",{className:fr.table,children:[N.jsx("thead",{children:oe.getHeaderGroups().map(Se=>N.jsx("tr",{className:fr.row,children:Se.headers.map(Be=>N.jsxs("th",{className:fr.tableHeadCol,colSpan:Be.colSpan,style:{width:Be.getSize()},children:[N.jsx("button",{onMouseDown:Be.getResizeHandler(),onTouchStart:Be.getResizeHandler(),onDoubleClick:Be.column.resetSize,className:`${fr.resizer} ${Be.column.getIsResizing()?fr.resizing:""}`,type:"button",title:"Resize Column"}),r!=null&&r.enableSorting?N.jsxs("div",{className:Be.column.getCanSort()?fr.sortButton:"",onClick:Be.column.getToggleSortingHandler(),children:[Be.isPlaceholder?null:N.jsx("div",{style:A,children:N.jsx(St,{styleClass:"custom",variant:"p",className:fr.truncateText,children:l0(Be.column.columnDef.header,Be.getContext())})}),N.jsx("div",{children:{asc:N.jsx(J$e,{color:"#182c60"}),desc:N.jsx(K$e,{color:"#182c60"})}[Be.column.getIsSorted()]??N.jsx(q$e,{color:"#182c60"})})]}):N.jsx(N.Fragment,{children:Be.isPlaceholder?null:N.jsx("div",{style:A,children:N.jsx(St,{variant:"p",styleClass:"custom",className:fr.truncateText,children:l0(Be.column.columnDef.header,Be.getContext())})})})]},Be.id))},Se.id))}),N.jsx("tbody",{children:oe.getSortedRowModel().rows.slice(p&&!(r!=null&&r.isServerSidePagination)?0:q.pageSize*q.pageIndex,p&&!(r!=null&&r.isServerSidePagination)?g?void 0:F:q.pageSize*(1+q.pageIndex)).map((Se,Be)=>N.jsx("tr",{className:`${fr.tableRow} ${r!=null&&r.showRowHover?fr.rowHover:""} ${r!=null&&r.enableStripedRows&&Number(Be)%2!==0?fr.stripedRow:""}`,children:Se.getVisibleCells().map(ze=>{var Ve,ft,ut,De,je;let dt=[],ge="",Ee=[];return ce(ze.column.id,r==null?void 0:r.badgeColumns)?(ge=typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):ze.getValue(),ge.toString().includes(b)?dt=ge.toString().split(b):dt=[ge]):pe(ze.column.id,r==null?void 0:r.listColumns)&&(ge=typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):ze.getValue(),ge.toString().includes(x)?(Ee=ge.toString().split((r==null?void 0:r.listSeparator)||","),dt=Ee.length>3?[Ee[0],Ee[1],Ee[2]]:Ee):dt=[ge]),N.jsxs("td",{className:`${fr.tableRowCol} ${r!=null&&r.hideVerticalDivider?"":fr.rightBorder}`,title:typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):`${ze.getValue()}`,children:[!!r&&N.jsx("div",{style:ce(ze.column.id,r.listColumns)?{...T,...vN({rules:((ft=(Ve=r.conditionalFormatting)==null?void 0:Ve.find(({columnName:ye})=>ye===ze.column.id))==null?void 0:ft.rules)||[],value:typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):ze.getValue()})}:{..._,...vN({rules:((De=(ut=r.conditionalFormatting)==null?void 0:ut.find(({columnName:ye})=>ye===ze.column.id))==null?void 0:De.rules)||[],value:typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):ze.getValue()})},children:ge.toString().includes(b)||ge.toString().includes(x)?N.jsxs(N.Fragment,{children:[dt.map(ye=>{var We;return N.jsx(N.Fragment,{children:ce(ze.column.id,r.badgeColumns)?N.jsx(St,{variant:"p",styleClass:"custom",className:`${fr.truncateText} ${ce(ze.column.id,r.badgeColumns)}`,style:(We=r.badgeColumns)!=null&&We.includes(ze.column.id)?L(ze.column.id,r.badgeColors,r.badgeTextColors):{},children:ye},ye):N.jsxs(St,{variant:"p",styleClass:"custom",className:`${fr.truncateText} ${fr.listItemDiv}`,children:[N.jsx("div",{className:fr.listItem}),N.jsx("div",{className:fr.listVal,children:ye})]},ye)})}),ce(ze.column.id,r.listColumns)&&Ee.length>3&&N.jsx(Cn,{name:"horizontal-more-icon",className:fr.truncateIcon})]}):N.jsx(St,{variant:"p",styleClass:"custom",className:`${fr.truncateText} ${ce(ze.column.id,r.badgeColumns)}`,style:(je=r.badgeColumns)!=null&&je.includes(ze.column.id)?L(ze.column.id,r.badgeColors,r.badgeTextColors):{},children:l0(ze.column.columnDef.cell,ze.getContext())})}),!r&&N.jsx("div",{style:{textAlign:"center",width:"100%"},children:l0(ze.column.columnDef.cell,ze.getContext())})]},ze.id)})},Se.id))})]})}),!(n!=null&&n.length)&&!t&&!e.length&&N.jsxs("div",{className:fr.noData,children:[N.jsx("img",{src:cne,alt:"no-data",width:"400px",height:"400px"}),N.jsx(St,{styleClass:"font-14c",variant:"h1",className:fr.noDataHead,children:"No data tables queried"}),N.jsx(St,{styleClass:"font-14",variant:"p",className:fr.noDataBody,children:"Type your query and input fields beside to generate results and explore data"})]}),e&&N.jsx("div",{className:fr.error,children:N.jsx(St,{styleClass:"primary",className:fr.errorMsg,variant:"p",children:e})})]}),n&&!(r!=null&&r.disablePagination)&&(!p||(r==null?void 0:r.isServerSidePagination))&&N.jsxs("div",{className:fr.pagination,children:[N.jsx("div",{className:fr.rowStyle,children:N.jsx(da,{onChange:Se=>{P(Se),u&&(l==null||l(!1,parseInt(Se.value,10)),h==null||h(Be=>({...Be,tableSettings:{...Be.tableSettings,defaultRowSize:Se.value}})))},selectedOption:z,options:O_,labelVariant:"static",dropdownAbove:!0,buttonClass:fr.rowsDropdown})}),u?N.jsxs("span",{className:fr.pageStyle,children:[d.offset+1,"-",d.offset+n.length," of ",fe]}):N.jsxs("span",{className:fr.pageStyle,children:[le.from,"-",le.to," of ",le.total]}),N.jsxs("div",{className:fr.buttonContainer,children:[N.jsx(Vt,{variant:"custom",type:"button",className:fr.button,onClick:()=>{u?l==null||l(!0):oe.previousPage()},isDisabled:u?!f:le.from<=1,children:"Prev"}),N.jsx(Vt,{variant:"custom",type:"button",className:fr.button,onClick:()=>{u?l==null||l(!1):oe.nextPage()},isDisabled:u?!c:le.to>=le.total,children:"Next"})]})]}),p&&!(r!=null&&r.isServerSidePagination)&&n&&(n.length>F||y&&n.length)?N.jsx(Vt,{variant:"secondary",type:"button",onClick:()=>{g?g():V(Se=>Se+50)},className:fr.loadMore,children:t?N.jsxs(N.Fragment,{children:[N.jsx(Cp,{style:{width:"20px",height:"20px",color:"blue"}})," ","Loading..."]}):N.jsxs(N.Fragment,{children:["Load More"," ",N.jsx(Cn,{name:"double-arrow-left-icon",className:fr.loadMoreIcon})]})}):null]})})},dw=Ne.memo(({chartOptions:n,data:t,events:e,colors:r,config:i,className:a,selectedSeries:o})=>{var p,g;const s=ae.useMemo(()=>JM({chartOptions:n,data:t,colors:r,selectedSeries:o}),[t,n,r,o]),[l,u]=ae.useState(JM({chartOptions:n,data:t,colors:r}));ae.useEffect(()=>{var y;(y=n.customSettings)!=null&&y.showDynamicBehaviour&&n.chartType&&u(JM({chartOptions:n,data:t.slice(0,10),colors:r}))},[n,r,t]),ae.useEffect(()=>{var S;let y=10,b=0;if((S=n.customSettings)!=null&&S.showDynamicBehaviour){const x=setInterval(()=>{if(y>=t.length){clearInterval(x);return}const M=t.slice(b,y+10),_=JM({chartOptions:n,data:M,colors:r});u(_),y+=10,b+=5},1e3);return()=>clearInterval(x)}},[n,t,r]);const[c,f]=ae.useState(!0);ae.useEffect(()=>{f(!1)},[]);const{ref:d,...h}=i||{};return n.chartType===Ce.singleValue?N.jsx(V$e,{...h,value:s.value,settings:s.settings,className:a,comparisonValue:s.comparisonValue,trendLineOptions:s.trendLineOptions,events:e}):n.chartType===Ce.horizontalStackTable?N.jsx(z$e,{...h,data:s.data,rawData:t,error:"",isLoading:!1,tableSettings:s.tableSettings,className:a,stackCols:n.stackTableCols||[],colors:s.colors,showLabels:(p=n.customSettings)==null?void 0:p.showStackLabels}):n.chartType===Ce.table?N.jsx(fw,{...h,data:s.data,error:"",isLoading:!1,tableSettings:s.tableSettings,className:a,isExternalChart:i==null?void 0:i.isExternalChart,onChangePage:i==null?void 0:i.onChangePage,isEnableNextBtn:i==null?void 0:i.isEnableNextBtn,isEnablePrevBtn:i==null?void 0:i.isEnablePrevBtn,paginationInfo:i==null?void 0:i.paginationInfo,setChartSettings:i==null?void 0:i.setChartSettings}):n.chartType===Ce.pivot?N.jsx(Z$e,{...h,data:t,pivotTableSettings:s.pivotTableSettings}):[Ce.bar,Ce.line,Ce.area,Ce.timeSeries].includes(n.chartType)&&((g=n.customSettings)!=null&&g.showDynamicBehaviour)?N.jsx(oN,{style:{width:"100%",height:"100%"},...i,option:{...l},className:a,onEvents:e,notMerge:!0}):N.jsx(oN,{style:{width:"100%",height:"100%"},...i,option:{...s,animation:c},className:a,onEvents:e,notMerge:!0})}),nje=({isShow:n,onCancel:t,...e})=>N.jsx(Kh,{isOpen:n,onClose:t,headerTitle:"Chart Preview",children:N.jsx("div",{className:lhe.fullscreen,children:N.jsx(dw,{...e})})}),oKe={button:"_button_jnm42_1",menu:"_menu_jnm42_7",menuContainer:"_menuContainer_jnm42_13",buttonText:"_buttonText_jnm42_19",buttonIcon:"_buttonIcon_jnm42_25",filterName:"_filterName_jnm42_31",filterDropdown:"_filterDropdown_jnm42_37"},rje=n=>{const t=document.documentElement;n.colors&&Object.entries(n.colors).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-color-${e}`,`${r}`)}),n.border&&Object.entries(n.border).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-border-${e}`,`${r}`)}),n.shadow&&Object.entries(n.shadow).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-shadow-${e}`,`${r}`)}),n.typography&&Object.entries(n.typography).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-typography-${e}`,`${r}`)}),n.breakpoint&&Object.entries(n.breakpoint).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-breakpoint-${e}`,`${r}`)})},hne=n=>{const t="data:text/csv;charset=utf-8,";if(!n.length)return t;const e=[],r=n[0],i=Object.keys(r);e.push(`S.NO,${i.join(",").toUpperCase()}`),n.forEach((s,l)=>{const u=Object.values(s).map(c=>{if(typeof c=="number")return c;try{if(c!=null&&c.includes(","))return`"${c}"`}catch{return c}return c});e.push(`${l+1},${u.join(",")}`)});const a=e.join(`
|
|
476
|
+
`).join("")}`,s},wu=n=>[{type:"inside",xAxisIndex:(n==null?void 0:n.zoomAxis)==="x"||(n==null?void 0:n.zoomAxis)==="xy"?[0]:"none",start:0,disabled:!(n!=null&&n.isZoomEnabled),filterMode:"none",zoomOnMouseWheel:(n==null?void 0:n.zoomOnMouseWheel)||"ctrl"},{type:"inside",yAxisIndex:(n==null?void 0:n.zoomAxis)==="y"||(n==null?void 0:n.zoomAxis)==="xy"?[0]:"none",start:0,disabled:!(n!=null&&n.isZoomEnabled),filterMode:"none",zoomOnMouseWheel:(n==null?void 0:n.zoomOnMouseWheel)||"ctrl"}],JM=({chartOptions:n,data:t=[],colors:e,selectedSeries:r})=>{var z,P,F,V,W,G,Z,Y,q,te,K,ne,oe,le,fe,ce,pe,xe,Ae,Se,Be,ze,dt,ge,Ee,Ve,ft,ut,De,je,ye,We,Ye,xt,_t,kt,Rt,yt,Oe,it,Ot,vn,_n,ir,Vr,Li,Kn,Ti,Tr,wr,ha,fi,qi,ra,eo,ia,ja,ba,to,aa,no,Ji,oa,Ki,Me,bt,jt,Wt,ct,ot,$t,Zt,$r,jr,Hr,ii,za,Uo,br,fc,So,qn,ko,bs,Fa,Ss,Ea,Kl,Sa,eu,tu,Us,_l,ro,io,pa,ws,_s,xs,xl,Gs,Go,dc,wo,vr,_o,Ys,Ml,er,Cl,Tl,Pn,Qs,_i,ji,va,Ms,di,zr,Dl,Ia,Gi,xo,nu,Ba,Yo,Du,ao,Cs,me,ke,gt,Ht,Dr,On,Xr,Di,qr,re,we,He,qe,wt,Kt,Pt,sn,Bn,gr,Fr,Ar,de,se,Ue,gn,hr,Yn,ea,zi,Qo,hc,uf,Bw,Vw,Eg,Ig,A0,E0,I0,Ng,Au,Hw,Lg,Ip,kg,Ww,Np,N0,Zo,Eu,wa,Al,cf,Lp,L0,ad,k0,R0,kp,od,Uw,Gw,O0,P0,$0,fh,sd,ld,ud,j0,Rg,Og,Pg,z0,F0,B0,Yw,Qw,Zw,V0,Xw,Zs,dh,H0,W0,U0,Rp,Iu,Op,G0,El,$g,hh,jg,Y0,Pp,ff,zg,Fg,Va,Bg,Q0,Z0,X0,q0,J0,Nu,ph,df,qw,vh,gh,Jw,K0,$p,Ai,pc,Lu,cd,eb,jp,mh,yh,hf,Vg,Hg,Kw,Wg,zp,Fp,Ug,pf,bh,vf,tb,Gg,Yg,e1,vc,Il,Sh,gc,ru,gf,ku,Qg,t1,Zg,Xs,wh,fd,Nn,mc,Fi,lr,ai,hi,iu,Qn,sa,Xo,qs,Yi,Js,yc,_h,Bp,nb,Ts,Ha,xh,Xg,qg,qo,bc,Jo,mf,dd,Ko,Mo,Ks,oo,Ru,Ds,Jg,Vp;const i=(n==null?void 0:n.chartType)===Ce.timeSeries?dne({data:t,timeStampKey:n.xAxis||"",valuekeys:n.yAxisList||[]}):!1;let a;e!=null&&e.length?a=[[.3,e[0]],[.7,e[1]],[1,e[2]]]:a=[[.3,"#37a2da"],[.7,"#67e0e3"],[1,"#fd666d"]];const o=be=>/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(be),s=((P=(z=n.customSettings)==null?void 0:z.gradients)==null?void 0:P.map(be=>{const Qe=[{offset:be.offset1>1?be.offset1/100:be.offset1,color:be.startColor},{offset:be.offset2>1?be.offset2/100:be.offset2,color:be.endColor}];switch(be.direction){case"left":return new po(1,0,0,0,Qe);case"right":return new po(0,0,1,0,Qe);case"top":return new po(0,1,0,0,Qe);case"bottom":return new po(0,0,0,1,Qe);default:return new po(0,0,1,0,Qe)}}))||[];let l="";if((F=n.customSettings)!=null&&F.isShowBarGradient&&((V=n.customSettings.barGradient)==null?void 0:V.offset1)!==void 0&&((W=n.customSettings.barGradient)==null?void 0:W.offset2)!==void 0&&o(n.customSettings.barGradient.startColor)&&o(n.customSettings.barGradient.endColor)){const be=[{offset:((G=n.customSettings.barGradient)==null?void 0:G.offset1)>1?((Z=n.customSettings)==null?void 0:Z.barGradient.offset1)/100:(Y=n.customSettings.barGradient)==null?void 0:Y.offset1,color:n.customSettings.barGradient.startColor||"#FF0000"},{offset:((q=n.customSettings.barGradient)==null?void 0:q.offset2)>1?((te=n.customSettings)==null?void 0:te.barGradient.offset2)/100:(K=n.customSettings.barGradient)==null?void 0:K.offset2,color:n.customSettings.barGradient.endColor||"#000000"}];switch(n.customSettings.barGradient.direction){case"left":l=new po(1,0,0,0,be);break;case"right":l=new po(0,0,1,0,be);break;case"top":l=new po(0,1,0,0,be);break;case"bottom":l=new po(0,0,0,1,be);break;default:l=new po(0,0,1,0,be)}}let u="";if((ne=n.customSettings)!=null&&ne.enableBackgroundGradient&&((oe=n.customSettings.backgroundGradient)==null?void 0:oe.offset1)!==void 0&&((le=n.customSettings.backgroundGradient)==null?void 0:le.offset2)!==void 0&&o(n.customSettings.backgroundGradient.startColor)&&o(n.customSettings.backgroundGradient.endColor)){const be=[{offset:((fe=n.customSettings.backgroundGradient)==null?void 0:fe.offset1)>1?((ce=n.customSettings)==null?void 0:ce.backgroundGradient.offset1)/100:(pe=n.customSettings.backgroundGradient)==null?void 0:pe.offset1,color:n.customSettings.backgroundGradient.startColor||"#FF0000"},{offset:((xe=n.customSettings.backgroundGradient)==null?void 0:xe.offset2)>1?((Ae=n.customSettings)==null?void 0:Ae.backgroundGradient.offset2)/100:(Se=n.customSettings.backgroundGradient)==null?void 0:Se.offset2,color:n.customSettings.backgroundGradient.endColor||"#000000"}];switch(n.customSettings.backgroundGradient.direction){case"left":u=new po(1,0,0,0,be);break;case"right":u=new po(0,0,1,0,be);break;case"top":u=new po(0,1,0,0,be);break;case"bottom":u=new po(0,0,0,1,be);break;default:u=new po(0,0,1,0,be)}}const{labels:c,datasets:f,funnelData:d,singleValueData:h,seriesData:p,xAxisData:g}=W$e({data:t,measure:n.measure,step:n.step,xAxis:n.xAxis,yAxisList:n.yAxisList,singleValue:n.singleValue,seriesField:n.seriesField,seriesType:((dt=(ze=(Be=n.timeSeriesSettings)==null?void 0:Be.seriesType)==null?void 0:ze[0])==null?void 0:dt.type)||"bar",isTimeSeries:i,fillXAxis:((ge=n.timeSeriesSettings)==null?void 0:ge.groupBySettings.fillXAxis)||!1,selectedFormat:(Ve=(Ee=n.timeSeriesSettings)==null?void 0:Ee.groupBySettings)!=null&&Ve.value.split("____").length?(ut=(ft=n.timeSeriesSettings)==null?void 0:ft.groupBySettings)==null?void 0:ut.value.split("____")[0]:((je=(De=n.timeSeriesSettings)==null?void 0:De.groupBySettings)==null?void 0:je.value)||"monthly",isDynamicXaxis:!!((ye=n==null?void 0:n.dynamicXAxis)!=null&&ye.isEnabled),isCumulativeBar:((We=n.customSettings)==null?void 0:We.cumulativeBar)||!1,chartType:n.chartType}),y=Y$e(t,((Ye=n.pivotTableSettings)==null?void 0:Ye.rows)||[],((xt=n.pivotTableSettings)==null?void 0:xt.columns)||[]),b=(_t=n.customSettings)!=null&&_t.showSelectLegend?p.filter(be=>r==null?void 0:r.includes(be.name)):[],S={...Gu.margins,...n.margins},x={...Gu.labelSettings,...n.labelSettings},M={...Gu.legendSettings,...n.legendSettings},_={...Gu.customSettings,...n.customSettings},T={...Gu.tableSettings,...n.tableSettings},A={...Gu.axisSettings,...n.axisSettings},L={...Gu.backGroundColor,...n.backGroundColor},O={...Gu.timeSeriesSettings,seriesType:((kt=n.yAxisList)==null?void 0:kt.map(be=>({column:be,type:"bar"})))||[],...n.timeSeriesSettings},k={...Gu.pivotTableSettings,...n.pivotTableSettings},E={...e!=null&&e.length?{color:[...s,...e]}:{}},$=_==null?void 0:_.chartZoom;switch(n.chartType){case Ce.line:{Object.assign(E,{...E,tooltip:{width:"200px",trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>{const Qe=Tn(be,_.numberFormatter);return Dn(Qe,_.labelPrefix,_.labelSuffix)},formatter:be=>Xf(be,n)},dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},backgroundColor:(Rt=n.customSettings)!=null&&Rt.enableBackgroundGradient?u:"",toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},xAxis:{type:"category",boundaryGap:!1,data:n.isMultiDimension&&n.seriesField!=="ungrouped"?g||[]:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Oe=(yt=n.labelSettings)==null?void 0:yt.XAxisStyle)==null?void 0:Oe.color)||"#000000",fontSize:((Ot=(it=n.labelSettings)==null?void 0:it.XAxisStyle)==null?void 0:Ot.size)||14,fontWeight:((_n=(vn=n.labelSettings)==null?void 0:vn.XAxisStyle)==null?void 0:_n.weight)||400,fontFamily:(Vr=(ir=n.labelSettings)==null?void 0:ir.XAxisStyle)==null?void 0:Vr.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Kn=(Li=n.labelSettings)==null?void 0:Li.YAxisStyle)==null?void 0:Kn.color)||"#000000",fontSize:((Tr=(Ti=n.labelSettings)==null?void 0:Ti.YAxisStyle)==null?void 0:Tr.size)||14,fontWeight:((ha=(wr=n.labelSettings)==null?void 0:wr.YAxisStyle)==null?void 0:ha.weight)||400,fontFamily:(qi=(fi=n.labelSettings)==null?void 0:fi.YAxisStyle)==null?void 0:qi.family,formatter:be=>{const Qe=Tn(be,_.numberFormatter);return Dn(Qe,_.labelPrefix,_.labelSuffix)}}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}},data:n.isMultiDimension&&n.seriesField!=="ungrouped"?p==null?void 0:p.map(be=>`${be.name}`||"line"):f==null?void 0:f.map(be=>be.label)},series:n.isMultiDimension&&n.seriesField!=="ungrouped"?b!=null&&b.length?b.map(be=>{var Qe;return{data:be.data,type:"line",showSymbol:!((Qe=n.customSettings)!=null&&Qe.showDynamicBehaviour),name:be.name||"line",label:{show:x.show,position:x.position,formatter(rt){const Ke=Tn(rt.data,_.numberFormatter);return Dn(Ke,_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"}}}):p.map(be=>{var Qe;return{data:be.data,type:"line",showSymbol:!((Qe=n.customSettings)!=null&&Qe.showDynamicBehaviour),name:be.name||"line",label:{show:x.show,position:x.position,formatter(rt){const Ke=Tn(rt.data,_.numberFormatter);return Dn(Ke,_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"}}}):f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"line",showSymbol:!((Qe=n.customSettings)!=null&&Qe.showDynamicBehaviour),name:be.label,label:{show:x.show,position:x.position,formatter(rt){const Ke=Tn(rt.data,_.numberFormatter);return Dn(Ke,_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"}}})});break}case Ce.bar:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},backgroundColor:(ra=n.customSettings)!=null&&ra.enableBackgroundGradient?u:"",dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:n.isMultiDimension&&n.seriesField!=="ungrouped"?g||[]:c,axisTick:{alignWithLabel:!0},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",interval:0,rotate:_.xRotation,hideOverlap:!0,color:((ia=(eo=n.labelSettings)==null?void 0:eo.XAxisStyle)==null?void 0:ia.color)||"#000000",fontSize:((ba=(ja=n.labelSettings)==null?void 0:ja.XAxisStyle)==null?void 0:ba.size)||14,fontWeight:((aa=(to=n.labelSettings)==null?void 0:to.XAxisStyle)==null?void 0:aa.weight)||400,fontFamily:(Ji=(no=n.labelSettings)==null?void 0:no.XAxisStyle)==null?void 0:Ji.family,formatter(be){return bi(be,x.truncateLabelValue||14)}},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Ki=(oa=n.labelSettings)==null?void 0:oa.YAxisStyle)==null?void 0:Ki.color)||"#000000",fontSize:((bt=(Me=n.labelSettings)==null?void 0:Me.YAxisStyle)==null?void 0:bt.size)||14,fontWeight:((Wt=(jt=n.labelSettings)==null?void 0:jt.YAxisStyle)==null?void 0:Wt.weight)||400,fontFamily:(ot=(ct=n.labelSettings)==null?void 0:ct.YAxisStyle)==null?void 0:ot.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{data:n.isMultiDimension&&n.seriesField!=="ungrouped"?p==null?void 0:p.map(be=>`${be.name}`||"series-bar"):f==null?void 0:f.map(be=>be.label),show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:n.isMultiDimension&&n.seriesField!=="ungrouped"?b!=null&&b.length?b.map(be=>{var Qe;return{data:be.data,type:"bar",showSymbol:!((Qe=n.customSettings)!=null&&Qe.showDynamicBehaviour),name:be.name||"line",label:{show:x.show,position:x.position,formatter(rt){const Ke=Tn(rt.data,_.numberFormatter);return Dn(Ke,_.labelPrefix,_.labelSuffix)}},itemStyle:{..._.coloredBars?{color:rt=>e==null?void 0:e[rt.dataIndex%e.length]}:{}},emphasis:{focus:"series"}}}):p.map(be=>{var Qe;return{data:be.data,type:"bar",name:be.name||"",barWidth:`${_.barWidth||0}%`,label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius,..._.coloredBars?{color:rt=>e==null?void 0:e[rt.dataIndex%e.length]}:{}}}}):f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"bar",name:be.label,barWidth:`${_.barWidth||0}%`,label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius,..._.coloredBars?{color:rt=>e==null?void 0:e[rt.dataIndex%e.length]}:{}}}})});break}case Ce.stack:{const be=(()=>{if(!f||!_.showFullStacked)return;const Qe={};return f.forEach(rt=>{const Ke=rt.data.map((Nt,Yt)=>{const mn=f.reduce((pn,Ln)=>pn+Ln.data[Yt],0);return(Nt/mn*100).toFixed(2)});Qe[rt.label]=Ke}),Qe})();Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},backgroundColor:($t=n.customSettings)!=null&&$t.enableBackgroundGradient?u:"",tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0},dataZoom:wu($),xAxis:{type:"category",data:n.isMultiDimension&&n.seriesField!=="ungrouped"?g||[]:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:(($r=(Zt=n.labelSettings)==null?void 0:Zt.XAxisStyle)==null?void 0:$r.color)||"#000000",fontSize:((Hr=(jr=n.labelSettings)==null?void 0:jr.XAxisStyle)==null?void 0:Hr.size)||14,fontWeight:((za=(ii=n.labelSettings)==null?void 0:ii.XAxisStyle)==null?void 0:za.weight)||400,fontFamily:(br=(Uo=n.labelSettings)==null?void 0:Uo.XAxisStyle)==null?void 0:br.family,formatter(Qe){return bi(Qe,x.truncateLabelValue||14)}}},yAxis:{type:"value",max:_.showFullStacked?100:void 0,position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((So=(fc=n.labelSettings)==null?void 0:fc.YAxisStyle)==null?void 0:So.color)||"#000000",fontSize:((ko=(qn=n.labelSettings)==null?void 0:qn.YAxisStyle)==null?void 0:ko.size)||14,fontWeight:((Fa=(bs=n.labelSettings)==null?void 0:bs.YAxisStyle)==null?void 0:Fa.weight)||400,fontFamily:(Ea=(Ss=n.labelSettings)==null?void 0:Ss.YAxisStyle)==null?void 0:Ea.family,formatter:Qe=>Qe===null||Qe===0?"0":Dn(Tn(Qe,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:n.isMultiDimension&&n.seriesField!=="ungrouped"?p==null?void 0:p.map(Qe=>`${Qe.name}`||"series-stack"):f==null?void 0:f.map(Qe=>Qe.label),formatter(Qe){return`{a|${bi(Qe,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Qe){return Qe.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:n.isMultiDimension&&n.seriesField!=="ungrouped"?b!=null&&b.length?b.map(Qe=>{var rt;return{data:Qe.data,type:"bar",stack:"total",name:Qe.name||"",barWidth:`${_.barWidth||0}%`,label:{show:x.show,position:x.position,formatter(Ke){return Dn(Tn(Ke.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(rt=n.customSettings)!=null&&rt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius},emphasis:{focus:"series"}}}):p.map(Qe=>{var rt;return{data:Qe.data,type:"bar",stack:"total",name:Qe.name||"",barWidth:`${_.barWidth||0}%`,label:{show:x.show,position:x.position,formatter(Ke){return Dn(Tn(Ke.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(rt=n.customSettings)!=null&&rt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius},emphasis:{focus:"series"}}}):f==null?void 0:f.map(Qe=>{var rt;return{data:_.showFullStacked?be[Qe.label]:Qe.data,type:"bar",name:Qe.label,stack:"x",barWidth:`${_.barWidth}%`,emphasis:{focus:"series"},label:{show:x.show,position:x.position,formatter(Ke){return Dn(Tn(Ke.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(rt=n.customSettings)!=null&&rt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius}}})});break}case Ce.area:{f==null||f.map(be=>Object.assign(be,{fill:!0})),Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Kl=n.customSettings)!=null&&Kl.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((eu=(Sa=n.labelSettings)==null?void 0:Sa.XAxisStyle)==null?void 0:eu.color)||"#000000",fontSize:((Us=(tu=n.labelSettings)==null?void 0:tu.XAxisStyle)==null?void 0:Us.size)||14,fontWeight:((ro=(_l=n.labelSettings)==null?void 0:_l.XAxisStyle)==null?void 0:ro.weight)||400,fontFamily:(pa=(io=n.labelSettings)==null?void 0:io.XAxisStyle)==null?void 0:pa.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}}],yAxis:[{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((_s=(ws=n.labelSettings)==null?void 0:ws.YAxisStyle)==null?void 0:_s.color)||"#000000",fontSize:((xl=(xs=n.labelSettings)==null?void 0:xs.YAxisStyle)==null?void 0:xl.size)||14,fontWeight:((Go=(Gs=n.labelSettings)==null?void 0:Gs.YAxisStyle)==null?void 0:Go.weight)||400,fontFamily:(wo=(dc=n.labelSettings)==null?void 0:dc.YAxisStyle)==null?void 0:wo.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}}],series:f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"line",name:be.label,stack:"Total",smooth:!0,showSymbol:!1,areaStyle:{},emphasis:{focus:"series"},label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})});break}case Ce.boxplot:{const be=[],Qe=[];f==null||f.map(rt=>{be.push(rt.data),Qe.push(rt.label)}),Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(vr=n.customSettings)!=null&&vr.enableBackgroundGradient?u:"",title:[{text:"Box Plot",left:"center"}],legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(rt=>rt.label),formatter(rt){return`{a|${bi(rt,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(rt){return rt.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},dataset:[{source:be},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:rt=>Dn(Tn(rt,_.numberFormatter),_.labelPrefix,_.labelSuffix)},dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Ys=(_o=n.labelSettings)==null?void 0:_o.XAxisStyle)==null?void 0:Ys.color)||"#000000",fontSize:((er=(Ml=n.labelSettings)==null?void 0:Ml.XAxisStyle)==null?void 0:er.size)||14,fontWeight:((Tl=(Cl=n.labelSettings)==null?void 0:Cl.XAxisStyle)==null?void 0:Tl.weight)||400,fontFamily:(Qs=(Pn=n.labelSettings)==null?void 0:Pn.XAxisStyle)==null?void 0:Qs.family}},yAxis:{type:"value",position:A.axis,splitArea:{show:!0},splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((ji=(_i=n.labelSettings)==null?void 0:_i.YAxisStyle)==null?void 0:ji.color)||"#000000",fontSize:((Ms=(va=n.labelSettings)==null?void 0:va.YAxisStyle)==null?void 0:Ms.size)||14,fontWeight:((zr=(di=n.labelSettings)==null?void 0:di.YAxisStyle)==null?void 0:zr.weight)||400,fontFamily:(Ia=(Dl=n.labelSettings)==null?void 0:Dl.YAxisStyle)==null?void 0:Ia.family,formatter:rt=>rt===null||rt===0?"0":Dn(Tn(rt,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]});break}case Ce.bubble:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Gi=n.customSettings)!=null&&Gi.enableBackgroundGradient?u:"",grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,formatter:be=>Xf(be,n)},dataZoom:wu($),xAxis:{type:"category",data:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((nu=(xo=n.labelSettings)==null?void 0:xo.XAxisStyle)==null?void 0:nu.color)||"#000000",fontSize:((Yo=(Ba=n.labelSettings)==null?void 0:Ba.XAxisStyle)==null?void 0:Yo.size)||14,fontWeight:((ao=(Du=n.labelSettings)==null?void 0:Du.XAxisStyle)==null?void 0:ao.weight)||400,fontFamily:(me=(Cs=n.labelSettings)==null?void 0:Cs.XAxisStyle)==null?void 0:me.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((gt=(ke=n.labelSettings)==null?void 0:ke.YAxisStyle)==null?void 0:gt.color)||"#000000",fontSize:((Dr=(Ht=n.labelSettings)==null?void 0:Ht.YAxisStyle)==null?void 0:Dr.size)||14,fontWeight:((Xr=(On=n.labelSettings)==null?void 0:On.YAxisStyle)==null?void 0:Xr.weight)||400,fontFamily:(qr=(Di=n.labelSettings)==null?void 0:Di.YAxisStyle)==null?void 0:qr.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:f==null?void 0:f.map(be=>{var Qe;return{symbolSize:rt=>rt*((n.percentageSize?n.percentageSize:50)/100),data:be.data,type:"scatter",name:be.label,label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})});break}case Ce.combo:{let be;const Qe=((re=n.yAxisList)==null?void 0:re.filter(Ke=>{var Nt;return!((Nt=n==null?void 0:n.comboBarList)!=null&&Nt.includes(Ke))}))||[];let rt;_!=null&&_.isStackBar&&((we=n.comboBarList)!=null&&we.length)?(be=[{show:!0,type:"value",name:((He=_.comboStackAxisSymbols)==null?void 0:He.name)||"stack",min:0,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((wt=(qe=n.labelSettings)==null?void 0:qe.YAxisStyle)==null?void 0:wt.color)||"#000000",fontSize:((Pt=(Kt=n.labelSettings)==null?void 0:Kt.YAxisStyle)==null?void 0:Pt.size)||14,fontWeight:((Bn=(sn=n.labelSettings)==null?void 0:sn.YAxisStyle)==null?void 0:Bn.weight)||400,fontFamily:(Fr=(gr=n.labelSettings)==null?void 0:gr.YAxisStyle)==null?void 0:Fr.family,formatter:Ke=>{var Nt,Yt;return Ke===null||Ke===0?"0":Dn(Tn(Ke,_.numberFormatter),((Nt=_.comboStackAxisSymbols)==null?void 0:Nt.prefix)||"",((Yt=_.comboStackAxisSymbols)==null?void 0:Yt.suffix)||"")}}}],rt=(Ar=n.comboBarList)==null?void 0:Ar.map((Ke,Nt)=>{var Yt;return{type:"bar",..._.isStackBar?{stack:"x"}:{},data:t.map(mn=>mn[Ke]),name:Ke,label:{show:x.show,position:x.position,..._.isStackBar?{formatter(mn){var pn,Ln;return Dn(Tn(mn.data,_.numberFormatter),(pn=_.comboStackAxisSymbols)==null?void 0:pn.prefix,(Ln=_.comboStackAxisSymbols)==null?void 0:Ln.suffix)}}:{formatter(mn){var pn,Ln;return Dn(Tn(mn.data,_.numberFormatter),(pn=_.comboAxisSymbols[Nt])==null?void 0:pn.prefix,(Ln=_.comboAxisSymbols[Nt])==null?void 0:Ln.suffix)}}},showBackground:L.show,backgroundStyle:{color:(Yt=n.customSettings)!=null&&Yt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}}),Qe.length&&(be.push(...Qe.map((Ke,Nt)=>{var mn,pn,Ln,gi,pi,Wa,Jr,el;const Yt=_.comboAxisSymbols.filter(so=>so.name===Ke);return{show:!0,type:"value",name:Ke,min:0,position:Nt>1?"left":"right",offset:Nt>0?60:0,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none",lineStyle:{color:e==null?void 0:e[n.comboBarList.length+Nt]}},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((pn=(mn=n.labelSettings)==null?void 0:mn.YAxisStyle)==null?void 0:pn.color)||"#000000",fontSize:((gi=(Ln=n.labelSettings)==null?void 0:Ln.YAxisStyle)==null?void 0:gi.size)||14,fontWeight:((Wa=(pi=n.labelSettings)==null?void 0:pi.YAxisStyle)==null?void 0:Wa.weight)||400,fontFamily:(el=(Jr=n.labelSettings)==null?void 0:Jr.YAxisStyle)==null?void 0:el.family,formatter:so=>{var Co,As;return so===null||so===0?"0":Dn(Tn(so,_.numberFormatter),((Co=Yt[0])==null?void 0:Co.prefix)||"",((As=Yt[0])==null?void 0:As.suffix)||"")}}}})),rt.push(...Qe.map((Ke,Nt)=>{var Yt;return{type:"line",yAxisIndex:Nt+1,data:t.map(mn=>mn[Ke]),name:Ke,label:{show:x.show,position:x.position,formatter(mn){var pn,Ln;return Dn(Tn(mn.data,_.numberFormatter),(pn=_.comboAxisSymbols[Nt])==null?void 0:pn.prefix,(Ln=_.comboAxisSymbols[Nt])==null?void 0:Ln.suffix)}},showBackground:L.show,backgroundStyle:{color:(Yt=n.customSettings)!=null&&Yt.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})))):(be=(de=n.yAxisList)==null?void 0:de.map((Ke,Nt)=>{var mn,pn,Ln,gi,pi,Wa,Jr,el;const Yt=_.comboAxisSymbols.filter(so=>so.name===Ke);return{show:!0,type:"value",name:Ke,min:0,position:Nt>2?"left":"",offset:Nt>1?60:0,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none",lineStyle:{color:e==null?void 0:e[Nt]}},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((pn=(mn=n.labelSettings)==null?void 0:mn.YAxisStyle)==null?void 0:pn.color)||"#000000",fontSize:((gi=(Ln=n.labelSettings)==null?void 0:Ln.YAxisStyle)==null?void 0:gi.size)||14,fontWeight:((Wa=(pi=n.labelSettings)==null?void 0:pi.YAxisStyle)==null?void 0:Wa.weight)||400,fontFamily:(el=(Jr=n.labelSettings)==null?void 0:Jr.YAxisStyle)==null?void 0:el.family,formatter:so=>{var Co,As;return so===null||so===0?"0":Dn(Tn(so,_.numberFormatter),((Co=Yt[0])==null?void 0:Co.prefix)||"",((As=Yt[0])==null?void 0:As.suffix)||"")}}}}),rt=(se=n.yAxisList)==null?void 0:se.map((Ke,Nt)=>{var Yt,mn,pn;return{type:(Yt=n==null?void 0:n.comboBarList)!=null&&Yt.includes(Ke)?"bar":"line",..._.isStackBar&&((mn=n==null?void 0:n.comboBarList)!=null&&mn.includes(Ke))?{stack:"x"}:{yAxisIndex:Nt},data:t.map(Ln=>Ln[Ke]),name:Ke,label:{show:x.show,position:x.position,formatter(Ln){var gi,pi;return Dn(Tn(Ln.data,_.numberFormatter),(gi=_.comboAxisSymbols[Nt])==null?void 0:gi.prefix,(pi=_.comboAxisSymbols[Nt])==null?void 0:pi.suffix)}},showBackground:L.show,backgroundStyle:{color:(pn=n.customSettings)!=null&&pn.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})),Object.assign(E,{...E,grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},backgroundColor:(Ue=n.customSettings)!=null&&Ue.enableBackgroundGradient?u:"",toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,formatter:Ke=>Xf(Ke,n),axisPointer:{type:"cross",crossStyle:{color:"#999"}}},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(Ke=>Ke.label),formatter(Ke){return`{a|${bi(Ke,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Ke){return Ke.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},xAxis:[{type:"category",data:c,axisPointer:{type:"shadow"},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((hr=(gn=n.labelSettings)==null?void 0:gn.XAxisStyle)==null?void 0:hr.color)||"#000000",fontSize:((ea=(Yn=n.labelSettings)==null?void 0:Yn.XAxisStyle)==null?void 0:ea.size)||14,fontWeight:((Qo=(zi=n.labelSettings)==null?void 0:zi.XAxisStyle)==null?void 0:Qo.weight)||400,fontFamily:(uf=(hc=n.labelSettings)==null?void 0:hc.XAxisStyle)==null?void 0:uf.family,formatter(Ke){return bi(Ke,x.truncateLabelValue||14)}}}],yAxis:be,series:rt});break}case Ce.pie:{const be=()=>{var Nt,Yt,mn;return{type:"pie",radius:"80%",data:(f==null?void 0:f.map((pn,Ln)=>({value:pn.data,name:c[Ln]||"undefined"})))||[],selectedMode:(Nt=n.customSettings)==null?void 0:Nt.selectedMode,selectedOffset:(Yt=n.customSettings)==null?void 0:Yt.selectedOffset,label:{show:x.show},labelLine:{show:(mn=n.labelSettings)==null?void 0:mn.showLabelLine,smooth:.2,length:10,length2:20}}},Qe=()=>{let Ke=100;const Nt=[];return f==null||f.map(Yt=>{const mn=[];let pn=0;Yt.data.map(Ln=>{const gi={value:Ln,name:c[pn]};mn.push(gi),pn+=1}),Nt.push([Yt.label,mn])}),Nt.map(Yt=>{var mn,pn,Ln;return Ke-=20,{name:Yt[0],type:"pie",radius:`${Ke}%`,data:Yt[1],selectedMode:(mn=n.customSettings)==null?void 0:mn.selectedMode,selectedOffset:(pn=n.customSettings)==null?void 0:pn.selectedOffset,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:x.show,position:x.position,formatter(gi){return Dn(Tn(gi.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},labelLine:{show:(Ln=n.labelSettings)==null?void 0:Ln.showLabelLine,smooth:.2,length:10,length2:20}}})},rt=f!=null&&f.length&&((Vw=(Bw=f[0])==null?void 0:Bw.data)==null?void 0:Vw.length)>1?Qe():be();Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Eg=n.customSettings)!=null&&Eg.enableBackgroundGradient?u:"",tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:Ke=>Dn(Tn(Ke,_.numberFormatter),_.labelPrefix,_.labelSuffix)},legend:{data:f!=null&&f.length&&((A0=(Ig=f[0])==null?void 0:Ig.data)==null?void 0:A0.length)>1||f==null?void 0:f[0],show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(Ke){return`{a|${bi(Ke,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Ke){return Ke.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:rt});break}case Ce.rose:{const be=()=>{var Nt,Yt,mn,pn;return{type:"pie",radius:"80%",data:(f==null?void 0:f.map((Ln,gi)=>({value:Ln.data,name:c[gi]||"undefined"})))||[],roseType:((Nt=n.customSettings)==null?void 0:Nt.roseType)||"radius",selectedMode:(Yt=n.customSettings)==null?void 0:Yt.selectedMode,selectedOffset:(mn=n.customSettings)==null?void 0:mn.selectedOffset,label:{show:x.show},labelLine:{show:(pn=n.labelSettings)==null?void 0:pn.showLabelLine,smooth:.2,length:10,length2:20}}},Qe=()=>{let Ke=100;const Nt=[];return f==null||f.map(Yt=>{const mn=[];let pn=0;Yt.data.map(Ln=>{const gi={value:Ln,name:c[pn]};mn.push(gi),pn+=1}),Nt.push([Yt.label,mn])}),Nt.map(Yt=>{var mn,pn,Ln,gi;return Ke-=20,{name:Yt[0],type:"pie",radius:`${Ke}%`,data:Yt[1],selectedMode:(mn=n.customSettings)==null?void 0:mn.selectedMode,selectedOffset:(pn=n.customSettings)==null?void 0:pn.selectedOffset,roseType:((Ln=n.customSettings)==null?void 0:Ln.roseType)||"radius",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:x.show,position:x.position,formatter(pi){return`${pi.name}: ${Dn(Tn(pi.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}`}},labelLine:{show:(gi=n.labelSettings)==null?void 0:gi.showLabelLine,smooth:.2,length:10,length2:20}}})},rt=f!=null&&f.length&&((I0=(E0=f[0])==null?void 0:E0.data)==null?void 0:I0.length)>1?Qe():be();Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Ng=n.customSettings)!=null&&Ng.enableBackgroundGradient?u:"",tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:Ke=>Dn(Tn(Ke,_.numberFormatter),_.labelPrefix,_.labelSuffix)},legend:{data:f!=null&&f.length&&((Hw=(Au=f[0])==null?void 0:Au.data)==null?void 0:Hw.length)>1||f==null?void 0:f[0],show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(Ke){return`{a|${bi(Ke,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Ke){return Ke.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:rt});break}case Ce.doughnut:{const be=()=>{var Nt;const Ke=f==null?void 0:f.map((Yt,mn)=>({value:Yt.data,name:c[mn]||"undefined"}));return{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:x.show,position:x.position,formatter(Yt){return Dn(Tn(Yt.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},data:Ke||[],labelLine:{show:(Nt=n.labelSettings)==null?void 0:Nt.showLabelLine,smooth:.2,length:10,length2:20}}},Qe=()=>{const Ke=[];let Nt=70,Yt=100;return f==null||f.map(mn=>{const pn=[];let Ln=0;mn.data.map(gi=>{const pi={value:gi,name:c[Ln]};pn.push(pi),Ln+=1}),Ke.push([mn.label,pn])}),Ke.map(mn=>{var pn;return Nt-=20,Yt-=20,{name:mn[0],type:"pie",radius:[`${Nt}%`,`${Yt}%`],avoidLabelOverlap:!1,label:{show:x.show,position:x.position,formatter(Ln){return Dn(Tn(Ln.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},data:mn[1],labelLine:{show:(pn=n.labelSettings)==null?void 0:pn.showLabelLine,smooth:.2,length:10,length2:20}}})},rt=c.length>1?Qe():be();Object.assign(E,{toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:Ke=>Dn(Tn(Ke,_.numberFormatter),_.labelPrefix,_.labelSuffix)},backgroundColor:(Lg=n.customSettings)!=null&&Lg.enableBackgroundGradient?u:"",legend:{data:c.length>1||f==null?void 0:f[0],show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(Ke){return`{a|${bi(Ke,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Ke){return Ke.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:rt});break}case Ce.row:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Ip=n.customSettings)!=null&&Ip.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Ww=(kg=n.labelSettings)==null?void 0:kg.XAxisStyle)==null?void 0:Ww.color)||"#000000",fontSize:((N0=(Np=n.labelSettings)==null?void 0:Np.XAxisStyle)==null?void 0:N0.size)||14,fontWeight:((Eu=(Zo=n.labelSettings)==null?void 0:Zo.XAxisStyle)==null?void 0:Eu.weight)||400,fontFamily:(Al=(wa=n.labelSettings)==null?void 0:wa.XAxisStyle)==null?void 0:Al.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},yAxis:{type:"category",data:c,position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Lp=(cf=n.labelSettings)==null?void 0:cf.YAxisStyle)==null?void 0:Lp.color)||"#000000",fontSize:((ad=(L0=n.labelSettings)==null?void 0:L0.YAxisStyle)==null?void 0:ad.size)||14,fontWeight:((R0=(k0=n.labelSettings)==null?void 0:k0.YAxisStyle)==null?void 0:R0.weight)||400,fontFamily:(od=(kp=n.labelSettings)==null?void 0:kp.YAxisStyle)==null?void 0:od.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},series:f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"bar",name:be.label,barWidth:`${_.barWidth}%`,emphasis:{focus:"series"},label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius,..._.coloredBars?{color:rt=>e==null?void 0:e[rt.dataIndex%e.length]}:{}}}})});break}case Ce.histogram:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Uw=n.customSettings)!=null&&Uw.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},xAxis:[{type:"category",data:c,axisTick:{alignWithLabel:!0},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((O0=(Gw=n.labelSettings)==null?void 0:Gw.XAxisStyle)==null?void 0:O0.color)||"#000000",fontSize:(($0=(P0=n.labelSettings)==null?void 0:P0.XAxisStyle)==null?void 0:$0.size)||14,fontWeight:((sd=(fh=n.labelSettings)==null?void 0:fh.XAxisStyle)==null?void 0:sd.weight)||400,fontFamily:(ud=(ld=n.labelSettings)==null?void 0:ld.XAxisStyle)==null?void 0:ud.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}}],yAxis:[{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Rg=(j0=n.labelSettings)==null?void 0:j0.YAxisStyle)==null?void 0:Rg.color)||"#000000",fontSize:((Pg=(Og=n.labelSettings)==null?void 0:Og.YAxisStyle)==null?void 0:Pg.size)||14,fontWeight:((F0=(z0=n.labelSettings)==null?void 0:z0.YAxisStyle)==null?void 0:F0.weight)||400,fontFamily:(Yw=(B0=n.labelSettings)==null?void 0:B0.YAxisStyle)==null?void 0:Yw.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}}],series:[{name:(Qw=f==null?void 0:f[0])==null?void 0:Qw.label,type:"bar",barWidth:"100%",data:(Zw=f==null?void 0:f[0])==null?void 0:Zw.data,label:{show:x.show,position:x.position,formatter(be){return Tn(be.data,_.numberFormatter)}},showBackground:L.show,backgroundStyle:{color:(V0=n.customSettings)!=null&&V0.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{..._.coloredBars?{color:be=>e==null?void 0:e[be.dataIndex%e.length]}:{}}}]});break}case Ce.funnel:{let be=0;if(d.length>=1&&typeof d[0].value=="number")for(let Qe=0;Qe<d.length;Qe+=1)d[Qe].value>be&&(be=d[Qe].value);Object.assign(E,{...E,tooltip:{trigger:"item",className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,formatter:_.showConversionRate?Qe=>{var Ke,Nt;let rt=100;return Qe.dataIndex>0&&(rt=(((Ke=d[Qe.dataIndex])==null?void 0:Ke.value)||0)/(((Nt=d[Qe.dataIndex-1])==null?void 0:Nt.value)||1)*100),`${Qe.name}: ${rt.toFixed(0)}%`}:_.showLabelValues?"{b}: {c}":_.labelFormat||"{b}",backgroundColor:"black",textStyle:{color:"white"}},backgroundColor:(Xw=n.customSettings)!=null&&Xw.enableBackgroundGradient?u:"",legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:d,formatter(Qe){return`{a|${bi(Qe,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(Qe){return Qe.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:[{name:"Funnel",type:"funnel",left:"10%",progressive:1e3,progressiveThreshold:3e3,top:60,bottom:60,width:"80%",height:"70%",min:0,max:be,sort:"descending",gap:((Zs=n.customSettings)==null?void 0:Zs.stepPadding)||10,itemStyle:(dh=n.customSettings)!=null&&dh.showFunnelShadow?{borderColor:"#fff",borderWidth:1,shadowBlur:20,shadowColor:"rgba(0, 0, 0, 0.3)",shadowOffsetY:10}:{},emphasis:{itemStyle:{shadowBlur:30,shadowColor:"rgba(0, 0, 0, 0.5)",shadowOffsetY:15}},label:{show:x.show,position:x.position,formatter:_.showConversionRate?Qe=>{var Ke,Nt;let rt=100;return Qe.dataIndex>0&&(rt=(((Ke=d[Qe.dataIndex])==null?void 0:Ke.value)||0)/(((Nt=d[Qe.dataIndex-1])==null?void 0:Nt.value)||1)*100),`${Qe.name}: ${rt.toFixed(0)}%`}:_.showLabelValues?"{b}: {c}":_.labelFormat||"{b}"},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},data:(d==null?void 0:d.length)>20?d.slice(0,20):d}]});break}case Ce.gauge:{const be=((H0=n==null?void 0:n.gaugeSettings)==null?void 0:H0.metric)||"",Qe=((W0=n.gaugeSettings)==null?void 0:W0.dimensions)||[],rt=[],Ke=[];let Nt,Yt=0,mn=!1;if(t.length===1&&(Nt=t[0],mn=Object.keys(Nt).every(pn=>typeof Nt[pn]=="number"),mn&&(Yt=Nt[be],rt.push({value:Nt[be],name:be,title:{show:!1},detail:{show:!1}}))),t.length!==1&&be.length){const pn=t[0][be];mn=!0,Yt=pn,rt.push({value:pn,name:be,title:{show:!1},detail:{show:!1}})}if(be.length&&Qe.length){const Ln=xF(t,Qe,[be])[be],gi=Ln.length;for(let pi=0;pi<gi;pi+=1)if(Ke.includes(Ln[pi].name)){for(let Wa=0;Wa<rt.length;Wa+=1)if(rt[Wa].value===Ln[pi].name){rt[Wa].name+=`, (${Ln[pi].parent.replaceAll("/",",")})`;break}}else{Ke.push(Ln[pi].name);const Wa={value:Ln[pi].name,name:`(${Ln[pi].parent.replaceAll("/",",")})`,title:{show:!1},detail:{show:!1}};rt.push(Wa)}}Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(U0=n.customSettings)!=null&&U0.enableBackgroundGradient?u:"",legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",formatter(pn){return`{a|${bi(pn,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(pn){return pn.name},backgroundColor:"black",textStyle:{color:"white"}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},tooltip:{show:!0,backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0},series:[{type:"gauge",startAngle:190,endAngle:-10,center:["50%","75%"],radius:"100%",anchor:{show:!0,showAbove:!0,size:12,itemStyle:{color:"#FAC858"}},pointer:{length:"100%",width:rt.length===1?10:4},axisLine:{lineStyle:{width:30,color:a}},axisTick:{show:!0,distance:-30,length:8,lineStyle:{color:"#fff",width:2}},splitLine:{distance:-30,length:30,lineStyle:{color:"#fff",width:4}},axisLabel:{distance:-20,color:"#999",rotate:5,fontSize:10,formatter(pn){return Dn(Tn(pn,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},data:rt,title:{fontSize:14},min:0,max:mn?Yt+Yt/2:Math.max(...Ke)+Math.min(...Ke),detail:{width:40,height:14,fontSize:14,color:"#fff",backgroundColor:"inherit",borderRadius:3,formatter:"{value}%"}}]});break}case Ce.sankey:{if((Rp=n.sankeyValues)!=null&&Rp.length){const[be,Qe,rt]=n.sankeyValues,{links:Ke,nodes:Nt}=U$e({data:t,source:be,target:Qe,value:rt});Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Iu=n.customSettings)!=null&&Iu.enableBackgroundGradient?u:"",tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,valueFormatter:Yt=>Dn(Tn(Yt,_.numberFormatter),_.labelPrefix,_.labelSuffix)},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:Nt,label:{show:x.show,position:x.position,formatter:x.truncateLabelValue?Yt=>bi(Yt.data.name,x.truncateLabelValue||14):void 0},links:Ke,showBackground:L.show,backgroundStyle:{color:(Op=n.customSettings)!=null&&Op.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})}break}case Ce.singleValue:{const be=h[0]&&Dn(Tn(h[0],_.numberFormatter),_.labelPrefix,_.labelSuffix),Qe=(G0=t==null?void 0:t[_.comparisonTimePeriod||0])==null?void 0:G0[(n==null?void 0:n.singleValue)||""],rt=h!=null&&h[0]?`${(((h==null?void 0:h[0])-Qe)/Qe*100).toFixed(2)} %`:null,Ke=_.comparisonValueShow&&_.comparisonTimePeriod&&_.comparisonTimePeriod>0&&_.comparisonTimeGrain!=="NONE"&&(n==null?void 0:n.singleValue)&&((El=t==null?void 0:t[0])==null?void 0:El._timestamp);Object.assign(E,{settings:{fontSize:_.fontSize||30,subHeaderFontSize:_.subHeaderFontSize||14,subHeaderShow:_.subHeaderShow||!1,displayText:_.displayText||"",comparisonTimePeriod:_.comparisonTimePeriod||30,comparisonTimeColumn:_.comparisonTimeColumn||"",comparisonValueShow:_.comparisonValueShow||!1,comparisonValueFontSize:_.comparisonValueFontSize||12,comparisonTimeGrain:_.comparisonTimeGrain||"",comparisonSuffix:_.comparisonSuffix||"",fontColor:_.singleValueFontColor||"#000000",suffix:_.singleValueSuffix||"",prefix:_.singleValuePrefix||""},value:be,comparisonValue:Ke?rt:void 0,trendLineOptions:rt&&_.isShowTrendLine?{...E,tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0},grid:{left:"0%",bottom:"0%",top:"0%",right:"0%",containLabel:!0},toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},xAxis:{type:"category",boundaryGap:!1,splitLine:{show:!1},axisLine:{show:!1},axisLabel:{show:!1}},yAxis:{type:"value",position:A.axis,splitLine:{show:!1},axisLine:{show:!1},axisLabel:{show:!1}},color:e,legend:{show:!1},series:[{data:t==null?void 0:t.map(Nt=>[Nt==null?void 0:Nt._timestamp,Nt==null?void 0:Nt[n.singleValue||""]]),type:"line",smooth:.6,symbol:"none",lineStyle:{color:"#5470C6",width:5},areaStyle:{},name:(n==null?void 0:n.singleValue)||"total",label:{show:!1}}]}:void 0});break}case Ce.waterfall:{let be;if(f!=null&&f.length){const Qe=($g=f[0])==null?void 0:$g.data,rt=[Qe[0]];if(Qe.length)for(let Ke=1;Ke<Qe.length-1;Ke++)rt.push(rt[Ke-1]-Qe[Ke]);rt.push(Qe[Qe.length-1]),be={labels:c,datasets:[Qe,rt]}}Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(hh=n.customSettings)!=null&&hh.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,formatter(Qe){const rt=Qe[1];return`${rt.name}<br/>${Dn(Tn(rt.value,_.numberFormatter),_.labelPrefix,_.labelSuffix)}`}},dataZoom:wu($),grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:be==null?void 0:be.labels,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Y0=(jg=n.labelSettings)==null?void 0:jg.XAxisStyle)==null?void 0:Y0.color)||"#000000",fontSize:((ff=(Pp=n.labelSettings)==null?void 0:Pp.XAxisStyle)==null?void 0:ff.size)||14,fontWeight:((Fg=(zg=n.labelSettings)==null?void 0:zg.XAxisStyle)==null?void 0:Fg.weight)||400,fontFamily:(Bg=(Va=n.labelSettings)==null?void 0:Va.XAxisStyle)==null?void 0:Bg.family,formatter(Qe){return bi(Qe,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Z0=(Q0=n.labelSettings)==null?void 0:Q0.YAxisStyle)==null?void 0:Z0.color)||"#000000",fontSize:((q0=(X0=n.labelSettings)==null?void 0:X0.YAxisStyle)==null?void 0:q0.size)||14,fontWeight:((Nu=(J0=n.labelSettings)==null?void 0:J0.YAxisStyle)==null?void 0:Nu.weight)||400,fontFamily:(df=(ph=n.labelSettings)==null?void 0:ph.YAxisStyle)==null?void 0:df.family,formatter:Qe=>Qe===null||Qe===0?"0":Dn(Tn(Qe,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:be==null?void 0:be.datasets[1],showBackground:L.show,backgroundStyle:{color:(qw=n.customSettings)!=null&&qw.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}},{name:"Life Cost",type:"bar",stack:"Total",label:{show:x.show,position:x.position,formatter(Qe){return Dn(Tn(Qe.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},data:be==null?void 0:be.datasets[0]}]});break}case Ce.horizontalStack:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(vh=n.customSettings)!=null&&vh.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Jw=(gh=n.labelSettings)==null?void 0:gh.XAxisStyle)==null?void 0:Jw.color)||"#000000",fontSize:(($p=(K0=n.labelSettings)==null?void 0:K0.XAxisStyle)==null?void 0:$p.size)||14,fontWeight:((pc=(Ai=n.labelSettings)==null?void 0:Ai.XAxisStyle)==null?void 0:pc.weight)||400,fontFamily:(cd=(Lu=n.labelSettings)==null?void 0:Lu.XAxisStyle)==null?void 0:cd.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},yAxis:{type:"category",data:c,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},position:A.axis,axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((jp=(eb=n.labelSettings)==null?void 0:eb.YAxisStyle)==null?void 0:jp.color)||"#000000",fontSize:((yh=(mh=n.labelSettings)==null?void 0:mh.YAxisStyle)==null?void 0:yh.size)||14,fontWeight:((Vg=(hf=n.labelSettings)==null?void 0:hf.YAxisStyle)==null?void 0:Vg.weight)||400,fontFamily:(Kw=(Hg=n.labelSettings)==null?void 0:Hg.YAxisStyle)==null?void 0:Kw.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},series:f==null?void 0:f.map(be=>{var Qe;return{data:be.data,type:"bar",stack:"x",name:be.label,barWidth:`${_.barWidth}%`,emphasis:{focus:"series"},label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_.barRadius}}})});break}case Ce.table:{const be=[];if(f){const Qe=[],rt=[];f.map(Ke=>{Qe.push(Ke.label),rt.push(Ke.data)});for(let Ke=0;Ke<((Wg=rt[0])==null?void 0:Wg.length);Ke+=1){const Nt={};for(let Yt=0;Yt<Qe.length;Yt+=1)Nt[Qe[Yt]]=rt[Yt][Ke];be.push(Nt)}}Object.assign(E,{data:be,tableSettings:T});break}case Ce.horizontalStackTable:{const be=[];if(f){const Qe=[],rt=[];f.map(Ke=>{Qe.push(Ke.label),rt.push(Ke.data)});for(let Ke=0;Ke<((zp=rt[0])==null?void 0:zp.length);Ke+=1){const Nt={};for(let Yt=0;Yt<Qe.length;Yt+=1)Nt[Qe[Yt]]=rt[Yt][Ke];be.push(Nt)}}Object.assign(E,{data:be,tableSettings:T,colors:e});break}case Ce.pivot:{Object.assign(E,{pivotTableSettings:k});break}case Ce.treeMap:{const be=QQ;Object.assign(E,{...E,tooltip:{backgroundColor:"black",textStyle:{color:"white"},formatter(rt){const Ke=rt.value,Nt=rt.treePathInfo,Yt=[];for(let mn=1;mn<Nt.length;mn++)Yt.push(Nt[mn].name);return[`<div>${be.encodeHTML(Yt.join("-"))}</div>`,`value: ${be.addCommas(Ke)}`].join("")}},series:[{type:"treemap",visibleMin:600,label:{show:!0,formatter:"{b}"},upperLabel:{show:!0,height:30},itemStyle:{borderColor:"#fff"},levels:(()=>[{itemStyle:{borderWidth:0,gapWidth:5}},{itemStyle:{gapWidth:1}},{colorSaturation:[.35,.5],itemStyle:{gapWidth:1,borderColorSaturation:.6}}])(),data:y}]});break}case Ce.stepped:{const be=["start","middle","end"];let Qe=2;Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Fp=n.customSettings)!=null&&Fp.enableBackgroundGradient?u:"",tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:rt=>Dn(Tn(rt,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:rt=>Xf(rt,n)},dataZoom:wu($),legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(rt=>rt.label),formatter(rt){return`{a|${bi(rt,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(rt){return rt.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((pf=(Ug=n.labelSettings)==null?void 0:Ug.XAxisStyle)==null?void 0:pf.color)||"#000000",fontSize:((vf=(bh=n.labelSettings)==null?void 0:bh.XAxisStyle)==null?void 0:vf.size)||14,fontWeight:((Gg=(tb=n.labelSettings)==null?void 0:tb.XAxisStyle)==null?void 0:Gg.weight)||400,fontFamily:(e1=(Yg=n.labelSettings)==null?void 0:Yg.XAxisStyle)==null?void 0:e1.family,formatter(rt){return bi(rt,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((Il=(vc=n.labelSettings)==null?void 0:vc.YAxisStyle)==null?void 0:Il.color)||"#000000",fontSize:((gc=(Sh=n.labelSettings)==null?void 0:Sh.YAxisStyle)==null?void 0:gc.size)||14,fontWeight:((gf=(ru=n.labelSettings)==null?void 0:ru.YAxisStyle)==null?void 0:gf.weight)||400,fontFamily:(Qg=(ku=n.labelSettings)==null?void 0:ku.YAxisStyle)==null?void 0:Qg.family,formatter:rt=>rt===null||rt===0?"0":Dn(Tn(rt,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},series:f==null?void 0:f.map(rt=>{var Ke;return Qe===0?Qe=1:Qe===1?Qe=2:Qe=0,{name:rt.label,type:"line",step:be[Qe],data:rt.data,areaStyle:{},label:{show:x.show,position:x.position,formatter(Nt){return Dn(Tn(Nt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Ke=n.customSettings)!=null&&Ke.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})});break}case Ce.scatter:{Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(t1=n.customSettings)!=null&&t1.enableBackgroundGradient?u:"",grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,formatter:be=>Xf(be,n)},dataZoom:wu($),xAxis:{type:"category",data:c,splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((Xs=(Zg=n.labelSettings)==null?void 0:Zg.XAxisStyle)==null?void 0:Xs.color)||"#000000",fontSize:((fd=(wh=n.labelSettings)==null?void 0:wh.XAxisStyle)==null?void 0:fd.size)||14,fontWeight:((mc=(Nn=n.labelSettings)==null?void 0:Nn.XAxisStyle)==null?void 0:mc.weight)||400,fontFamily:(lr=(Fi=n.labelSettings)==null?void 0:Fi.XAxisStyle)==null?void 0:lr.family,formatter(be){return bi(be,x.truncateLabelValue||14)}}},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((hi=(ai=n.labelSettings)==null?void 0:ai.YAxisStyle)==null?void 0:hi.color)||"#000000",fontSize:((Qn=(iu=n.labelSettings)==null?void 0:iu.YAxisStyle)==null?void 0:Qn.size)||14,fontWeight:((Xo=(sa=n.labelSettings)==null?void 0:sa.YAxisStyle)==null?void 0:Xo.weight)||400,fontFamily:(Yi=(qs=n.labelSettings)==null?void 0:qs.YAxisStyle)==null?void 0:Yi.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:f==null?void 0:f.map(be=>be.label),formatter(be){return`{a|${bi(be,M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:f==null?void 0:f.map(be=>{var Qe;return{symbolSize:10,data:be.data,type:"scatter",name:be.label,label:{show:x.show,position:x.position,formatter(rt){return Dn(Tn(rt.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},showBackground:L.show,backgroundStyle:{color:(Qe=n.customSettings)!=null&&Qe.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"}}})});break}case Ce.timeSeries:{if(!i)break;Object.assign(E,{...E,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},backgroundColor:(Js=n.customSettings)!=null&&Js.enableBackgroundGradient?u:"",grid:{left:`${S.marginLeft}%`,bottom:`${S.marginBottom}%`,top:`${S.marginTop}%`,right:`${S.marginRight}%`,containLabel:!0},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none"},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},className:"getChartOptions-tooltip",confine:!0,appendToBody:!0,enterable:!0,valueFormatter:be=>Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix),formatter:be=>Xf(be,n)},dataZoom:wu($),xAxis:{type:"category",axisTick:{alignWithLabel:!0},axisLabel:{show:_.axisLabels==="y"||_.axisLabels==="none",color:((_h=(yc=n.labelSettings)==null?void 0:yc.XAxisStyle)==null?void 0:_h.color)||"#000000",fontSize:((nb=(Bp=n.labelSettings)==null?void 0:Bp.XAxisStyle)==null?void 0:nb.size)||14,fontWeight:((Ha=(Ts=n.labelSettings)==null?void 0:Ts.XAxisStyle)==null?void 0:Ha.weight)||400,fontFamily:(Xg=(xh=n.labelSettings)==null?void 0:xh.XAxisStyle)==null?void 0:Xg.family,interval:0,rotate:_.xRotation,hideOverlap:!0,formatter(be){return bi(be||"",x.truncateLabelValue||14)}},splitLine:{show:_.hideSplitLines==="horizontal"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="y"||_.hideAxisLines==="none"},data:g||[]},yAxis:{type:"value",position:A.axis,splitLine:{show:_.hideSplitLines==="vertical"||_.hideSplitLines==="none"},axisLine:{show:_.hideAxisLines==="x"||_.hideAxisLines==="none"},axisLabel:{show:_.axisLabels==="x"||_.axisLabels==="none",color:((qo=(qg=n.labelSettings)==null?void 0:qg.YAxisStyle)==null?void 0:qo.color)||"#000000",fontSize:((Jo=(bc=n.labelSettings)==null?void 0:bc.YAxisStyle)==null?void 0:Jo.size)||14,fontWeight:((dd=(mf=n.labelSettings)==null?void 0:mf.YAxisStyle)==null?void 0:dd.weight)||400,fontFamily:(Mo=(Ko=n.labelSettings)==null?void 0:Ko.YAxisStyle)==null?void 0:Mo.family,formatter:be=>be===null||be===0?"0":Dn(Tn(be,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},legend:{show:M.show,top:M.top,left:M.left,right:M.right,bottom:M.bottom,orient:M.position,icon:M.legendShape,type:"scroll",data:n.isMultiDimension&&n.seriesField!=="ungrouped"?p==null?void 0:p.map(be=>`${be.name}`||"series-bar"):n.yAxisList,formatter(be){return`{a|${bi(be||"",M.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(be){return be.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:n.isMultiDimension&&n.seriesField!=="ungrouped"?b!=null&&b.length?b.map(be=>{var Qe,rt,Ke,Nt,Yt,mn,pn,Ln,gi,pi,Wa,Jr,el;return{data:(be==null?void 0:be.data)||[],type:((rt=(Qe=O==null?void 0:O.seriesType)==null?void 0:Qe[0])==null?void 0:rt.type)==="area"?"line":((Nt=(Ke=O==null?void 0:O.seriesType)==null?void 0:Ke[0])==null?void 0:Nt.type)==="stack"?"bar":((mn=(Yt=O==null?void 0:O.seriesType)==null?void 0:Yt[0])==null?void 0:mn.type)||"bar",name:(be==null?void 0:be.name)||"series",...((Ln=(pn=O==null?void 0:O.seriesType)==null?void 0:pn[0])==null?void 0:Ln.type)==="stack"?{stack:"total"}:{},label:{show:x.show,position:x.position,formatter(so){return Dn(Tn(so.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"},...((pi=(gi=O==null?void 0:O.seriesType)==null?void 0:gi[0])==null?void 0:pi.type)==="area"?{areaStyle:{}}:{areaStyle:{opacity:0}},...((Jr=(Wa=O==null?void 0:O.seriesType)==null?void 0:Wa[0])==null?void 0:Jr.type)==="bar"?{barWidth:`${(_==null?void 0:_.barWidth)||0}%`,showBackground:L==null?void 0:L.show,backgroundStyle:{color:(el=n.customSettings)!=null&&el.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_==null?void 0:_.barRadius}}:{}}}):p.map(be=>{var Qe,rt,Ke,Nt,Yt,mn,pn,Ln,gi,pi,Wa,Jr,el;return{data:(be==null?void 0:be.data)||[],type:((rt=(Qe=O==null?void 0:O.seriesType)==null?void 0:Qe[0])==null?void 0:rt.type)==="area"?"line":((Nt=(Ke=O==null?void 0:O.seriesType)==null?void 0:Ke[0])==null?void 0:Nt.type)==="stack"?"bar":((mn=(Yt=O==null?void 0:O.seriesType)==null?void 0:Yt[0])==null?void 0:mn.type)||"bar",name:(be==null?void 0:be.name)||"series",...((Ln=(pn=O==null?void 0:O.seriesType)==null?void 0:pn[0])==null?void 0:Ln.type)==="stack"?{stack:"total"}:{},label:{show:x.show,position:x.position,formatter(so){return Dn(Tn(so.data,_.numberFormatter),_.labelPrefix,_.labelSuffix)}},emphasis:{focus:"series"},...((pi=(gi=O==null?void 0:O.seriesType)==null?void 0:gi[0])==null?void 0:pi.type)==="area"?{areaStyle:{}}:{areaStyle:{opacity:0}},...((Jr=(Wa=O==null?void 0:O.seriesType)==null?void 0:Wa[0])==null?void 0:Jr.type)==="bar"?{barWidth:`${(_==null?void 0:_.barWidth)||0}%`,showBackground:L==null?void 0:L.show,backgroundStyle:{color:(el=n.customSettings)!=null&&el.isShowBarGradient?l:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:_==null?void 0:_.barRadius}}:{}}}):G$e({dataArray:t,timeStampKey:n.xAxis||"",valuekeys:n.yAxisList||[],type:((Ks=O.seriesType[0])==null?void 0:Ks.type)||"bar",groupBy:(oo=O.groupBySettings)!=null&&oo.value.split("____").length?(Ru=O.groupBySettings)==null?void 0:Ru.value.split("____")[0]:((Ds=O.groupBySettings)==null?void 0:Ds.value)||"monthly",labelSettings:x,backGroundColor:L,customSettings:_,fillXAxis:((Jg=O.groupBySettings)==null?void 0:Jg.fillXAxis)||!1,isCumulativeBar:((Vp=n.customSettings)==null?void 0:Vp.cumulativeBar)||!1})});break}}return E},Z$e=({data:n,pivotTableSettings:t,onChartReady:e})=>{ae.useEffect(()=>{(n!=null&&n.length||t)&&(e==null||e())},[n,e,t]);const r=(t==null?void 0:t.rows)||[],i=(t==null?void 0:t.columns)||[],a=xF(n,i,r);return N.jsx("div",{className:Zf.tableData,children:N.jsx("div",{className:Zf.tableScroll,children:N.jsx("div",{className:Zf.tableSet,children:N.jsxs("table",{role:"grid",border:2,children:[N.jsxs("thead",{children:[N.jsxs("tr",{className:Zf.row,children:[N.jsx("th",{className:Zf.tableHeadCol,children:"metric"}),r.map(o=>N.jsx("td",{colSpan:n.length,rowSpan:1,className:Zf.tableMetricHeadCol,children:o},o))]}),i.map((o,s)=>N.jsxs("tr",{className:Zf.row,children:[N.jsx("td",{className:Zf.tableHeadCol,children:o}),r.map(()=>a[o].map((l,u)=>N.jsx("td",{colSpan:l.count,rowSpan:1,className:Zf.tableHeadCol,children:l.name},u)))]},s))]}),N.jsx("tbody",{children:N.jsxs("tr",{children:[N.jsx("th",{colSpan:1,className:Zf.tableHeadCol,children:"Total (Sum)"}),r.map(o=>a[o].map((s,l)=>N.jsx("td",{role:"gridcell",className:Zf.tableRowCol,children:mg(s.name,!0)},l)))]})})]})})})})},fr={"table-loader-container":"_table-loader-container_1p7zj_1",tableData:"_tableData_1p7zj_7",tableScroll:"_tableScroll_1p7zj_13",tableHeadCol:"_tableHeadCol_1p7zj_19",resizer:"_resizer_1p7zj_25",resizing:"_resizing_1p7zj_37",tableRow:"_tableRow_1p7zj_43",tableRowCol:"_tableRowCol_1p7zj_49",truncateText:"_truncateText_1p7zj_57",row:"_row_1p7zj_65",container:"_container_1p7zj_71",table:"_table_1p7zj_1",previewTable:"_previewTable_1p7zj_83",preview:"_preview_1p7zj_83",searchButton:"_searchButton_1p7zj_95",previewText:"_previewText_1p7zj_101",noData:"_noData_1p7zj_107",error:"_error_1p7zj_113",errorMsg:"_errorMsg_1p7zj_119",tableIcon:"_tableIcon_1p7zj_125",stripedRow:"_stripedRow_1p7zj_131",rowHover:"_rowHover_1p7zj_137",rightBorder:"_rightBorder_1p7zj_143",searchContainer:"_searchContainer_1p7zj_149",sortButton:"_sortButton_1p7zj_155",searchTab:"_searchTab_1p7zj_161",searchTabInput:"_searchTabInput_1p7zj_167",searchTabIcon:"_searchTabIcon_1p7zj_173",noDataHead:"_noDataHead_1p7zj_179",noDataBody:"_noDataBody_1p7zj_185",showSort:"_showSort_1p7zj_191",noSort:"_noSort_1p7zj_197",pagination:"_pagination_1p7zj_203",rowStyle:"_rowStyle_1p7zj_209",rowText:"_rowText_1p7zj_215",rowsDropdown:"_rowsDropdown_1p7zj_221",pageStyle:"_pageStyle_1p7zj_227",buttonContainer:"_buttonContainer_1p7zj_233",button:"_button_1p7zj_233",paginationWrapper:"_paginationWrapper_1p7zj_251",current:"_current_1p7zj_257",textTruncate:"_textTruncate_1p7zj_263",badge:"_badge_1p7zj_269",list:"_list_1p7zj_275",badgeDiv:"_badgeDiv_1p7zj_281",listItem:"_listItem_1p7zj_287",listItemDiv:"_listItemDiv_1p7zj_293",truncateIcon:"_truncateIcon_1p7zj_299",loadMore:"_loadMore_1p7zj_305",loadMoreIcon:"_loadMoreIcon_1p7zj_311",listVal:"_listVal_1p7zj_317"},X$e=({value:n,onChange:t,debounce:e=500,...r})=>{const[i,a]=ae.useState(n);return ae.useEffect(()=>{a(n)},[n]),ae.useEffect(()=>{const o=setTimeout(()=>{t(i)},e);return()=>clearTimeout(o)},[e,t,i]),N.jsxs("div",{className:`${fr.searchTab} ${r.className||""}`,children:[N.jsx("input",{...r,value:i,onChange:o=>a(o.target.value),className:fr.searchTabInput}),i.toString().length?"":N.jsx(d2,{className:fr.searchTabIcon,color:"#C7C7C7",width:"30px",height:"30px"})]})},q$e=n=>N.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...n,children:N.jsx("path",{fill:"currentColor",d:"m16 28l-7-7l1.41-1.41L16 25.17l5.59-5.58L23 21l-7 7zm0-24l7 7l-1.41 1.41L16 6.83l-5.59 5.58L9 11l7-7z"})}),J$e=n=>N.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...n,children:N.jsx("path",{fill:"currentColor",d:"m16 4l7 7l-1.4 1.4L16 6.8l-5.6 5.6L9 11z"})}),K$e=n=>N.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...n,children:N.jsx("path",{fill:"currentColor",d:"m16 28l-7-7l1.4-1.4l5.6 5.6l5.6-5.6L23 21z"})}),eje=ane(),tje=(n,t,e)=>{const r=n.getValue(e),i=t.getValue(e);if(typeof r=="number"&&typeof i=="number")return r<i?-1:1;if(typeof r=="boolean"&&typeof i=="boolean")return r?1:-1;const a=new Date(r),o=new Date(i);return a.toString()!=="Invalid Date"?a.getTime()<o.getTime()?-1:1:r<i?-1:1},fw=({data:n,isLoading:t,error:e,tableSettings:r,tableName:i,className:a="",onColumnSizingChange:o,onChartReady:s,onChangePage:l,isExternalChart:u,isEnableNextBtn:c,isEnablePrevBtn:f,paginationInfo:d={limit:10,offset:0,totalRecords:10},setChartSettings:h,isInfiniteScroll:p,onLoadMore:g,hasMoreData:y})=>{var xe,Ae;const[b,S]=ae.useState(","),[x,M]=ae.useState(",");ae.useEffect(()=>{r!=null&&r.badgeSeparator?S(r.badgeSeparator):S(",")},[r==null?void 0:r.badgeSeparator]),ae.useEffect(()=>{r!=null&&r.listSeparator?M(r.listSeparator):M(",")},[r==null?void 0:r.listSeparator]);const{badgeDivStyle:_,listDivStyle:T,headerStyle:A}=ae.useMemo(()=>{const Se=(r==null?void 0:r.lineGap)==="small"?"1.5rem":(r==null?void 0:r.lineGap)==="medium"?"1.9rem":"2.5rem",Be=(r==null?void 0:r.lineGap)==="small"?"0.7rem":(r==null?void 0:r.lineGap)==="medium"?"0.85":"1rem";return{badgeDivStyle:{width:"100%",height:Se,fontSize:Be,display:"flex",alignItems:"center",justifyContent:r!=null&&r.contentAlignment?`${r.contentAlignment}`:"",gap:1},listDivStyle:{width:"100%",fontSize:Be,display:"flex",alignItems:"start",justifyContent:"center",flexDirection:"column",gap:1,height:"80px",flexWrap:"wrap"},headerStyle:{width:"100%",color:"#182c60",fontSize:Be,height:Se,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"500"}}},[r==null?void 0:r.lineGap,r==null?void 0:r.contentAlignment]),L=(Se,Be,ze)=>{if(Be&&ze&&Object.keys(Be).includes(Se)&&Object.keys(ze).includes(Se))return{backgroundColor:Be[Se],color:ze[Se]};if(Be&&Object.keys(Be).includes(Se))return{backgroundColor:Be[Se]};if(ze&&Object.keys(ze).includes(Se))return{color:ze[Se]}},[O,k]=ae.useState([]),[E,$]=ae.useState({}),[z,P]=ae.useState({label:((xe=Gu.tableSettings)==null?void 0:xe.defaultRowSize)||"10",value:((Ae=Gu.tableSettings)==null?void 0:Ae.defaultRowSize)||"10"}),[F,V]=ae.useState(50),[W,G]=ae.useState(r==null?void 0:r.columnSizing),[Z,Y]=ae.useState(""),[q,te]=ae.useState({pageIndex:0,pageSize:10});ae.useEffect(()=>{o==null||o(W)},[W]),ae.useEffect(()=>{if(!(r!=null&&r.defaultRowSize))return;const Se=O_.find(Be=>Be.value===r.defaultRowSize);if(Se)Number(Se.value)>1e3?P(O_.at(-1)):P(Se);else{const Be=O_.find(ze=>{var dt;return ze.value===((dt=Gu.tableSettings)==null?void 0:dt.defaultRowSize)});P(Be)}},[r==null?void 0:r.defaultRowSize]);const K=ae.useMemo(()=>!n||!Array.isArray(n)?[]:n,[n]),ne=ae.useMemo(()=>Object.keys(K[0]||{}).map(Se=>eje.accessor(Se,{header:()=>Se,cell:Be=>{const ze=Be.row.original[Se];return typeof ze=="object"?JSON.stringify(ze):typeof ze=="boolean"?ze?"true":"false":ze},sortingFn:"manualSorting"})),[K[0]]),oe=une({data:K,columns:ne,state:{sorting:O,globalFilter:Z,pagination:q,...W?{columnSizing:W}:{}},sortingFns:{manualSorting:tje},enableGlobalFilter:!0,onRowSelectionChange:$,onSortingChange:k,getCoreRowModel:one(),getFilteredRowModel:sne(),getSortedRowModel:lne(),onGlobalFilterChange:Y,onPaginationChange:te,manualPagination:!0,debugTable:!1,enableColumnResizing:!0,columnResizeMode:"onChange",onColumnSizingChange:G});ae.useEffect(()=>{oe.setPageSize(Number(z.value))},[z,oe]);const le=ae.useMemo(()=>{const{pageIndex:Se,pageSize:Be}=oe.getState().pagination,ze=Z?oe.getRowModel().rows.length:(n==null?void 0:n.length)||0,dt=ze===0?0:Be*Se+1,ge=ze<=Be*(Se+1)?ze:Be*(Se+1);return{from:dt,to:ge,total:ze}},[Z,n,oe.getState().pagination,oe.getRowModel().rows.length]);let fe;if(u){const Se=mg(d.totalRecords,!0).toString().split(".");Se.length>1&&[...Se[1]].some(Be=>parseInt(Be,10)>0)?fe=mg(d.totalRecords,!0):fe=mg(d.totalRecords,!1)}ae.useEffect(()=>{oe.getIsSomeColumnsVisible()&&(s==null||s())},[oe.getIsSomeColumnsVisible()]);const ce=(Se,Be)=>Be!=null&&Be.includes(Se)?fr.badge:"",pe=(Se,Be)=>Be!=null&&Be.includes(Se)?fr.list:"";return N.jsx("div",{className:`${fr.container} ${a}`,children:N.jsxs("div",{className:fr.previewTable,children:[r!=null&&r.enableTableSearch||r!=null&&r.showTableTitle?N.jsxs("div",{className:r.showTableTitle?fr.preview:fr.searchButton,children:[r.showTableTitle&&N.jsx(St,{styleClass:"font-14c",variant:"h1",className:fr.previewText,children:i}),r.enableTableSearch&&N.jsx(X$e,{value:Z,onChange:Se=>Y(String(Se)),placeholder:"Search"})]}):null,N.jsxs("div",{className:fr.tableData,children:[t&&!(n!=null&&n.length)&&N.jsx("div",{className:fr["table-loader-container"],children:N.jsx(Cp,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(n!=null&&n.length)&&N.jsx(lF,{style:{height:"100%"},children:N.jsxs("table",{className:fr.table,children:[N.jsx("thead",{children:oe.getHeaderGroups().map(Se=>N.jsx("tr",{className:fr.row,children:Se.headers.map(Be=>N.jsxs("th",{className:fr.tableHeadCol,colSpan:Be.colSpan,style:{width:Be.getSize()},children:[N.jsx("button",{onMouseDown:Be.getResizeHandler(),onTouchStart:Be.getResizeHandler(),onDoubleClick:Be.column.resetSize,className:`${fr.resizer} ${Be.column.getIsResizing()?fr.resizing:""}`,type:"button",title:"Resize Column"}),r!=null&&r.enableSorting?N.jsxs("div",{className:Be.column.getCanSort()?fr.sortButton:"",onClick:Be.column.getToggleSortingHandler(),children:[Be.isPlaceholder?null:N.jsx("div",{style:A,children:N.jsx(St,{styleClass:"custom",variant:"p",className:fr.truncateText,children:l0(Be.column.columnDef.header,Be.getContext())})}),N.jsx("div",{children:{asc:N.jsx(J$e,{color:"#182c60"}),desc:N.jsx(K$e,{color:"#182c60"})}[Be.column.getIsSorted()]??N.jsx(q$e,{color:"#182c60"})})]}):N.jsx(N.Fragment,{children:Be.isPlaceholder?null:N.jsx("div",{style:A,children:N.jsx(St,{variant:"p",styleClass:"custom",className:fr.truncateText,children:l0(Be.column.columnDef.header,Be.getContext())})})})]},Be.id))},Se.id))}),N.jsx("tbody",{children:oe.getSortedRowModel().rows.slice(p&&!(r!=null&&r.isServerSidePagination)?0:q.pageSize*q.pageIndex,p&&!(r!=null&&r.isServerSidePagination)?g?void 0:F:q.pageSize*(1+q.pageIndex)).map((Se,Be)=>N.jsx("tr",{className:`${fr.tableRow} ${r!=null&&r.showRowHover?fr.rowHover:""} ${r!=null&&r.enableStripedRows&&Number(Be)%2!==0?fr.stripedRow:""}`,children:Se.getVisibleCells().map(ze=>{var Ve,ft,ut,De,je;let dt=[],ge="",Ee=[];return ce(ze.column.id,r==null?void 0:r.badgeColumns)?(ge=typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):ze.getValue(),ge.toString().includes(b)?dt=ge.toString().split(b):dt=[ge]):pe(ze.column.id,r==null?void 0:r.listColumns)&&(ge=typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):ze.getValue(),ge.toString().includes(x)?(Ee=ge.toString().split((r==null?void 0:r.listSeparator)||","),dt=Ee.length>3?[Ee[0],Ee[1],Ee[2]]:Ee):dt=[ge]),N.jsxs("td",{className:`${fr.tableRowCol} ${r!=null&&r.hideVerticalDivider?"":fr.rightBorder}`,title:typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):`${ze.getValue()}`,children:[!!r&&N.jsx("div",{style:ce(ze.column.id,r.listColumns)?{...T,...vN({rules:((ft=(Ve=r.conditionalFormatting)==null?void 0:Ve.find(({columnName:ye})=>ye===ze.column.id))==null?void 0:ft.rules)||[],value:typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):ze.getValue()})}:{..._,...vN({rules:((De=(ut=r.conditionalFormatting)==null?void 0:ut.find(({columnName:ye})=>ye===ze.column.id))==null?void 0:De.rules)||[],value:typeof ze.getValue()=="object"?JSON.stringify(ze.getValue()):ze.getValue()})},children:ge.toString().includes(b)||ge.toString().includes(x)?N.jsxs(N.Fragment,{children:[dt.map(ye=>{var We;return N.jsx(N.Fragment,{children:ce(ze.column.id,r.badgeColumns)?N.jsx(St,{variant:"p",styleClass:"custom",className:`${fr.truncateText} ${ce(ze.column.id,r.badgeColumns)}`,style:(We=r.badgeColumns)!=null&&We.includes(ze.column.id)?L(ze.column.id,r.badgeColors,r.badgeTextColors):{},children:ye},ye):N.jsxs(St,{variant:"p",styleClass:"custom",className:`${fr.truncateText} ${fr.listItemDiv}`,children:[N.jsx("div",{className:fr.listItem}),N.jsx("div",{className:fr.listVal,children:ye})]},ye)})}),ce(ze.column.id,r.listColumns)&&Ee.length>3&&N.jsx(Cn,{name:"horizontal-more-icon",className:fr.truncateIcon})]}):N.jsx(St,{variant:"p",styleClass:"custom",className:`${fr.truncateText} ${ce(ze.column.id,r.badgeColumns)}`,style:(je=r.badgeColumns)!=null&&je.includes(ze.column.id)?L(ze.column.id,r.badgeColors,r.badgeTextColors):{},children:l0(ze.column.columnDef.cell,ze.getContext())})}),!r&&N.jsx("div",{style:{textAlign:"center",width:"100%"},children:l0(ze.column.columnDef.cell,ze.getContext())})]},ze.id)})},Se.id))})]})}),!(n!=null&&n.length)&&!t&&!e.length&&N.jsxs("div",{className:fr.noData,children:[N.jsx("img",{src:cne,alt:"no-data",width:"400px",height:"400px"}),N.jsx(St,{styleClass:"font-14c",variant:"h1",className:fr.noDataHead,children:"No data tables queried"}),N.jsx(St,{styleClass:"font-14",variant:"p",className:fr.noDataBody,children:"Type your query and input fields beside to generate results and explore data"})]}),e&&N.jsx("div",{className:fr.error,children:N.jsx(St,{styleClass:"primary",className:fr.errorMsg,variant:"p",children:e})})]}),n&&!(r!=null&&r.disablePagination)&&(!p||(r==null?void 0:r.isServerSidePagination))&&N.jsxs("div",{className:fr.pagination,children:[N.jsx("div",{className:fr.rowStyle,children:N.jsx(da,{onChange:Se=>{P(Se),u&&(l==null||l(!1,parseInt(Se.value,10)),h==null||h(Be=>({...Be,tableSettings:{...Be.tableSettings,defaultRowSize:Se.value}})))},selectedOption:z,options:O_,labelVariant:"static",dropdownAbove:!0,buttonClass:fr.rowsDropdown})}),u?N.jsxs("span",{className:fr.pageStyle,children:[d.offset+1,"-",d.offset+n.length," of ",fe]}):N.jsxs("span",{className:fr.pageStyle,children:[le.from,"-",le.to," of ",le.total]}),N.jsxs("div",{className:fr.buttonContainer,children:[N.jsx(Vt,{variant:"custom",type:"button",className:fr.button,onClick:()=>{u?l==null||l(!0):oe.previousPage()},isDisabled:u?!f:le.from<=1,children:"Prev"}),N.jsx(Vt,{variant:"custom",type:"button",className:fr.button,onClick:()=>{u?l==null||l(!1):oe.nextPage()},isDisabled:u?!c:le.to>=le.total,children:"Next"})]})]}),p&&!(r!=null&&r.isServerSidePagination)&&n&&(n.length>F||y&&n.length)?N.jsx(Vt,{variant:"secondary",type:"button",onClick:()=>{g?g():V(Se=>Se+50)},className:fr.loadMore,children:t?N.jsxs(N.Fragment,{children:[N.jsx(Cp,{style:{width:"20px",height:"20px",color:"blue"}})," ","Loading..."]}):N.jsxs(N.Fragment,{children:["Load More"," ",N.jsx(Cn,{name:"double-arrow-left-icon",className:fr.loadMoreIcon})]})}):null]})})},dw=Ne.memo(({chartOptions:n,data:t,events:e,colors:r,config:i,className:a,selectedSeries:o})=>{var p,g;const s=ae.useMemo(()=>JM({chartOptions:n,data:t,colors:r,selectedSeries:o}),[t,n,r,o]),[l,u]=ae.useState(JM({chartOptions:n,data:t,colors:r}));ae.useEffect(()=>{var y;(y=n.customSettings)!=null&&y.showDynamicBehaviour&&n.chartType&&u(JM({chartOptions:n,data:t.slice(0,10),colors:r}))},[n,r,t]),ae.useEffect(()=>{var S;let y=10,b=0;if((S=n.customSettings)!=null&&S.showDynamicBehaviour){const x=setInterval(()=>{if(y>=t.length){clearInterval(x);return}const M=t.slice(b,y+10),_=JM({chartOptions:n,data:M,colors:r});u(_),y+=10,b+=5},1e3);return()=>clearInterval(x)}},[n,t,r]);const[c,f]=ae.useState(!0);ae.useEffect(()=>{f(!1)},[]);const{ref:d,...h}=i||{};return n.chartType===Ce.singleValue?N.jsx(V$e,{...h,value:s.value,settings:s.settings,className:a,comparisonValue:s.comparisonValue,trendLineOptions:s.trendLineOptions,events:e}):n.chartType===Ce.horizontalStackTable?N.jsx(z$e,{...h,data:s.data,rawData:t,error:"",isLoading:!1,tableSettings:s.tableSettings,className:a,stackCols:n.stackTableCols||[],colors:s.colors,showLabels:(p=n.customSettings)==null?void 0:p.showStackLabels}):n.chartType===Ce.table?N.jsx(fw,{...h,data:s.data,error:"",isLoading:!1,tableSettings:s.tableSettings,className:a,isExternalChart:i==null?void 0:i.isExternalChart,onChangePage:i==null?void 0:i.onChangePage,isEnableNextBtn:i==null?void 0:i.isEnableNextBtn,isEnablePrevBtn:i==null?void 0:i.isEnablePrevBtn,paginationInfo:i==null?void 0:i.paginationInfo,setChartSettings:i==null?void 0:i.setChartSettings}):n.chartType===Ce.pivot?N.jsx(Z$e,{...h,data:t,pivotTableSettings:s.pivotTableSettings}):[Ce.bar,Ce.line,Ce.area,Ce.timeSeries].includes(n.chartType)&&((g=n.customSettings)!=null&&g.showDynamicBehaviour)?N.jsx(oN,{style:{width:"100%",height:"100%"},...i,option:{...l},className:a,onEvents:e,notMerge:!0}):N.jsx(oN,{style:{width:"100%",height:"100%"},...i,option:{...s,animation:c},className:a,onEvents:e,notMerge:!0})}),nje=({isShow:n,onCancel:t,...e})=>N.jsx(Kh,{isOpen:n,onClose:t,headerTitle:"Chart Preview",children:N.jsx("div",{className:lhe.fullscreen,children:N.jsx(dw,{...e})})}),oKe={button:"_button_jnm42_1",menu:"_menu_jnm42_7",menuContainer:"_menuContainer_jnm42_13",buttonText:"_buttonText_jnm42_19",buttonIcon:"_buttonIcon_jnm42_25",filterName:"_filterName_jnm42_31",filterDropdown:"_filterDropdown_jnm42_37"},rje=n=>{const t=document.documentElement;n.colors&&Object.entries(n.colors).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-color-${e}`,`${r}`)}),n.border&&Object.entries(n.border).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-border-${e}`,`${r}`)}),n.shadow&&Object.entries(n.shadow).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-shadow-${e}`,`${r}`)}),n.typography&&Object.entries(n.typography).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-typography-${e}`,`${r}`)}),n.breakpoint&&Object.entries(n.breakpoint).forEach(([e,r])=>{e&&r&&t.style.setProperty(`--dbn-breakpoint-${e}`,`${r}`)})},hne=n=>{const t="data:text/csv;charset=utf-8,";if(!n.length)return t;const e=[],r=n[0],i=Object.keys(r);e.push(`S.NO,${i.join(",").toUpperCase()}`),n.forEach((s,l)=>{const u=Object.values(s).map(c=>{if(typeof c=="number")return c;try{if(typeof c=="string"&&(c.includes(",")||c.includes(`
|
|
477
|
+
`)||c.includes("\r")||c.includes('"')))return`"${c.replace(/"/g,'""')}"`}catch{return c}return c});e.push(`${l+1},${u.join(",")}`)});const a=e.join(`
|
|
477
478
|
`);return encodeURI(t+a)},ije=(n,t,e)=>{const r=n.clientX-t.left+5,i=n.clientY-t.top-50,a=t.width-e.width,o=t.height-e.height,s=Math.max(0,Math.min(r,a)),l=Math.max(0,Math.min(i,o));return[s,l]},aje=(n,t,e)=>{n.style.left=`${t}px`,n.style.top=`${e}px`},oje=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch{return{}}else return typeof n=="object"?n:{}},ef={container:"_container_v730k_1",popover:"_popover_v730k_9",button:"_button_v730k_17",buttonOpen:"_buttonOpen_v730k_25",menu:"_menu_v730k_33",enter:"_enter_v730k_41",enterFrom:"_enterFrom_v730k_49",enterTo:"_enterTo_v730k_57",leave:"_leave_v730k_65",leaveFrom:"_leaveFrom_v730k_73",leaveTo:"_leaveTo_v730k_81",center:"_center_v730k_89",top:"_top_v730k_97",bottom:"_bottom_v730k_105",left:"_left_v730k_113",right:"_right_v730k_121","left-top-end":"_left-top-end_v730k_129","right-top-end":"_right-top-end_v730k_137","left-bottom-end":"_left-bottom-end_v730k_145","right-bottom-end":"_right-bottom-end_v730k_153","top-left":"_top-left_v730k_161","top-right":"_top-right_v730k_169","bottom-left":"_bottom-left_v730k_177","bottom-right":"_bottom-right_v730k_185","left-top":"_left-top_v730k_129","left-bottom":"_left-bottom_v730k_145","right-top":"_right-top_v730k_137","right-bottom":"_right-bottom_v730k_153"},rh=({className:n="",menuClass:t="",menuContainerClass:e="",buttonClass:r="",children:i,buttonContent:a,position:o="bottom",isDisabled:s})=>{const[l,u]=ae.useState(!1);return N.jsx(N.Fragment,{children:N.jsxs("div",{className:`${ef.container} ${n}`,onBlur:c=>{c.currentTarget.contains(c.relatedTarget)||u(!1)},tabIndex:-1,children:[N.jsx("div",{role:"button",tabIndex:0,onKeyDown:()=>{},className:`${r} ${l?ef.buttonOpen:""} ${ef.button}`,onClick:()=>!s&&u(c=>!c),children:a}),s?null:N.jsx("div",{className:`${ef.popover} ${ef[o]} ${e}`,children:N.jsx(CD,{as:"div",className:`${ef.menu} ${t}`,show:l,enter:ef.enter,enterFrom:ef.enterFrom,enterTo:ef.enterTo,leave:ef.leave,leaveFrom:ef.leaveFrom,leaveTo:ef.leaveTo,children:i})})]})})},sje=n=>["IN","NOT IN"].includes(n),lje=n=>["IS NULL","IS NOT NULL"].includes(n),sr={container:"_container_51ubv_1",form:"_form_51ubv_7",filterHeader:"_filterHeader_51ubv_23",titleContent:"_titleContent_51ubv_29",title:"_title_51ubv_29",buttons:"_buttons_51ubv_41",apply:"_apply_51ubv_47",applyIcon:"_applyIcon_51ubv_53",reset:"_reset_51ubv_59",filterFieldsContainer:"_filterFieldsContainer_51ubv_67",filterFields:"_filterFields_51ubv_67",filterContainer:"_filterContainer_51ubv_91",AddFilter:"_AddFilter_51ubv_97",filterDropdown:"_filterDropdown_51ubv_103",filterDropdowns:"_filterDropdowns_51ubv_111",noFilters:"_noFilters_51ubv_111",gridColAndRow:"_gridColAndRow_51ubv_127",gridCol1:"_gridCol1_51ubv_135",gridCol2:"_gridCol2_51ubv_143",gridCol3:"_gridCol3_51ubv_151",filters:"_filters_51ubv_159",filterItem:"_filterItem_51ubv_165",filterItemOperator:"_filterItemOperator_51ubv_171",remove:"_remove_51ubv_177",filterCol:"_filterCol_51ubv_183",filterText:"_filterText_51ubv_189",smallText:"_smallText_51ubv_195",numberFieldPopup:"_numberFieldPopup_51ubv_203",numberField:"_numberField_51ubv_203",numberFieldWrapper:"_numberFieldWrapper_51ubv_219",numberFieldLabel:"_numberFieldLabel_51ubv_227",selectedLabel:"_selectedLabel_51ubv_235",numberFieldLabelText:"_numberFieldLabelText_51ubv_243",numberFieldLabelSelectText:"_numberFieldLabelSelectText_51ubv_251",numberFieldButtonClass:"_numberFieldButtonClass_51ubv_259",numberFieldLabelMenuClass:"_numberFieldLabelMenuClass_51ubv_267",numberFieldClearButton:"_numberFieldClearButton_51ubv_275",numberFieldFooter:"_numberFieldFooter_51ubv_283",checkedOption:"_checkedOption_51ubv_291",option:"_option_51ubv_299",addFilterMenu:"_addFilterMenu_51ubv_307",appliedFilterTag:"_appliedFilterTag_51ubv_315",appliedfilters:"_appliedfilters_51ubv_323",textBold:"_textBold_51ubv_331",filterButton:"_filterButton_51ubv_339",filterBtnText:"_filterBtnText_51ubv_347",filterLength:"_filterLength_51ubv_355",addfilter:"_addfilter_51ubv_363",alertContainer:"_alertContainer_51ubv_371"};var uje=function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=[]),t.length!==e.length||t.some(function(r,i){return!Object.is(r,e[i])})},pne={error:null},cje=function(n){Hm(t,n);function t(){for(var r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r=n.call.apply(n,[this].concat(a))||this,r.state=pne,r.resetErrorBoundary=function(){for(var s,l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];r.props.onReset==null||(s=r.props).onReset.apply(s,u),r.reset()},r}t.getDerivedStateFromError=function(i){return{error:i}};var e=t.prototype;return e.reset=function(){this.setState(pne)},e.componentDidCatch=function(i,a){var o,s;(o=(s=this.props).onError)==null||o.call(s,i,a)},e.componentDidUpdate=function(i,a){var o=this.state.error,s=this.props.resetKeys;if(o!==null&&a.error!==null&&uje(i.resetKeys,s)){var l,u;(l=(u=this.props).onResetKeysChange)==null||l.call(u,i.resetKeys,s),this.reset()}},e.render=function(){var i=this.state.error,a=this.props,o=a.fallbackRender,s=a.FallbackComponent,l=a.fallback;if(i!==null){var u={error:i,resetErrorBoundary:this.resetErrorBoundary};if(ae.isValidElement(l))return l;if(typeof o=="function")return o(u);if(s)return ae.createElement(s,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(ae.Component);const fje=async()=>{if(!navigator.onLine)return!1;const n=new URL("https://jsonplaceholder.typicode.com/todos/1");n.searchParams.set("rand",Date.now().toString());try{return(await fetch(n.toString())).ok}catch{return!1}},dje=n=>N.jsx("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...n,children:N.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 8a7 7 0 1 1 2.898 5.673c-.167-.121-.216-.406-.002-.62l1.8-1.8a3.5 3.5 0 0 0 4.572-.328l1.414-1.415a.5.5 0 0 0 0-.707l-.707-.707l1.559-1.563a.5.5 0 1 0-.708-.706l-1.559 1.562l-1.414-1.414l1.56-1.562a.5.5 0 1 0-.707-.706l-1.56 1.56l-.707-.706a.5.5 0 0 0-.707 0L5.318 5.975a3.5 3.5 0 0 0-.328 4.571l-1.8 1.8c-.58.58-.62 1.6.121 2.137A8 8 0 1 0 0 8a.5.5 0 0 0 1 0Z"})}),mN={dialog:"_dialog_uhvn8_1",container:"_container_uhvn8_7",pluginIcon:"_pluginIcon_uhvn8_13",closeButton:"_closeButton_uhvn8_19"},hje=()=>{const[n,t]=ae.useState(!1);return ae.useEffect(()=>{const e=()=>{t(!0)},r=()=>{t(!1)};window.addEventListener("offline",e),window.addEventListener("online",r);const i=setInterval(()=>{fje().then(a=>{a?r():e()})},12e3);return()=>{window.removeEventListener("offline",e),window.removeEventListener("online",r),i&&clearInterval(i)}},[]),N.jsx(N.Fragment,{children:N.jsx(HD,{children:typeof window<"u"&&(!window.navigator.onLine||n)?N.jsx("dialog",{className:mN.dialog,children:N.jsxs("div",{className:mN.container,children:[N.jsx(Vt,{variant:"custom",type:"button",className:mN.closeButton,onClick:()=>t(!1),children:N.jsx(Cn,{name:"close-icon"})}),N.jsx(dje,{className:mN.pluginIcon}),N.jsx(St,{variant:"p",styleClass:"font-18",children:"No Internet Connection Detected."})]})}):null})})},pje=new vfe({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),vne=({children:n,theme:t})=>(ae.useEffect(()=>{!t||!Object.keys(t).length||rje(t)},[t]),N.jsx(cje,{FallbackComponent:rhe,children:N.jsxs(wfe,{client:pje,children:[N.jsx(hje,{}),n]})})),gne={metric:"_metric_1gcml_1",loader:"_loader_1gcml_7"},vje=Ne.memo(({token:n,chartColors:t,metricId:e,chartRendererType:r="canvas",variant:i="card",onMinimize:a,isHideChartSettings:o,isHideTablePreview:s,enableDownloadCsv:l,enableEmailCsv:u,metricFilterOptions:c,enableMultiMetricFilters:f})=>{const[d,h]=ae.useState({isShow:i==="fullscreen"}),[p,g]=ae.useState({show:!1,filterValues:void 0}),{externalMetric:y,adminColors:b,rlsSettings:S,sharingSettingsId:x,companyId:M,clientId:_,tenancyLevel:T,isLoading:A,errorMsg:L}=Zde({token:n,metricId:e});return N.jsxs(N.Fragment,{children:[A?N.jsx("div",{className:gne.loader,children:N.jsx(OUe,{})}):null,L||null,y&&!A?N.jsxs(N.Fragment,{children:[i==="card"&&N.jsx(eoe,{metricItem:y,client:_,colors:b||t,onMaximize:(O,k)=>h({isShow:!0,rlsFilters:k}),companyTenancyType:T,chartRendererType:r,param:S,metricFilterOptions:c,enableDownloadCsv:l,enableMultiMetricFilters:f,onDownloadRawCsv:u?O=>g({show:!0,filterValues:O}):void 0}),N.jsx(HD,{children:d.isShow||i==="fullscreen"?N.jsx(toe,{metric:y,clientId:_,colors:b||t,onMinimize:()=>{h({isShow:!1}),a==null||a()},companyId:M,tenancyLevel:T,rlsFilters:d.rlsFilters,sharingSettingsId:x,externalDashboardId:"",userProvidedDashboardId:"",isShowChartConfigTab:!1,isHideChartSettings:o,isHideTablePreview:s,metricFilterOptions:c}):null}),u&&N.jsx(TL,{metricItem:y,isShowRawCsvModal:p.show,onCloseModal:()=>g({show:!1,filterValues:void 0}),companyTenancyType:T,filterValues:p.filterValues,client:_,sharingSettingsId:x})]}):null]})}),gje=Ne.memo(({theme:n,width:t,height:e,style:r,className:i="",metricFilterOptions:a,...o})=>{const s=ae.useId(),[l,u]=ae.useState("");return ae.useEffect(()=>{const c=document.querySelector("#dbn-styles");c&&u(c.innerHTML)},[]),N.jsxs(N.Fragment,{children:[N.jsx("style",{id:`dbn-metric-${s}-style`,children:l}),N.jsx("div",{style:{...r,width:t?`${t}px`:void 0,height:e?`${e}px`:void 0},className:`${gne.metric} ${i} dbn-metric`,children:N.jsx(vne,{theme:n,children:N.jsx(vje,{...o,metricFilterOptions:a&&oje(a)})})})]})}),mne=({setAppliedFilters:n,column:t,defaultValues:e,className:r="",onChange:i,label:a})=>{const[o,s]=ae.useState(e||{min:null,max:null}),l=(e==null?void 0:e.min)===null||(e==null?void 0:e.max)===null,u=ae.useRef(null),[c,f]=ae.useState(""),[d,h]=ae.useState(""),p=()=>{var y;s({min:null,max:null}),f(""),h(""),(y=u.current)==null||y.click(),n(b=>b.filter(S=>S.column!==(t==null?void 0:t.name)))},g=()=>{var y;if(o.min===null||o.max===null){h("Invalid value");return}t&&n&&n(b=>{const S={column:t.name,operator:"BETWEEN",value:`${o.min} AND ${o.max}`,as:t.as,defaultValues:o,filterType:t.isShowHorizontal?"horizontal":"global",isFilterApplied:!!t.isShowHorizontal},x=b.findIndex(_=>_.column===t.name);if(x===-1)return[...b,S];const M=[...b];return M[x]=S,M}),f(`Between ${o.min} to ${o.max}`),h(""),(y=u.current)==null||y.click()};return ae.useEffect(()=>{s(e||{min:null,max:null}),f(e&&!l?`${e.min} AND ${e.max}`:"")},[e==null?void 0:e.max,e==null?void 0:e.min,l]),N.jsx(N.Fragment,{children:N.jsx(rh,{menuClass:sr.numberFieldLabelMenuClass,buttonContent:N.jsxs("div",{className:sr.numberField,ref:u,children:[!c&&N.jsx("div",{className:"dbn-mr-2",children:N.jsx(St,{variant:"span",styleClass:"custom",className:"dbn-text-sm",children:N.jsx(Cn,{name:"number-icon"})})}),N.jsxs("div",{className:sr.numberFieldLabelText,children:[N.jsx(St,{variant:"p",styleClass:"font-14",className:ma(sr.numberFieldLabel,{[sr.selectedLabel]:!!c}),children:a||(t==null?void 0:t.label)||(t==null?void 0:t.name)}),N.jsx(St,{variant:"p",styleClass:"font-14c",className:sr.numberFieldLabelSelectText,children:c})]}),N.jsx($_,{})]}),className:`${sr.numberFieldPopup} ${r}`,buttonClass:sr.numberFieldButtonClass,children:N.jsxs("div",{className:sr.numberFieldWrapper,children:[N.jsx(Tt,{label:"minimum",type:"number",defaultValue:o.min,onChange:({target:{value:y}})=>{s(b=>({...b,min:Number(y)})),i==null||i({min:Number(y),max:o.max})}}),N.jsx(Tt,{label:"maximum",type:"number",defaultValue:o.max,onChange:({target:{value:y}})=>{s(b=>({...b,max:Number(y)})),i==null||i({min:o.min,max:Number(y)})}}),d&&N.jsx(St,{variant:"p",styleClass:"custom",className:"dbn-text-red-500 dbn-text-sm",children:d}),N.jsxs("div",{className:sr.numberFieldFooter,children:[N.jsx(Vt,{type:"button",variant:"custom",className:sr.numberFieldClearButton,onClick:p,children:"Clear"}),N.jsx(Vt,{variant:"primary",type:"button",size:"xs",onClick:g,children:"Save"})]})]})})})},mje=({columnList:n,filterList:t,setFilterList:e})=>N.jsx(N.Fragment,{children:!!n.length&&N.jsx(rh,{buttonContent:N.jsx(Vt,{variant:"custom",type:"button",size:"small",className:sr.addfilter,children:N.jsx(Cn,{name:"plus-icon-2"})}),position:"bottom-left",children:N.jsx("div",{className:sr.addFilterMenu,children:n.map(r=>{const i=!!t.find(a=>a.name===r.name);return N.jsxs(Vt,{variant:"secondary",onClick:()=>{const a=i?t.filter(o=>o.name!==r.name):[...t,r];e(a)},className:i?sr.checkedOption:sr.option,children:[i?N.jsx(w2,{}):N.jsx(j_,{}),r.label||r.name]},r.name)})})})});var MF={exports:{}},yN={exports:{}},Oi={};/** @license React v16.13.1
|
|
478
479
|
* react-is.production.min.js
|
|
479
480
|
*
|