diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index a033521898..f666e7a15c 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,12 +1,12 @@ { "files": { - "main.css": "./static/css/main.a8f63142.css", - "main.js": "./static/js/main.d67a62da.js", + "main.css": "./static/css/main.07bcc4ad.css", + "main.js": "./static/js/main.3e8347de.js", "static/js/27.939f971b.chunk.js": "./static/js/27.939f971b.chunk.js", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.a8f63142.css", - "static/js/main.d67a62da.js" + "static/css/main.07bcc4ad.css", + "static/js/main.3e8347de.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 8c09374035..be1cf73295 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -
'+(n?e:NC(e,!0))+"
\n":""+(n?e:NC(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"\n".concat(e,"\n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var o=this.options.headerPrefix+r.slug(n);return"
".concat(e,"
\n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"".concat(e,"
")}},{key:"br",value:function(){return this.options.xhtml?""+NC(u.message+"",!0)+"";throw u}}hD.options=hD.setOptions=function(e){var t;return QC(hD.defaults,e),t=hD.defaults,TC=t,hD},hD.getDefaults=PC,hD.defaults=TC,hD.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n
"+NC(r.message+"",!0)+"";throw r}},hD.Parser=pD,hD.parser=pD.parse,hD.Renderer=cD,hD.TextRenderer=dD,hD.Lexer=sD,hD.lexer=sD.lex,hD.Tokenizer=oD,hD.Slugger=fD,hD.parse=hD;hD.options,hD.setOptions,hD.use,hD.walkTokens,hD.parseInline,pD.parse,sD.lex;var mD,vD,gD,yD,bD,xD,ZD,wD,kD=function(e){var n=e.title,o=e.description,i=e.unit,a=e.expr,l=e.showLegend,u=e.filename,s=e.alias,c=so().time.period,d=co(),f=(0,t.useRef)(null),p=(0,t.useState)(!0),h=(0,r.Z)(p,2),m=h[0],v=h[1],g=(0,t.useState)(c.step||1),y=(0,r.Z)(g,2),b=y[0],x=y[1],Z=(0,t.useState)({limits:{enable:!1,range:{1:[0,0]}}}),w=(0,r.Z)(Z,2),k=w[0],S=w[1],C=(0,t.useMemo)((function(){return Array.isArray(a)&&a.every((function(e){return e}))}),[a]),D=xg({predefinedQuery:C?a:[],display:"chart",visible:m,customStep:b}),E=D.isLoading,_=D.graphData,M=D.error,A=D.warning,P=function(e){var t=vn({},k);t.limits.range=e,S(t)};return(0,t.useEffect)((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return v(e.isIntersecting)}))}),{threshold:.1});return f.current&&e.observe(f.current),function(){f.current&&e.unobserve(f.current)}}),[]),C?(0,ie.BX)(xi,{border:"1px solid",borderRadius:"2px",borderColor:"divider",width:"100%",height:"100%",ref:f,children:[(0,ie.BX)(xi,{px:2,py:1,display:"flex",flexWrap:"wrap",width:"100%",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"divider",children:[(0,ie.tZ)(Ed,{arrow:!0,componentsProps:{tooltip:{sx:{maxWidth:"100%"}}},title:(0,ie.BX)(xi,{sx:{p:1},children:[o&&(0,ie.BX)(xi,{mb:2,children:[(0,ie.tZ)(bv,{fontWeight:"500",sx:{mb:.5,textDecoration:"underline"},children:"Description:"}),(0,ie.tZ)("div",{className:"panelDescription",dangerouslySetInnerHTML:{__html:hD.parse(o)}})]}),(0,ie.BX)(xi,{children:[(0,ie.tZ)(bv,{fontWeight:"500",sx:{mb:.5,textDecoration:"underline"},children:"Queries:"}),(0,ie.tZ)("div",{children:a.map((function(e,t){return(0,ie.tZ)(xi,{mb:.5,children:e},"".concat(t,"_").concat(e))}))})]})]}),children:(0,ie.tZ)(Jv.Z,{color:"info",sx:{mr:1}})}),(0,ie.tZ)(bv,{component:"div",variant:"subtitle1",fontWeight:500,sx:{mr:2,py:1,flexGrow:"1"},children:n||""}),(0,ie.tZ)(xi,{mr:2,py:1,children:(0,ie.tZ)(Qv,{defaultStep:c.step,setStep:function(e){return x(e)}})}),(0,ie.tZ)(Eg,{yaxis:k,setYaxisLimits:P,toggleEnableLimits:function(){var e=vn({},k);e.limits.enable=!e.limits.enable,S(e)}})]}),(0,ie.BX)(xi,{px:2,pb:2,children:[E&&(0,ie.tZ)(qg,{isLoading:!0,height:"500px"}),M&&(0,ie.tZ)(Et,{color:"error",severity:"error",sx:{whiteSpace:"pre-wrap",mt:2},children:M}),A&&(0,ie.tZ)(Et,{color:"warning",severity:"warning",sx:{whiteSpace:"pre-wrap",my:2},children:A}),_&&(0,ie.tZ)(Bd,{data:_,period:c,customStep:b,query:a,yaxis:k,unit:i,alias:s,showLegend:l,setYaxisLimits:P,setPeriod:function(e){var t=e.from,n=e.to;d({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]}):(0,ie.BX)(Et,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"expr"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:u}),"."]})},SD={position:"absolute",top:0,bottom:0,width:"10px",opacity:0,cursor:"ew-resize"},CD=function(e){var n=e.index,o=e.title,i=e.panels,a=e.filename,l=Ts(document.body),u=(0,t.useMemo)((function(){return l.width/12}),[l]),s=(0,t.useState)([]),c=(0,r.Z)(s,2),d=c[0],f=c[1];(0,t.useEffect)((function(){f(i.map((function(e){return e.width||12})))}),[i]);var p=(0,t.useState)({start:0,target:0,enable:!1}),h=(0,r.Z)(p,2),m=h[0],v=h[1],g=function(e){if(m.enable){var t=m.start,n=Math.ceil((t-e.clientX)/u);if(!(Math.abs(n)>=12)){var r=d.map((function(e,t){return e-(t===m.target?n:0)}));f(r)}}},y=function(){v(vn(vn({},m),{},{enable:!1}))};return(0,t.useEffect)((function(){return window.addEventListener("mousemove",g),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",y)}}),[m]),(0,ie.BX)(vC,{defaultExpanded:!n,sx:{boxShadow:"none"},children:[(0,ie.tZ)(SC,{sx:{px:3,bgcolor:"primary.light"},"aria-controls":"panel".concat(n,"-content"),id:"panel".concat(n,"-header"),expandIcon:(0,ie.tZ)(AC.Z,{}),children:(0,ie.BX)(xi,{display:"flex",alignItems:"center",width:"100%",children:[o&&(0,ie.tZ)(bv,{variant:"h6",fontWeight:"bold",sx:{mr:2},children:o}),i&&(0,ie.BX)(bv,{variant:"body2",fontStyle:"italic",children:["(",i.length," panels)"]})]})}),(0,ie.tZ)(MC,{sx:{display:"grid",gridGap:"10px"},children:(0,ie.tZ)(Ax,{container:!0,spacing:2,children:Array.isArray(i)&&i.length?i.map((function(e,t){return(0,ie.tZ)(Ax,{item:!0,xs:d[t],sx:{transition:"200ms"},children:(0,ie.BX)(xi,{position:"relative",height:"100%",children:[(0,ie.tZ)(kD,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:a,showLegend:e.showLegend}),(0,ie.tZ)("button",{style:vn(vn({},SD),{},{right:0}),onMouseDown:function(e){return function(e,t){v({start:e.clientX,target:t,enable:!0})}(e,t)}})]})},t)})):(0,ie.BX)(Et,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"panels"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:a}),"."]})})})]})},DD=function(){var e=(0,t.useState)(),n=(0,r.Z)(e,2),o=n[0],i=n[1],a=(0,t.useState)(0),l=(0,r.Z)(a,2),u=l[0],s=l[1],c=(0,t.useMemo)((function(){return br()(o,[u,"filename"],"")}),[o,u]),d=(0,t.useMemo)((function(){return br()(o,[u,"rows"],[])}),[o,u]);return(0,t.useEffect)((function(){aC().then((function(e){return e.length&&i(e)}))}),[]),(0,ie.BX)(ie.HY,{children:[!o&&(0,ie.tZ)(Et,{color:"info",severity:"info",sx:{m:4},children:"Dashboards not found"}),o&&(0,ie.BX)(ie.HY,{children:[(0,ie.tZ)(xi,{sx:{borderBottom:1,borderColor:"divider"},children:(0,ie.tZ)(Jn,{value:u,onChange:function(e,t){return s(t)},"aria-label":"dashboard-tabs",children:o&&o.map((function(e,t){return(0,ie.tZ)(lr,{label:e.title||e.filename,id:"tab-".concat(t),"aria-controls":"tabpanel-".concat(t)},t)}))})}),(0,ie.tZ)(xi,{children:Array.isArray(d)&&d.length?d.map((function(e,t){return(0,ie.tZ)(CD,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(u,"_").concat(t))})):(0,ie.BX)(Et,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"rows"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:c}),"."]})})]})]})},ED=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},_D=function(){function e(){vh(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return yh(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(n,r){return vn(vn({},n),{},{tabs:vn(vn({},n.tabs),{},(0,U.Z)({},r,e.tabsNames)),containerRefs:vn(vn({},n.containerRefs),{},(0,U.Z)({},r,(0,t.useRef)(null))),defaultActiveTab:vn(vn({},n.defaultActiveTab),{},(0,U.Z)({},r,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(e,'" label with the highest number of series'),seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:MD,seriesCountByLabelName:AD,seriesCountByFocusLabelValue:PD,seriesCountByLabelValuePair:TD,labelValueCountByLabelName:RD}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),MD=[{disablePadding:!1,id:"name",label:"Metric name",numeric:!1},{disablePadding:!1,id:"value",label:"Number of series",numeric:!1},{disablePadding:!1,id:"percentage",label:"Percent of series",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],AD=[{disablePadding:!1,id:"name",label:"Label name",numeric:!1},{disablePadding:!1,id:"value",label:"Number of series",numeric:!1},{disablePadding:!1,id:"percentage",label:"Percent of series",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],PD=[{disablePadding:!1,id:"name",label:"Label value",numeric:!1},{disablePadding:!1,id:"value",label:"Number of series",numeric:!1},{disablePadding:!1,id:"percentage",label:"Percent of series",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],TD=[{disablePadding:!1,id:"name",label:"Label=value pair",numeric:!1},{disablePadding:!1,id:"value",label:"Number of series",numeric:!1},{disablePadding:!1,id:"percentage",label:"Percent of series",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],RD=[{disablePadding:!1,id:"name",label:"Label name",numeric:!1},{disablePadding:!1,id:"value",label:"Number of unique values",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],FD={seriesCountByMetricName:function(e,t){return BD("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return BD(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],o=n.slice(1).join("=");return BD(r,o)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},BD=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},OD=n(3451),ID=function(e){var t=e.topN,n=e.error,r=e.query,o=e.onSetHistory,i=e.onRunQuery,a=e.onSetQuery,l=e.onTopNChange,u=e.onFocusLabelChange,s=e.totalSeries,c=e.totalLabelValuePairs,d=e.date,f=e.match,p=e.focusLabel,h=co(),m=so().queryControls.autocomplete,v=Ug().queryOptions;return(0,ie.BX)(xi,{boxShadow:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;",p:4,pb:2,mb:2,children:[(0,ie.tZ)(xi,{children:(0,ie.BX)(xi,{display:"grid",gridTemplateColumns:"1fr auto auto auto auto",gap:"4px",width:"100%",mb:4,children:[(0,ie.tZ)(sv,{query:r,index:0,autocomplete:m,queryOptions:v,error:n,setHistoryIndex:o,runQuery:i,setQuery:a,label:"Time series selector"}),(0,ie.tZ)(xi,{mr:2,children:(0,ie.tZ)(Gm,{label:"Number of entries per table",type:"number",size:"medium",variant:"outlined",value:t,error:t<1,helperText:t<1?"Number must be bigger than zero":" ",onChange:l})}),(0,ie.tZ)(xi,{mr:2,children:(0,ie.tZ)(Gm,{label:"Focus label",type:"text",size:"medium",variant:"outlined",value:p,onChange:u})}),(0,ie.tZ)(xi,{children:(0,ie.tZ)(Cv,{label:"Autocomplete",control:(0,ie.tZ)(jv,{checked:m,onChange:function(){h({type:"TOGGLE_AUTOCOMPLETE"}),qr("AUTOCOMPLETE",!m)}})})}),(0,ie.tZ)(Ed,{title:"Execute Query",children:(0,ie.tZ)(pt,{onClick:i,sx:{height:"49px",width:"49px"},children:(0,ie.tZ)(OD.Z,{})})})]})}),(0,ie.BX)(xi,{children:["Analyzed ",(0,ie.tZ)("b",{children:s})," series with ",(0,ie.tZ)("b",{children:c}),' "label=value" pairs at ',(0,ie.tZ)("b",{children:d})," ",f&&(0,ie.BX)("span",{children:["for series selector ",(0,ie.tZ)("b",{children:f})]}),". Show top ",t," entries per table."]})]})},LD=["children","value","index"],ND=function(e){var t=e.children,n=e.value,r=e.index,o=Md(e,LD);return(0,ie.tZ)("div",vn(vn({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&(0,ie.tZ)(xi,{sx:{p:3},children:t})}))},zD=(0,ht.Z)((0,ie.tZ)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),jD=(0,ht.Z)((0,ie.tZ)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),WD=["backIconButtonProps","count","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton"],HD=t.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.getItemAriaLabel,a=e.nextIconButtonProps,l=e.onPageChange,u=e.page,s=e.rowsPerPage,c=e.showFirstButton,d=e.showLastButton,f=(0,X.Z)(e,WD),p=Bt();return(0,ie.BX)("div",(0,o.Z)({ref:t},f,{children:[c&&(0,ie.tZ)(pt,{onClick:function(e){l(e,0)},disabled:0===u,"aria-label":i("first",u),title:i("first",u),children:"rtl"===p.direction?mD||(mD=(0,ie.tZ)(zD,{})):vD||(vD=(0,ie.tZ)(jD,{}))}),(0,ie.tZ)(pt,(0,o.Z)({onClick:function(e){l(e,u-1)},disabled:0===u,color:"inherit","aria-label":i("previous",u),title:i("previous",u)},n,{children:"rtl"===p.direction?gD||(gD=(0,ie.tZ)(An,{})):yD||(yD=(0,ie.tZ)(Mn,{}))})),(0,ie.tZ)(pt,(0,o.Z)({onClick:function(e){l(e,u+1)},disabled:-1!==r&&u>=Math.ceil(r/s)-1,color:"inherit","aria-label":i("next",u),title:i("next",u)},a,{children:"rtl"===p.direction?bD||(bD=(0,ie.tZ)(Mn,{})):xD||(xD=(0,ie.tZ)(An,{}))})),d&&(0,ie.tZ)(pt,{onClick:function(e){l(e,Math.max(0,Math.ceil(r/s)-1))},disabled:u>=Math.ceil(r/s)-1,"aria-label":i("last",u),title:i("last",u),children:"rtl"===p.direction?ZD||(ZD=(0,ie.tZ)(jD,{})):wD||(wD=(0,ie.tZ)(zD,{}))})]}))})),$D=HD;function VD(e){return(0,ne.Z)("MuiTablePagination",e)}var YD,qD=(0,re.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),UD=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton"],XD=(0,J.ZP)(nf,{name:"MuiTablePagination",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t=e.theme;return{overflow:"auto",color:t.palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),GD=(0,J.ZP)(qb,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:function(e,t){return(0,o.Z)((0,U.Z)({},"& .".concat(qD.actions),t.actions),t.toolbar)}})((function(e){var t,n=e.theme;return t={minHeight:52,paddingRight:2},(0,U.Z)(t,"".concat(n.breakpoints.up("xs")," and (orientation: landscape)"),{minHeight:52}),(0,U.Z)(t,n.breakpoints.up("sm"),{minHeight:52,paddingRight:2}),(0,U.Z)(t,"& .".concat(qD.actions),{flexShrink:0,marginLeft:20}),t})),KD=(0,J.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:function(e,t){return t.spacer}})({flex:"1 1 100%"}),QD=(0,J.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:function(e,t){return t.selectLabel}})((function(e){var t=e.theme;return(0,o.Z)({},t.typography.body2,{flexShrink:0})})),JD=(0,J.ZP)($m,{name:"MuiTablePagination",slot:"Select",overridesResolver:function(e,t){var n;return(0,o.Z)((n={},(0,U.Z)(n,"& .".concat(qD.selectIcon),t.selectIcon),(0,U.Z)(n,"& .".concat(qD.select),t.select),n),t.input,t.selectRoot)}})((0,U.Z)({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8},"& .".concat(qD.select),{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"})),eE=(0,J.ZP)(uv,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:function(e,t){return t.menuItem}})({}),tE=(0,J.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:function(e,t){return t.displayedRows}})((function(e){var t=e.theme;return(0,o.Z)({},t.typography.body2,{flexShrink:0})}));function nE(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"\u2013").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))}function rE(e){return"Go to ".concat(e," page")}var oE=t.forwardRef((function(e,n){var r,i=(0,ee.Z)({props:e,name:"MuiTablePagination"}),a=i.ActionsComponent,l=void 0===a?$D:a,u=i.backIconButtonProps,s=i.className,c=i.colSpan,d=i.component,f=void 0===d?nf:d,p=i.count,h=i.getItemAriaLabel,m=void 0===h?rE:h,v=i.labelDisplayedRows,g=void 0===v?nE:v,y=i.labelRowsPerPage,b=void 0===y?"Rows per page:":y,x=i.nextIconButtonProps,Z=i.onPageChange,w=i.onRowsPerPageChange,k=i.page,S=i.rowsPerPage,C=i.rowsPerPageOptions,D=void 0===C?[10,25,50,100]:C,E=i.SelectProps,_=void 0===E?{}:E,M=i.showFirstButton,A=void 0!==M&&M,P=i.showLastButton,T=void 0!==P&&P,R=(0,X.Z)(i,UD),F=i,B=function(e){var t=e.classes;return(0,K.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},VD,t)}(F),O=_.native?"option":eE;f!==nf&&"td"!==f||(r=c||1e3);var I=(0,md.Z)(_.id),L=(0,md.Z)(_.labelId);return(0,ie.tZ)(XD,(0,o.Z)({colSpan:r,ref:n,as:f,ownerState:F,className:(0,G.Z)(B.root,s)},R,{children:(0,ie.BX)(GD,{className:B.toolbar,children:[(0,ie.tZ)(KD,{className:B.spacer}),D.length>1&&(0,ie.tZ)(QD,{className:B.selectLabel,id:L,children:b}),D.length>1&&(0,ie.tZ)(JD,(0,o.Z)({variant:"standard",input:YD||(YD=(0,ie.tZ)(np,{})),value:S,onChange:w,id:I,labelId:L},_,{classes:(0,o.Z)({},_.classes,{root:(0,G.Z)(B.input,B.selectRoot,(_.classes||{}).root),select:(0,G.Z)(B.select,(_.classes||{}).select),icon:(0,G.Z)(B.selectIcon,(_.classes||{}).icon)}),children:D.map((function(e){return(0,t.createElement)(O,(0,o.Z)({},!Ls(O)&&{ownerState:F},{className:B.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)}))})),(0,ie.tZ)(tE,{className:B.displayedRows,children:g({from:0===p?0:k*S+1,to:-1===p?(k+1)*S:-1===S?p:Math.min(p,(k+1)*S),count:-1===p?-1:p,page:k})}),(0,ie.tZ)(l,{className:B.actions,backIconButtonProps:u,count:p,nextIconButtonProps:x,onPageChange:Z,page:k,rowsPerPage:S,showFirstButton:A,showLastButton:T,getItemAriaLabel:m})]})}))})),iE=oE,aE={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function lE(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,o=e.headerCells;return(0,ie.tZ)(mf,{children:(0,ie.tZ)(Zf,{children:o.map((function(e){return(0,ie.tZ)(nf,{align:e.numeric?"right":"left",sortDirection:n===e.id&&t,children:(0,ie.BX)(Mf,{active:n===e.id,direction:n===e.id?t:"asc",onClick:(o=e.id,function(e){r(e,o)}),children:[e.label,n===e.id?(0,ie.tZ)(xi,{component:"span",sx:aE,children:"desc"===t?"sorted descending":"sorted ascending"}):null]})},e.id);var o}))})})}function uE(e,t,n){return t[n]
'+(n?e:OC(e,!0))+"
\n":""+(n?e:OC(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"\n".concat(e,"\n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var o=this.options.headerPrefix+r.slug(n);return"
".concat(e,"
\n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"".concat(e,"
")}},{key:"br",value:function(){return this.options.xhtml?""+OC(u.message+"",!0)+"";throw u}}dD.options=dD.setOptions=function(e){var t;return XC(dD.defaults,e),t=dD.defaults,MC=t,dD},dD.getDefaults=_C,dD.defaults=MC,dD.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n
"+OC(r.message+"",!0)+"";throw r}},dD.Parser=cD,dD.parser=cD.parse,dD.Renderer=lD,dD.TextRenderer=uD,dD.Lexer=aD,dD.lexer=aD.lex,dD.Tokenizer=tD,dD.Slugger=sD,dD.parse=dD;dD.options,dD.setOptions,dD.use,dD.walkTokens,dD.parseInline,cD.parse,aD.lex;var fD,pD,hD,mD,vD,gD,yD,bD,xD=function(e){var n=e.title,o=e.description,i=e.unit,a=e.expr,l=e.showLegend,u=e.filename,s=e.alias,c=so().time.period,d=co(),f=(0,t.useRef)(null),p=(0,t.useState)(!0),h=(0,r.Z)(p,2),m=h[0],v=h[1],g=(0,t.useState)(c.step||1),y=(0,r.Z)(g,2),b=y[0],x=y[1],Z=(0,t.useState)({limits:{enable:!1,range:{1:[0,0]}}}),w=(0,r.Z)(Z,2),k=w[0],S=w[1],C=(0,t.useMemo)((function(){return Array.isArray(a)&&a.every((function(e){return e}))}),[a]),D=yg({predefinedQuery:C?a:[],display:"chart",visible:m,customStep:b}),E=D.isLoading,_=D.graphData,M=D.error,A=D.warning,P=function(e){var t=vn({},k);t.limits.range=e,S(t)};return(0,t.useEffect)((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return v(e.isIntersecting)}))}),{threshold:.1});return f.current&&e.observe(f.current),function(){f.current&&e.unobserve(f.current)}}),[]),C?(0,ie.BX)(xi,{border:"1px solid",borderRadius:"2px",borderColor:"divider",width:"100%",height:"100%",ref:f,children:[(0,ie.BX)(xi,{px:2,py:1,display:"flex",flexWrap:"wrap",width:"100%",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"divider",children:[(0,ie.tZ)(Dd,{arrow:!0,componentsProps:{tooltip:{sx:{maxWidth:"100%"}}},title:(0,ie.BX)(xi,{sx:{p:1},children:[o&&(0,ie.BX)(xi,{mb:2,children:[(0,ie.tZ)(yv,{fontWeight:"500",sx:{mb:.5,textDecoration:"underline"},children:"Description:"}),(0,ie.tZ)("div",{className:"panelDescription",dangerouslySetInnerHTML:{__html:dD.parse(o)}})]}),(0,ie.BX)(xi,{children:[(0,ie.tZ)(yv,{fontWeight:"500",sx:{mb:.5,textDecoration:"underline"},children:"Queries:"}),(0,ie.tZ)("div",{children:a.map((function(e,t){return(0,ie.tZ)(xi,{mb:.5,children:e},"".concat(t,"_").concat(e))}))})]})]}),children:(0,ie.tZ)(Kv.Z,{color:"info",sx:{mr:1}})}),(0,ie.tZ)(yv,{component:"div",variant:"subtitle1",fontWeight:500,sx:{mr:2,py:1,flexGrow:"1"},children:n||""}),(0,ie.tZ)(xi,{mr:2,py:1,children:(0,ie.tZ)(Hv,{defaultStep:c.step,setStep:function(e){return x(e)}})}),(0,ie.tZ)(Cg,{yaxis:k,setYaxisLimits:P,toggleEnableLimits:function(){var e=vn({},k);e.limits.enable=!e.limits.enable,S(e)}})]}),(0,ie.BX)(xi,{px:2,pb:2,children:[E&&(0,ie.tZ)(Vg,{isLoading:!0,height:"500px"}),M&&(0,ie.tZ)(Et,{color:"error",severity:"error",sx:{whiteSpace:"pre-wrap",mt:2},children:M}),A&&(0,ie.tZ)(Et,{color:"warning",severity:"warning",sx:{whiteSpace:"pre-wrap",my:2},children:A}),_&&(0,ie.tZ)(Fd,{data:_,period:c,customStep:b,query:a,yaxis:k,unit:i,alias:s,showLegend:l,setYaxisLimits:P,setPeriod:function(e){var t=e.from,n=e.to;d({type:"SET_PERIOD",payload:{from:t,to:n}})}})]})]}):(0,ie.BX)(Et,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"expr"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:u}),"."]})},ZD={position:"absolute",top:0,bottom:0,width:"10px",opacity:0,cursor:"ew-resize"},wD=function(e){var n=e.index,o=e.title,i=e.panels,a=e.filename,l=Ps(document.body),u=(0,t.useMemo)((function(){return l.width/12}),[l]),s=(0,t.useState)([]),c=(0,r.Z)(s,2),d=c[0],f=c[1];(0,t.useEffect)((function(){f(i.map((function(e){return e.width||12})))}),[i]);var p=(0,t.useState)({start:0,target:0,enable:!1}),h=(0,r.Z)(p,2),m=h[0],v=h[1],g=function(e){if(m.enable){var t=m.start,n=Math.ceil((t-e.clientX)/u);if(!(Math.abs(n)>=12)){var r=d.map((function(e,t){return e-(t===m.target?n:0)}));f(r)}}},y=function(){v(vn(vn({},m),{},{enable:!1}))};return(0,t.useEffect)((function(){return window.addEventListener("mousemove",g),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",y)}}),[m]),(0,ie.BX)(pC,{defaultExpanded:!n,sx:{boxShadow:"none"},children:[(0,ie.tZ)(ZC,{sx:{px:3,bgcolor:"primary.light"},"aria-controls":"panel".concat(n,"-content"),id:"panel".concat(n,"-header"),expandIcon:(0,ie.tZ)(EC.Z,{}),children:(0,ie.BX)(xi,{display:"flex",alignItems:"center",width:"100%",children:[o&&(0,ie.tZ)(yv,{variant:"h6",fontWeight:"bold",sx:{mr:2},children:o}),i&&(0,ie.BX)(yv,{variant:"body2",fontStyle:"italic",children:["(",i.length," panels)"]})]})}),(0,ie.tZ)(DC,{sx:{display:"grid",gridGap:"10px"},children:(0,ie.tZ)(Ex,{container:!0,spacing:2,children:Array.isArray(i)&&i.length?i.map((function(e,t){return(0,ie.tZ)(Ex,{item:!0,xs:d[t],sx:{transition:"200ms"},children:(0,ie.BX)(xi,{position:"relative",height:"100%",children:[(0,ie.tZ)(xD,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:a,showLegend:e.showLegend}),(0,ie.tZ)("button",{style:vn(vn({},ZD),{},{right:0}),onMouseDown:function(e){return function(e,t){v({start:e.clientX,target:t,enable:!0})}(e,t)}})]})},t)})):(0,ie.BX)(Et,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"panels"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:a}),"."]})})})]})},kD=function(){var e=(0,t.useState)(),n=(0,r.Z)(e,2),o=n[0],i=n[1],a=(0,t.useState)(0),l=(0,r.Z)(a,2),u=l[0],s=l[1],c=(0,t.useMemo)((function(){return br()(o,[u,"filename"],"")}),[o,u]),d=(0,t.useMemo)((function(){return br()(o,[u,"rows"],[])}),[o,u]);return(0,t.useEffect)((function(){rC().then((function(e){return e.length&&i(e)}))}),[]),(0,ie.BX)(ie.HY,{children:[!o&&(0,ie.tZ)(Et,{color:"info",severity:"info",sx:{m:4},children:"Dashboards not found"}),o&&(0,ie.BX)(ie.HY,{children:[(0,ie.tZ)(xi,{sx:{borderBottom:1,borderColor:"divider"},children:(0,ie.tZ)(Jn,{value:u,onChange:function(e,t){return s(t)},"aria-label":"dashboard-tabs",children:o&&o.map((function(e,t){return(0,ie.tZ)(lr,{label:e.title||e.filename,id:"tab-".concat(t),"aria-controls":"tabpanel-".concat(t)},t)}))})}),(0,ie.tZ)(xi,{children:Array.isArray(d)&&d.length?d.map((function(e,t){return(0,ie.tZ)(wD,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(u,"_").concat(t))})):(0,ie.BX)(Et,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"rows"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:c}),"."]})})]})]})},SD=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},CD=function(){function e(){mh(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return gh(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(n,r){return vn(vn({},n),{},{tabs:vn(vn({},n.tabs),{},(0,U.Z)({},r,e.tabsNames)),containerRefs:vn(vn({},n.containerRefs),{},(0,U.Z)({},r,(0,t.useRef)(null))),defaultActiveTab:vn(vn({},n.defaultActiveTab),{},(0,U.Z)({},r,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(e,'" label with the highest number of series'),seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:DD,seriesCountByLabelName:ED,seriesCountByFocusLabelValue:_D,seriesCountByLabelValuePair:MD,labelValueCountByLabelName:AD}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),DD=[{disablePadding:!1,id:"name",label:"Metric name",numeric:!1},{disablePadding:!1,id:"value",label:"Number of series",numeric:!1},{disablePadding:!1,id:"percentage",label:"Percent of series",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],ED=[{disablePadding:!1,id:"name",label:"Label name",numeric:!1},{disablePadding:!1,id:"value",label:"Number of series",numeric:!1},{disablePadding:!1,id:"percentage",label:"Percent of series",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],_D=[{disablePadding:!1,id:"name",label:"Label value",numeric:!1},{disablePadding:!1,id:"value",label:"Number of series",numeric:!1},{disablePadding:!1,id:"percentage",label:"Percent of series",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],MD=[{disablePadding:!1,id:"name",label:"Label=value pair",numeric:!1},{disablePadding:!1,id:"value",label:"Number of series",numeric:!1},{disablePadding:!1,id:"percentage",label:"Percent of series",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],AD=[{disablePadding:!1,id:"name",label:"Label name",numeric:!1},{disablePadding:!1,id:"value",label:"Number of unique values",numeric:!1},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],PD={seriesCountByMetricName:function(e,t){return TD("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return TD(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],o=n.slice(1).join("=");return TD(r,o)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},TD=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},RD=n(3451),FD=function(e){var t=e.topN,n=e.error,r=e.query,o=e.onSetHistory,i=e.onRunQuery,a=e.onSetQuery,l=e.onTopNChange,u=e.onFocusLabelChange,s=e.totalSeries,c=e.totalLabelValuePairs,d=e.date,f=e.match,p=e.focusLabel,h=co(),m=so().queryControls.autocomplete,v=Yg().queryOptions;return(0,ie.BX)(xi,{boxShadow:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;",p:4,pb:2,mb:2,children:[(0,ie.tZ)(xi,{children:(0,ie.BX)(xi,{display:"grid",gridTemplateColumns:"1fr auto auto auto auto",gap:"4px",width:"100%",mb:4,children:[(0,ie.tZ)(uv,{query:r,index:0,autocomplete:m,queryOptions:v,error:n,setHistoryIndex:o,runQuery:i,setQuery:a,label:"Time series selector"}),(0,ie.tZ)(xi,{mr:2,children:(0,ie.tZ)(Xm,{label:"Number of entries per table",type:"number",size:"medium",variant:"outlined",value:t,error:t<1,helperText:t<1?"Number must be bigger than zero":" ",onChange:l})}),(0,ie.tZ)(xi,{mr:2,children:(0,ie.tZ)(Xm,{label:"Focus label",type:"text",size:"medium",variant:"outlined",value:p,onChange:u})}),(0,ie.tZ)(xi,{children:(0,ie.tZ)(Sv,{label:"Autocomplete",control:(0,ie.tZ)(zv,{checked:m,onChange:function(){h({type:"TOGGLE_AUTOCOMPLETE"}),qr("AUTOCOMPLETE",!m)}})})}),(0,ie.tZ)(Dd,{title:"Execute Query",children:(0,ie.tZ)(pt,{onClick:i,sx:{height:"49px",width:"49px"},children:(0,ie.tZ)(RD.Z,{})})})]})}),(0,ie.BX)(xi,{children:["Analyzed ",(0,ie.tZ)("b",{children:s})," series with ",(0,ie.tZ)("b",{children:c}),' "label=value" pairs at ',(0,ie.tZ)("b",{children:d})," ",f&&(0,ie.BX)("span",{children:["for series selector ",(0,ie.tZ)("b",{children:f})]}),". Show top ",t," entries per table."]})]})},BD=["children","value","index"],OD=function(e){var t=e.children,n=e.value,r=e.index,o=_d(e,BD);return(0,ie.tZ)("div",vn(vn({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&(0,ie.tZ)(xi,{sx:{p:3},children:t})}))},ID=(0,ht.Z)((0,ie.tZ)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),LD=(0,ht.Z)((0,ie.tZ)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),ND=["backIconButtonProps","count","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton"],zD=t.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.getItemAriaLabel,a=e.nextIconButtonProps,l=e.onPageChange,u=e.page,s=e.rowsPerPage,c=e.showFirstButton,d=e.showLastButton,f=(0,X.Z)(e,ND),p=Bt();return(0,ie.BX)("div",(0,o.Z)({ref:t},f,{children:[c&&(0,ie.tZ)(pt,{onClick:function(e){l(e,0)},disabled:0===u,"aria-label":i("first",u),title:i("first",u),children:"rtl"===p.direction?fD||(fD=(0,ie.tZ)(ID,{})):pD||(pD=(0,ie.tZ)(LD,{}))}),(0,ie.tZ)(pt,(0,o.Z)({onClick:function(e){l(e,u-1)},disabled:0===u,color:"inherit","aria-label":i("previous",u),title:i("previous",u)},n,{children:"rtl"===p.direction?hD||(hD=(0,ie.tZ)(An,{})):mD||(mD=(0,ie.tZ)(Mn,{}))})),(0,ie.tZ)(pt,(0,o.Z)({onClick:function(e){l(e,u+1)},disabled:-1!==r&&u>=Math.ceil(r/s)-1,color:"inherit","aria-label":i("next",u),title:i("next",u)},a,{children:"rtl"===p.direction?vD||(vD=(0,ie.tZ)(Mn,{})):gD||(gD=(0,ie.tZ)(An,{}))})),d&&(0,ie.tZ)(pt,{onClick:function(e){l(e,Math.max(0,Math.ceil(r/s)-1))},disabled:u>=Math.ceil(r/s)-1,"aria-label":i("last",u),title:i("last",u),children:"rtl"===p.direction?yD||(yD=(0,ie.tZ)(LD,{})):bD||(bD=(0,ie.tZ)(ID,{}))})]}))})),jD=zD;function WD(e){return(0,ne.Z)("MuiTablePagination",e)}var HD,$D=(0,re.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),VD=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton"],YD=(0,J.ZP)(tf,{name:"MuiTablePagination",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t=e.theme;return{overflow:"auto",color:t.palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),qD=(0,J.ZP)(Vb,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:function(e,t){return(0,o.Z)((0,U.Z)({},"& .".concat($D.actions),t.actions),t.toolbar)}})((function(e){var t,n=e.theme;return t={minHeight:52,paddingRight:2},(0,U.Z)(t,"".concat(n.breakpoints.up("xs")," and (orientation: landscape)"),{minHeight:52}),(0,U.Z)(t,n.breakpoints.up("sm"),{minHeight:52,paddingRight:2}),(0,U.Z)(t,"& .".concat($D.actions),{flexShrink:0,marginLeft:20}),t})),UD=(0,J.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:function(e,t){return t.spacer}})({flex:"1 1 100%"}),XD=(0,J.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:function(e,t){return t.selectLabel}})((function(e){var t=e.theme;return(0,o.Z)({},t.typography.body2,{flexShrink:0})})),GD=(0,J.ZP)(Hm,{name:"MuiTablePagination",slot:"Select",overridesResolver:function(e,t){var n;return(0,o.Z)((n={},(0,U.Z)(n,"& .".concat($D.selectIcon),t.selectIcon),(0,U.Z)(n,"& .".concat($D.select),t.select),n),t.input,t.selectRoot)}})((0,U.Z)({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8},"& .".concat($D.select),{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"})),KD=(0,J.ZP)(lv,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:function(e,t){return t.menuItem}})({}),QD=(0,J.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:function(e,t){return t.displayedRows}})((function(e){var t=e.theme;return(0,o.Z)({},t.typography.body2,{flexShrink:0})}));function JD(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"\u2013").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))}function eE(e){return"Go to ".concat(e," page")}var tE=t.forwardRef((function(e,n){var r,i=(0,ee.Z)({props:e,name:"MuiTablePagination"}),a=i.ActionsComponent,l=void 0===a?jD:a,u=i.backIconButtonProps,s=i.className,c=i.colSpan,d=i.component,f=void 0===d?tf:d,p=i.count,h=i.getItemAriaLabel,m=void 0===h?eE:h,v=i.labelDisplayedRows,g=void 0===v?JD:v,y=i.labelRowsPerPage,b=void 0===y?"Rows per page:":y,x=i.nextIconButtonProps,Z=i.onPageChange,w=i.onRowsPerPageChange,k=i.page,S=i.rowsPerPage,C=i.rowsPerPageOptions,D=void 0===C?[10,25,50,100]:C,E=i.SelectProps,_=void 0===E?{}:E,M=i.showFirstButton,A=void 0!==M&&M,P=i.showLastButton,T=void 0!==P&&P,R=(0,X.Z)(i,VD),F=i,B=function(e){var t=e.classes;return(0,K.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},WD,t)}(F),O=_.native?"option":KD;f!==tf&&"td"!==f||(r=c||1e3);var I=(0,hd.Z)(_.id),L=(0,hd.Z)(_.labelId);return(0,ie.tZ)(YD,(0,o.Z)({colSpan:r,ref:n,as:f,ownerState:F,className:(0,G.Z)(B.root,s)},R,{children:(0,ie.BX)(qD,{className:B.toolbar,children:[(0,ie.tZ)(UD,{className:B.spacer}),D.length>1&&(0,ie.tZ)(XD,{className:B.selectLabel,id:L,children:b}),D.length>1&&(0,ie.tZ)(GD,(0,o.Z)({variant:"standard",input:HD||(HD=(0,ie.tZ)(tp,{})),value:S,onChange:w,id:I,labelId:L},_,{classes:(0,o.Z)({},_.classes,{root:(0,G.Z)(B.input,B.selectRoot,(_.classes||{}).root),select:(0,G.Z)(B.select,(_.classes||{}).select),icon:(0,G.Z)(B.selectIcon,(_.classes||{}).icon)}),children:D.map((function(e){return(0,t.createElement)(O,(0,o.Z)({},!Is(O)&&{ownerState:F},{className:B.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)}))})),(0,ie.tZ)(QD,{className:B.displayedRows,children:g({from:0===p?0:k*S+1,to:-1===p?(k+1)*S:-1===S?p:Math.min(p,(k+1)*S),count:-1===p?-1:p,page:k})}),(0,ie.tZ)(l,{className:B.actions,backIconButtonProps:u,count:p,nextIconButtonProps:x,onPageChange:Z,page:k,rowsPerPage:S,showFirstButton:A,showLastButton:T,getItemAriaLabel:m})]})}))})),nE=tE,rE={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function oE(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,o=e.headerCells;return(0,ie.tZ)(hf,{children:(0,ie.tZ)(xf,{children:o.map((function(e){return(0,ie.tZ)(tf,{align:e.numeric?"right":"left",sortDirection:n===e.id&&t,children:(0,ie.BX)(_f,{active:n===e.id,direction:n===e.id?t:"asc",onClick:(o=e.id,function(e){r(e,o)}),children:[e.label,n===e.id?(0,ie.tZ)(xi,{component:"span",sx:rE,children:"desc"===t?"sorted descending":"sorted ascending"}):null]})},e.id);var o}))})})}function iE(e,t,n){return t[n]