diff options
Diffstat (limited to 'web/gui/v2/1646.f66ed032e200120e1457.chunk.js')
-rw-r--r-- | web/gui/v2/1646.f66ed032e200120e1457.chunk.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/web/gui/v2/1646.f66ed032e200120e1457.chunk.js b/web/gui/v2/1646.f66ed032e200120e1457.chunk.js new file mode 100644 index 0000000000..411b0fd580 --- /dev/null +++ b/web/gui/v2/1646.f66ed032e200120e1457.chunk.js @@ -0,0 +1 @@ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2a5f6b50-67c1-4b2a-a976-f22746599825",e._sentryDebugIdIdentifier="sentry-dbid-2a5f6b50-67c1-4b2a-a976-f22746599825")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"0c0a7a41a0e7ecb4870dbce38dbd7d5e0913bb7f"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1646],{80959:function(e,t,n){var r=n(87462),a=n(45987),o=n(67294),l=n(59978),i=["message","title","footer"];t.Z=function(e){var t=e.message,n=e.title,c=e.footer,u=(0,a.Z)(e,i),s=(null===u||void 0===u?void 0:u["data-testid"])||"functionError";return o.createElement(l.Flex,(0,r.Z)({alignItems:"center",column:!0,"data-testid":s,flex:!0,gap:3,justifyContent:"center",padding:[0,20]},u),o.createElement(l.H3,{"data-testid":"".concat(s,"-title")},n),o.createElement(l.TextBig,{color:"textDescription","data-testid":"".concat(s,"-message")},t),c)}},91646:function(e,t,n){n.r(t),n.d(t,{default:function(){return la}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(29439),a=n(4942),o=n(67294),l=n(91268),i=n(96929),c=n(4822),u=n(3322),s=n(71181),d=n(36560),f=n(78266),m=n(45987),p=n(87462),v=(n(69826),n(31672),n(59461),n(41817),n(59978)),g=n(97945),h=n(74059),y=n(49254),b=n(89250),E=function(e){var t=(0,c.XT)(e),n=(0,b.TH)().state;return(0,o.useEffect)((function(){null!==n&&void 0!==n&&n.nodeId&&t([n.nodeId])}),[]),null===n||void 0===n?void 0:n.nodeId},x=n(91008),O=n(80959),w=["paramsKey"],C=function(e){var t=e.paramsKey,n=(0,m.Z)(e,w),r=(null===n||void 0===n?void 0:n["data-testid"])||"capableNodesError",a=(0,c.c6)(t),l=(0,g.iy)(null===a||void 0===a?void 0:a[0],"name");return o.createElement(v.Flex,(0,p.Z)({alignItems:"center",flex:!0,gap:8,justifyContent:"center"},n,{"data-testid":r}),o.createElement(v.Icon,{"data-testid":"".concat(r,"-icon"),height:"230px",name:"unreachableNode",width:"230px"}),o.createElement(O.Z,{"data-testid":"".concat(r,"-details"),gap:2,title:l?"".concat(l," is not configured for Functions"):"Your nodes are not configured for Functions",message:o.createElement(o.Fragment,null,"Learn how to configure your nodes"," ",o.createElement(x.Z,{Component:v.TextBig,"data-ga":"functions-capable-nodes-error::click-docs-link::functions-view","data-testid":"".concat(r,"-docsLink"),href:"https://learn.netdata.cloud/docs/nightly/operations/run-time-troubleshooting-with-functions#prerequisites",target:"_blank",rel:"noopener noreferrer"},"to support functions")),width:{max:"fit-content"}}))},P=n(64599),Z=n(70842),j=n(39469),k=(n(21249),n(57640),n(9924),n(92222),n(36657)),I=n(91128),T=n(82351),S=n(46667),D=(n(26699),n(32023),n(62554)),K=n(71893),F=(0,K.default)(v.Flex).attrs({alignItems:"center",border:{side:"bottom",color:"borderSecondary"},padding:[2]}).withConfig({displayName:"styled__MenuItem",componentId:"sc-1bb2nho-0"})(["&:last-child{border:none;}"]),N=(0,K.default)(v.TextInput).withConfig({displayName:"styled__TextInput",componentId:"sc-1bb2nho-1"})(['margin:0 10px;min-width:unset;width:45px;> div{margin:0;}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}input[type="number"]{-moz-appearance:textfield;}']),L=["onClose","targetRef","paramsKey"];function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=o.createElement(v.Flex,{column:!0,width:{max:"500px"},gap:1},o.createElement(v.TextSmall,{color:"bright"},"Full data queries will always provide all the available facets with counters for your search, which depending on the size of the query could result in poor performance."),o.createElement(v.TextSmall,{color:"bright"},"i.e. Querying logs for multiple days with multitudes of entries."),o.createElement(v.TextSmall,{color:"bright"},"With this toggle \u201coff\u201d (default), queries will slice the data and will lower performance hit on your servers.")),R=function(e){var t=e.onClose,n=e.targetRef,a=e.paramsKey,l=(0,m.Z)(e,L),i=(null===l||void 0===l?void 0:l["data-testid"])||"config",s=(0,u.ZQ)(M({key:"acceptedParams"},a)).includes("slice"),d=(0,c.D0)("slice",M({defaultValue:!0,flavour:"bool"},a)),f=(0,r.Z)(d,2),p=f[0],g=f[1],h=(0,S.Z)(!p),y=(0,r.Z)(h,2),b=y[0],E=y[1];(0,D.Z)((function(){!!p===!!b&&g(!b)}),200,[p,b]);var x=(0,u.ZQ)(M({key:"updateEvery"},a)),O=(0,c.D0)("pollingInterval",M(M({},a),{},{flavour:"int",defaultValue:x})),w=(0,r.Z)(O,2),C=w[0],P=w[1],Z=(0,o.useState)(C),j=(0,r.Z)(Z,2),k=j[0],I=j[1];return(0,D.Z)((function(){C!==k&&P(k)}),400,[C,k]),n.current?o.createElement(v.Drop,{align:{top:"bottom",right:"right"},animation:!0,background:"dropdown",close:t,column:!0,"data-testid":i,margin:[.5,0,0],onClickOutside:t,onEsc:t,round:1,target:n.current,width:58},s&&o.createElement(F,{"data-testid":"".concat(i,"-slice-data"),justifyContent:"between"},o.createElement(v.Flex,{gap:1,alignItems:"center"},o.createElement(v.Text,{color:"menuItem","data-testid":"".concat(i,"-slice-data-label")},"Full data queries (slow)"),o.createElement(T.Z,{plain:!0,content:A,isBasic:!0,allowHoverOnTooltip:!0,stretch:"align"},o.createElement(v.Icon,{name:"information",color:"textDescription",width:"14px",height:"14px"}))),o.createElement(v.Toggle,{colored:!0,checked:b,"data-ga":"functions-config::auto-slice-data-switch::functions-view::".concat(b?"enabled":"disabled"),"data-testid":"".concat(i,"-slice-data-switch"),onChange:E})),o.createElement(F,{"data-testid":"".concat(i,"-pollingInterval")},o.createElement(v.Text,{color:"menuItem","data-testid":"".concat(i,"-pollingInterval-label")},"Refresh every"),o.createElement(N,{"data-ga":"functions-config::polling-interval::functions-view","data-testid":"".concat(i,"-pollingInterval-input"),min:1,onChange:function(e){var t=+e.target.value;t>0&&I(t)},size:"tiny",type:"number",value:k}),o.createElement(v.Text,{color:"menuItem","data-testid":"".concat(i,"-pollingInterval-units")},"seconds"))):null},_=n(89405),B=function(e){var t=e.paramsKey,n=(0,u.ZQ)(t).updatedAt,r=(0,_.rA)(),a=r.localeTimeString,l=r.localeDateString;return o.createElement(v.TextMicro,{color:"textLite"},"Last updated: ",l(n,{long:!0})," ",a(n,{secs:!0}))},V=n(2379),H=K.default.div.withConfig({displayName:"reload__IconsContainer",componentId:"sc-gd414j-0"})(["position:relative;"]),q=(0,K.default)(v.Icon).withConfig({displayName:"reload__SmallIcon",componentId:"sc-gd414j-1"})(["position:absolute;top:3px;left:3px;"]),W=(0,K.keyframes)(["from{transform:rotate(0deg);}to{transform:rotate(359deg);}"]),U=(0,K.default)(v.IconButton).withConfig({displayName:"reload__AnimatedIcon",componentId:"sc-gd414j-2"})(["&& svg{animation:",";}animation:rotation 2s infinite linear;"],(function(e){return e.animate?(0,K.css)([""," 3s linear infinite"],W):""})),Q=function(e){var t=e.onRefresh,n=e.onCancel,a=e.dataGa,l=e.testId,i=e.loading,c=(0,V.Cd)(),u=(0,o.useState)(!1),s=(0,r.Z)(u,2),d=s[0],f=s[1],m=(0,o.useState)(!1),p=(0,r.Z)(m,2),g=p[0],h=p[1];return(0,o.useEffect)((function(){if(!i)return f(!1),void h(!1);var e=setTimeout((function(){return f(!0)}),500),t=setTimeout((function(){return h(!0)}),3e3);return function(){clearTimeout(e),clearTimeout(t)}}),[i]),o.createElement(v.Flex,{alignItems:"center",gap:1},o.createElement(H,null,o.createElement(q,{name:c?"playSolid":"pauseSolid",width:"6px",height:"6px",color:c?"primary":"text"}),o.createElement(U,{animate:d,"data-testid":"".concat(l,"-refreshNowBtn"),"data-ga":"".concat(a,"::click-refresh-now::functions-view"),flavour:"hollow",icon:"refresh",onClick:function(){return t({merge:!1})},disabled:c,padding:[1]})),o.createElement(v.Collapsible,{open:g,direction:"horizontal",duration:300},o.createElement(v.IconButton,{"data-testid":"".concat(l,"-cancelBtn"),"data-ga":"".concat(a,"::click-cancel::functions-view"),flavour:"hollow",warning:!0,icon:"x",onClick:function(){return n()},padding:[1]})))},X=["onRefresh","onCancel","paramsKey"],G={fn:{dataGa:"functions-header",hasConfig:!0,Title:function(e){var t=e.name,n=e.fn,r=void 0===n?"Processes":n;return t?"".concat(r," on ").concat(t):r},titleTooltip:o.createElement(v.Flex,{width:{max:"500px"},alignItems:"center",flexWrap:!0},o.createElement(v.Text,{color:"bright"},"Netdata Functions enable detailed low-level monitoring at the edge. Use this tab to execute functions on your node and see the results immediately."," "),o.createElement(x.Z,{Component:v.Text,"data-ga":"functions-header::click-docs-link::functions-view","data-testid":"docsLink",href:"https://learn.netdata.cloud/docs/nightly/concepts/netdata-functions",target:"_blank",rel:"noopener noreferrer"},"Read the Netdata functions documentation to learn more"),o.createElement(v.Text,{color:"bright"},"."))},feed:{dataGa:"feed-header",Title:function(){return"Events"},titleTooltip:o.createElement(v.Flex,{width:{max:"500px"},alignItems:"center",flexWrap:!0},o.createElement(v.Text,{color:"bright"},"Troubleshoot faster with Netdata Events. Access topology and alert events across the war room in one convenient location."," "),o.createElement(x.Z,{Component:v.Text,"data-ga":"feed-header::click-docs-link::feed-view","data-testid":"docsLink",href:"https://learn.netdata.cloud/docs/nightly/concepts/events-feed",target:"_blank",rel:"noopener noreferrer"},"Read the Events feed documentation to learn more"),o.createElement(v.Text,{color:"bright"},"."))}},J=(0,o.memo)((function(e){var t=e.onRefresh,n=e.onCancel,a=e.paramsKey,l=(0,m.Z)(e,X),i=(null===l||void 0===l?void 0:l["data-testid"])||"functionsHeader",s=(0,o.useRef)(),d=G[a.extraKey],f=d.dataGa,p=d.hasConfig,h=d.titleTooltip,y=d.Title,b=(0,S.Z)(!1),E=(0,r.Z)(b,4),x=E[0],O=E[1],w=E[3],C=(0,c.c6)(a),P=(0,g.iy)(null===C||void 0===C?void 0:C[0],"name"),Z=(0,u.ZQ)(a),j=Z.loaded,k=Z.data,I=Z.totalSize,D=Z.loading,K=Z.loadingMore,F=(0,u.CE)(a);return o.createElement(v.Flex,{"data-testid":i,justifyContent:"between"},o.createElement(v.Flex,{column:!0},o.createElement(v.Flex,{alignItems:"center","data-testid":"".concat(i,"-title"),gap:1},o.createElement(v.H3,null,o.createElement(y,{name:P,fn:F})),o.createElement(T.Z,{plain:!0,content:h,isBasic:!0,allowHoverOnTooltip:!0,stretch:"align"},o.createElement(v.Icon,{name:"information",color:"textDescription",width:"16px",height:"16px"}))),o.createElement(v.Flex,{alignItems:"center",gap:2},j&&o.createElement(v.TextSmall,{color:"textLite",strong:!0},"(",I||(null===k||void 0===k?void 0:k.length)||0," results)"),o.createElement(B,{paramsKey:a}))),o.createElement(v.Flex,{gap:1,alignItems:"start"},o.createElement(Q,{testId:i,dataGa:f,onRefresh:t,onCancel:n,loading:D||K}),p&&o.createElement(v.IconButton,{"data-testid":"".concat(i,"-ConfigBtn"),"data-ga":"".concat(f,"::click-config::functions-view"),flavour:"hollow",icon:"chevron_down",ref:s,onClick:O,padding:[1]}),x&&o.createElement(R,{"data-testid":"".concat(i,"-Config"),isOpen:x,onClose:w,targetRef:s,paramsKey:a})))}),(function(e,t){return e.onRefresh===t.onRefresh})),Y=(n(39714),n(74916),n(15306),n(34553),n(41331)),$=n(93433),ee=(n(85827),n(25387),n(72608),n(88386),n(55436)),te=["icon","iconRotate","children","onClick","strong","testId","textAlign","wrap","truncate","rowOptions"],ne=["description","tooltipValue","value","valueOptions","wrap","rowOptions"];function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=(0,K.default)(v.Icon).attrs({color:"text",height:"16px",width:"16px"}).withConfig({displayName:"value__Arrow",componentId:"sc-1apuy8c-0"})(["rotate:",";transition:all 200ms ease;"],(function(e){return e.rotate})),le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=t.decimalPoints,a=void 0===r?0:r,l=t.units,i=t.defaultValue,c=(0,ee.Ol)();return(0,o.useMemo)((function(){switch(n){case"number":return(0,ee.Jw)(e,{decimalPoints:a,units:l,defaultValue:i});case"duration":return(0,ee.kl)(e,{defaultValue:i});case"datetime":return c(e,{defaultValue:i});case"datetime_usec":return c(e,{defaultValue:i,usec:!0});default:return null===e||"undefined"===typeof e?i:e}}),[e,l])},ie=function(e){var t=e.description,n=void 0===t?"":t,r=e.value,a=e.units,l=void 0===a?"":a;return n?o.createElement(v.Flex,{column:!0,gap:1,justifyContent:"center"},o.createElement(v.TextSmall,{color:"bright"},n),o.createElement(v.TextSmall,{strong:!0,color:"bright",textAlign:"center"},r," ",l)):"".concat(r," ").concat(l)},ce=(0,K.default)(v.Flex).withConfig({displayName:"value__ValueContainer",componentId:"sc-1apuy8c-1"})(["",""],(function(e){return e.overflowWrap&&"* {\n overflow-wrap: anywhere;\n white-space: pre-wrap;\n word-break: break-word;\n }\n "})),ue={debug:{strong:!0,color:"textLite"},normal:{},notice:{strong:!0},warning:{strong:!0,color:"warningText"},critical:{strong:!0,color:"errorText"}},se=(0,K.default)(v.Text).attrs((function(e){return ae(ae({},e),ue[e.severity]||ue.normal)})).withConfig({displayName:"value__ValueLabel",componentId:"sc-1apuy8c-2"})([""]),de=(0,o.forwardRef)((function(e,t){var n=e.icon,r=e.iconRotate,a=e.children,l=e.onClick,i=e.strong,c=e.testId,u=void 0===c?"cell":c,s=e.textAlign,d=e.wrap,f=e.truncate,v=void 0===f||f,g=e.rowOptions,h=(0,m.Z)(e,te);return o.createElement(ce,(0,p.Z)({cursor:l?"pointer":"inherit",gap:.5,onClick:l,overflow:"hidden",ref:t,width:{max:"100%"},flexWrap:!0,overflowWrap:d},h),n&&o.createElement(oe,{name:n,rotate:r}),o.createElement(se,(0,p.Z)({"data-testid":"".concat(u,"-value"),strong:i,textAlign:s,truncate:!d&&v,whiteSpace:d?"wrap":"nowrap"},g),a))})),fe=function(e){var t=e.description,n=void 0===t?"":t,r=e.tooltipValue,a=e.value,l=e.valueOptions,i=void 0===l?{}:l,c=e.wrap,u=e.rowOptions,s=(0,m.Z)(e,ne),d=le(a,i);return o.createElement(T.Z,(0,p.Z)({content:!c&&o.createElement(ie,{description:n,value:r||a,units:i.units}),"data-testid":"valueComponent",isBasic:!0},s),o.createElement(de,{wrap:c,rowOptions:u},d))},me=["value"],pe=function(e){var t=e.value,n=(0,m.Z)(e,me);return o.createElement(fe,(0,p.Z)({value:t.value},n))},ve=["description","maxValue","strong","type","value","valueOptions","wrap"],ge=function(e){var t=e.description,n=void 0===t?"":t,r=e.maxValue,a=e.strong,l=e.type,i=e.value,c=e.valueOptions,u=void 0===c?{}:c,s=e.wrap,d=(0,m.Z)(e,ve),f=100*i/r,p="bar"===l,g=(null===d||void 0===d?void 0:d["data-testid"])||"progressValue",h=le(i,u);return o.createElement(T.Z,{content:o.createElement(ie,{description:n,value:i,units:u.units}),isBasic:!0,stretch:"align"},o.createElement(v.Flex,{column:!0,"data-testid":g,gap:1,flexWrap:s,flex:!0},!p&&o.createElement(de,{strong:a,testid:g},h),o.createElement(v.ProgressBar,{background:"borderSecondary",border:"none",color:["green","netdata"],containerWidth:"100%","data-testid":"".concat(g,"-bar"),height:2,width:"".concat(f,"%")})))},he=function(e){var t=e.value,n=e.wrap;return t=Array.isArray(t)?t:[t],o.createElement(v.Flex,{alignItems:"center",gap:1,flexWrap:n},t.map((function(e,t){return o.createElement(v.Pill,{border:{side:"all",color:"neutralPillColor"},color:"neutralPillColor","data-testid":"pillValueComponent",key:"".concat(e,"-").concat(t)},e)})))},ye=n(37518),be=n(20686),Ee=["color"],xe=function(e){var t=e.hide,n=e.user;return t||!n?null:o.createElement(o.Fragment,null,o.createElement(v.Text,null,"by"),o.createElement(Oe,null,n))},Oe=function(e){var t=e.color,n=void 0===t?"text":t,r=(0,m.Z)(e,Ee);return o.createElement(v.Text,(0,p.Z)({color:n,strong:!0},r))},we=function(e){var t=e.type,n=e.text,r=void 0===n?t:n,a=e.hollow,l=a?"".concat(t.toLowerCase(),"AlertsTable"):t.toLowerCase();return o.createElement(be.Z,(0,p.Z)({type:l},a&&{border:!1}),r)},Ce=(0,K.default)(v.Flex).attrs({gap:1,flexWrap:!0,alignItems:"center"}).withConfig({displayName:"components__Container",componentId:"sc-b5rk6g-0"})([""]),Pe=n(79655),Ze=["chart","hosts","alert"];function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ie={CLEAR:0,WARNING:1,CRITICAL:2,UNINITIALIZED:3,UNDEFINED:4},Te=function(e){var t=e.chart,n=e.nodeId,r=e.nodeName,a=e.spaceSlug,l=e.roomSlug,i=e.alert,c=(0,b.s0)(),u=(0,g.m3)(n),s=(0,o.useCallback)((function(){i?c(u,{state:{alertId:null===i||void 0===i?void 0:i.id}}):c(u)}),[u,i]),d="/spaces/".concat(a,"/rooms/").concat(l,"/alerts/").concat(null===i||void 0===i?void 0:i.id),f=i.current,m=i.name,p=i.previous;if("ERROR"===f.status)return o.createElement(Ce,null,o.createElement(v.Text,null,"For the alert"),o.createElement(x.Z,{Component:Oe,as:Pe.rU,to:d},m),o.createElement(v.Text,null,"for"),o.createElement(x.Z,{Component:Oe,onClick:s},t.name),o.createElement(v.Text,null,"on"),o.createElement(x.Z,{Component:Oe,onClick:s},r),o.createElement(v.Text,null,"we couldn't calculate the current value"),o.createElement(T.Z,{align:"bottom",content:"Please check your alert configuration"},o.createElement(v.Icon,{color:"nodeBadgeColor",size:"small",name:"information"})));if("REMOVED"===f.status)return o.createElement(Ce,null,o.createElement(v.Text,null,"Alert"),o.createElement(x.Z,{Component:Oe,as:Pe.rU,to:d},m),o.createElement(v.Text,null,"for"),o.createElement(x.Z,{Component:Oe,onClick:s},t.name),o.createElement(v.Text,null,"on"),o.createElement(x.Z,{Component:Oe,onClick:s},r),o.createElement(v.Text,null,"is no longer available, state can't be assessed"));var h=Ie[f.status]===Ie.CLEAR;return o.createElement(Ce,null,o.createElement(v.Text,null,"Alert"),o.createElement(x.Z,{Component:Oe,as:Pe.rU,to:d},m),o.createElement(v.Text,null,"for"),o.createElement(x.Z,{Component:Oe,onClick:s},t.name),o.createElement(v.Text,null,"on"),o.createElement(x.Z,{Component:Oe,onClick:s},r),h?o.createElement(v.Text,null,"recovered"):o.createElement(o.Fragment,null,o.createElement(v.Text,{strong:!0},Ie[p.status]===Ie.CRITICAL?"was demoted":Ie[p.status]===Ie.WARNING?"escalated":Ie[f.status]===Ie.UNDEFINED?"transitioned":"was raised"),o.createElement(v.Text,null,"to"),o.createElement(we,{type:f.status}),Ie[f.status]===Ie.UNDEFINED&&o.createElement(v.Text,null,"state")),o.createElement(v.Text,null,"with value"),o.createElement(we,{type:f.status,text:f.value_string,hollow:!0,padding:[0]}))},Se=function(e){var t=e.id,n=e.name,r=(0,h.uk)(),a=(0,ye.tE)(t,"slug"),l="/spaces/".concat(r,"/rooms/").concat(a,"/home");return o.createElement(x.Z,{Component:Oe,as:Pe.rU,to:l},n)},De=function(e){var t=e.rooms;return t.map((function(e,n){return o.createElement(o.Fragment,{key:e.id},n>0&&(n<t.length-1?", ":" and "),o.createElement(Se,e))}))},Ke=function(e){var t=e.rooms;if(!t.length)return null;var n=t.length>1?"rooms":"room";return o.createElement(o.Fragment,null,o.createElement(v.Text,null,"on ",n),o.createElement(De,{rooms:t}))},Fe=function(e){var t=e.contexts;t.map((function(e,n){return o.createElement(o.Fragment,{key:e},n>0&&(n<t.length-1?", ":" and "),o.createElement(Oe,null,e))}))},Ne=function(e){var t=e.contexts;if(!t.length)return null;var n=t.length>1?"contexts":"context";return o.createElement(v.Text,null,"on ",n," ",o.createElement(Fe,{contexts:t}))},Le={month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric",long:!1,dateStyle:void 0},ze=function(e){var t=e.start,n=e.end,r=(0,_.rA)().localeDateString;if(!t||!n)return null;var a=r(new Date(t),Le),l=r(new Date(n),Le);return o.createElement(o.Fragment,null,o.createElement(v.Text,null,"(scheduled ",a," - ",l,")"))},Me={"silencing-rule-created":"created","silencing-rule-deleted":"deleted","silencing-rule-changed":"changed"},Ae=function(e){var t=e.rooms,n=void 0===t?[]:t,r=e.contexts,a=void 0===r?[]:r;return n.length||a.length?o.createElement(o.Fragment,null,!!n.length&&o.createElement(Ke,{rooms:n}),!!n.length&&!!a.length&&o.createElement(v.Text,null,"and ",o.createElement(Ne,{contexts:a}))):null},Re=function(e){var t,n=e.action,r=e.notification,a=e.user,l=e.room,i=e.context,c=((null===r||void 0===r||null===(t=r.silencing)||void 0===t?void 0:t.rule)||[])[0],u=null===a||void 0===a?void 0:a.name,s=(null===i||void 0===i?void 0:i.name)||[];return o.createElement(Ce,null,o.createElement(v.Text,null,"Silencing rule"),o.createElement(Oe,null,c.name),o.createElement(Ae,{rooms:l,contexts:s}),o.createElement(v.Text,null,"was ",Me[n]),o.createElement(xe,{user:u}),o.createElement(ze,c))},_e=n(62200),Be=function(e,t){var n,r;return(null===(n=e.target)||void 0===n?void 0:n[t])||(null===(r=e.target)||void 0===r?void 0:r.id)||e[t]||e.id},Ve=function(e){return Array.isArray(e)?e[0].name||e[0].id:e.name||e.id},He=function(e){var t=e.statistics,n=(null===t||void 0===t?void 0:t.nodes)||{},r=n.live,a=n.stale,l=n.removed,i=n.total;return o.createElement(Ce,null,o.createElement(v.Text,null,"Space statistics. Nodes:"),o.createElement(v.Text,{color:_e.WV.live.statusTextColor},r," live"),o.createElement(v.Text,null,","),o.createElement(v.Text,{color:_e.WV.stale.statusTextColor},a," stale"),o.createElement(v.Text,null,","),o.createElement(v.Text,{color:_e.WV.offline.statusTextColor},l," removed"),o.createElement(v.Text,null,","),o.createElement(v.Text,{strong:!0},i," total"))},qe=(n(69810),n(86035),n(6973)),We=function(e){var t=e.stateColor,n=e.state;return o.createElement(o.Fragment,null,o.createElement(v.Text,null,"became"),o.createElement(Oe,{color:t},n))},Ue=function(e){var t=e.stateColor,n=e.state;return o.createElement(o.Fragment,null,o.createElement(v.Text,null,"was"),o.createElement(Oe,{color:t},n))},Qe={"node-created":Ue,"node-state-live":We,"node-state-stale":We,"node-state-offline":We,"node-removed":Ue,"node-deleted":Ue,"node-restored":Ue,default:Ue},Xe=function(e){var t,n=e.action,r=e.hosts,a=(void 0===r?[]:r)[0],l=a.id,i=a.name,c=(0,b.s0)(),u=(0,g.m3)(l),s=(0,o.useCallback)((function(){return c(u)}),[u]),d=Qe[n],f=n.split("-").at(-1),m=null===(t=qe.B[f])||void 0===t?void 0:t.statusTextColor;return o.createElement(Ce,null,o.createElement(v.Text,null,"Node"),o.createElement(x.Z,{Component:Oe,onClick:s},i),o.createElement(d,{stateColor:m,state:f}))},Ge=function(e){var t=e.room,n=(0,ye.Hm)("untouchable");return o.createElement(o.Fragment,null,o.createElement(v.Text,null,"was added to",n?" room":""),o.createElement(Oe,null,n?Ve(t):"this room"))},Je=function(e){var t=e.room,n=(0,ye.Hm)("untouchable");return o.createElement(o.Fragment,null,o.createElement(v.Text,null,"was removed from",n?" room":""),o.createElement(Oe,null,n?Ve(t):"this room"))},Ye={"room-created":function(){return o.createElement(v.Text,null,"was created")},"room-deleted":function(){return o.createElement(v.Text,null,"was deleted")},"room-node-added":Ge,"room-node-removed":Je,"room-user-added":Ge,"room-user-removed":Je},$e=function(e){var t,n=e.action,r=e.hosts,a=void 0===r?[]:r,l=e.Netdata,i=e.user,c=Ye[n],u=null===(t=a[0])||void 0===t?void 0:t.name;return o.createElement(Ce,null,o.createElement(v.Text,null,"Node"),o.createElement(Oe,null,u),o.createElement(c,{room:l.room}),o.createElement(xe,{user:null===i||void 0===i?void 0:i.name}))},et=function(e){var t=e.action,n=e.Netdata,r=e.user,a=Ye[t];return o.createElement(Ce,null,o.createElement(v.Text,null,"User"),o.createElement(Oe,null,Be(r,"name")),o.createElement(a,{room:n.room}),o.createElement(xe,{hide:!r.target,user:r.name}))},tt=function(e){var t=e.action,n=e.Netdata,r=e.user,a=Ye[t];return o.createElement(Ce,null,o.createElement(v.Text,null,"Room"),o.createElement(Oe,null,Ve(n.room)),o.createElement(a,null),o.createElement(xe,{user:r.name}))},nt={"alert-node-transition":function(e){var t=e.chart,n=e.hosts,r=e.alert,a=(0,m.Z)(e,Ze);return n.map((function(e,n){var l=e.id,i=e.name,c=ke(ke({},r),{},{name:r.name[n]},r.current?{current:ke(ke({},r.current),r.current.status?{status:r.current.status[n]||r.current.status[0]}:{})}:{});return o.createElement(Te,(0,p.Z)({key:l,chart:t,nodeId:l,nodeName:i,alert:c},a))}))},"node-created":Xe,"node-state-live":Xe,"node-state-stale":Xe,"node-state-offline":Xe,"node-removed":Xe,"node-deleted":Xe,"node-restored":Xe,"agent-connected":function(e){var t=e.agentId;return o.createElement(Ce,null,o.createElement(v.Text,null,"Agent with claim ID"),o.createElement(Oe,null,t)," ",o.createElement(v.Text,null,"has connected to Netdata"))},"agent-connection-initialized":function(e){var t=e.agentId;e.reason;return o.createElement(Ce,null,o.createElement(v.Text,null,"Agent with claim ID"),o.createElement(Oe,null,t),o.createElement(v.Text,null,"has initialized its connection to Netdata"))},"agent-disconnected":function(e){var t=e.agentId,n=e.reason;return o.createElement(Ce,null,o.createElement(v.Text,null,"Agent with claim ID"),o.createElement(Oe,null,t),o.createElement(v.Text,null,"has disconnected from Netdata with reason: \u201c",n,"\u201d"))},"agent-authenticated":function(e){var t=e.agentId;return o.createElement(Ce,null,o.createElement(v.Text,null,"Agent with claim ID"),o.createElement(Oe,null,t),o.createElement(v.Text,null,"has successfully authenticated"))},"agent-authentication-failed":function(e){var t=e.agentId;return o.createElement(Ce,null,o.createElement(v.Text,null,"Agent with claim ID"),o.createElement(Oe,null,t),o.createElement(v.Text,null,"has failed to authenticate"))},"room-created":tt,"room-deleted":tt,"room-node-added":$e,"room-node-removed":$e,"room-user-added":et,"room-user-removed":et,"space-created":function(e){var t=e.Netdata,n=e.user;return o.createElement(Ce,null,o.createElement(v.Text,null,"Space"),o.createElement(Oe,null,t.space.name||t.space.id),o.createElement(v.Text,null,"was created"),o.createElement(xe,{user:n.name}))},"space-statistics":He,"space-user-added":function(e){var t=e.Netdata,n=e.user,r=((null===t||void 0===t?void 0:t.inviter)||{}).name;return o.createElement(Ce,null,o.createElement(v.Text,null,"User"),o.createElement(Oe,null,Be(n,"name")),o.createElement(v.Text,null,"was added to this space"),r&&o.createElement(o.Fragment,null,o.createElement(v.Text,null,"by invite of"),o.createElement(Oe,null,r)))},"space-user-changed":function(e){var t,n=e.user;if(!(null===(t=n.changes)||void 0===t||!t.roles)&&1===Object.keys(n.changes).length){var r=n.changes.roles.length>1,a=n.changes.roles.join(", ");return o.createElement(Ce,null,o.createElement(v.Text,null,"User ",r?"roles":"role"," for"),o.createElement(Oe,null,Be(n,"name")),o.createElement(v.Text,null,r?"were":"was"," changed to"),o.createElement(Oe,null,a),o.createElement(xe,{hide:!n.target,user:n.name}))}return o.createElement(Ce,null,o.createElement(v.Text,null,"User"),o.createElement(Oe,null,Be(n,"name")),o.createElement(v.Text,null,"was modified"))},"space-user-invited":function(e){var t=e.user;return o.createElement(Ce,null,o.createElement(v.Text,null,"User"),o.createElement(Oe,null,Be(t,"email")),o.createElement(v.Text,null,"was invited to this space"),o.createElement(xe,{user:t.name}))},"space-user-removed":function(e){var t=e.user,n=(t.target||{}).name;return o.createElement(Ce,null,o.createElement(v.Text,null,"User"),o.createElement(Oe,null,Be(t,"name")),o.createElement(v.Text,null,"was removed from this space"),n&&o.createElement(xe,{user:t.name}))},"space-user-uninvited":function(e){var t=e.event,n=e.user;return"space-invite-expired"===t.reason?o.createElement(Ce,null,o.createElement(v.Text,null,"The invite for"),o.createElement(Oe,null,Be(n,"email")),o.createElement(v.Text,null,"to this space has expired")):o.createElement(Ce,null,o.createElement(v.Text,null,"User"),o.createElement(Oe,null,Be(n,"email")),o.createElement(v.Text,null,"was uninvited from this space"),o.createElement(xe,{hide:!n.target,user:n.name}))},"silencing-rule-created":Re,"silencing-rule-deleted":Re,"silencing-rule-changed":Re},rt=function(e){var t=e.data,n=t.source,r=n.action,a=n.roomId,l=n.space,i=(0,h.vu)(l.id,"slug"),c=(0,ye.tE)(a,"slug"),u=nt[r];return u?o.createElement(u,(0,p.Z)({},t.source,{spaceSlug:i,roomSlug:c})):o.createElement(Ce,null,o.createElement(v.Text,null,"Event")," ",o.createElement(v.Text,{strong:!0},r)," ",o.createElement(v.Text,null,"emitted"))},at=["value"],ot=["visualization","type","value","data"],lt={bar:ge,"bar-with-integer":ge,duration:ge,pill:he,number:fe,string:fe,feedTemplate:rt,datetime:function(e){var t=e.value,n=(0,m.Z)(e,at),r=new Date(t),a=(0,_.rA)(),l=a.localeTimeString,i=a.localeDateString,c=isNaN(r.valueOf())?"Missing date & time":"".concat(i(r,{long:!1})," ").concat(l(r,{secs:!0}));return o.createElement(fe,(0,p.Z)({value:c},n))},value:fe},it={bar:ge,pill:he,value:fe,richValue:pe,feedTemplate:rt,rowOptions:"skip"},ct=function(e){var t=e.visualization,n=e.type,r=e.value,a=e.data,l=(0,m.Z)(e,ot),i=it[t]||lt[n]||it.value;return i===it.rowOptions?null:o.createElement(i,(0,p.Z)({value:r,type:n,rowOptions:a.rowOptions,data:a},l))},ut=["displayName","name","sortable","sticky","units","max","dummy","cellSize","valueOptions","summary","type","visualization","wrap"];function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ft={sum:"sum",min:"min",max:"max",extent:"extent",mean:"mean",median:"median",unique:"unique",uniqueCount:"uniqueCount",count:"count"},mt=n(71002),pt=(n(64211),n(41874),n(69720),n(54678),n(4480));function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ht={query:function(e,t,n){var a=n.columnVisibility,o=(null===t||void 0===t?void 0:t.toLowerCase())||"";return Object.entries(e).some((function(e){var t=(0,r.Z)(e,2),n=t[0],l=t[1];return!!a[n]&&(null!==l&&"undefined"!==typeof l&&(Array.isArray(l)?l.some((function(e){return String(e).toLowerCase().includes(o)})):("object"===(0,mt.Z)(l)&&Object.keys(l).some((function(e){return String(l[e]).toLowerCase().includes(o)})),String(l).toLowerCase().includes(o))))}))}},yt=function(e){return function(t,n){return!e.some((function(e){var a=(0,r.Z)(e,2),o=a[0],l=a[1];return ht[o]?!ht[o](t,l,n):!function(e){return function(t,n,r){var a;if("range"===(null===(a=r.columns[e])||void 0===a?void 0:a.filter)&&null!==n&&void 0!==n&&n.length)return t[e]>=n[0]&&t[e]<=n[1];if(!Array.isArray(n)||!n.length)return!0;var o=t[e];return"number"===typeof o?(o=parseFloat(o),n.some((function(e){return parseFloat(e)===o}))):n.includes(o)}}(o)(t,l,n)}))}},bt=(0,pt.CG)({key:"fnDataFiltered",get:function(e){var t=e.extraKey,n=e.roomId,r=e.omit,a=void 0===r?[]:r,o=e.keepAll,l=e.fn;return function(e){var r,i=e.get,s=i((0,u.tD)({id:l})),d=s.columnVisibility,f=s.data,m=s.columns;if(s.aggregations||!f)return f||[];var p=i((0,c.dz)({key:n,extraKey:t})),v=Object.keys(p).reduce((function(e,t){return a.includes(t)||e.push([t,p[t]]),e}),[]);if(!v.length)return f;var g=yt(v),h=null===(r=i((0,c.dz)({key:n,extraKey:"".concat(l,"Settings"),flavour:"val"})))||void 0===r?void 0:r.sortColumn;return o?f.map((function(e){return g(e,{columnVisibility:d,columns:m,sortColumn:h})?e:gt(gt({},e),{},{hidden:!0})})):f.filter((function(e){return g(e,{columnVisibility:d,columns:m,sortColumn:h})}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),Et=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraKey,n=void 0===t?"fn":t,r=e.omit,a=void 0===r?[]:r,o=e.keepAll,l=void 0!==o&&o,i=(0,u.CE)({extraKey:n}),c=(0,ye.UL)();return(0,pt.sJ)(bt({extraKey:"".concat(i||n,"Filters"),fn:i,roomId:c,omit:a,keepAll:l}))},xt=n(70459);function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ct,Pt=(0,K.default)(v.Table).withConfig({displayName:"table__StyledTable",componentId:"sc-1n2s6gl-0"})(['*{font-family:"Courier New",Courier,monospace;letter-spacing:0.09px;}']),Zt=(0,o.memo)(Pt,(function(e,t){return(0,Y.ZP)(e,t,{keep:["columnVisibility","data","fnQuery","sortBy","virtualizeOptions"]})})),jt={bulkActionsStyles:{padding:[0,0,2]},searchStyles:{inputContainerStyles:{height:"32px",border:{side:"all",size:"1px",color:"inputBg"},background:"inputBg",round:!0,padding:[1,2],_hover:{border:{side:"all",size:"1px",color:"borderSecondary"}}}}},kt=(0,o.memo)((0,o.forwardRef)((function(e,t){var n=e["data-testid"],a=e.paramsKey,l=e.refetch,i=e.onShowInfo,c=(0,u.ZQ)(a),s=c.columns,d=c.sortedColumns,f=c.sortColumn,p=c.sortDirection,g=c.columnVisibility,h=c.pinnedColumns,y=c.loadingMore,b=c.retentionWarning,E=c.groupByColumns,x=c.pagination,O=c.merged,w=c.latestDirection,C=c.hasDirection,P=c.tail,Z=c.aggregations,j=(0,o.useRef)();j.current=c;var k=(0,o.useState)(""),I=(0,r.Z)(k,2),T=I[0],S=I[1],D=Et(a),K="feed"===a.extraKey,F=function(e,t,n){var r=n.groupBy;return(0,o.useMemo)((function(){return e.reduce((function(e,n){var a=t[n];if(!a)return e;var l=a.displayName,i=a.name,c=a.sortable,u=(a.sticky,a.units),s=a.max,d=a.dummy,f=a.cellSize,p=a.valueOptions,g=a.summary,h=a.type,y=a.visualization,b=a.wrap,E=void 0!==b&&b,x=(0,m.Z)(a,ut);return d?e:[].concat((0,$.Z)(e),[dt(dt(dt({},x),{},{displayName:l,id:l,accessorFn:function(e){return e[n]},cell:function(e){var t=e.getValue,n=e.row,a=e.cell.getIsAggregated(),l=t(),c=a&&(ft[g]===ft.count||ft[g]===ft.uniqueCount||!ft[g]);return o.createElement(ct,{description:i,data:n.original,maxValue:s,padding:n.depth>0?[0,0,0,2.5*n.depth]:[0],strong:a,value:c?"".concat(l,"x"):l,tooltipValue:c?"".concat(l," ").concat(1===l?"item":"items"," associated with ").concat(r," grouping"):l,valueOptions:c?dt(dt({},p),{},{transform:"none"}):p,type:h,visualization:y,wrap:E})},header:o.createElement(v.Flex,{column:!0},o.createElement(v.TextSmall,{strong:!0},l),u&&o.createElement(v.TextMicro,null,"(",u,")")),enableSorting:c,aggregationFn:ft[g]||ft.count},f),{},{meta:dt({},l!==i?{tooltip:i}:{})})])}),[])}),[e,t,r])}(d,s,wt({},K?{}:{groupBy:T})),N=(0,u.fg)(wt({key:"sortColumn",flavour:"val"},a)),L=(0,r.Z)(N,2),z=L[0],M=L[1],A=(0,u.fg)(wt({key:"sortDirection",flavour:"val"},a)),R=(0,r.Z)(A,2),_=R[0],B=R[1],V=(0,u.kU)(wt({key:"query",flavour:"val"},a)),H=(0,r.Z)(V,2),q=H[0],W=H[1],U=(0,u.I_)(wt({key:"columnVisibility"},a)),Q=(0,o.useMemo)((function(){return z||f?[{id:z||f,desc:"descending"===(_||p)}]:[]}),[f,p,z,_]),X=(0,o.useCallback)((function(e){var t=(0,r.Z)(e,1)[0],n=(null===t||void 0===t?void 0:t.id)||n,a=null!==t&&void 0!==t&&t.desc?p||"descending":"ascending";M(n),B(a)}),[z,f,p]),G=(0,o.useMemo)((function(){return{left:h}}),[h]),J=(0,o.useRef)();J.current=y;var Y=(0,xt.Z)().pause,ee=(0,o.useCallback)((function(e){var t=e.data;return i({data:t.json||t,columns:s})}),[]),te=(0,o.useRef)(),ne=(0,o.useRef)(),re=(0,o.useRef)(),ae=(0,o.useRef)(0),oe=(0,o.useRef)(0),le=(0,o.useRef)(O);(0,o.useLayoutEffect)((function(){var e;O&&!P||null===(e=ne.current)||void 0===e||!e.scrollOffset||ne.current.scrollToOffset(0)}),[O,P]),(0,o.useLayoutEffect)((function(){clearTimeout(Ct),y||(Ct=setTimeout((function(){le.current=!1}),200))}),[y]),(0,o.useLayoutEffect)((function(){if(x&&C&&!P){if(oe.current!==D.length&&"forward"===w){var e,t,n=ne.current.scrollOffset,r=0,a=ne.current.getMeasurements().find((function(e,t){return 0!==t&&(r+=e.size)>n}));if(!a)a=null===(t=ne.current.getMeasurements())||void 0===t?void 0:t[1];if(!a)return;re.current=wt(wt({},D[D.length-oe.current+(a.index-1)]),{},{headerSize:(null===(e=ne.current.getMeasurements())||void 0===e||null===(e=e[0])||void 0===e?void 0:e.size)||0}),O&&!P?ae.current=0:re.current=null}!function e(){if(re.current&&ae.current<5){var t,n;ae.current=ae.current+1,oe.current=D.length;var r=null===(t=re.current)||void 0===t||null===(t=t[x.column])||void 0===t||null===(n=t.toString)||void 0===n?void 0:n.call(t),a=ne.current.getMeasurements().find((function(e){return e.key.replace(/-\d+?/,"")===r}));if(!a){var o=D.findIndex((function(e){return e[x.column]==r}));a=ne.current.getMeasurements()[o+1]}return a?(ne.current.scrollToOffset(a.start-re.current.headerSize),void setTimeout(e)):(ae.current=5,void(re.current=null))}ae.current=5,re.current=null}(),oe.current=D.length}}),[D]);var ie=(0,o.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"backward";P||J.current||j.current.hasDirection&&(le.current||("backward"!==e||j.current.hasNextPage||j.current.anchorBefore)&&("forward"!==e||j.current.hasPrevPage||j.current.anchorAfter)&&("forward"===e&&(le.current=!0),l({anchor:"backward"===e?j.current.anchorBefore:j.current.anchorAfter,merge:!0,direction:e,data_only:!0})))}),[P]),ce=(0,o.useCallback)((function(e){var t;return"undefined"!==typeof(null===(t=j.current.data[e])||void 0===t?void 0:t[null===x||void 0===x?void 0:x.column])?"".concat(j.current.data[e][null===x||void 0===x?void 0:x.column],"-").concat(e):e}),[]),ue=(0,o.useCallback)((function(){return j.current.hasNextPage}),[]),se=(0,o.useCallback)((function(){return j.current.hasPrevPage}),[]),de=(0,o.useCallback)((function(e){e.scrollOffset>10&&Y()}),[Y]),fe=(0,o.useMemo)((function(){return{overscan:15,getHasNextPage:ue,getHasPrevPage:se,loading:y,loadMore:ie,warning:b,virtualRef:ne,getItemKey:ce,onVirtualChange:de}}),[D,y]),me=(0,u.$0)();return o.createElement(Zt,{groupByColumns:E,onClickRow:ee,columnPinning:G,columnVisibility:g,data:D,dataColumns:F,dataGa:"functions",enableColumnPinning:!!h.length,enableColumnVisibility:!K,enableCustomSearch:!!Z,enableResizing:!0,enableSorting:!K,globalFilter:K?null:q,onColumnVisibilityChange:U,onSearch:K?null:W,onGroupByChange:K?null:S,onSortingChange:K?null:X,sortBy:Q,testPrefix:n,virtualizeOptions:fe,meta:jt,ref:t,tableRef:te,onHoverCell:(0,o.useCallback)((function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).row;e||me(null),me(e)}),[])})})),(function(){return!0})),It=kt,Tt=(n(88674),n(17727),n(18446)),St=n.n(Tt),Dt=n(37176),Kt=n(44536),Ft=n(18997),Nt=n(4808),Lt=n(81732),zt=(n(47042),n(26833),n(2707),n(50361)),Mt=n.n(zt),At=n(38609),Rt=["updateEvery","merge","groupBy","items","direction","dataOnly","showIds","facetsDelta","histogramDelta"];function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vt=90,Ht=110,qt=160,Wt=500,Ut={minSize:Vt,maxSize:Wt},Qt=50,Xt={uniqueKey:{size:Vt,downLimit:Vt-Qt,upLimit:Vt+Qt},bar:{size:Vt,downLimit:Vt-Qt,upLimit:Vt+Qt},value:{size:Ht,downLimit:Ht-Qt,upLimit:Ht+Qt},feedTemplate:{size:Wt,downLimit:Wt-Qt,upLimit:Wt+Qt,minSize:230,maxSize:5e3,fullWidth:!0},pill:{size:Ht,downLimit:Ht-Qt,upLimit:Ht+Qt},timestamp:{size:qt,downLimit:qt-Qt,upLimit:qt+Qt},datetime:{size:qt,downLimit:qt-Qt,upLimit:qt+Qt}},Gt=function(e,t){e((function(e){var n,r,a,o=t.updateEvery,l=t.merge,i=t.groupBy,c=t.items,u=t.direction,s=t.dataOnly,d=t.showIds,f=void 0===d?!1!==e.showIds:d,p=t.facetsDelta,v=t.histogramDelta,g=(0,m.Z)(t,Rt),h=s?Mt()(e.columns):Mt()(l?(0,At.Z)(t.columns,e.columns):t.columns),y=Bt({},e.sortedColumnsObj)||{},b=g.hasHistory||e.hasHistory,E=s?e.pagination:t.pagination,x=Object.keys(h).reduce((function(t,n){var r=h[n],a=r.id,o=r.name,l=r.sticky,i=r.visible,c=r.index;return r.displayName=f?a||n:o,t.columnVisibility[r.displayName]=e.loaded?!!t.columnVisibility[r.displayName]:i,l&&!e.loaded&&t.pinnedColumns.push(r.displayName),r.valueOptions=r.valueOptions||{},r.cellSize=function(e){var t=e.visualization,n=e.type,r=e.fullWidth,a=e.uniqueKey;return r?Xt.feedTemplate:Bt(Bt({},Ut),(a&&"timestamp"!==n?Xt.uniqueKey:Xt[n])||Xt[t]||{minSize:Vt,maxSize:Wt,size:Ht,downLimit:Ht-Qt,upLimit:Ht+Qt})}(r),r.sortable=r.sortable&&!(null!==E&&void 0!==E&&E.enabled),"undefined"!==typeof c&&(y[y[c]!==n?r.displayName:c]=n),t}),{columnVisibility:Bt({},e.columnVisibility||{}),pinnedColumns:(0,$.Z)(e.pinnedColumns||[])}),O=l?Mt()(e.aggregations):t.aggregations||Mt()(e.aggregations);p&&p.forEach((function(e){var t=O.find((function(t){return t.id===e.id}));t?e.options.forEach((function(e){if(!isNaN(e.count)){var n=t.options.find((function(t){return t.id===e.id}));n?n.count=(n.count||0)+((null===e||void 0===e?void 0:e.count)||0):t.options.push(e)}})):O.push(e)}));var w=l?Mt()(e.histogram):t.histogram||Mt()(e.histogram);if(v){var C;if((null===(C=e.histogram)||void 0===C?void 0:C.id)!==(null===v||void 0===v?void 0:v.id))return;var P=w.chart.result.labels;if((0,Y.ZP)(P,v.chart.result.labels))w.chart.result.data=[].concat((0,$.Z)(w.chart.result.data),(0,$.Z)(v.chart.result.data));else{var Z=function(e,t){var n=t.reduce((function(t,n,r){var a=e.findIndex((function(e){return n===e}));return-1===a||(t[a]=r),t}),{});return function(t){return e.reduce((function(e,r,a){return"undefined"===typeof n[a]?e.push([0,0,0]):e.push(t[n[a]]),e}),[])}}(P,v.chart.result.labels);v.chart.result.data.forEach((function(e){return w.chart.result.data.push(Z(e))}))}}var j={};Object.keys(t.columns).forEach((function(e){j[t.columns[e].index]=e}));var k=t.data.map((function(e){return e.reduce((function(e,t,n){var r=j[n];return r?(e[r]=t,e):e}),{})})),I=l?"forward"===u?k.concat(e.data||[]):(e.data||[]).concat(k):k;g.tail&&I.slice(0,500);var T=null!==E&&void 0!==E&&E.enabled&&E.column&&Array.isArray(I)&&null!==(n=I[I.length-1])&&void 0!==n&&n[E.column]&&null!==(r=I[0])&&void 0!==r&&r[E.column]?{anchorBefore:I[I.length-1][E.column],anchorAfter:I[0][E.column],anchorUnits:E.units}:{},S=t.defaultSortColumn||e.defaultSortColumn,D=(t.acceptedParams||e.acceptedParams).includes("direction"),K=Bt(Bt(Bt(Bt(Bt(Bt(Bt({},e||Lt.Zn.table),g),{},{groupByColumns:i||e.groupByColumns,data:I,columns:l?(0,At.Z)(e.columns,h):h,updatedAt:(new Date).getTime(),updateEvery:o||e.updateEvery,sortedColumns:Object.values(y),sortColumn:null===(a=h[S])||void 0===a?void 0:a.displayName,sortDirection:S?h[S].sort:"descending"},x),T),{},{totalSize:g.totalSize||(null===c||void 0===c?void 0:c.matched)||(!s||"forward"===u||k.length||t.partial)&&e.totalSize||0},!!b&&{hasNextPage:!(s&&"forward"!==u&&!k.length&&!t.partial)&&(!c||0!==c.after)}),!!b&&D&&{hasPrevPage:!(s&&"forward"===u&&!k.length&&!t.partial)&&(!(!g.tail&&c)||0!==c.before)}),{},{offset:l?null:(null===c||void 0===c?void 0:c.before)||null,loading:!1,loaded:!0,showIds:f,merged:l,latestDirection:u,hasHistory:b,hasDirection:D,aggregations:O,histogram:w,sortedColumnsObj:y});return y=null,w=null,O=null,T=null,x=null,h=null,j=null,k=null,I=null,K}))},Jt=["data","type","updateEvery"];function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var en=["checkPeriod"];function tn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tn(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rn={table:Gt,log:Gt,default:function(e,t){var n=t.data,r=t.type,a=t.updateEvery,o=(0,m.Z)(t,Jt);e($t($t($t({},Lt.Zn.default),o),{},{data:n,updateEvery:a,type:r,loading:!1,loaded:!0}))}},an={default:{fetch:Nt.Ru,isEnabled:function(e){var t=e.nodeIds,n=e.fn,r=e.after;return!(null===t||void 0===t||!t.length)&&!!n&&!!r}},feed:{fetch:Nt.bj,isEnabled:function(e){var t=e.roomId,n=e.fn;return!!t&&!!n}}},on=function(e){var t=(0,c.by)(),n=t.after,r=t.before,a=t.highlight;return(0,o.useMemo)((function(){return n>0?[function(){return{after:n,before:r}},n,r,e||a.before]:[function(){var e=Date.now();return{after:e+1e3*n,before:e}},n,r,e||a.before]}),[n,r,null===a||void 0===a?void 0:a.before,e])},ln=n(5429);function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sn={default:{fetch:Nt.HZ,isEnabled:function(e){var t=e.nodeIds,n=e.fn;return!(null===t||void 0===t||!t.length)&&!!n}},feed:{fetch:function(){return Promise.resolve({data:{type:"table"}})},isEnabled:function(){return!0}}},dn=function(e,t,n){var a=(0,h.th)(),o=(0,g.Xw)(e),l=(0,j.zp)(),i=(0,r.Z)(l,1)[0].loading,c=sn[t]||sn.default,s=c.fetch,d=c.isEnabled,f=(0,u.mO)(n),m=(0,r.Z)(f,2),p=m[0].infoLoaded,v=m[1],y=on(),b=(0,r.Z)(y,1)[0],E=(0,u.KO)(n.extraKey).loaded;(0,ln.Z)((function(){return{enabled:!p&&E&&!i&&d({nodeIds:e,fn:t}),fetch:function(){return s({spaceId:a,cloudNodeIds:o,nodeIds:e,fn:t,after:b().after,before:b().before})},onFail:function(e){var t,n;null===(t=e)||void 0===t||null===(t=t.response)||void 0===t||!t.status||400!==e.response.status&&304!==e.response.status?(null!==(n=e)&&void 0!==n&&null!==(n=n.response)&&void 0!==n&&n.data&&(e=e.response.data),v({error:e})):v((function(e){return un(un({},e),{},{infoLoaded:!0})}))},onSuccess:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v((function(t){return un(un(un({},Lt.Zn[e.type]||Lt.Zn.default),t),{},{hasHistory:e.hasHistory||!1,acceptedParams:e.acceptedParams||[],requiredParams:e.requiredParams||[],type:e.type,help:e.help,infoLoaded:!0})}))}}}),[p,E,t,i,!(null!==e&&void 0!==e&&e.length),null===e||void 0===e?void 0:e[0]])},fn=n(92501),mn=n(26495),pn=n(36337),vn=n(19221),gn=n(23148),hn=(0,pt.cn)({key:"chartjs",default:{navigation:"pan"}});function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var En=(0,pt.CG)({key:"feedChartState",get:function(e){var t=e.key;return function(e){var n=(0,e.get)(hn);return t?n[t]:n}},set:function(e){var t=e.key;return function(e,n){(0,e.set)(hn,(function(e){return t?bn(bn({},e),{},(0,a.Z)({},t,n)):bn(bn({},e),n)}))}}}),xn=function(e){return(0,pt.sJ)(En({key:e}))},On=function(e){return(0,pt.Zl)(En({key:e}))},wn=n(85672),Cn=(n(41203),(0,K.default)(v.Button).attrs((function(e){return{flavour:"borderless",iconColor:e.active?"textDescription":"border",iconSize:"small",padding:[.5],small:!0}})).withConfig({displayName:"styled__Button",componentId:"sc-8s0lqd-0"})(["&&{background-color:",";height:20px;width:20px;&:hover{background-color:",";.button-icon__color{fill:",";}}}"],(function(e){var t=e.theme;return e.active?(0,v.getColor)("borderSecondary")({theme:t}):"initial"}),(function(e){var t=e.theme;return(0,v.getColor)("borderSecondary")({theme:t})}),(function(e){var t=e.theme;return(0,v.getColor)("textDescription")({theme:t})}))),Pn=(0,K.default)(v.Flex).attrs({padding:[.5],gap:1,round:!0,border:{side:"all",color:"borderSecondary"}}).withConfig({displayName:"styled__Container",componentId:"sc-8s0lqd-1"})(["position:absolute;top:18px;right:8px;background:",";&:hover{background:",";}"],(0,v.getRgbColor)("elementBackground",.5),(0,v.getColor)("elementBackground")),Zn=["testIdPrefix"],jn=(0,o.forwardRef)((function(e,t){var n,a=e.testIdPrefix,l=(0,m.Z)(e,Zn),i=(0,c.I0)(),u=(0,r.Z)(i,2),s=u[0],d=s.after,f=s.before,v=u[1],g=[xn(n="navigation"),On(n)],h=(0,r.Z)(g,2),y=h[0],b=h[1],E=(0,o.useCallback)((function(e){var t=d,n=f;if(d<0){var r=Date.now();t=r+1e3*d,n=r}var a=e*Math.round((n-t)/4);v({after:t+a,before:n-a})}),[d,f]),x=d>0&&Math.abs(f-d)<2e3||-1===d;return o.createElement(Pn,(0,p.Z)({"data-testid":"chartToolbox","data-track":"chart-toolbox::hover-chart::".concat(a),"data-toolbox":"true",ref:t},l),o.createElement(Cn,{active:"pan"===y,"data-testid":"chartToolbox-pan","data-track":"chart-toolbox::pan-click::".concat(a),icon:"panTool",onClick:function(){return b("pan")},title:"Pan"}),o.createElement(Cn,{active:"highlight"===y,"data-testid":"chartToolbox-highlight","data-track":"chart-toolbox::highlight-click::".concat(a),icon:"highlightArea",onClick:function(){return b("highlight")},title:"Highlight"}),o.createElement(Cn,{active:"zoom"===y,"data-testid":"chartToolbox-zoom","data-track":"chart-toolbox::zoom-click::".concat(a),disabled:x,icon:"dragHorizontal",onClick:function(){b("zoom")},title:"Select and zoom"}),o.createElement(Cn,{"data-testid":"chartToolbox-zoomIn","data-track":"chart-toolbox::zoom-in-click::".concat(a),disabled:x,icon:"zoomIn",onClick:function(){E(1)},title:"Zoom in"}),o.createElement(Cn,{"data-testid":"chartToolbox-zoomOut","data-track":"chart-toolbox::zoom-out-click::".concat(a),icon:"zoomOut",onClick:function(){E(-1)},title:"Zoom out"}),o.createElement(Cn,{"data-testid":"chartToolbox-zoomReset","data-track":"chart-toolbox::zoom-reset-click::".concat(a),disabled:-900===d&&0===f,icon:"zoomReset",onClick:function(){v({after:-900,before:0})},title:"Zoom reset"}))}));function kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kn(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tn={after:null,before:null};gn.kL.register(pn.Z,gn.vn,gn.ZL,gn.uw,gn.De,gn.f$,gn.FB,gn.u,vn.ZP);var Sn=function(e){var t,n=e.paramsKey,a=e.testIdPrefix,l=(0,o.useRef)(),i=(0,o.useContext)(K.ThemeContext),s=(0,c.I0)(),d=(0,r.Z)(s,2),f=d[0],m=d[1],p=(0,o.useState)([]),g=(0,r.Z)(p,2),h=g[0],y=g[1],b=(0,o.useState)(Tn),E=(0,r.Z)(b,2),x=E[0],O=E[1],w=(0,o.useState)(!1),C=(0,r.Z)(w,2),P=C[0],Z=C[1],j=(0,o.useState)(!1),k=(0,r.Z)(j,2),I=k[0],T=k[1],D=(0,o.useState)([]),F=(0,r.Z)(D,2), |