clickhouse-46029ebbad38b40a.js 51 KB

1
  1. (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5380],{1639:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>L,IW:()=>C,TB:()=>F,Ud:()=>E,WB:()=>N,_D:()=>T,jl:()=>q,uz:()=>P});var r=a(6029),l=a(75155),n=a(55729),s=a(71024),o=a.n(s),i=a(92884),c=a(36006),u=a.n(c),d=a(35467),m=a(76089),h=a(82641),g=a(96804),p=a(6784),f=a(36417),x=a(45975),y=a(88849),b=a(43152),_=a(91021),v=a(7565),w=a(92917),S=a(15628),j=a(17434);function k(e,t,a){let r,l;if(null==t)return void e.setSelect({left:0,top:0,width:0,height:0},!1);let{xMin:n,xMax:s,yMin:o,yMax:i}=t,c=e.valToPos(1e3*n,"x"),u=e.valToPos(1e3*s,"x"),d=e.scales.y?.min,m=e.scales.y?.max;if(null==d||null==m)return;"log"===a?(l=i>0?Math.min(Math.log(i),m):m,r=o>0?Math.max(Math.log(o),d):d):(l=Math.min(i,m),r=Math.max(o,d));let h=e.valToPos(l,"y"),g=e.valToPos(r,"y"),p=Math.min(c,u),f=Math.max(c,u);e.setSelect({left:p,top:h,width:f-p,height:Math.max(0,g-h)},!1)}let E=["#7b6cf6","#5a9cf6","#38c9a0","#6cd44a","#c4d629","#f0c528","#f5a623"],C=["#2a6fb5","#2a96a8","#33a85e","#7db832","#c4a820","#e08a17","#d46a12"],R={stroke:"rgba(102,102,102,1)",font:"12px IBM Plex Mono, monospace",grid:{show:!0,stroke:"rgba(52,58,64)",dash:[3,3],width:1},border:{show:!0,stroke:"rgba(102,102,102,1)",width:1}},M={width:1500,height:600,mode:2,ms:1,padding:[8,8,0,4],legend:{show:!1},scales:{x:{time:!0}},axes:[{...R,gap:10,space:60},{...R}],series:[{},{label:"Latency",facets:[{scale:"x",auto:!0,sorted:1},{scale:"y",auto:!0}]}]};function T(e){let t=Array.isArray(e.select)?e.select[0]:void 0;return{heatmapConfig:{...e,displayType:h.t2.Heatmap,select:[{aggFn:"heatmap",valueExpression:t?.valueExpression??"",countExpression:t?.countExpression}],granularity:"auto",numberFormat:e.numberFormat},scaleType:t?.heatmapScaleType??"log"}}let P=80;function N({config:e,scaleType:t}){let a=e.select[0].valueExpression,r=(0,b.eY)(a),l="log"===t?.01:.001;return (r||!a)?{...e,where:"",orderBy:void 0,granularity:void 0,select:[{aggFn:"quantile",level:l,aggCondition:"value_calc >= 0",aggConditionLanguage:"sql",valueExpression:"value_calc",alias:"min"},{aggFn:"max",valueExpression:"value_calc",alias:"max"}],with:[{name:"min_max_calc",chartConfig:{...e,select:r?[{valueExpression:a,alias:"value_calc"}]:[{aggFn:"count",valueExpression:"",aggCondition:"",aggConditionLanguage:"lucene",alias:"value_calc"}],orderBy:void 0}}],timestampValueExpression:"__hdx_time_bucket",from:{databaseName:"",tableName:"min_max_calc"}}:{...e,orderBy:void 0,granularity:void 0,select:[{aggFn:"quantile",level:l,valueExpression:a,aggCondition:`${a} >= 0`,aggConditionLanguage:"sql",alias:"min"},{aggFn:"max",valueExpression:a,alias:"max"}]}}function F({config:e,scaleType:t,effectiveMin:a,max:r,granularity:l,nBuckets:n}){let s=e.select[0].valueExpression,o=e.select[0].countExpression??"count()",i=(0,b.eY)(s),c="log"===t?`widthBucket(log(greatest(toFloat64(value_calc), ${a})), log(${a}), log(${r}), ${n})`:`widthBucket(value_calc, ${a}, ${r}, ${n})`,u="log"===t?`widthBucket(log(greatest(toFloat64(${s}), ${a})), log(${a}), log(${r}), ${n})`:`widthBucket(${s}, ${a}, ${r}, ${n})`;return i?{...e,where:"",select:[{valueExpression:"sum(value_count)",alias:"count"}],groupBy:[{valueExpression:c,alias:"x_bucket"}],with:[{name:"bucket_calc",chartConfig:{...e,select:[{valueExpression:s,alias:"value_calc"},{valueExpression:o,alias:"value_count"}],granularity:l,orderBy:void 0}}],timestampValueExpression:"__hdx_time_bucket",from:{databaseName:"",tableName:"bucket_calc"},orderBy:[{valueExpression:"x_bucket",ordering:"ASC"}],granularity:l}:!s?{...e,where:"",select:[{valueExpression:"sum(value_count)",alias:"count"}],groupBy:[{valueExpression:c,alias:"x_bucket"}],with:[{name:"bucket_calc",chartConfig:{...e,select:[{aggFn:"count",valueExpression:"",aggCondition:"",aggConditionLanguage:"lucene",alias:"value_calc"},{aggFn:"count",valueExpression:"",aggCondition:"",aggConditionLanguage:"lucene",alias:"value_count"}],granularity:l,orderBy:void 0}}],timestampValueExpression:"__hdx_time_bucket",from:{databaseName:"",tableName:"bucket_calc"},orderBy:[{valueExpression:"x_bucket",ordering:"ASC"}],granularity:l}:{...e,select:[{valueExpression:o,alias:"count"}],groupBy:[{valueExpression:u,alias:"x_bucket"}],orderBy:[{valueExpression:"x_bucket",ordering:"ASC"}],granularity:l}}function q(e){let t,a,n,s,o,i,c=(0,l.c)(9),{colors:u}=e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)(g.E,{size:"10px",c:"dimmed",children:"Low"}),a={display:"flex",width:80,height:8,borderRadius:2,overflow:"hidden"},c[0]=t,c[1]=a):(t=c[0],a=c[1]),c[2]!==u?(n=u.map(B),c[2]=u,c[3]=n):n=c[3],c[4]!==n?(s=(0,r.jsx)("div",{style:a,children:n}),c[4]=n,c[5]=s):s=c[5],c[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(g.E,{size:"10px",c:"dimmed",children:"High"}),c[6]=o):o=c[6],c[7]!==s?(i=(0,r.jsxs)(p.s,{align:"center",gap:4,role:"img","aria-label":"Color scale: low to high count",children:[t,s,o]}),c[7]=s,c[8]=i):i=c[8],i}function B(e,t){return(0,r.jsx)("div",{style:{flex:1,background:e}},t)}function A({config:e,enabled:t=!0,onFilter:a,onClearFilter:l,selectionBounds:s,title:o,toolbarPrefix:i,toolbarSuffix:c,scaleType:u="log",showLegend:h=!1,errorVariant:p}){let x=e.dateRange,y=(0,m.tA)(x,245),{colorScheme:v}=(0,f.C)(),w="light"===v?C:E,k=N({config:e,scaleType:u}),{data:R,isLoading:M,error:T}=(0,_.HD)(k,{queryKey:["heatmap",k],enabled:t}),B=Number.parseFloat(R?.data?.[0]?.min??"0"),L=Number.parseFloat(R?.data?.[0]?.max??"0"),I="log"===u?Math.max(B,1e-4*L||1e-4):B,D=F({config:e,scaleType:u,effectiveMin:I,max:L,granularity:y,nBuckets:P}),{data:V,isLoading:$,error:H}=(0,_.HD)(D,{queryKey:["heatmap_bucket",D],enabled:!!R&&null!=D&&L>I}),z=x[0]?.getTime()??0,U=x[1]?.getTime()??0,Q=(0,n.useMemo)(()=>(0,b.Ht)(x[0],x[1],y),[z,U,y]),W=(0,n.useMemo)(()=>{let e=(0,d.zo)(V?.meta??[]);return null==V||null==V.data||null==e?[[],[],[]]:function({data:e,timestampColumn:t,generatedTsBuckets:a,scaleType:r,effectiveMin:l,max:n,nBuckets:s}){let o=[],i=[],c=[],u=e=>"log"===r&&l>0&&n>l?Math.log(l*Math.pow(n/l,e/s)):l+(n-l)/s*e,d=0;for(let r=0;r<a.length;r++){let l=a[r].getTime();for(let a=0;a<=s+1;a++){let r=e[d];if(null!=r&&new Date(r[t.name]).getTime()==l&&r.x_bucket==a)for(o.push(new Date(r[t.name]).getTime()),i.push(u(r.x_bucket)),c.push(Number.parseInt(r.count,10));d<e.length&&new Date(e[d][t.name]).getTime()==l&&e[d].x_bucket==a;)d++;else o.push(l),i.push(u(a)),c.push(0)}}return[o,i,c]}({data:V.data,timestampColumn:e,generatedTsBuckets:Q,scaleType:u,effectiveMin:I,max:L,nBuckets:P})},[V,Q,u,I,L,P]),Y=W[0],Z=(0,n.useMemo)(()=>{let e=[];return h&&e.push((0,r.jsx)(q,{colors:w},"heatmap-legend")),i&&i.length>0&&e.push(...i),c&&c.length>0&&e.push(...c),e},[h,w,i,c]),J=H||T;return(0,r.jsx)(S.Ay,{title:o,toolbarItems:Z,disableReactiveContainer:!0,children:$||M?(0,r.jsx)(g.E,{size:"sm",ta:"center",p:"xl",children:"Loading..."}):J?(0,r.jsx)(j.A,{error:J,variant:p}):Y.length<2||Q?.length<2?(0,r.jsx)(g.E,{size:"sm",ta:"center",p:"xl",children:"Not enough data points to render heatmap. Try expanding your search criteria."}):(0,r.jsx)(O,{data:W,numberFormat:e.numberFormat,onFilter:a?(e,t,r,l)=>{a(e,t,"log"===u&&r<=1.1*I?0:r,l)}:void 0,onClearFilter:l,scaleType:u,palette:w,selectionBounds:s},JSON.stringify(e))})}let L=o()(()=>Promise.resolve(A),{ssr:!1});function O({data:e,numberFormat:t,onFilter:a,onClearFilter:l,scaleType:s="linear",palette:o,selectionBounds:c}){let[d,m]=(0,n.useState)(void 0),h=(0,n.useRef)(!1),p=!!a,f=(0,n.useRef)(a);(0,n.useEffect)(()=>{f.current=a},[a]);let b=(0,n.useRef)(null),_=(0,n.useRef)(c),S=(0,n.useRef)(s);(0,n.useEffect)(()=>{_.current=c,S.current=s});let{ref:j,width:E,height:C}=(0,y.L)();(0,n.useEffect)(()=>{b.current&&k(b.current,c,s)},[c,s,E,C]);let R=(0,n.useRef)(0),T=(0,n.useMemo)(()=>t?JSON.stringify(t):"",[t]),P=(0,n.useCallback)(e=>{let a="log"===s?Math.exp(e):e;if(t?.unit==="ms"||t?.output==="duration"){let e=t?.output==="duration"?a*(t?.factor??1)*1e3:a;return(0,w.xR)(e)}return t?(0,w.ZV)(a,{...t,average:!0,mantissa:Math.abs(a)>=1?0:2}):new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short"}).format(a)},[T,s]),N=(0,n.useMemo)(()=>(function(e){let[,t,a]=e,r=new Map,l=0;for(let e=0;e<t.length;e++)r.set(t[e],(r.get(t[e])??0)+a[e]),l+=a[e];let n=new Map;if(0===l)return n;let s=0;for(let[e,t]of[...r].sort(([e],[t])=>e-t))s+=t,n.set(e,s/l*100);return n})(e),[e]),F=(0,n.useMemo)(()=>{let e={paths:function(e){let{disp:t}=e;return(e,a,r,l)=>(i.default.orient(e,a,(r,l,n,s,o,i,c,u,d,m,h,g,p,f,x)=>{let[y,b,_]=e.data[a],v=y.length,w=t.fill.values(e,a),S=t.fill.lookup??[...new Set(w)],j=S.map(()=>new Path2D),k=v-b.lastIndexOf(b[0]),E=b[1]-b[0],C=i(y[k]-y[0],s,m,u)-i(0,s,m,u),R=c(E,o,h,d)-c(0,o,h,d),M=b.slice(0,k).map(e=>Math.round(c(e,o,h,d)-R/2)),T=Array.from({length:v/k},(e,t)=>Math.round(i(y[t*k],s,m,u)-C/2));for(let e=0;e<v;e++)if(_[e]>0&&y[e]>=(s.min??-1/0)&&y[e]<=(s.max??1/0)&&b[e]>=(o.min??-1/0)&&b[e]<=(o.max??1/0)){let t=T[~~(e/k)],a=M[e%k];f(j[w[e]],t,a,C,R)}e.ctx.save(),e.ctx.rect(e.bbox.left,e.bbox.top,e.bbox.width,e.bbox.height),e.ctx.clip(),j.forEach((t,a)=>{e.ctx.fillStyle=S[a],e.ctx.fill(t)}),e.ctx.restore()}),null)}({disp:{fill:{lookup:o,values:(e,t)=>{let a=e.data[t][2],r=a.length,l=[];for(let e=0;e<r;e++)a[e]>0&&l.push(a[e]);l.sort((e,t)=>e-t);let n=o.length,s=Array(r);if(0===l.length)return s.fill(-1),s;let i=Math.floor((l.length-1)*.95),c=Math.sqrt(l[i]??l[l.length-1]);for(let e=0;e<r;e++)s[e]=0===a[e]?-1:Math.max(Math.min(n-1,Math.floor(Math.sqrt(a[e])/(c||1)*(n-1))),0);return s}}}})};return{...M,series:[M.series[0],{...M.series[1],...e}],...null!=M&&null!=M.axes?{axes:[M.axes[0],{...M.axes[1],values:(e,t)=>t.map(P),size(e,t){if(!t||0===t.length)return 50;let a=e.axes[1]?.font??"12px IBM Plex Mono, monospace",r=e.ctx;r.save(),r.font=a;let l=0;for(let e of t){let t=r.measureText(e).width;t>l&&(l=t)}return r.restore(),Math.ceil(l)+16},..."log"===s?{splits:e=>{let[t,a]=null!=e.scales.y.min?[e.scales.y.min,e.scales.y.max]:[0,1],r=[],l=Math.floor(Math.log10(Math.exp(t))),n=Math.ceil(Math.log10(Math.exp(a)));for(let e=l;e<=n;e++){let l=Math.log(Math.pow(10,e));l>=t&&l<=a&&r.push(l)}if(r.length<3){for(let e=l;e<=n;e++)for(let l of[1,3]){let n=Math.log(l*Math.pow(10,e));n>=t&&n<=a&&r.push(n)}return[...new Set(r)].sort((e,t)=>e-t)}return r}}:{}}]}:{},width:E,height:C,cursor:{drag:{setScale:!1,x:p,y:p,dist:5},show:!0,focus:{prox:100}},plugins:[function({proximity:e,onPointHighlight:t}){let a=-1;return{hooks:{setCursor:r=>{let{top:l,left:n}=r.cursor;if(null==l||null==n)return;let[s,o,i]=r.data[1],c=0,u=1/0;for(let e=0;e<s.length;e++){let t=Math.sqrt((r.valToPos(s[e],"x")-n)**2+(r.valToPos(o[e],"y")-l)**2);t<u&&i[e]>0&&(c=e,u=t)}let d=s.length-o.lastIndexOf(o[0]),m=o[1]-o[0],h=s[d]-s[0],g=Math.abs(r.valToPos(h,"x")-r.valToPos(0,"x")),p=Math.abs(r.valToPos(m,"y")-r.valToPos(0,"y")),f=r.valToPos(s[c],"x"),x=r.valToPos(o[c],"y"),y=i[c],b=s[c],_=o[c],{offsetLeft:v,offsetTop:w}=r.over;u<e&&c!==a&&(a=c,t({xVal:b,yVal:_,countVal:y,closestDistance:u,closestIndex:c,xCoord:f+v,yCoord:x+w,xSize:g,ySize:p}))}}}}({proximity:20,onPointHighlight:({xVal:e,yVal:t,countVal:a,closestDistance:r,closestIndex:l,xCoord:n,yCoord:s,xSize:o,ySize:i})=>{h.current&&m({xVal:e,yVal:t,countVal:a,closestDistance:r,closestIndex:l,xCoord:n,yCoord:s,xSize:o,ySize:i})}}),{hooks:{ready:e=>{k(e,_.current,S.current)},setSelect:e=>{if(e.select.width<=0||e.select.height<=0)return;let t=e.posToVal(e.select.left,"x"),a=e.posToVal(e.select.left+e.select.width,"x"),r=e.posToVal(e.select.top,"y"),l=e.posToVal(e.select.top+e.select.height,"y"),n="log"===s?Math.exp(l):l,o="log"===s?Math.exp(r):r;R.current=performance.now(),f.current?.(t/1e3,a/1e3,n,o)}}}]}},[E,C,P,s,o,p]),q=d&&N.get(d.yVal);return(0,r.jsxs)("div",{ref:j,className:"heatmap-selection-container",style:{width:"100%",height:"100%",position:"relative"},onClick:()=>{performance.now()-R.current<300||p&&(b.current?.setSelect({left:0,top:0,width:0,height:0},!1),l?.())},onMouseEnter:()=>{h.current=!0},onMouseLeave:()=>{h.current=!1,m(void 0)},children:[(0,r.jsx)(u(),{options:F,data:[[],e],resetScales:!0,onCreate:e=>{b.current=e},onDelete:()=>{b.current=null}}),null!=d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:{position:"absolute",top:d.yCoord,left:d.xCoord,width:d.xSize,height:d.ySize,pointerEvents:"none",background:"var(--mantine-color-default-hover)"}}),(0,r.jsxs)("div",{className:"px-2 py-1 fs-8",style:{position:"absolute",top:Math.min(d.yCoord+5,C-90),...d.xCoord>E/2?{right:E-d.xCoord+10}:{left:d.xCoord+10},maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",backdropFilter:"blur(8px)",backgroundColor:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-default-border)",borderRadius:4,pointerEvents:"none"},children:[a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.E,{size:"10px",pt:"4px",children:"Drag to Compare \xb7 Click to Clear"}),(0,r.jsx)(x.c,{my:"xs"})]}),(0,r.jsx)("div",{children:(0,r.jsx)(v.H,{value:d.xVal})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"Y Value:"})," ",P(d.yVal),null!=q&&` (p${new Intl.NumberFormat("en-US",{maximumFractionDigits:1}).format(q)})`]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"Count Value:"})," ",new Intl.NumberFormat("en-US",{notation:"standard",compactDisplay:"short"}).format(d.countVal)]})]})]})]})}},2489:(e,t,a)=>{"use strict";a.d(t,{f:()=>l});var r=a(55729);function l(){let[e,t]=(0,r.useState)("visible");return(0,r.useEffect)(()=>{t(document.visibilityState);let e=()=>t(document.visibilityState);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),e}},9622:(e,t,a)=>{"use strict";a.d(t,{M:()=>u});var r=a(6029),l=a(75155),n=a(75828),s=a.n(n),o=a(21587),i=a(19672),c=a.n(i);function u(e){let t,a,n,i,u,d=(0,l.c)(21),{title:m,leading:h,actions:g,breadcrumbs:p,children:f,header:x,content:y,className:b,contentClassName:_,"data-testid":v,fillViewport:w,padded:S}=e;d[0]!==g||d[1]!==p||d[2]!==x||d[3]!==f||d[4]!==h||d[5]!==m?(t=x??(null!=m||null!=h||null!=g||null!=p||f?(0,r.jsx)(o.z,{title:m,leading:h,actions:g,breadcrumbs:p,children:f}):null),d[0]=g,d[1]=p,d[2]=x,d[3]=f,d[4]=h,d[5]=m,d[6]=t):t=d[6];let j=t,k=void 0!==w&&w&&c().fillViewport;d[7]!==b||d[8]!==k?(a=s()(c().root,k,b),d[7]=b,d[8]=k,d[9]=a):a=d[9];let E=void 0!==S&&S&&c().padded;return d[10]!==_||d[11]!==E?(n=s()(c().content,E,_),d[10]=_,d[11]=E,d[12]=n):n=d[12],d[13]!==y||d[14]!==n?(i=(0,r.jsx)("div",{className:n,children:y}),d[13]=y,d[14]=n,d[15]=i):i=d[15],d[16]!==j||d[17]!==a||d[18]!==i||d[19]!==v?(u=(0,r.jsxs)("div",{className:a,"data-testid":v,children:[j,i]}),d[16]=j,d[17]=a,d[18]=i,d[19]=v,d[20]=u):u=d[20],u}},19672:e=>{e.exports={root:"PageLayout_root__haxTY",fillViewport:"PageLayout_fillViewport___5y5K",content:"PageLayout_content__5AajY",padded:"PageLayout_padded__eRjbg"}},21587:(e,t,a)=>{"use strict";a.d(t,{z:()=>u});var r=a(6029),l=a(75155),n=a(55729),s=a(75828),o=a.n(s),i=a(58525),c=a.n(i);function u(e){let t,a,s,i,u,d,m,h,g,p,f=(0,l.c)(31),{title:x,leading:y,actions:b,breadcrumbs:_,children:v,className:w,"data-testid":S,stickyRow:j}=e,k=null!=x||null!=y||null!=b,E=null!=_,C=null!=j,R=(0,n.useRef)(null),[M,T]=(0,n.useState)(!1);f[0]!==C?(t=()=>{let e=R.current;if(!e||!C)return;let t=new IntersectionObserver(e=>{let[t]=e;return T(t.intersectionRatio<1)},{threshold:[1],rootMargin:"-1px 0px 0px 0px"});return t.observe(e),()=>t.disconnect()},a=[C],f[0]=C,f[1]=t,f[2]=a):(t=f[1],a=f[2]),(0,n.useEffect)(t,a);let P=C?c().notSticky:void 0;f[3]!==x?(s=null!=x&&(0,r.jsx)("h1",{className:c().title,children:x}),f[3]=x,f[4]=s):s=f[4],f[5]!==y||f[6]!==s?(i=(0,r.jsxs)("div",{className:c().start,children:[s,y]}),f[5]=y,f[6]=s,f[7]=i):i=f[7],f[8]!==b?(u=null!=b&&(0,r.jsx)("div",{className:c().actions,children:b}),f[8]=b,f[9]=u):u=f[9],f[10]!==i||f[11]!==u?(d=(0,r.jsxs)(r.Fragment,{children:[i,u]}),f[10]=i,f[11]=u,f[12]=d):d=f[12];let N=d;f[13]!==_||f[14]!==v||f[15]!==P||f[16]!==w||f[17]!==E||f[18]!==k||f[19]!==S||f[20]!==N?(m=k||E?E&&k?(0,r.jsxs)("header",{className:o()(c().header,c().headerStacked,P,w),"data-testid":S,children:[(0,r.jsx)("div",{className:c().breadcrumbsRow,children:_}),(0,r.jsx)("div",{className:c().toolbarRow,children:N})]}):E&&!k?(0,r.jsxs)("header",{className:o()(c().header,c().headerStacked,P,w),"data-testid":S,children:[(0,r.jsx)("div",{className:c().breadcrumbsRow,children:_}),v]}):(0,r.jsx)("header",{className:o()(c().header,P,w),"data-testid":S,children:N}):null!=v?(0,r.jsx)("header",{className:o()(c().header,P,w),"data-testid":S,children:v}):null,f[13]=_,f[14]=v,f[15]=P,f[16]=w,f[17]=E,f[18]=k,f[19]=S,f[20]=N,f[21]=m):m=f[21];let F=m;if(!C)return F;let q=null!=F&&!M&&c().stickyRowAttached;f[22]!==q?(h=o()(c().stickyRow,q),f[22]=q,f[23]=h):h=f[23];let B=M?"true":void 0;return f[24]!==j||f[25]!==B||f[26]!==h?(g=(0,r.jsx)("div",{ref:R,className:h,"data-stuck":B,"data-testid":"page-header-sticky-row",children:j}),f[24]=j,f[25]=B,f[26]=h,f[27]=g):g=f[27],f[28]!==F||f[29]!==g?(p=(0,r.jsxs)(r.Fragment,{children:[F,g]}),f[28]=F,f[29]=g,f[30]=p):p=f[30],p}},24996:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,l=((r=a(73722))&&r.__esModule?r:{default:r}).default.create(),n=new Map;for(let e of Object.keys(l.helpers))l.unregisterHelper(e);l.registerHelper("default",(e,t)=>{var a;return null==e||""===e?(a=()=>"",null!=t?t:a()):e}),l.registerHelper("floor",e=>{if(null==e||""===e)return"";let t="number"==typeof e?e:parseFloat(String(e));return Number.isFinite(t)?String(Math.floor(t)):""});var s=class extends Error{constructor(e){super(e),this.name="LinkTemplateError"}},o=t.b=class extends s{constructor(e){super(`Template references unknown variable: ${e}`),this.variable=e,this.name="MissingTemplateVariableError"}},i=/^"([^"]+)" not defined/;function c(e,t){let a=n.get(e);if(!a)try{a=l.compile(e,{strict:!0,noEscape:!0}),n.set(e,a)}catch(e){throw new s(e instanceof Error?e.message:String(e))}try{return a(t)}catch(a){let e=a instanceof Error?a.message:String(a),t=i.exec(e);throw t?new o(t[1]):new s(e)}}t.a=s,t.b=o,t.c=c,t.d=function(e,t){let a={};for(let[e,r]of Object.entries(t))a[e]="string"==typeof r?encodeURIComponent(r):Array.isArray(r)||function(e){if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}(r)?encodeURIComponent(JSON.stringify(r)):r;return c(e,a)},t.e=()=>{n.clear()},t.f=function(e){l.compile(e,{strict:!1,noEscape:!0})({})}},32479:(e,t,a)=>{"use strict";a.d(t,{r:()=>o});var r=a(75155),l=a(55729),n=a(76089),s=a(2489);let o=e=>{let t,a,o,i,c,u=(0,r.c)(15),{searchedTimeRange:d,onTimeRangeSelect:m,isLive:h}=e,[g,p]=l.useState(!1),f="visible"===(0,s.f)()&&h;u[0]!==m||u[1]!==d?(t=()=>{let e=1e3*Math.round((d[1].getTime()-d[0].getTime())/1e3),t=new Date;m(new Date(t.getTime()-e),t),p(!0),setTimeout(()=>{p(!1)},1e3)},u[0]=m,u[1]=d,u[2]=t):t=u[2];let x=t;u[3]!==d?(a=(0,n.tA)(d),u[3]=d,u[4]=a):a=u[4];let y=a,b=l.useRef(null);return u[5]!==y||u[6]!==f||u[7]!==x?(o=()=>(f?(b.current&&window.clearInterval(b.current),b.current=window.setInterval(()=>{x()},1e3*(0,n.qL)(y))):b.current&&window.clearInterval(b.current),()=>{b.current&&window.clearInterval(b.current)}),i=[f,y,x],u[5]=y,u[6]=f,u[7]=x,u[8]=o,u[9]=i):(o=u[8],i=u[9]),l.useEffect(o,i),u[10]!==y||u[11]!==f||u[12]!==g||u[13]!==x?(c={granularityOverride:y,isRefreshEnabled:f,manualRefreshCooloff:g,refresh:x},u[10]=y,u[11]=f,u[12]=g,u[13]=x,u[14]=c):c=u[14],c}},47788:(e,t,a)=>{"use strict";function r(e,t){return null!=e?e:t()}var l=a(24996),n=a(95384);function s(e,t,a){try{return{ok:!0,value:!function(e){let t,a=e[0],r=1;for(;r<e.length;){let l=e[r],n=e[r+1];if(r+=2,("optionalAccess"===l||"optionalCall"===l)&&null==a)return;"access"===l||"optionalAccess"===l?(t=a,a=n(a)):("call"===l||"optionalCall"===l)&&(a=n((...e)=>a.call(t,...e)),t=void 0)}return a}([a,"optionalAccess",e=>e.encodeValues])?l.c.call(void 0,e,t):l.d.call(void 0,e,t)}}catch(e){return{ok:!1,error:e instanceof l.b?`Row has no column '${e.variable}'`:e instanceof l.a?e.message:String(e)}}}function o(e,t){if(!e||0===e.length)return{ok:!0,filters:[]};let a={};for(let r of e){let e=s(r.template,t);if(!e.ok)return e;a[r.expression]?a[r.expression].included.add(e.value):a[r.expression]={included:new Set([e.value]),excluded:new Set}}return{ok:!0,filters:n.Rb.call(void 0,a)}}a(69498),a(62637),a(68798),a(7837),a(40313),a(787),t.DE=function({onClick:e,sourceNamesById:t,dashboardNamesById:a}){if("search"===e.type){if("id"===e.target.mode){let a=t.get(e.target.id);if(a)return`Search ${a}`}return"Open in search"}if("dashboard"===e.type){if("id"===e.target.mode){let t=a.get(e.target.id);if(t)return`Open dashboard "${t}"`}return"Open dashboard"}return"external"===e.type?"Open external link":e},t.ov=function({onClick:e,row:t,dashboardIds:a,dashboardIdsByName:l,dateRange:n}){let i;if("id"===e.target.mode){if(!a.has(e.target.id))return{ok:!1,error:`Could not find dashboard with ID '${e.target.id}'`};i=e.target.id}else{let a=s(e.target.template,t);if(!a.ok)return a;let n=a.value.trim();if(""===n)return{ok:!1,error:"Dashboard name is empty"};let o=r(l.get(n),()=>[]);if(0===o.length)return{ok:!1,error:`Could not find dashboard '${n}'`};if(o.length>1)return{ok:!1,error:`Multiple dashboards named '${n}' \u2014 dashboard names must be unique to use them in a link`};i=o[0]}let c="";if(e.whereTemplate){let a=s(e.whereTemplate,t);if(!a.ok)return a;c=a.value}let u=new URLSearchParams({where:encodeURIComponent(c),whereLanguage:r(e.whereLanguage,()=>"lucene"),from:String(n[0].getTime()),to:String(n[1].getTime())}),d=o(e.filters,t);return d.ok?(d.filters.length>0&&u.set("filters",encodeURIComponent(JSON.stringify(d.filters))),{ok:!0,url:`/dashboards/${i}?${u.toString()}`}):d},t.Hw=function({onClick:e,row:t}){let a=s(e.urlTemplate,t,{encodeValues:!0});if(!a.ok)return a;let r=a.value.trim();return""===r?{ok:!1,error:"External link URL is empty"}:!function(e){let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol}(r)?{ok:!1,error:`External link must be an absolute http(s) URL, got '${r}'`}:{ok:!0,url:r}},t.sJ=function({onClick:e,row:t,sourceIds:a,sourceIdsByName:l,dateRange:n}){let i;if("id"===e.target.mode){if(!a.has(e.target.id))return{ok:!1,error:`Could not find source with ID '${e.target.id}'`};i=e.target.id}else{let a=s(e.target.template,t);if(!a.ok)return a;let n=a.value.trim();if(""===n)return{ok:!1,error:"Source name is empty"};let o=r(l.get(n),()=>[]);if(0===o.length)return{ok:!1,error:`Could not find source '${n}'`};if(o.length>1)return{ok:!1,error:`Multiple sources named '${n}' \u2014 source names must be unique to use them in a link`};i=o[0]}let c="";if(e.whereTemplate){let a=s(e.whereTemplate,t);if(!a.ok)return a;c=a.value}let u=new URLSearchParams({source:i,where:encodeURIComponent(c),whereLanguage:r(e.whereLanguage,()=>"lucene"),isLive:"false",from:String(n[0].getTime()),to:String(n[1].getTime())}),d=o(e.filters,t);return d.ok?(d.filters.length>0&&u.set("filters",encodeURIComponent(JSON.stringify(d.filters))),{ok:!0,url:`/search?${u.toString()}`}):d},t.GC=function(e){if("external"===e.type)return void l.f.call(void 0,e.urlTemplate);if("template"===e.target.mode&&l.f.call(void 0,e.target.template),e.filters)for(let t of e.filters)"expressionTemplate"===t.kind&&l.f.call(void 0,t.template);e.whereTemplate&&l.f.call(void 0,e.whereTemplate)}},55933:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/clickhouse",function(){return a(76115)}])},58525:e=>{e.exports={header:"PageHeader_header__Rc2pT",notSticky:"PageHeader_notSticky__xUVX_",stickyRow:"PageHeader_stickyRow__Yj81o",stickyRowAttached:"PageHeader_stickyRowAttached__LMLfP",headerStacked:"PageHeader_headerStacked__kcjBU",breadcrumbsRow:"PageHeader_breadcrumbsRow__HP2EC",toolbarRow:"PageHeader_toolbarRow__HZU5E",start:"PageHeader_start__5QZkd",title:"PageHeader_title__gPjQr",actions:"PageHeader_actions__8BodH"}},76115:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>X});var r=a(6029),l=a(75155),n=a(55729),s=a(71024),o=a.n(s),i=a(95669),c=a.n(i),u=a(82203),d=a.n(u),m=a(41038),h=a(1909),g=a(73854),p=a(82641),f=a(15226),x=a(18430),y=a(96804),b=a(85336),_=a(36417),v=a(70770),w=a(17183),S=a(56562),j=a(30682),k=a(8784),E=a(8511),C=a(96143),R=a(94502),M=a(95352),T=a(62453),P=a(35278),N=a(9622),F=a(58153),q=a(41575),B=a(91393),A=a(15628),L=a(1639),O=a(30253),I=a(86472),D=a(64501),V=a(32479),$=a(36600),H=a(94740),z=a(93108),U=a(387),Q=a(92917);let W=(0,U.lr)("Past 1h",!1),Y={databaseName:"system",tableName:"query_log"};function Z(e){let t,a,n,s,o,i,c,u,d,m,h,g,b,_,v,w,S,j,k,E,C,R,M,T,N,F,q,A,L,O,I,D=(0,l.c)(56),{searchedTimeRange:V,connection:$,onTimeRangeSelect:H}=e;return D[0]===Symbol.for("react.memo_cache_sentinel")?(t={height:400},D[0]=t):t=D[0],D[1]===Symbol.for("react.memo_cache_sentinel")?(a=[{valueExpression:"avg(ProfileEvent_OSCPUVirtualTimeMicroseconds) / 1000000",alias:"CPU Cores"}],n={databaseName:"system",tableName:"metric_log"},D[1]=a,D[2]=n):(a=D[1],n=D[2]),D[3]!==$||D[4]!==V?(s={select:a,from:n,where:"",connection:$,dateRange:V,timestampValueExpression:"event_time",displayType:p.t2.Line},D[3]=$,D[4]=V,D[5]=s):s=D[5],D[6]!==H||D[7]!==s?(o=(0,r.jsx)(f.x.Col,{span:6,children:(0,r.jsx)(B.d,{style:t,children:(0,r.jsx)(P.S,{title:"CPU Usage (Cores)",config:s,onTimeRangeSelect:H})})}),D[6]=H,D[7]=s,D[8]=o):o=D[8],D[9]===Symbol.for("react.memo_cache_sentinel")?(i={height:400},D[9]=i):i=D[9],D[10]===Symbol.for("react.memo_cache_sentinel")?(c=[{valueExpression:"avg(CurrentMetric_MemoryTracking)",alias:"Bytes"}],u={databaseName:"system",tableName:"metric_log"},D[10]=c,D[11]=u):(c=D[10],u=D[11]),D[12]===Symbol.for("react.memo_cache_sentinel")?(d={output:"byte",mantissa:2},D[12]=d):d=D[12],D[13]!==$||D[14]!==V?(m={select:c,from:u,where:"",connection:$,dateRange:V,timestampValueExpression:"event_time",displayType:p.t2.Line,numberFormat:d},D[13]=$,D[14]=V,D[15]=m):m=D[15],D[16]!==H||D[17]!==m?(h=(0,r.jsx)(f.x.Col,{span:6,children:(0,r.jsx)(B.d,{style:i,children:(0,r.jsx)(P.S,{title:"Memory Usage",config:m,onTimeRangeSelect:H})})}),D[16]=H,D[17]=m,D[18]=h):h=D[18],D[19]===Symbol.for("react.memo_cache_sentinel")?(g={height:400},D[19]=g):g=D[19],D[20]===Symbol.for("react.memo_cache_sentinel")?(b=[{aggFn:"avg",aggCondition:"",valueExpression:"ProfileEvent_OSReadChars",alias:"Bytes Read"},{aggFn:"avg",aggCondition:"",valueExpression:"ProfileEvent_OSWriteChars",alias:"Bytes Written"}],_={databaseName:"system",tableName:"metric_log"},D[20]=b,D[21]=_):(b=D[20],_=D[21]),D[22]===Symbol.for("react.memo_cache_sentinel")?(v={output:"byte",mantissa:2},D[22]=v):v=D[22],D[23]!==$||D[24]!==V?(w={select:b,from:_,where:"",connection:$,dateRange:V,timestampValueExpression:"event_time",displayType:p.t2.Line,numberFormat:v},D[23]=$,D[24]=V,D[25]=w):w=D[25],D[26]!==H||D[27]!==w?(S=(0,r.jsx)(f.x.Col,{span:6,children:(0,r.jsx)(B.d,{style:g,children:(0,r.jsx)(P.S,{title:"Disk",config:w,onTimeRangeSelect:H})})}),D[26]=H,D[27]=w,D[28]=S):S=D[28],D[29]===Symbol.for("react.memo_cache_sentinel")?(j={height:400},D[29]=j):j=D[29],D[30]===Symbol.for("react.memo_cache_sentinel")?(k=[{aggFn:"avg",aggCondition:"",valueExpression:"CurrentMetric_S3Requests",alias:"All Requests"},{aggFn:"avg",aggCondition:"",valueExpression:"ProfileEvent_S3GetObject",alias:"GetObject Requests"},{aggFn:"avg",aggCondition:"",valueExpression:"ProfileEvent_S3PutObject",alias:"PutObject Requests"},{aggFn:"avg",aggCondition:"",valueExpression:"ProfileEvent_S3ListObjects",alias:"ListObjects Requests"},{aggFn:"avg",aggCondition:"",valueExpression:"ProfileEvent_S3UploadPart",alias:"UploadPart Requests"}],E={databaseName:"system",tableName:"metric_log"},D[30]=k,D[31]=E):(k=D[30],E=D[31]),D[32]!==$||D[33]!==V?(C={select:k,from:E,connection:$,where:"",dateRange:V,timestampValueExpression:"event_time",displayType:p.t2.Line},D[32]=$,D[33]=V,D[34]=C):C=D[34],D[35]!==H||D[36]!==C?(R=(0,r.jsx)(f.x.Col,{span:6,children:(0,r.jsx)(B.d,{style:j,children:(0,r.jsx)(P.S,{title:"S3 Requests",config:C,onTimeRangeSelect:H})})}),D[35]=H,D[36]=C,D[37]=R):R=D[37],D[38]===Symbol.for("react.memo_cache_sentinel")?(M={height:400},D[38]=M):M=D[38],D[39]===Symbol.for("react.memo_cache_sentinel")?(T=(0,r.jsxs)(x.B,{gap:0,children:[(0,r.jsx)(y.E,{size:"sm",mb:"xs",children:"Network"}),(0,r.jsx)(y.E,{size:"xs",mb:"sm",children:"Network activity for the entire machine, not only Clickhouse."})]}),N=[{aggFn:"avg",aggCondition:"",valueExpression:"value"}],F={databaseName:"system",tableName:"asynchronous_metric_log"},D[39]=T,D[40]=N,D[41]=F):(T=D[39],N=D[40],F=D[41]),D[42]===Symbol.for("react.memo_cache_sentinel")?(q=[{valueExpression:"metric"}],D[42]=q):q=D[42],D[43]===Symbol.for("react.memo_cache_sentinel")?(A={output:"byte",mantissa:2},D[43]=A):A=D[43],D[44]!==$||D[45]!==V?(L={select:N,from:F,where:"metric ILIKE 'NetworkReceiveBytes_%' OR metric ILIKE 'NetworkSendBytes_%'",groupBy:q,connection:$,dateRange:V,timestampValueExpression:"event_time",displayType:p.t2.Line,numberFormat:A},D[44]=$,D[45]=V,D[46]=L):L=D[46],D[47]!==H||D[48]!==L?(O=(0,r.jsx)(f.x.Col,{span:6,children:(0,r.jsx)(B.d,{style:M,children:(0,r.jsx)(P.S,{title:T,config:L,onTimeRangeSelect:H})})}),D[47]=H,D[48]=L,D[49]=O):O=D[49],D[50]!==h||D[51]!==S||D[52]!==R||D[53]!==O||D[54]!==o?(I=(0,r.jsxs)(f.x,{mt:"md",children:[o,h,S,R,O]}),D[50]=h,D[51]=S,D[52]=R,D[53]=O,D[54]=o,D[55]=I):I=D[55],I}function J(e){let t,a,n,s,o,i,c,u,d,h,g,_,v,w,S,j,k,E,C,R,M,T,N,F,q,A,L=(0,l.c)(51),{searchedTimeRange:O,connection:D,onTimeRangeSelect:V}=e;L[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,m.Oq)(["queries","rows","bytes"]).withDefault("queries"),L[0]=t):t=L[0];let[$,H]=(0,m.ZA)("insertsBy",t);L[1]!==$?(a="queries"===$?[{type:"sql_ast",operator:"=",left:"query_kind",right:"'Insert'"},{type:"sql_ast",operator:"=",left:"type",right:"'QueryStart'"}]:[{type:"sql",condition:"query_kind IN ('Insert', 'AsyncInsertFlush')"},{type:"sql_ast",operator:"=",left:"type",right:"'QueryFinish'"}],L[1]=$,L[2]=a):a=L[2];let z=a;L[3]!==$?(n="queries"===$?[{aggFn:"count",valueExpression:"",aggCondition:"",alias:"Queries"}]:"rows"===$?[{aggFn:"sum",valueExpression:"written_rows",aggCondition:"",alias:"Rows"}]:[{aggFn:"sum",valueExpression:"written_bytes",aggCondition:"",alias:"Bytes"}],L[3]=$,L[4]=n):n=L[4],L[5]===Symbol.for("react.memo_cache_sentinel")?(s=[{valueExpression:"tables"}],L[5]=s):s=L[5],L[6]!==$?(o="bytes"===$?{output:"byte",mantissa:2}:void 0,L[6]=$,L[7]=o):o=L[7],L[8]!==D||L[9]!==z||L[10]!==O||L[11]!==n||L[12]!==o?(i={select:n,from:Y,where:"",timestampValueExpression:"event_time",dateRange:O,displayType:p.t2.Line,filters:z,groupBy:s,connection:D,numberFormat:o},L[8]=D,L[9]=z,L[10]=O,L[11]=n,L[12]=o,L[13]=i):i=L[13];let U=i;L[14]===Symbol.for("react.memo_cache_sentinel")?(c={height:400},L[14]=c):c=L[14];let Q="queries"===$?"Queries":"rows"===$?"Rows":"Bytes";L[15]!==Q?(u=(0,r.jsxs)(y.E,{size:"sm",children:["Insert"," ",Q," ","Per Table"]}),L[15]=Q,L[16]=u):u=L[16];let W=$??"queries";return L[17]!==H?(d=e=>{H(e)},L[17]=H,L[18]=d):d=L[18],L[19]===Symbol.for("react.memo_cache_sentinel")?(h=[{label:"Queries",value:"queries"},{label:"Rows",value:"rows"},{label:"Bytes",value:"bytes"}],L[19]=h):h=L[19],L[20]!==W||L[21]!==d?(g=[(0,r.jsx)(b.I,{size:"xs",value:W,onChange:d,data:h},"inserts-by-toolbar")],L[20]=W,L[21]=d,L[22]=g):g=L[22],L[23]!==U||L[24]!==V||L[25]!==g||L[26]!==u?(_=(0,r.jsx)(f.x.Col,{span:12,children:(0,r.jsx)(B.d,{style:c,children:(0,r.jsx)(P.S,{title:u,toolbarPrefix:g,config:U,onTimeRangeSelect:V})})}),L[23]=U,L[24]=V,L[25]=g,L[26]=u,L[27]=_):_=L[27],L[28]===Symbol.for("react.memo_cache_sentinel")?(v={height:200},L[28]=v):v=L[28],L[29]===Symbol.for("react.memo_cache_sentinel")?(w=[{aggFn:"max",valueExpression:"value",aggCondition:"metric = 'MaxPartCountForPartition'",aggConditionLanguage:"sql",alias:"Max Parts per Partition"}],S={databaseName:"system",tableName:"asynchronous_metric_log"},L[29]=w,L[30]=S):(w=L[29],S=L[30]),L[31]!==D||L[32]!==O?(j={select:w,from:S,where:"",timestampValueExpression:"event_time",dateRange:O,connection:D},L[31]=D,L[32]=O,L[33]=j):j=L[33],L[34]!==V||L[35]!==j?(k=(0,r.jsx)(f.x.Col,{span:12,children:(0,r.jsx)(B.d,{style:v,children:(0,r.jsx)(P.S,{title:"Max Active Parts per Partition",config:j,showDisplaySwitcher:!1,showLegend:!1,onTimeRangeSelect:V})})}),L[34]=V,L[35]=j,L[36]=k):k=L[36],L[37]===Symbol.for("react.memo_cache_sentinel")?(E={height:400},L[37]=E):E=L[37],L[38]===Symbol.for("react.memo_cache_sentinel")?(C=(0,r.jsxs)(x.B,{gap:0,children:[(0,r.jsx)(y.E,{size:"sm",mb:"sm",children:"Active Parts Per Partition"}),(0,r.jsx)(y.E,{size:"xs",mb:"md",children:"Recommended to stay under 300, ClickHouse will automatically throttle inserts after 1,000 parts per partition and stop inserts at 3,000 parts per partition."})]}),L[38]=C):C=L[38],L[39]===Symbol.for("react.memo_cache_sentinel")?(R=[{aggFn:"count",valueExpression:"",alias:"Part Count"},{aggFn:"sum",valueExpression:"rows",alias:"Rows"},{valueExpression:"database",alias:"Database"},{valueExpression:"table",alias:"Table"},{valueExpression:"partition",alias:"Partition"}],M={databaseName:"system",tableName:"parts"},L[39]=R,L[40]=M):(R=L[39],M=L[40]),L[41]===Symbol.for("react.memo_cache_sentinel")?(T=[{valueExpression:"database"},{valueExpression:"table"},{valueExpression:"partition"}],L[41]=T):T=L[41],L[42]===Symbol.for("react.memo_cache_sentinel")?(N=[{valueExpression:"count()",ordering:"DESC"}],F={limit:100},L[42]=N,L[43]=F):(N=L[42],F=L[43]),L[44]!==D||L[45]!==O?(q=(0,r.jsx)(f.x.Col,{span:12,children:(0,r.jsx)(B.d,{style:E,children:(0,r.jsx)(I.A,{title:C,config:{dateRange:O,select:R,from:M,where:"active=1",groupBy:T,connection:D,orderBy:N,limit:F,selectGroupBy:!1}})})}),L[44]=D,L[45]=O,L[46]=q):q=L[46],L[47]!==_||L[48]!==k||L[49]!==q?(A=(0,r.jsxs)(f.x,{mt:"md",children:[_,k,q]}),L[47]=_,L[48]=k,L[49]=q,L[50]=A):A=L[50],A}function G(){let e,t,a,s,o,i,u,x,b,q,G,K,X,ee,et,ea,er,el,en,es,eo,ei,ec,eu,ed,em,eh,eg,ep,ef,ex,ey,eb,e_,ev,ew,eS,ej,ek,eE,eC,eR,eM,eT,eP,eN,eF,eq,eB,eA,eL,eO,eI,eD,eV,e$=(0,l.c)(121),eH=(0,$.Kh)(),{colorScheme:ez}=(0,_.C)(),{data:eU}=(0,z.ZY)(),[eQ,eW]=(0,m.ZA)("connection");e$[0]===Symbol.for("react.memo_cache_sentinel")?(e={latencyMin:m.YC,latencyMax:m.YC},e$[0]=e):e=e$[0];let[eY,eZ]=(0,m.ab)(e);e$[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,m.Oq)(["selects","inserts","infrastructure"]).withDefault("selects"),e$[1]=t):t=e$[1];let[eJ,eG]=(0,m.ZA)("tab",t),eK=eQ??eU?.[0]?.id??"";e$[2]!==eK?(a={values:{connection:eK}},e$[2]=eK,e$[3]=a):a=e$[3];let{control:eX}=(0,h.mN)(a);e$[4]!==eX?(s={control:eX,name:"connection"},e$[4]=eX,e$[5]=s):s=e$[5];let e0=(0,h.FH)(s),e1=(0,Q.ZC)(e0);e$[6]!==e1||e$[7]!==eW||e$[8]!==e0?(o=()=>{e1!==e0&&eW(e0??null)},i=[e0,eW,e1],e$[6]=e1,e$[7]=eW,e$[8]=e0,e$[9]=o,e$[10]=i):(o=e$[9],i=e$[10]),(0,n.useEffect)(o,i);let[e2,e3]=(0,n.useState)("Past 1h");e$[11]===Symbol.for("react.memo_cache_sentinel")?(u={initialDisplayValue:"Past 1h",initialTimeRange:W,setDisplayedTimeInputValue:e3},e$[11]=u):u=e$[11];let{searchedTimeRange:e5,onSearch:e4,onTimeRangeSelect:e6}=(0,U.R0)(u);e$[12]!==e6||e$[13]!==e5?(x={searchedTimeRange:e5,onTimeRangeSelect:e6,isLive:!1},e$[12]=e6,e$[13]=e5,e$[14]=x):x=e$[14];let{manualRefreshCooloff:e7,refresh:e8}=(0,V.r)(x),{latencyMin:e9,latencyMax:te}=eY;e$[15]!==te?(b=null!=te?[{type:"sql_ast",operator:"<",left:"query_duration_ms",right:`${te}`}]:[],e$[15]=te,e$[16]=b):b=e$[16],e$[17]!==e9?(q=null!=e9?[{type:"sql_ast",operator:">",left:"query_duration_ms",right:`${e9}`}]:[],e$[17]=e9,e$[18]=q):q=e$[18],e$[19]!==b||e$[20]!==q?(G=[...b,...q],e$[19]=b,e$[20]=q,e$[21]=G):G=e$[21];let tt=G;e:{if(null!=eY.latencyMin||null!=eY.latencyMax){let e;e$[22]!==e4||e$[23]!==eZ?(e=[(0,r.jsx)(v.$,{size:"xs",variant:"subtle",onClick:()=>{eZ({latencyMin:null,latencyMax:null}),e4("Past 1h")},children:"Reset"},"heatmap-reset-latency-filter")],e$[22]=e4,e$[23]=eZ,e$[24]=e):e=e$[24],K=e;break e}K=void 0}let ta=K;e$[25]!==e2||e$[26]!==e4?(X=(0,r.jsx)("form",{onSubmit:e=>(e.preventDefault(),e4(e2),!1),children:(0,r.jsx)(F.A,{inputValue:e2,setInputValue:e3,onSearch:e4})}),e$[25]=e2,e$[26]=e4,e$[27]=X):X=e$[27],e$[28]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,r.jsx)(R.A,{size:18}),e$[28]=ee):ee=e$[28],e$[29]!==e7||e$[30]!==e8?(et=(0,r.jsx)(w.m,{withArrow:!0,label:"Refresh dashboard",fz:"xs",color:"gray",children:(0,r.jsx)(S.M,{onClick:e8,loading:e7,disabled:e7,variant:"secondary",title:"Refresh dashboard","aria-label":"Refresh dashboard",size:"lg",children:ee})}),e$[29]=e7,e$[30]=e8,e$[31]=et):et=e$[31],e$[32]!==X||e$[33]!==et?(ea=(0,r.jsxs)(j.Y,{gap:"xs",children:[X,et]}),e$[32]=X,e$[33]=et,e$[34]=ea):ea=e$[34];let tr=ea;e$[35]===Symbol.for("react.memo_cache_sentinel")?(er=(0,r.jsxs)(k.B,{fz:"sm",children:[(0,r.jsx)(E.M,{component:d(),href:"/dashboards/list",fz:"sm",c:"dimmed",children:"Dashboards"}),(0,r.jsx)(y.E,{fz:"sm",c:"dimmed",children:"ClickHouse"})]}),e$[35]=er):er=e$[35];let tl=er;return e$[36]!==eX?(el=(0,r.jsx)(T.r,{control:eX,name:"connection",size:"xs"}),e$[36]=eX,e$[37]=el):el=e$[37],e$[38]!==eH?(en=(0,r.jsx)(c(),{children:(0,r.jsxs)("title",{children:["ClickHouse Dashboard – ",eH]})}),e$[38]=eH,e$[39]=en):en=e$[39],e$[40]===Symbol.for("react.memo_cache_sentinel")?(es=(0,r.jsx)(D.A,{requireSource:!1}),e$[40]=es):es=e$[40],e$[41]===Symbol.for("react.memo_cache_sentinel")?(eo=(0,r.jsxs)(C.t.List,{children:[(0,r.jsx)(C.t.Tab,{value:"selects",children:"Select"}),(0,r.jsx)(C.t.Tab,{value:"inserts",children:"Inserts"}),(0,r.jsx)(C.t.Tab,{value:"infrastructure",children:"Infrastructure"})]}),e$[41]=eo):eo=e$[41],e$[42]===Symbol.for("react.memo_cache_sentinel")?(ei={height:250},e$[42]=ei):ei=e$[42],e$[43]===Symbol.for("react.memo_cache_sentinel")?(ec=[{aggFn:"heatmap",valueExpression:"query_duration_ms"}],e$[43]=ec):ec=e$[43],e$[44]!==eK||e$[45]!==tt||e$[46]!==e5?(eu={displayType:p.t2.Heatmap,select:ec,from:Y,dateRange:e5,granularity:"auto",timestampValueExpression:"event_time",connection:eK,where:"query_kind='Select' AND (\n type='ExceptionWhileProcessing' OR type='QueryFinish' \n )",filters:tt},e$[44]=eK,e$[45]=tt,e$[46]=e5,e$[47]=eu):eu=e$[47],e$[48]!==e6||e$[49]!==eZ?(ed=(e,t,a,r)=>{e6(new Date(1e3*e),new Date(1e3*t)),eZ({latencyMax:r,latencyMin:a})},e$[48]=e6,e$[49]=eZ,e$[50]=ed):ed=e$[50],e$[51]!==ta||e$[52]!==eu||e$[53]!==ed?(em=(0,r.jsx)(f.x.Col,{span:12,children:(0,r.jsx)(B.d,{style:ei,children:(0,r.jsx)(L.Ay,{title:"Query Latency",toolbarSuffix:ta,config:eu,onFilter:ed})})}),e$[51]=ta,e$[52]=eu,e$[53]=ed,e$[54]=em):em=e$[54],e$[55]===Symbol.for("react.memo_cache_sentinel")?(eh={height:400},e$[55]=eh):eh=e$[55],e$[56]===Symbol.for("react.memo_cache_sentinel")?(eg=[{aggFn:"count",valueExpression:"",aggCondition:"",alias:"Query Count"}],ep=[{valueExpression:"tables"},{valueExpression:"type"}],e$[56]=eg,e$[57]=ep):(eg=e$[56],ep=e$[57]),e$[58]===Symbol.for("react.memo_cache_sentinel")?(ef={limit:1e3},e$[58]=ef):ef=e$[58],e$[59]!==eK||e$[60]!==tt||e$[61]!==e5?(ex={select:eg,groupBy:ep,selectGroupBy:!0,dateRange:e5,connection:eK,timestampValueExpression:"event_time",from:Y,granularity:"auto",where:"query_kind='Select' AND (\n type='ExceptionWhileProcessing' OR type='QueryFinish' \n OR type='ExceptionBeforeStart'\n )",filters:tt,limit:ef,displayType:p.t2.Line},e$[59]=eK,e$[60]=tt,e$[61]=e5,e$[62]=ex):ex=e$[62],e$[63]!==e6?(ey=(e,t)=>{e6(e,t)},e$[63]=e6,e$[64]=ey):ey=e$[64],e$[65]!==ex||e$[66]!==ey?(eb=(0,r.jsx)(f.x.Col,{span:12,children:(0,r.jsx)(B.d,{style:eh,children:(0,r.jsx)(P.S,{title:"Query Count by Table",config:ex,onTimeRangeSelect:ey})})}),e$[65]=ex,e$[66]=ey,e$[67]=eb):eb=e$[67],e$[68]===Symbol.for("react.memo_cache_sentinel")?(e_={height:400},e$[68]=e_):e_=e$[68],e$[69]===Symbol.for("react.memo_cache_sentinel")?(ev=[{aggFn:"count",valueExpression:"",alias:"Count"},{aggFn:"sum",valueExpression:"query_duration_ms",alias:"Total Duration (ms)"},{aggFn:"any",valueExpression:"query",alias:"Query Example"}],e$[69]=ev):ev=e$[69],e$[70]===Symbol.for("react.memo_cache_sentinel")?(ew=[{valueExpression:"normalized_query_hash"},{valueExpression:"tables"}],e$[70]=ew):ew=e$[70],e$[71]===Symbol.for("react.memo_cache_sentinel")?(eS=[{valueExpression:"sum(query_duration_ms)",ordering:"DESC"}],e$[71]=eS):eS=e$[71],e$[72]===Symbol.for("react.memo_cache_sentinel")?(ej={type:"sql_ast",operator:"=",left:"query_kind",right:"'Select'"},e$[72]=ej):ej=e$[72],e$[73]!==tt?(ek=[...tt,ej],e$[73]=tt,e$[74]=ek):ek=e$[74],e$[75]===Symbol.for("react.memo_cache_sentinel")?(eE={limit:20},e$[75]=eE):eE=e$[75],e$[76]!==eK||e$[77]!==e5||e$[78]!==ek?(eC=(0,r.jsx)(f.x.Col,{span:12,children:(0,r.jsx)(B.d,{style:e_,children:(0,r.jsx)(I.A,{title:"Most Time Consuming Query Patterns",config:{select:ev,dateRange:e5,from:Y,where:"(\n type='ExceptionWhileProcessing' OR type='QueryFinish' \n )",timestampValueExpression:"event_time",groupBy:ew,connection:eK,orderBy:eS,filters:ek,selectGroupBy:!1,limit:eE}})})}),e$[76]=eK,e$[77]=e5,e$[78]=ek,e$[79]=eC):eC=e$[79],e$[80]===Symbol.for("react.memo_cache_sentinel")?(eR={height:400},e$[80]=eR):eR=e$[80],e$[81]!==ez?(eM=e=>(0,r.jsx)(M.Ay,{extensions:[(0,H.J)()],editable:!1,value:(0,g.G)(String(e.query??"")),theme:"dark"===ez?"dark":"light",lang:"sql",maxHeight:"200px"}),e$[81]=ez,e$[82]=eM):eM=e$[82],e$[83]===Symbol.for("react.memo_cache_sentinel")?(eT=[{valueExpression:"query_duration_ms",ordering:"DESC"}],e$[83]=eT):eT=e$[83],e$[84]===Symbol.for("react.memo_cache_sentinel")?(eP={type:"sql_ast",operator:"=",left:"query_kind",right:"'Select'"},e$[84]=eP):eP=e$[84],e$[85]!==tt?(eN=[...tt,eP],e$[85]=tt,e$[86]=eN):eN=e$[86],e$[87]===Symbol.for("react.memo_cache_sentinel")?(eF={limit:100},e$[87]=eF):eF=e$[87],e$[88]!==eK||e$[89]!==e5||e$[90]!==eN?(eq={select:"event_time, query_kind, \n read_rows,\n formatReadableSize(memory_usage) as memory_usage,\n query_duration_ms, \n query",dateRange:e5,from:Y,where:"(\n type='ExceptionWhileProcessing' OR type='QueryFinish' \n )",timestampValueExpression:"event_time",connection:eK,orderBy:eT,filters:eN,limit:eF},e$[88]=eK,e$[89]=e5,e$[90]=eN,e$[91]=eq):eq=e$[91],e$[92]!==eM||e$[93]!==eq?(eB=(0,r.jsx)(f.x.Col,{span:12,children:(0,r.jsx)(B.d,{style:eR,children:(0,r.jsx)(A.Ay,{title:"Slowest Queries",children:(0,r.jsx)(O.rD,{renderRowDetails:eM,config:eq})})})}),e$[92]=eM,e$[93]=eq,e$[94]=eB):eB=e$[94],e$[95]!==em||e$[96]!==eb||e$[97]!==eC||e$[98]!==eB?(eA=(0,r.jsx)(C.t.Panel,{value:"selects",children:(0,r.jsxs)(f.x,{mt:"md",children:[em,eb,eC,eB]})}),e$[95]=em,e$[96]=eb,e$[97]=eC,e$[98]=eB,e$[99]=eA):eA=e$[99],e$[100]!==eK||e$[101]!==e6||e$[102]!==e5?(eL=(0,r.jsx)(C.t.Panel,{value:"inserts",children:(0,r.jsx)(J,{searchedTimeRange:e5,connection:eK,onTimeRangeSelect:e6})}),e$[100]=eK,e$[101]=e6,e$[102]=e5,e$[103]=eL):eL=e$[103],e$[104]!==eK||e$[105]!==e6||e$[106]!==e5?(eO=(0,r.jsx)(C.t.Panel,{value:"infrastructure",children:(0,r.jsx)(Z,{searchedTimeRange:e5,connection:eK,onTimeRangeSelect:e6})}),e$[104]=eK,e$[105]=e6,e$[106]=e5,e$[107]=eO):eO=e$[107],e$[108]!==eG||e$[109]!==eA||e$[110]!==eL||e$[111]!==eO||e$[112]!==eJ?(eI=(0,r.jsxs)(C.t,{mt:"md",keepMounted:!1,defaultValue:"selects",onChange:eG,value:eJ,children:[eo,eA,eL,eO]}),e$[108]=eG,e$[109]=eA,e$[110]=eL,e$[111]=eO,e$[112]=eJ,e$[113]=eI):eI=e$[113],e$[114]!==en||e$[115]!==eI?(eD=(0,r.jsxs)(r.Fragment,{children:[en,es,eI]}),e$[114]=en,e$[115]=eI,e$[116]=eD):eD=e$[116],e$[117]!==tr||e$[118]!==el||e$[119]!==eD?(eV=(0,r.jsx)(N.M,{"data-testid":"clickhouse-dashboard-page",breadcrumbs:tl,leading:el,actions:tr,padded:!0,content:eD}),e$[117]=tr,e$[118]=el,e$[119]=eD,e$[120]=eV):eV=e$[120],eV}let K=o()(async()=>G,{ssr:!1});K.getLayout=q.D;let X=K},86472:(e,t,a)=>{"use strict";a.d(t,{A:()=>j});var r=a(6029),l=a(75155),n=a(55729),s=a(67270),o=a(62798),i=a(96804),c=a(43152),u=a(81458),d=a(57389),m=a(78744),h=a(47788),g=a(82641),p=a(60665),f=a(97344),x=a(81973),y=a(92917),b=a(15628),_=a(17434),v=a(35467);let w=(e,t,a)=>{let r=e.getValue(a),l=t.getValue(a),n=null==r||isNaN(Number(r)),s=null==l||isNaN(Number(l));return n&&s?0:n?1:s?-1:Number(r)-Number(l)};var S=a(99082);function j(e){let t,a,j,C,R,M,T,P,N,F,q,B,A,L=(0,l.c)(75),{config:O,getRowSearchLink:I,enabled:D,queryKeyPrefix:V,onSortingChange:$,sort:H,hiddenColumns:z,title:U,toolbarPrefix:Q,toolbarSuffix:W,showMVOptimizationIndicator:Y,variant:Z,errorVariant:J}=e,G=void 0===D||D,K=void 0===Y||Y;L[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],L[0]=t):t=L[0];let[X,ee]=(0,n.useState)(t);L[1]!==O.source?(a={id:O.source},L[1]=O.source,L[2]=a):a=L[2];let{data:et}=(0,x.Fo)(a),ea=H||X;L[3]!==$?(j=e=>{ee(e),$&&$(e)},L[3]=$,L[4]=j):j=L[4];let er=j;e:{let e;if((0,o.Xo)(O)||(0,o.qi)(O)){C=O;break e}if(L[5]!==O||L[6]!==ea){if(e=(0,c.Z7)(O),ea.length){let t;L[8]!==ea?(t=ea.map(E),L[8]=ea,L[9]=t):t=L[9],e.orderBy=t}L[5]=O,L[6]=ea,L[7]=e}else e=L[7];C=e}let el=C;L[10]!==el?(R=(0,o.O3)(el)?el:void 0,L[10]=el,L[11]=R):R=L[11];let{data:en}=(0,d.d)(R);L[12]!==G||L[13]!==V?(M={enabled:G,queryKeyPrefix:V},L[12]=G,L[13]=V,L[14]=M):M=L[14];let{data:es,fetchNextPage:eo,hasNextPage:ei,isLoading:ec,isError:eu,error:ed}=(0,m.A)(el,M),{observerRef:em}=(0,y.BL)(eo);t:{let e;if((0,o.Xo)(O)||(0,o.qi)(O)){let e;L[15]===Symbol.for("react.memo_cache_sentinel")?(e=[],L[15]=e):e=L[15],T=e;break t}if("string"==typeof O.select){let e;L[16]===Symbol.for("react.memo_cache_sentinel")?(e=[],L[16]=e):e=L[16],T=e;break t}L[17]!==O.select?(e=O.select.reduce(k,[]),L[17]=O.select,L[18]=e):e=L[18],T=e}let eh=T,{formatByColumn:eg}=(0,x.ry)(el,es?.meta);if(es?.meta,L[19]!==es?.meta||L[20]!==el){a:{let e,t=new Map,a=new Map,r=es?.meta;if(!r||!(0,o.O3)(el)||!Array.isArray(el.select)||(0,s.sA)(el.select,el)||el.formulas?.length&&!1===el.showOperandSeries){P={colorByColumn:t,rulesByColumn:a};break a}for(let e=0;e<el.select.length;e++){let l=el.select[e],n=r[e]?.name;null!=n&&(l.color&&t.set(n,l.color),l.colorRules&&l.colorRules.length>0&&a.set(n,l.colorRules))}L[22]!==t||L[23]!==a?(e={colorByColumn:t,rulesByColumn:a},L[22]=t,L[23]=a,L[24]=e):e=L[24],P=e}L[19]=es?.meta,L[20]=el,L[21]=P}else P=L[21];let{colorByColumn:ep,rulesByColumn:ef}=P;r:{let e,t,a;L[25]!==es?.data?(e=es?.data??[],L[25]=es?.data,L[26]=e):e=L[26];let r=e;if(0===r.length){let e;L[27]===Symbol.for("react.memo_cache_sentinel")?(e=[],L[27]=e):e=L[27],N=e;break r}L[28]!==r?(t=r.at(0),L[28]=r,L[29]=t):t=L[29];let l=t;if(L[30]!==eh||L[31]!==ep||L[32]!==es?.meta||L[33]!==l||L[34]!==eg||L[35]!==z||L[36]!==el||L[37]!==ef){let e=l?Object.keys(l):[],t=[];if((0,o.O3)(el)&&Array.isArray(el.select)){let a=(0,x.u4)(el),r=e.length-a;t=r>0?e.slice(-r):[]}let r=[...e];if((0,o.O3)(el)&&el.groupByColumnsOnLeft&&Array.isArray(el.select)){let a=e.filter(e=>!t.includes(e));r=[...t,...a]}a=r.filter(e=>!z?.includes(e)).map(e=>{var a;let r;return{id:eh.includes(e)?`"${e}"`:e,dataKey:e,displayName:e,numberFormat:t.includes(e)?void 0:eg.get(e)??el.numberFormat,color:t.includes(e)?void 0:ep.get(e),colorRules:t.includes(e)?void 0:ef.get(e),sortingFn:(a=es?.meta,"number"===((r=a?.find(t=>t.name===e))?(0,v.rj)(r.type):void 0)?w:"alphanumeric")}}),L[30]=eh,L[31]=ep,L[32]=es?.meta,L[33]=l,L[34]=eg,L[35]=z,L[36]=el,L[37]=ef,L[38]=a}else a=L[38];N=a}let ex=N;if(L[39]!==en||L[40]!==el||L[41]!==K||L[42]!==et||L[43]!==Q||L[44]!==W){let e;if(F=[],Q&&Q.length>0&&F.push(...Q),et&&K&&(0,o.O3)(el)){let e;L[46]!==el||L[47]!==et?(e=(0,r.jsx)(S.A,{config:el,source:et,variant:"icon"},"db-table-chart-mv-indicator"),L[46]=el,L[47]=et,L[48]=e):e=L[48],F.push(e)}L[49]!==en||L[50]!==el.dateRange?(e=(0,c.m9)({mvOptimizationData:en,originalDateRange:el.dateRange}),L[49]=en,L[50]=el.dateRange,L[51]=e):e=L[51];let t=e;t&&F.push(t),W&&W.length>0&&F.push(...W),L[39]=en,L[40]=el,L[41]=K,L[42]=et,L[43]=Q,L[44]=W,L[45]=F}else F=L[45];let ey=F;L[52]!==O.onClick||L[53]!==el.dateRange?(q={onClick:O.onClick,dateRange:el.dateRange},L[52]=O.onClick,L[53]=el.dateRange,L[54]=q):q=L[54];let eb=function(e){let t,a,r,n,s,o,i,c,u,d=(0,l.c)(30),{onClick:m,dateRange:y}=e,{data:b}=(0,x.oE)(),{data:_}=(0,f.L9)();if(d[0]!==b){for(let e of(a=new Map,t=new Set,r=new Map,b?.filter(g.sx)??[])){t.add(e.id),r.set(e.id,e.name);let l=a.get(e.name);l?l.push(e.id):a.set(e.name,[e.id])}d[0]=b,d[1]=t,d[2]=a,d[3]=r}else t=d[1],a=d[2],r=d[3];d[4]!==t||d[5]!==a||d[6]!==r?(n=[a,t,r],d[4]=t,d[5]=a,d[6]=r,d[7]=n):n=d[7];let[v,w,S]=n;if(d[8]!==_){for(let e of(s=new Map,o=new Set,i=new Map,_??[])){o.add(e.id),i.set(e.id,e.name);let t=s.get(e.name);t?t.push(e.id):s.set(e.name,[e.id])}d[8]=_,d[9]=s,d[10]=o,d[11]=i}else s=d[9],o=d[10],i=d[11];d[12]!==s||d[13]!==o||d[14]!==i?(c=[s,o,i],d[12]=s,d[13]=o,d[14]=i,d[15]=c):c=d[15];let[j,k,E]=c;e:{let e,t,a;if(!m){u=null;break e}d[16]!==E||d[17]!==m||d[18]!==S?(e=(0,h.DE)({onClick:m,sourceNamesById:S,dashboardNamesById:E}),d[16]=E,d[17]=m,d[18]=S,d[19]=e):e=d[19];let r=e;d[20]===Symbol.for("react.memo_cache_sentinel")?(t=new WeakMap,d[20]=t):t=d[20];let l=t,n="external"===m.type;d[21]!==k||d[22]!==j||d[23]!==y||d[24]!==r||d[25]!==n||d[26]!==m||d[27]!==w||d[28]!==v?(a=e=>{let t=l.get(e);if(t)return t;let a=(e=>{let t="search"===m.type?(0,h.sJ)({onClick:m,row:e,sourceIds:w,sourceIdsByName:v,dateRange:y}):"dashboard"===m.type?(0,h.ov)({onClick:m,row:e,dashboardIds:k,dashboardIdsByName:j,dateRange:y}):(0,h.Hw)({onClick:m,row:e});if(t.ok)return{url:t.url,description:n?t.url:r,external:n};let a=t.error;return{url:null,description:r,onClickError:e=>{e.preventDefault(),p.$e.show({id:a,color:"red",title:"Link error",message:a})}}})(e);return l.set(e,a),a},d[21]=k,d[22]=j,d[23]=y,d[24]=r,d[25]=n,d[26]=m,d[27]=w,d[28]=v,d[29]=a):a=d[29],u=a}return u}(q);return L[55]!==ex||L[56]!==O||L[57]!==es||L[58]!==ea||L[59]!==ed||L[60]!==J||L[61]!==em||L[62]!==eb||L[63]!==I||L[64]!==er||L[65]!==ei||L[66]!==eu||L[67]!==ec||L[68]!==el.alternateRowBackground||L[69]!==Z?(B=ec&&!es?(0,r.jsx)("div",{className:"d-flex h-100 w-100 align-items-center justify-content-center text-muted",children:"Loading Chart Data..."}):eu&&ed?(0,r.jsx)(_.A,{error:ed,variant:J}):es?.data.length===0?(0,r.jsx)("div",{className:"d-flex h-100 w-100 align-items-center justify-content-center text-muted",children:"No data found within time range."}):(0,r.jsx)(u.X,{data:es?.data??[],columns:ex,getRowAction:eb??void 0,getRowSearchLink:eb?void 0:I,sorting:ea,enableClientSideSorting:(0,o.Xo)(O),onSortingChange:er,variant:Z,alternateRowBackground:!!el.alternateRowBackground,tableBottom:ei&&(0,r.jsx)(i.E,{ref:em,ta:"center",children:"Loading..."})}),L[55]=ex,L[56]=O,L[57]=es,L[58]=ea,L[59]=ed,L[60]=J,L[61]=em,L[62]=eb,L[63]=I,L[64]=er,L[65]=ei,L[66]=eu,L[67]=ec,L[68]=el.alternateRowBackground,L[69]=Z,L[70]=B):B=L[70],L[71]!==B||L[72]!==U||L[73]!==ey?(A=(0,r.jsx)(b.Ay,{title:U,toolbarItems:ey,children:B}),L[71]=B,L[72]=U,L[73]=ey,L[74]=A):A=L[74],A}function k(e,t){return t.alias&&e.push(t.alias),e}function E(e){return{valueExpression:e.id,ordering:e.desc?"DESC":"ASC"}}},91393:(e,t,a)=>{"use strict";a.d(t,{d:()=>o});var r=a(6029),l=a(75155),n=a(60481),s=a(15628);function o(e){let t,a,o,i=(0,l.c)(8),{children:c,style:u,"data-testid":d}=e;return i[0]!==u?(t={width:"100%",display:"flex",flexDirection:"column",overflow:"hidden",background:"var(--color-bg-body)",border:"1px solid var(--color-border)",borderRadius:"var(--mantine-radius-sm)",paddingTop:0,paddingBottom:"var(--mantine-spacing-xs)",...u,paddingInline:s.sg},i[0]=u,i[1]=t):t=i[1],i[2]!==c?(a=(0,r.jsx)(s.o$,{children:c}),i[2]=c,i[3]=a):a=i[3],i[4]!==d||i[5]!==t||i[6]!==a?(o=(0,r.jsx)(n.a,{"data-testid":d,style:t,children:a}),i[4]=d,i[5]=t,i[6]=a,i[7]=o):o=i[7],o}}},e=>{e.O(0,[7756,883,6171,5554,5299,4662,2482,9470,4802,7023,5096,1909,8909,5437,9249,7855,5525,1855,1440,7539,1138,3777,6053,3722,6006,9073,1021,1575,3439,5278,3172,2411,8744,4310,6593,636,8792],()=>e(e.s=55933)),_N_E=e.O()}]);