summaryrefslogtreecommitdiffstats
path: root/web/gui/v2/6942.99ffa6276d630cf3047e.chunk.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/gui/v2/6942.99ffa6276d630cf3047e.chunk.js')
-rw-r--r--web/gui/v2/6942.99ffa6276d630cf3047e.chunk.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/web/gui/v2/6942.99ffa6276d630cf3047e.chunk.js b/web/gui/v2/6942.99ffa6276d630cf3047e.chunk.js
deleted file mode 100644
index a3e207f2..00000000
--- a/web/gui/v2/6942.99ffa6276d630cf3047e.chunk.js
+++ /dev/null
@@ -1 +0,0 @@
-!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]="0346003c-e8e4-4630-a0d8-7f4f47520677",e._sentryDebugIdIdentifier="sentry-dbid-0346003c-e8e4-4630-a0d8-7f4f47520677")}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([[6942],{95665:function(e,t,n){n.d(t,{Z:function(){return Ue}});var r=n(87462),o=n(29439),a=n(45987),i=(n(66992),n(41539),n(33948),n(92222),n(67294)),c=n(48286),l=n(28789),u=n(69119),s=n(83894),d=n(59978),m=n(92432),f=n(46667),p=n(23109),g=(n(21249),n(57640),n(9924),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4942)),v=n(71893);function h(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}var b=(0,v.default)(d.Flex).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({position:"relative",width:{min:200},height:{min:45},column:!0,background:"dropdown",color:"text",zIndex:60,round:!0,alignItems:"end"},e)})).withConfig({displayName:"styled__PickerBox",componentId:"sc-gwjt9o-0"})([""]),y=v.default.span.withConfig({displayName:"styled__StyledTimePeriod",componentId:"sc-gwjt9o-1"})(["margin-bottom:",";cursor:pointer;width:187px;height:",";&:last-of-type{margin-bottom:0;}& > span:hover{color:",";}"],(0,d.getSizeBy)(1.5),(0,d.getSizeBy)(2),(0,d.getColor)("textLite")),w=(0,v.default)(d.Flex).attrs((function(e){return{color:e.isSelected?"primary":"text",margin:[2,6,0]}})).withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"sc-gwjt9o-2"})(["cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],(0,d.getColor)("textLite")),E=(0,v.default)(d.Flex).attrs({alignItems:"center",border:{side:"all",color:"border"},color:"text",flexWrap:!1,height:8,justifyContent:"center",padding:[2,0],round:1,width:22}).withConfig({displayName:"styled__TimePeriodDropdownButton",componentId:"sc-gwjt9o-3"})([""]),C=(0,v.default)(d.Drop).attrs({background:"mainBackground",column:!0,overflow:{vertical:"auto"},margin:[.5,0,0],padding:[2,0],round:1}).withConfig({displayName:"styled__TimePeriodDrop",componentId:"sc-gwjt9o-4"})([""]),O=(0,v.default)(d.Icon).withConfig({displayName:"styled__DropdownIcon",componentId:"sc-gwjt9o-5"})(["fill:",";width:12px;height:12px;"],(0,d.getColor)("text")),x=v.default.input.withConfig({displayName:"styled__CustomInput",componentId:"sc-gwjt9o-6"})(["border:1px solid ",";background:",";box-sizing:border-box;border-radius:4px;color:",";height:32px;margin-left:10px;margin-right:10px;outline:none;padding:4px;width:32px;&:focus{border:1px solid ",";}"],(0,d.getColor)("border"),(0,d.getColor)("mainBackground"),(0,d.getColor)("text"),(0,d.getColor)("primary")),k=(0,v.default)(d.Drop).attrs({background:"dropdown",round:2,margin:[.5,0,0],border:{side:"all",color:"borderSecondary"},animation:!0}).withConfig({displayName:"styled__StyledDrop",componentId:"sc-gwjt9o-7"})([""]),S=(0,v.default)(d.TextInput).withConfig({displayName:"styled__StyledDateInput",componentId:"sc-gwjt9o-8"})(["width:100%;"]),Z=v.default.div.withConfig({displayName:"styled__StyledCalendar",componentId:"sc-gwjt9o-9"})(["background:",";border:0;&.react-datepicker{background:",";border:0;}.react-datepicker{&__navigation{top:8px;&-icon::before{border-color:",";}}&__month-container{height:260px;}&__header{background:",";border:0;.react-datepicker__current-month{color:",";font-weight:normal;}.react-datepicker__day-name{color:",";}}&__day{color:",";&:hover{background:",";}&--disabled{color:",";&:hover{background:inherit;}}&--keyboard-selected,&--keyboard-selected:hover{color:",";background:inherit;border-radius:inherit;}&--selected,&--selected:hover{color:",";background:",";border-radius:8px;}&--in-selecting-range,&--in-range{color:",";background:",";border-radius:0;}&--selecting-range-start,&--range-start{color:",";background:",";border-top-left-radius:8px;border-bottom-left-radius:8px;&:hover{color:",";background:",";border-radius:0;border-top-left-radius:8px;border-bottom-left-radius:8px;}}&--selecting-range-end,&--range-end{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;&:hover{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;}}}}"],(0,d.getColor)("dropdown"),(0,d.getColor)("dropdown"),(0,d.getColor)("text"),(0,d.getColor)("dropdown"),(0,d.getColor)("main"),(0,d.getColor)("textLite"),(0,d.getColor)("main"),(0,d.getColor)("elementBackground"),(0,d.getColor)("textLite"),(0,d.getColor)("main"),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("primary"),(0,d.getColor)("elementBackground"),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("bright"),(0,d.getRgbColor)(["green","netdata"],.8),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("bright"),(0,d.getRgbColor)(["green","netdata"],.8)),P=function(e){var t=e.value,n=e.period,r=e.resolution,o=e.isSelected,a=e.setTimeRange,c=e.tagging,l=(0,i.useCallback)((function(){return a(t,r)}),[t,r]);return i.createElement(y,{key:t,onClick:l,"data-ga":"date-picker::click-quick-selector::".concat(c,"::").concat(-t),"data-testid":"timePeriod-value"},i.createElement(d.Text,{color:o?"primary":"text"},n))},I=(0,i.memo)(P),j=(n(39714),n(83112),n(66528),n(29422)),D=n(99982),N=n(49546),T=n(38431),F=n(76417),M=n(936),_=60,L=3600,A=86400,B=["minutes","hours","days","months"],R={minutes:_,hours:L,days:A,months:2592e3},U=function(e,t){return Math.round(e/R[t])},z=function(e,t){var n=(0,j.Z)(new Date(0),(0,g.Z)({},t,e));return-(0,D.Z)(n)},V={startDate:"start",endDate:"finish"},H=[{period:"Last 5 minutes",value:-300,resolution:"minutes"},{period:"Last 10 minutes",value:-600,resolution:"minutes"},{period:"Last 15 minutes",value:-900,resolution:"minutes"},{period:"Last 30 minutes",value:-1800,resolution:"minutes"},{period:"Last hour",value:-3600,resolution:"hours"},{period:"Last 2 hours",value:-7200,resolution:"hours"},{period:"Last 6 hours",value:-21600,resolution:"hours"},{period:"Last 12 hours",value:-43200,resolution:"hours"},{period:"Last day",value:-A,resolution:"days"},{period:"Last 2 days",value:-2*A,resolution:"days"},{period:"Last 7 days",value:-7*A,resolution:"days"}],W=function(e,t){var n=(0,T.Z)(e,"MMMM d yyyy, H:mm")?e:(0,F.default)(e,"MMMM d yyyy, H:mm",Date.now());return(0,F.default)("".concat(n," ").concat(function(e){if(!e)return"+00:00";var t=e.toString().split("."),n=t[0]>0?"+":"-",r=Math.abs(t[0]).toString(),o="".concat(n).concat(r.padStart(2,0));return t.length>1?"".concat(o,":").concat(String(.6*t[1]).padEnd(2,0)):"".concat(o,":00")}(t)),"MMMM d yyyy, H:mm xxx",Date.now())},G=function(e){var t=e.handleTimePeriodChange,n=e.selectedDate,r=e.tagging;return i.createElement(d.Flex,{column:!0,justifyContent:"start",alignItems:"start",height:{max:"260px"},overflow:{vertical:"auto"},"data-testid":"timePeriods"},H.map((function(e){var o=e.period,a=e.value,c=e.resolution;return i.createElement(I,{key:a,value:a,period:o,resolution:c,setTimeRange:t,isSelected:n===a,tagging:r})})))},K=(n(9653),n(33161),n(12274)),Y=function(e){var t=e.customTimePeriodRef,n=e.handleTimePeriodChange,r=e.value,a=e.resolution,c=e.tagging,l=function(){return r<=0?U(-r,a):0},u=(0,i.useState)(l),s=(0,o.Z)(u,2),m=s[0],p=s[1],v=(0,f.Z)(),h=(0,o.Z)(v,4),b=h[0],y=h[1],k=h[3],S=(0,i.useRef)();(0,i.useEffect)((function(){return p(l())}),[r]);var Z=(0,i.useCallback)((function(e){return p(e.target.value)}),[]),P=(0,i.useCallback)((function(e){var t=Number(e.currentTarget.value),o=!Number.isNaN(t)&&Number.isInteger(t)&&t>0,i=(0,j.Z)(new Date(0),(0,g.Z)({},a,t));return o&&(0,K.default)(i)&&(0,D.Z)(i)<=94694400?n(z(t,a),a):p(r<=0?U(-r,a):0)}),[a,m]),I=(0,i.useCallback)((function(e){return function(){n(z(m,e),e),k()}}),[m]);return i.createElement(d.Flex,{justifyContent:"start",alignItems:"center",height:8,"data-ga":"date-picker::click-last-integer::".concat(c),"data-testid":"customTimePeriod"},i.createElement(d.Text,{"data-testid":"customTimePeriod-label"},"Last"),i.createElement(x,{value:m,onChange:Z,onBlur:P,"data-ga":"date-picker::click-last-integer::".concat(c,"::").concat(m),"data-testid":"timePeriod-timeInput"}),i.createElement(E,{"data-testid":"timePeriodDropdown-button",onClick:y,ref:S},i.createElement(d.Text,{"data-testid":"timePeriodDropdown-buttonLabel",padding:[0,4,0,0]},a),i.createElement(O,{"data-testid":"timePeriodDropdown-buttonIcon",name:"triangle_down"})),S.current&&b&&i.createElement(C,{align:{top:"bottom",left:"left"},animation:!0,close:k,"data-testid":"timePeriodDropdown",onClickOutside:k,onEsc:k,ref:t,target:S.current},B.map((function(e){return i.createElement(w,{key:e,onClick:I(e),"data-ga":"date-picker::click-last-time-".concat(e,"::").concat(c),"data-testid":"timePeriod-option"},e)}))))},J=n(313),q=n(89405),Q=n(9198),$=n.n(Q),X=(n(59061),function(e){var t=e.selected,n=e.selectsStart,r=void 0!==n&&n,o=e.selectsEnd,a=void 0!==o&&o,c=e.startDate,l=e.endDate,u=e.onChange,s=e.minDate,d=e.maxDate,m=e.dateFormat,f=void 0===m?"MM/dd/yyyy":m,p=e.open,g=void 0!==p&&p,v=e.startOpen,h=void 0!==v&&v,b=e.inline,y=void 0!==b&&b,w=e.selectsRange,E=void 0!==w&&w,C=e.monthsShown,O=void 0===C?1:C,x=e.showPopperArrow,k=void 0===x||x,S=e.calendarContainer,Z=void 0===S?null:S;return i.createElement($(),{selected:t,onChange:u,selectsStart:r,selectsEnd:a,startDate:c,endDate:l,minDate:s,maxDate:d,dateFormat:f,open:g,startOpen:h,inline:y,selectsRange:E,monthsShown:O,showPopperArrow:k,calendarContainer:Z})}),ee=function(e){var t=e.name,n=void 0===t?"":t,r=e.value,a=void 0===r?"":r,c=e.onDatesChange,u=e.onFocus,s=e.placeholderText,d=void 0===s?"":s,m=(0,q.rA)().utcOffset,f=(0,i.useState)(""),p=(0,o.Z)(f,2),g=p[0],v=p[1],h=(0,i.useCallback)((function(e){var t=e.target.value;v(t)}),[]),b=(0,i.useCallback)((function(e){if((0,K.default)(e)){var t=(0,N.default)(e,"MMMM d yyyy, H:mm");v(t)}}),[]),y=(0,i.useCallback)((function(e){var t=W(e.target.value,m);if((0,K.default)(t)&&(0,l.default)(t)>0){var n=(0,l.default)(t);c(n,(function(){return b(a)}))}else b(a)}),[a,m]);return(0,i.useEffect)((function(){return b(a)}),[a]),i.createElement(S,{type:"text",name:n,value:a?g:d,onChange:h,onBlur:y,onFocus:u,placeholder:d,"data-testid":"datePicker-input"})},te=n(19013),ne=function(){var e=(0,q.rA)(),t=e.localeTimeString,n=e.localeDateString;return(0,i.useCallback)((function(e){return"".concat(n(e,{locale:"en-us",long:!1})," ").concat(t(e,{locale:"en-us",secs:!1}))}),[t,n])},re=function(e,t){return e>0?(0,te.default)(new Date(t(e))):e||0===e?(0,te.default)(new Date(t((new Date).valueOf()+1e3*e))):null},oe=function(e){var t=ne();return(0,i.useMemo)((function(){return re(e,t)}),[e])},ae=function(e,t){return[oe(e),oe(t)]};function ie(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}var ce=function(e){var t=e.startDate,n=e.setStartDate,a=e.endDate,c=e.setEndDate,u=e.singleDate,s=e.onDatesChange,m=e.onInputFocus,f=e.onlyDates,p=e.maxDate,v=void 0===p?new Date:p,h=e.minDate,b=void 0===h?new Date("1/1/2018"):h,y=e.isSinglePicker,w=ae(t,a),E=(0,o.Z)(w,2),C=E[0],O=E[1],x=oe(u),k=(0,q.rA)().utcOffset,S=ne(),P=(0,i.useCallback)((function(e,t){return(0,J.default)(re(e,S),O)?n(e):t()}),[a,S]),I=(0,i.useCallback)((function(e,t){return(0,J.default)(C,re(e,S))?c(e):t()}),[t,S]),j=(0,i.useCallback)((function(e){var t=Array.isArray(e)?e[0]:e,n=Array.isArray(e)?e[1]:null,r=t?W((0,N.default)(t,"MMMM d yyyy, H:mm"),k):t,o=n?W((0,N.default)(n,"MMMM d yyyy, H:mm"),k):n,a=(0,l.default)(r)||null,i=(0,l.default)(o)||null;s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},y?{singleDate:a}:{startDate:a,endDate:i}))}),[k]);return i.createElement(d.Flex,{column:!0,justifyContent:"center",alignItems:"center",flex:!0,gap:3,"data-testid":"datePicker-wrapper"},i.createElement(X,(0,r.Z)({selected:y?x:C,onChange:j},y?{}:{startDate:C,endDate:O},{maxDate:v,minDate:b,inline:!0,selectsRange:!0,monthsShown:y?1:2,dateFormat:"MMMM d yyyy, H:mm",showPopperArrow:!1,calendarContainer:Z})),!f&&(y?i.createElement(ee,{name:"date",value:x,onDatesChange:j,placeholderText:"Select a date"}):i.createElement(d.Flex,{justifyContent:"around",alignItems:"center",width:"100%",gap:2,padding:[0,10]},i.createElement(ee,{name:"startDate",value:C,onDatesChange:P,onFocus:m,placeholderText:"Select a start date"}),i.createElement(ee,{name:"endDate",value:O,onDatesChange:I,onFocus:m,placeholderText:"Select an end date"}))))},le=function(e){var t=e.startDate,n=e.endDate,r=e.onlyDates,a=ae(t,n),c=(0,o.Z)(a,2),u=c[0],s=c[1],m=(0,i.useMemo)((function(){return function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).onlyDates?"MMMM d yyyy":"MMMM d yyyy, H:mm:ss";return{formattedStartDate:(0,N.default)(e,n),formattedEndDate:(0,N.default)(t,n)}}(u,s,{onlyDates:r})}),[u,s]),f=m.formattedStartDate,p=m.formattedEndDate,g=(0,i.useMemo)((function(){return function(e,t){return(0,M.Z)((0,l.default)(e),(0,l.default)(t))}(u,s)}),[u,s]);return i.createElement(d.Flex,{alignItems:"center",gap:2},i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1.5},i.createElement(d.TextSmall,{strong:!0,whiteSpace:"nowrap"},"From"),i.createElement(d.TextSmall,{whiteSpace:"nowrap","data-testid":"periodIndication-from"},f)),i.createElement(d.Icon,{name:"arrow_left",size:"small",color:"textLite",rotate:2}),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1.5},i.createElement(d.TextSmall,{strong:!0,whiteSpace:"nowrap"},"To"),i.createElement(d.TextSmall,{whiteSpace:"nowrap","data-testid":"periodIndication-to"},p)),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:2},i.createElement(d.TextSmall,{whiteSpace:"nowrap"},"/"),i.createElement(d.TextSmall,{color:"textLite",whiteSpace:"nowrap","data-testid":"periodIndication-period"},g)))},ue=n(2379),se=(n(85827),n(26699),n(3151)),de=n(33926),me=36e5,fe=864e5,pe=2592e6,ge=[{key:"years",value:31104e6,unit:"y"},{key:"months",value:pe,unit:"m"},{key:"days",value:fe,unit:"d"},{key:"hours",value:me,unit:"h"},{key:"minutes",value:6e4,unit:"min"},{key:"seconds",value:1e3,unit:"s"}],ve=["hours","minutes","seconds"],he=function(e){var t=e.placeholder,n=void 0===t?"No date":t;return i.createElement(d.TextSmall,null,n)},be=function(e){var t=e.isPlaying,n=e.startDate,r=e.endDate,o=e.isSameDate,a=e.color,c=e.onlyDates,l=e.isSinglePicker,u=(0,q.rA)(),s=u.localeTimeString,m=u.localeDateString,f=a||(t?"accent":"textFocus");return i.createElement(d.Flex,{gap:1},i.createElement(d.TextSmall,{color:a,whiteSpace:"nowrap"},m(n,{long:!1}),!c&&i.createElement(i.Fragment,null," ","\u2022"," ",i.createElement(d.TextSmall,{color:f,whiteSpace:"nowrap"},s(n,{secs:!1})))),!l&&i.createElement(i.Fragment,null,(!c||!o)&&i.createElement(d.Icon,{name:"arrow_left",color:f,size:"small",rotate:2}),i.createElement(d.TextSmall,{color:a,whiteSpace:"nowrap"},!o&&i.createElement(i.Fragment,null,m(r,{long:!1})," \u2022 "),!c&&i.createElement(d.TextSmall,{color:f,whiteSpace:"nowrap"},s(r,{secs:!1})))))},ye=function(e){var t=e.isPlaying,n=e.duration,r=e.color,o=e.fluid,a=void 0!==o&&o;return i.createElement(d.Flex,{gap:1,align:"center"},i.createElement(d.TextSmall,{color:r},"\u2022"),i.createElement(d.Flex,{width:a?"auto":5},t&&i.createElement(d.TextSmall,{color:r},"last")),i.createElement(d.TextSmall,{color:r},n))},we=n(82351),Ee=(0,v.default)(d.Flex).withConfig({displayName:"styled__Container",componentId:"sc-1s7311w-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],(0,d.getColor)("textLite"),(0,d.getColor)("textLite")),Ce=(0,v.default)(we.Z).withConfig({displayName:"styled__StyledTooltip",componentId:"sc-1s7311w-1"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),Oe=["onClick","start","end","isPlaying","isPickerOpen","tagging","color","fluid","onlyDates","tooltipContent","isSinglePicker","noDateSelected"],xe=(0,i.forwardRef)((function(e,t){var n=e.onClick,c=e.start,l=e.end,u=e.isPlaying,s=e.isPickerOpen,d=e.tagging,m=e.color,f=e.fluid,p=e.onlyDates,g=e.tooltipContent,v=e.isSinglePicker,h=e.noDateSelected,b=(0,a.Z)(e,Oe),y=(0,ue.IX)(),w=(0,i.useMemo)((function(){if(h)return[];var e=function(e){return e<0?(0,j.Z)(new Date,{seconds:e}):new Date(e)}(c),t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e?new Date(e):new Date}(l),n=function(e,t){return(0,se.default)(e,t)}(e,t);return[e,t,n]}),[c,l,h]),E=(0,o.Z)(w,3),C=E[0],O=E[1],x=E[2],k=(0,i.useMemo)((function(){return h?0:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.withSeconds,r=void 0!==n&&n,o=t.withTime,a=void 0===o||o,i=r||!!e.seconds;return ge.reduce((function(t,n){var r=n.key,o=n.unit;return"seconds"!==r||i?!a&&ve.includes(r)?t:e[r]?t?"".concat(t," ").concat(e[r]).concat(o):"".concat(e[r]).concat(o):t:t}),"")}(function(e,t){return(0,de.Z)({start:e,end:t})}(C,O),{withTime:!p})}),[u,C,O,h]);return i.createElement(Ce,{content:s?function(){}:g||"Select a predefined or a custom timeframe",align:"bottom",isDisabled:!n||y,plain:!0},i.createElement(Ee,(0,r.Z)({alignItems:"center",justifyContent:"center",gap:1,height:"100%",onClick:n,padding:[0,1],ref:t,"data-ga":"date-picker::click-time::".concat(d),"data-testid":"datePicker-accessorElement"},b),v&&h?i.createElement(he,null):i.createElement(be,{isPlaying:u,endDate:O,startDate:C,isSameDate:x,color:m,onlyDates:p,isSinglePicker:v}),!p&&!v&&!h&&i.createElement(ye,{isPlaying:u,duration:k,color:m,fluid:f})))})),ke=xe,Se=n(4822),Ze=(n(32023),n(89211)),Pe=n(67622),Ie=n(37689),je=n(92517),De=(0,v.default)(d.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[.5,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1,width:80}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-pg99kg-0"})([""]),Ne=(0,v.default)(d.Flex).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"sc-1gtygg6-0"})([""]),Te=(0,v.default)(d.Flex).attrs({justifyContent:"between",alignItems:"center",width:"100%",gap:2}).withConfig({displayName:"wrapper__Wrapper",componentId:"sc-1ehauu1-0"})([""]),Fe=function(e){var t=e.name,n=e.offset,r=e.utc,o=e.onSelect,a=(0,i.useCallback)((function(){return o(r,n,t)}),[r,t]);return i.createElement(Pe.Z,{round:1,onClick:a,Wrapper:Te,"data-ga":"timezone-picker::click-timezone::global-view::".concat(t)},i.createElement(d.Text,{color:"text"},t),i.createElement(d.Text,{color:"textLite",whiteSpace:"nowrap"},"UTC ",n))},Me=n(14600),_e=function(e){var t=e.value,n=e.onChange,r=e.timezoneRef,a=e.timezoneName,c=(0,i.useState)(""),l=(0,o.Z)(c,2),u=l[0],s=l[1],m=(0,Ze.Z)(),f=(0,o.Z)(m,2),p=f[0],g=f[1],v=(0,i.useRef)(),h=(0,i.useRef)();(0,i.useEffect)((function(){h.current&&p&&h.current.focus()}),[p]);var b=(0,i.useMemo)((function(){return u?Me.K.filter((function(e){var t=e.text,n=e.offset;return t.toUpperCase().includes(u.toUpperCase())||n.includes(u)})):Me.K}),[u]),y=function(){g(!1),s("")},w=(0,i.useCallback)((function(e,t,r){n(e,t,r),y()}),[]),E=(0,i.useCallback)((function(e){return s(e.target.value)}),[]);return i.createElement(je.Z,{hasBorder:!1,testId:"timezone-picker"},i.createElement(Pe.Z,{round:1,onClick:g,ref:v,Wrapper:Te,padding:[2],"data-ga":"timezone-picker::click-picker::global-view",selected:!0},i.createElement(d.Flex,{gap:1},i.createElement(d.Text,{color:"text",whiteSpace:"nowrap"},a," UTC ",t)),i.createElement(d.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"})),v.current&&p&&i.createElement(De,{onClickOutside:y,onEsc:y,ref:r,target:v.current},i.createElement(d.Box,{padding:[0,2]},i.createElement(Ie.Z,{value:u,onChange:E,ref:h,"data-ga":"timezone-picker::click-search::global-view"})),i.createElement(Ne,null,b.map((function(e){var t=e.text,n=e.offset,r=e.utc;return i.createElement(Fe,{key:t,name:t,offset:n,utc:r[0],onSelect:w})})))))},Le=function(e){var t=e.timezoneRef,n=(0,Se.I0)(),r=(0,o.Z)(n,2),a=r[0],c=a.offset,l=a.timezoneName,u=r[1],s=(0,i.useCallback)((function(e,t,n){return u({utc:e,offset:t,timezoneName:n})}),[]);return i.createElement(_e,{timezoneRef:t,timezoneName:l,value:c,onChange:s})},Ae=(n(68216),n(79433),["mousedown","touchstart"]),Be=n(91128),Re=["onChange","isSinglePicker","values","defaultValue","tagging","isPlaying","onlyDates","accessorProps","maxDate","minDate","accessorTooltipContent"],Ue=function(e){var t=e.onChange,n=e.isSinglePicker,g=e.values,v=void 0===g?{}:g,h=v.start,y=v.end,w=v.singleDate,E=e.defaultValue,C=void 0===E?-900:E,O=e.tagging,x=void 0===O?"":O,S=e.isPlaying,Z=e.onlyDates,P=e.accessorProps,I=void 0===P?{}:P,j=e.maxDate,D=e.minDate,N=e.accessorTooltipContent,T=(0,a.Z)(e,Re),F=(0,i.useState)(w),M=(0,o.Z)(F,2),_=M[0],L=M[1],A=(0,i.useState)(h),B=(0,o.Z)(A,2),R=B[0],U=B[1],z=(0,i.useState)(h),H=(0,o.Z)(z,2),W=H[0],K=H[1],J=(0,p.Z)("resolution","minutes"),q=(0,o.Z)(J,2),Q=q[0],$=q[1],X=(0,i.useState)("startDate"),ee=(0,o.Z)(X,2),te=ee[0],ne=ee[1],re=(0,f.Z)(),oe=(0,o.Z)(re,4),ae=oe[0],ie=oe[1],ue=oe[3],se=(0,i.useRef)(),de=(0,i.useState)(null),me=(0,o.Z)(de,2),fe=me[0],pe=me[1],ge=(0,i.useState)(null),ve=(0,o.Z)(ge,2),he=ve[0],be=ve[1],ye=(0,i.useState)(null),we=(0,o.Z)(ye,2),Ee=we[0],Ce=we[1],Oe=(0,Be.Z)();!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ae,n=arguments.length>2?arguments[2]:void 0,r=(0,i.useRef)();(0,i.useEffect)((function(){var o=function(t){Array.isArray(n)?n.every((function(e){return!e||!e.contains(t.target)}))&&e():r.current&&!r.current.contains(t.target)&&e()};return t.forEach((function(e){return document.addEventListener(e,o)})),function(){t.forEach((function(e){return document.removeEventListener(e,o)}))}}),[r,e,n])}(ue,["mouseup","touchend"],[fe,he,Ee,se.current]),(0,c.Z)((function(){Oe(!!ae)}),[ae]);var xe=(0,i.useCallback)((function(e){var t=e.startDate,n=e.endDate;U(t),K(n)}),[]);(0,i.useEffect)((function(){xe({startDate:h,endDate:y})}),[h,y]);var Se=(0,i.useCallback)((function(){n?(L(w),ue()):xe({startDate:C,endDate:0})}),[n]),Ze=(0,i.useCallback)((function(e){e.target.name&&ne(e.target.name)}),[]),Pe=(0,i.useCallback)((function(e){e.stopPropagation(),ie()}),[ie]),Ie=function(){n?t(_):(t({start:R,end:W}),Oe(!1)),ue()},je=(0,i.useMemo)((function(){return function(e){return V[e]}(te)}),[te]),De=!!n||null!==R&&null!==W&&R!==W,Ne=!n&&(R===h&&W===y),Te=(0,i.useMemo)((function(){return C}),[]),Fe=R===Te,Me=(0,i.useCallback)((function(e,t){$(t),xe({startDate:e,endDate:0})}),[]),_e=function(e){var r=e.startDate,o=e.endDate,a=e.singleDate;if(n)L(a),t(a),(0,m.L)("date-picker","click-date-picker",x,String(a));else{xe(Z?{startDate:r?(0,l.default)((0,u.default)(new Date(r))):r,endDate:o?(0,l.default)((0,s.default)(new Date(o))):o}:{startDate:r,endDate:o});var i="finish"===je?o||r:r||o;(0,m.L)("date-picker","click-date-picker",x,String(i))}},Ue=(0,i.useMemo)((function(){return se.current&&ae?i.createElement(k,{backdrop:!0,target:se.current,canHideTarget:!1,align:{top:"bottom",left:"left"},onEsc:ue},i.createElement(b,(0,r.Z)({ref:be,"data-testid":"datePicker"},T),i.createElement(d.Flex,{alignItems:"center",width:"100%",padding:Z?[4]:[0,6]},!Z&&!n&&i.createElement(d.Flex,{column:!0,gap:3,margin:[0,4,0,0],padding:[6,0],border:{side:"right",color:"borderSecondary"}},i.createElement(G,{handleTimePeriodChange:Me,selectedDate:R,tagging:x}),i.createElement(Y,{handleTimePeriodChange:Me,customTimePeriodRef:pe,resolution:Q,tagging:x,value:R})),i.createElement(ce,{startDate:R,endDate:W,singleDate:_,setStartDate:U,setEndDate:K,onDatesChange:_e,onInputFocus:Ze,onlyDates:Z,maxDate:j,minDate:D,isSinglePicker:n})),i.createElement(d.Flex,{column:!0,padding:[4,6,2],width:"100%",border:{side:"top",color:"borderSecondary"}},!Z&&!n&&i.createElement(Le,{timezoneRef:Ce}),i.createElement(d.Flex,{gap:1,justifyContent:n?"end":Z?"center":De?"between":"end",width:"100%"},!Z&&!n&&De&&i.createElement(le,{startDate:R,endDate:W,onlyDates:Z}),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1},i.createElement(d.Button,{label:"Clear",flavour:"hollow",onClick:Se,disabled:Fe,"data-ga":"date-picker::click-clear::".concat(x,"-").concat(je),"data-testid":"datePicker-clear",small:!0}),i.createElement(d.Button,{label:"Apply",onClick:Ie,disabled:!De||Ne,"data-ga":"date-picker::click-apply::".concat(x,"-").concat(je),"data-testid":"datePicker-apply",small:!0})))))):null}),[R,x,Q,W,De,Fe,je,Ne,_,ae]);return i.createElement(i.Fragment,null,i.createElement(ke,(0,r.Z)({onClick:Pe,tagging:x,isPickerOpen:ae,isPlaying:S,setRangeValues:t,start:n?_:h,end:n?_:y,ref:se,onlyDates:Z,tooltipContent:N,isSinglePicker:n,noDateSelected:n&&!_},I)),Ue)}},2379:function(e,t,n){n.d(t,{Cd:function(){return s},IX:function(){return c},RT:function(){return l},o8:function(){return u}});var r=n(89250),o=n(3322),a=n(54576),i={},c=function(){var e=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/alerts"),t=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/alerts/:alertId"),n=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/home");return e||t||n},l=function(){var e=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/functions"),t=((0,o.ZQ)({extraKey:"fn"})||i).hasHistory;return e&&!t},u=function(){return(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/events")},s=function(){var e=u(),t=(0,a.useAttributeValue)("autofetch");return!(0,a.useAttributeValue)("paused")&&t&&!e}},92432:function(e,t,n){n.d(t,{L:function(){return r}});var r=function(e,t,n,r,o){var a,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"gaCustomEvent";if(window.envSettings.tracking){if(window.dataLayer){var c={event:i,eventCategory:e,eventAction:t,eventLabel:n,eventValue:r,eventResults:o};window.dataLayer.push(c)}window.gtag&&window.gtag("event","gaCustomEvent",{eventCategory:e,eventAction:t,eventLabel:n,eventValue:r,eventResults:o}),null!==(a=window.posthog)&&void 0!==a&&a.__loaded&&window.posthog.capture(i,{eventCategory:e,eventAction:t,eventLabel:n,eventValue:r})}}},39979:function(e,t,n){n.d(t,{Z:function(){return v}});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(87462),o=n(4942),a=n(45987),i=n(67294),c=n(87267),l=["callback","feature","isStart","isSuccess","isFailure","eventReason","payload"];function u(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){return(0,i.forwardRef)((function(t,n){var u=t.callback,d=t.feature,m=t.isStart,f=t.isSuccess,p=t.isFailure,g=t.eventReason,v=t.payload,h=void 0===v?{}:v,b=(0,a.Z)(t,l),y=(0,c.Z)(),w=y.sendLog,E=y.isReady,C=(0,i.useCallback)((function(){var e=b[u],t=s(s(s(s(s({feature:d,isStart:m,isSuccess:f,isFailure:p,eventReason:g},h),b["data-ga"]?{dataGa:b["data-ga"]}:{}),b.dataGa?{dataGa:b.dataGa}:{}),b["data-track"]?{dataTrack:b["data-track"]}:{}),b.label?{label:b.label}:{});"function"==typeof e&&e(),w(t,!0)}),[u,w,E,h,b]),O=(0,i.useMemo)((function(){return s(s({},b),{},(0,o.Z)({},u,C))}),[b,u,C]);return i.createElement(e,(0,r.Z)({ref:n},O))}))},m=n(16294),f=["payload"];function p(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){return(0,i.forwardRef)((function(t,n){var o=t.payload,c=void 0===o?{}:o,l=(0,a.Z)(t,f),u=d(e);return i.createElement(u,(0,r.Z)({},l,{ref:n,callback:"onClick",payload:g(g({},c),{},{action:m.Nw.buttonClicked})}))}))}},72437:function(e,t,n){n.d(t,{xy:function(){return o}});n(26699);var r=[];var o=function(e){if(r.includes(e))return function(){return!0};var t="true"===localStorage.getItem(e);return function(e){return e||t}}("mobileAppNotifications")()},71752:function(e,t,n){n.d(t,{T:function(){return r}});var r=function(e){return e.messages&&e.messages.length>0?e.messages[0]:void 0}},30688:function(e,t,n){n.d(t,{A:function(){return a},f:function(){return o}});var r=n(93433),o=(n(92222),n(85827),n(41539),n(25387),n(2490),n(72608),function(e,t){return{isValid:e,message:t}});function a(e){return Array.isArray(e)?function(t){return e.reduce((n=t,function(e,t){var o=t(n),a=o.isValid,i=o.message;if(a)return e;var c=e.messages,l=void 0===c?[]:c;return{isValid:a,messages:[].concat((0,r.Z)(l),[i])}}),{isValid:!0});var n}:(t=e,function(e){var n=t(e),r=n.isValid,o=n.message;return o?{isValid:r,messages:[o]}:{isValid:r}});var t}},31203:function(e,t,n){var r=n(87462),o=n(45987),a=n(66007),i=n(67294),c=n(70982),l=n(59978),u=["onClick","src","title"],s=(0,i.forwardRef)((function(e,t){var n=e.onClick,s=e.src,d=e.title,m=void 0===d?"User avatar":d,f=(0,o.Z)(e,u);return i.createElement(l.Flex,(0,r.Z)({cursor:"pointer",round:"50%","data-testid":"userAvatar",title:m,alt:m,onClick:function(e){return n&&n(e)},width:8,height:8},f,{ref:t,alignItems:"center",justifyContent:"center",background:"spaceIdle",color:"textLite",overflow:"hidden"}),s?i.createElement(l.Flex,{as:"img",src:s,alt:m,width:8,height:8}):i.createElement(c.G,{icon:a.KC,size:"lg",alt:m}))}));t.Z=s},70842:function(e,t,n){n.d(t,{Z:function(){return q}});var r=n(87462),o=n(29439),a=n(67294),i=n(59978),c=n(61152),l=n(82351),u=n(24533),s=n(71893),d=n(57387),m=n(78266),f=n(45987),p=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(78710)),g=n(46667),v=n(36065),h=n(74059),b=n(77872),y=n(97346),w=n(14428),E=["selectedSpace","setSelectedSpace","column","showFullname"],C=s.default.div.withConfig({displayName:"spaces__Separator",componentId:"sc-19p9rsp-0"})(["height:1px;width:",";background:",";"],(0,i.getSizeBy)(3),(0,i.getColor)("border")),O=function(e){var t=e.selectedSpace,n=e.setSelectedSpace,c=e.column,u=e.showFullname,s=(0,f.Z)(e,E),d=(0,h.Iw)(),m=(0,a.useMemo)((function(){return d.filter((function(e){return!(0,p.Ly)(e)}))}),[d]),O=(0,g.Z)(),x=(0,o.Z)(O,4),k=x[0],S=x[2],Z=x[3];return a.createElement(i.Flex,(0,r.Z)({"data-testid":"workspaceBar",padding:[3,2],column:c,alignItems:"center",justifyContent:"center"},s),a.createElement(i.Flex,{column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden"},a.createElement(i.Flex,{column:c,"data-testid":"workspaceBar-spacesList",gap:c?4:2,overflow:{vertical:"auto"},flexWrap:!c},m.map((function(e){return a.createElement(b.Z,{testIdPrefix:"workspaceBar-space",key:e,spaceId:e,onClick:n,active:e===(null===t||void 0===t?void 0:t.id),background:"selected",showFullname:u})}))),a.createElement(y.Z,{permission:"user:CreateSpace"},a.createElement(C,{"data-testid":"workspaceBar-separator"}),a.createElement(l.Z,{content:"Create a new Space",align:"right"},a.createElement(w.Z,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:S,"data-testid":"workspaceBar-addSpace-button"})))),k&&a.createElement(v.Z,{onClose:Z,onDone:n}))},x=n(56662),k=n(61458),S=n(33335),Z=n(23383),P=n(95383),I=n(73398),j=function(e){var t=e.selectedSpace,n=e.selectedRoom,r=e.setSelectedRoom,c=t.id;(0,Z.Z)(c);var u=(0,S.gI)("room:Create",c),s=(0,S.gI)("room:Read",c),d=(0,g.Z)(!1),m=(0,o.Z)(d,4),f=m[0],p=m[2],v=m[3],h=(0,a.useCallback)((function(e){e.stopPropagation(),u&&p()}),[u]),b=(0,P.WY)(c),y=(0,a.useMemo)((function(){return b.filter((function(e){return e.isMember}))}),[b]);return(0,a.useEffect)((function(){null!==y&&void 0!==y&&y.length&&(n||r(y[0]))}),[y,n]),a.createElement(a.Fragment,null,a.createElement(k.Z,{"data-testid":"workspaceRooms-menuList",disabled:!s,headerTestId:"workspaceRooms-warRooms",isOpen:!0,label:a.createElement(i.Flex,{padding:[1,0],margin:[0,0,1],flex:!0,justifyContent:"between",alignItems:"center",height:"24px"},a.createElement(i.Flex,{alignItems:"center",gap:2},a.createElement(i.Icon,{name:"space_new",color:"menuItem",width:"14px",height:"14px"}),a.createElement(i.TextSmall,{color:"menuItem"},"Select a room")),a.createElement(i.Flex,{alignItems:"center",gap:2},a.createElement(l.Z,{content:"Create a new room",align:"right"},a.createElement(w.Z,{permission:"room:Create",tiny:!0,icon:"plus",onClick:h,"data-testid":"workspaceRooms-addWarRoom-button",spaceId:c}))))},a.createElement(i.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1]},y.map((function(e){var t=e.id;return a.createElement(I.Z,{key:t,id:t,hideAlerts:!0,Wrapper:i.TextSmall,isSidebar:!0,selectedId:null===n||void 0===n?void 0:n.id,onClick:function(){return r(e)}})})))),f&&a.createElement(x.U,{onClose:v,isSubmodal:!1}))},D=n(4942),N=(n(92222),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(33582)),T=n(13477),F=n(93017),M=n(28234),_=n(94221),L=n(49254),A=n(39469),B=n(87267);function R(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 U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){(0,D.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=n(39979),V=n(63346),H=(0,s.default)(i.ModalContent).attrs({width:{base:"80vw"},height:{base:"80vh",min:"80vh"}}).withConfig({displayName:"modal__ModalContent",componentId:"sc-4dwymj-0"})(["box-shadow:0 18px 28px rgba(0,0,0,0.5);"]),W=(0,z.Z)(i.Button),G=function(e){var t=e.claim,n=e.loading,r=(e.error,e.privateKey),o=e.setPrivateKey,c=e.selectedSpace,l=e.setSelectedSpace,u=e.selectedRoom,s=e.keyFilename;return c?u?a.createElement(a.Fragment,null,a.createElement(m.H,null),a.createElement(i.H3,{textAlign:"center"},'You are ready to connect your agent in "',u.name,'" of "',c.name,'"'),a.createElement(i.Text,{textAlign:"center"},"Last step is to ensure you're the admin of this agent ;)"),a.createElement(i.TextSmall,{textAlign:"center"},"We've created a file with a random key. Can you read it?"),a.createElement(d.ZP,{"data-testid":"key-filename-command",commandText:"sudo cat ".concat(s),width:"60%"},"$ sudo cat ",s),a.createElement(i.Flex,{column:!0,round:!0,background:"accent",border:"primary",padding:[2],width:"60%"},a.createElement(i.TextSmall,{color:"tooltip"},a.createElement(i.TextSmall,{strong:!0,color:"tooltip"},"Tip:")," ","Run the command and paste here the key it will give you. If the command doesn't work out of the box, locate the ",s," file, open it in your favorite text editor, and copy it to your clipboard.")),a.createElement(i.TextInput,{value:r,placeholder:"Paste private key here",onChange:function(e){return o(e.target.value)},metaShrinked:!0,containerStyles:{width:"60%"}}),a.createElement(W,{label:"Claim your agent",onClick:t,disabled:!r||n,isLoading:n,"data-ga":"claiming::claim-agent::modal",payload:{space:null===c||void 0===c?void 0:c.id,room:null===u||void 0===u?void 0:u.id,privateKey:r}})):a.createElement(a.Fragment,null,a.createElement(m.H,null),a.createElement(i.H3,{textAlign:"center"},'Select a room in "',c.name,'" for this agent'),a.createElement(i.TextBig,{color:"textDescription",textAlign:"center"},"or create a new one by hitting the [+] button.")):a.createElement(a.Fragment,null,a.createElement(m.H,null),a.createElement(i.H3,{textAlign:"center"},"Let's connect your agent"),a.createElement(i.TextBig,{color:"textDescription",textAlign:"center"},"Select the space you want this agent to join"),a.createElement(i.TextBig,{color:"textDescription",textAlign:"center"},"or create a new one by hitting the [+] button."),a.createElement(O,{column:!!c,selectedSpace:c,setSelectedSpace:l,showFullname:!0,width:"80%"}))},K=function(e){var t=e.onClose,n=e.keyFilename,r=function(e){var t,n=(0,a.useState)(),r=(0,o.Z)(n,2),i=r[0],c=r[1],l=(0,a.useState)(),s=(0,o.Z)(l,2),d=s[0],m=s[1],f=(0,a.useState)(""),p=(0,o.Z)(f,2),g=p[0],v=p[1],b=(0,N.Z)(null===i||void 0===i?void 0:i.id),y=(0,h.Q6)(),w=null===(t=window.localNetdataRegistry)||void 0===t?void 0:t.mg,E=(0,u.Lz)(w),C=(0,o.Z)(E,2),O=C[0],x=O.claiming,k=O.claimingError,S=C[1],Z=(0,T.Iy)("isAnonymous"),P=(0,F.Z)(),I=(0,o.Z)(P,2),j=I[0],D=I[1],R=(0,u.Hu)(),z=(0,L.Hu)(),V=(0,A.Hu)(),H=(0,B.Z)(),W=H.sendLog,G=H.isReady;return{claim:(0,a.useCallback)((function(){var t;g&&!x&&b&&w&&y&&!Z&&d&&(S({claiming:!0}),(0,_.c)({key:g,token:null===b||void 0===b||null===(t=b[0])||void 0===t?void 0:t.token,rooms:[d.id],url:window.envSettings.apiUrl}).then((function(t){var n=t.data;if(!n.success)return S({claiming:!1,claimingError:n.message,claimId:null}),D({message:n.message}),void W({feature:"claim-node",isFailure:!0,message:n.message});R(),z(),V(),S(U(U({claiming:!1},n),{},{claimingError:""})),e(),j({header:"Your agent got connected to Netdata",text:"You can see your agent in the room ".concat(d.name," of ").concat(i.name," space.")}),W({feature:"claim-node",isSuccess:!0})})).catch((function(e){var t,n=null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data,r=(0,M.r)(null===n||void 0===n?void 0:n.errorMsgKey)||(null===n||void 0===n?void 0:n.errorMessage)||"Something went wrong";S({claiming:!1,claimingError:r,claimId:null}),D({message:r}),W({feature:"claim-node",isFailure:!0,message:r})})))}),[b,g,w,y,Z,x,W,G]),selectedSpace:i,setSelectedSpace:c,selectedRoom:d,setSelectedRoom:m,loading:x,error:k,privateKey:g,setPrivateKey:v}}(t),c=r.claim,l=r.selectedSpace,s=r.setSelectedSpace,d=r.selectedRoom,m=r.setSelectedRoom,f=r.loading,p=r.error,g=r.privateKey,v=r.setPrivateKey;return a.createElement(i.Modal,{zIndex:7e3,backdropProps:{backdropBlur:!0}},a.createElement(V.ZP,{feature:"ClaimModal"},a.createElement(i.Flex,{column:!0,alignItems:"end",gap:3},a.createElement(H,{tabIndex:0},a.createElement(i.ModalHeader,{justifyContent:"between"},a.createElement(i.Flex,{gap:2,alignItems:"center"},"Connect your agent to Netdata"),a.createElement(i.ModalCloseButton,{onClose:t,testId:"claim-modal-close-button","data-ga":"claiming::close-claim-modal::local"})),a.createElement(i.ModalBody,{overflow:{vertical:"auto"},padding:[0],height:"100%",column:!1},a.createElement(i.Collapsible,{background:"sideBar",open:!!l,direction:"horizontal"},a.createElement(O,{column:!0,selectedSpace:l,setSelectedSpace:s,background:"sideBarMini",height:"100%"})),a.createElement(i.Collapsible,{background:"sideBar",open:!!l,direction:"horizontal"},a.createElement(i.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"auto"},padding:[2,0]},!!l&&a.createElement(j,{selectedSpace:l,selectedRoom:d,setSelectedRoom:m}))),a.createElement(i.Flex,{alignItems:"center",column:!0,"data-testid":"claim-modal-body",flex:!0,gap:3,justifyContent:"center",padding:[4]},a.createElement(G,{selectedSpace:l,selectedRoom:d,setSelectedSpace:s,keyFilename:n,claim:c,loading:f,error:p,privateKey:g,setPrivateKey:v})))))))},Y={unavailable:"Netdata is not available for this agent.",available:"Netdata is available. Click to claim it and gain the full benefits of Netdata!",disabled:"Netdata is available, but it is disabled, you can change the agent configuration to enable it.",banned:"The agent has been banned from cloud.",offline:"The agent tries to connect to Netdata, but it fails to do so.",online:"The agent is already connected to Netdata :)"},J=(0,z.Z)(i.Button),q=function(e){var t=(0,c.Z)("claimModal"),n=(0,o.Z)(t,4),i=n[0],s=n[2],d=n[3],m=(0,u.Lz)(),f=(0,o.Z)(m,1)[0],p=f.canBeClaimed,g=f.cloudStatus,v=f.keyFilename;return a.createElement(a.Fragment,null,a.createElement(l.Z,{plain:!0,content:Y[g],isBasic:!0},a.createElement("div",null,a.createElement(J,(0,r.Z)({label:"Connect to Netdata",onClick:s},e,{disabled:!p,"data-ga":"claiming::open-claim-modal::local"})))),i&&a.createElement(K,{onClose:d,keyFilename:v}))}},35253:function(e,t,n){n.d(t,{J:function(){return o},N:function(){return r}});var r={Community:"nightly",default:"stable",EarlyBird:"nightly"},o={nightly:{description:"Released at most once every 24 hours with fully-tested code that fixes bugs or security flaws, or introduces new features to Netdata. Every nightly release is a candidate for then becoming a stable release.",title:"Nightly"},stable:{description:"Released when a major milestone is reached. Stable releases might be a better choice for those who run Netdata in mission-critical production systems, as updates will come more infrequently.",title:"Stable"}}},16931:function(e,t,n){n.d(t,{Sn:function(){return l},U8:function(){return i},m7:function(){return c}});var r=n(67294),o=n(71893),a=n(59978),i=(0,o.default)(a.Box).attrs({border:{side:"all",color:"border"},padding:[1.75,7,1.75,3],round:!0}).withConfig({displayName:"styled__InfoBlock",componentId:"sc-1lice8m-0"})(["color:",';font-family:"Courier New",Courier,monospace;font-size:14px;letter-spacing:0.09px;line-height:18px;max-height:34px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;'],(0,a.getColor)("textLite")),c=function(e){var t=e.children;return r.createElement(a.Flex,{column:!0,gap:4},t)},l=(0,o.default)(a.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-1lice8m-1"})(["&&{width:auto;min-width:auto;height:22px;background:",";border:1px solid ",";border-radius:4px;padding:0;&:hover{background:",";& > span{span{color:",";}svg{fill:",";}}}& > span{display:flex;align-items:center;gap:6px;margin:2px 8px 2px 4px;span{color:",";}svg{fill:",";}}}"],(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"primary":"modalBackground")({theme:n})}),(0,a.getColor)("primary"),(0,a.getColor)("primary"),(0,a.getColor)("modalBackground"),(0,a.getColor)("modalBackground"),(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"modalBackground":"primary")({theme:n})}),(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"modalBackground":"primary")({theme:n})}))},52428:function(e,t,n){n.d(t,{J:function(){return u}});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(4942),o=n(58206),a=n(52631),i=n(74855);function c(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,o.Z)(e);var n=(0,i.sc)(l(l({header:"Copied",text:"Command copied to your clipboard! Please run it on your node's terminal.",icon:"gear"},t),{},{success:!0}));a.Z.success(n,{context:"copy"})}}},57387:function(e,t,n){n.d(t,{ZM:function(){return g}});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(45987),o=n(4942),a=n(67294),i=n(71893),c=n(59978),l=n(52428),u=["children"],s=["children","confirmationText","commandText"];function d(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}var m=(0,i.default)(c.Box).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({color:"textDescription",background:"modalTabsBackground",border:{side:"all",color:"borderSecondary"},padding:[4,10,4,4],position:"relative",width:"100%"},e)})).withConfig({displayName:"command__StyledTerminalCommand",componentId:"sc-wnwmk3-0"})(["color:",';border-radius:2px;overflow-wrap:anywhere;white-space:pre-wrap;font-family:"Courier New",Courier,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;'],(0,c.getColor)("textDescription")),f=(0,i.default)(c.Icon).withConfig({displayName:"command__StyledIcon",componentId:"sc-wnwmk3-1"})(["display:flex;align-self:flex-end;cursor:pointer;"]),p=(0,i.default)(c.Box).attrs({color:"textDescription",border:{side:"all",color:"borderSecondary"},background:"modalTabsBackground",padding:[0,1]}).withConfig({displayName:"command__CodeText",componentId:"sc-wnwmk3-2"})(["display:inline-block;color:",';border-radius:2px;font-family:"Courier New",Courier,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;'],(0,c.getColor)("textDescription")),g=function(e){var t=e.children,n=(0,r.Z)(e,u);return a.createElement(p,n,t)};t.ZP=function(e){var t=e.children,n=e.confirmationText,o=void 0===n?"Command copied to your clipboard.":n,i=e.commandText,u=void 0===i?t:i,d=(0,r.Z)(e,s);return a.createElement(m,d,t,a.createElement(c.Box,{position:"absolute",bottom:"8px",right:"8px"},a.createElement(f,{name:"copy",size:"small",color:"primary",onClick:(0,l.J)(u||t,{text:o})})))}},70459:function(e,t,n){var r=n(29439),o=(n(41539),n(15581),n(2490),n(34514),n(54747),n(67294)),a=n(54576),i=n(4822);t.Z=function(){var e=(0,a.useChart)(),t=(0,i.I0)(),n=(0,r.Z)(t,2),c=n[0],l=c.after,u=c.before,s=c.forcePlay,d=n[1],m=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autofetchOnWindowBlur:!1};return function(){e.getNodes().forEach((function(e){return e.updateAttributes(t)}));var n=l<0?l:-Math.floor((u-l)/1e3);d({after:n,before:0,forcePlay:!!t.autofetchOnWindowBlur})}};return{play:(0,o.useCallback)(m(),[u,l,s]),forcePlay:(0,o.useCallback)(m({autofetchOnWindowBlur:!0}),[u,l,s]),pause:(0,o.useCallback)((function(){if(!(l>0)){var e=Date.now();d({after:1e3*Math.floor(e/1e3+l),before:1e3*Math.floor(e/1e3),forcePlay:!1})}}),[l,u,s])}}},92517:function(e,t,n){var r=n(71893),o=n(67294),a=n(59978),i=(0,r.default)(a.Flex).withConfig({displayName:"item__StyledFlex",componentId:"sc-1gby0f1-0"})(["&:hover{background:",";}"],(function(e){var t=e.hasHoverBackground,n=e.theme,r=e.hoverBackground,o=void 0===r?"borderSecondary":r;return t?(0,a.getColor)(o)({theme:n}):null})),c=(0,o.forwardRef)((function(e,t){var n=e.background,r=e.children,c=e.cursor,l=e.hasBorder,u=e.hasHoverBackground,s=e.onClick,d=e.padding,m=e.testId,f=e.borderColor,p=void 0===f?"selected":f,g=e.round,v=e.hoverBackground;return o.createElement(a.Flex,{alignItems:"center",border:l&&{side:"right",color:p},cursor:c,"data-testid":m,onClick:s,ref:t},o.createElement(i,{round:g,alignItems:"center",background:n,hasHoverBackground:u,margin:l?[0,3,0,0]:void 0,padding:d,hoverBackground:v},r))}));t.Z=c},27261:function(e,t,n){n(92222);var r=n(59978),o=n(67294),a="node-status-indicator";t.Z=function(e){var t=e.statusText,n=e.counter,i=e.statusColor,c=i.statusTextColor,l=i.indicatorWrapperColor,u=i.counterColor;return o.createElement(r.Flex,{alignItems:"center",gap:2},o.createElement(r.TextSmall,{"data-testid":"".concat(a,"-text-").concat(t),color:c},t),o.createElement(r.Flex,{justifyContent:"center",alignItems:"center",padding:[0,1],width:{min:7.5},height:5,background:l,round:!0},o.createElement(r.TextSmall,{"data-testid":"".concat(a,"-counter-").concat(t),color:u},n)))}},9458:function(e,t,n){var r=n(67294),o=n(59978);t.Z=function(){return r.createElement(o.Box,{as:"hr",height:3,margin:[0],sx:{borderWidth:"0px 0px 0px 1px",borderColor:"placeholder",borderStyle:"solid"}})}},6973:function(e,t,n){n.d(t,{B:function(){return r}});var r={live:{statusTextColor:"live",indicatorWrapperColor:"live",counterColor:"bright"},stale:{statusTextColor:"stale",indicatorWrapperColor:"stale",counterColor:"bright"},offline:{statusTextColor:"textLite",indicatorWrapperColor:"offline",counterColor:"bright"},unseen:{statusTextColor:"unseen",indicatorWrapperColor:"unseen",counterColor:"bright"}}},4514:function(e,t,n){n.d(t,{c:function(){return d}});n(21249),n(57640),n(9924),n(47941);var r=n(67294),o=n(71893),a=n(59978),i=n(27261),c=n(9458),l=n(6973),u=(0,o.default)(a.Flex).withConfig({displayName:"wrapper__NodesIndicatorWrapper",componentId:"sc-gy5ftg-0"})(["pointer-events:",";cursor:",";opacity:",";"],(function(e){return e.disabled?"none":"auto"}),(function(e){return e.disabled?"default":"pointer"}),(function(e){return e.disabled?"0.4":"1"})),s={live:{counter:0,statusText:"Live"},stale:{counter:0,statusText:"Stale"},offline:{counter:0,statusText:"Offline"},unseen:{counter:0,statusText:"Unseen"}},d=function(e){return r.createElement(u,e,Object.keys(s).map((function(e){return r.createElement(r.Fragment,{key:e},r.createElement(i.Z,{statusText:s[e].statusText,counter:s[e].counter,statusColor:l.B[e]}),r.createElement(c.Z,null))})))};t.Z=u},64599:function(e,t,n){var r=n(87462),o=n(67294),a=n(59978),i=n(13477),c=n(83356),l=(0,n(39979).Z)(a.Button);t.Z=function(e){var t=(0,i.Iy)("isAnonymous"),n=(0,c.Z)();return t?o.createElement(l,(0,r.Z)({label:"Sign In",isStart:!0,onClick:n,"data-ga":"click-sign-in::header",feature:"SignIn"},e)):null}},46942:function(e,t,n){n.r(t),n.d(t,{default:function(){return rt}});n(66992),n(41539),n(88674),n(78783),n(33948);var r=n(67294),o=n(2145),a=n(59978),i=n(13477),c=(n(15581),n(2490),n(34514),n(54747),n(68035)),l=n(4480),u=n(30266),s=n(74059),d=n(33335),m=n(94979),f=n(78266),p=n(29439),g=n(46667),v=n(59636),h=n(67622),b=n(61458),y=n(37518),w=n(71893),E=(0,w.default)(a.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[2,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1,width:64}).withConfig({displayName:"styled__Dropdown",componentId:"sc-1vwntsm-0"})([""]),C=(0,w.default)(a.H6).attrs({color:"text",padding:[2,4]}).withConfig({displayName:"styled__OtherRoomsHeader",componentId:"sc-1vwntsm-1"})([""]),O=n(82351),x=n(93033),k=n(14428),S=function(){var e=(0,g.Z)(),t=(0,p.Z)(e,4),n=t[0],o=t[1],i=t[3],c=(0,r.useRef)(),l=(0,y.Hm)(),u=l.slug,m=(0,s.OS)("name"),f=(0,x.Z)({roomSlug:u}),w=(0,d.gI)("room:Read"),S=(0,s.Q6)();return r.createElement(r.Fragment,null,r.createElement(a.Flex,{alignItems:"center",gap:1,"data-testid":"header-roomOptions"},r.createElement(h.Z,{ref:c,testid:"roomDropdownMenu-roomOptions",icon:"space_new",onClick:o,padding:[2],round:1,width:"auto",disabled:!w||S},l.name&&r.createElement(a.Flex,{alignItems:"center",gap:4},r.createElement(a.Text,null,l.name),r.createElement(a.Icon,{name:"chevron_down",size:"small",color:"text"}))),r.createElement(O.Z,{align:"bottom",content:"Room settings"},r.createElement(k.Z,{permission:"room:Leave","data-ga":"header::click-war-room-settings::global-view","data-testid":"header-manageWarRoom",onClick:f,icon:"gear",flavour:"borderless",neutral:!0,small:!0}))),c.current&&n&&r.createElement(E,{target:c.current,onEsc:i,onClickOutside:i},r.createElement(b.Z,{isOpen:!0,label:"ROOMS IN ".concat(m.toUpperCase()),headerTestId:"roomDropdownMenu-otherRooms",Header:C},r.createElement(a.Flex,{onClick:i,column:!0,height:{max:100},overflow:{vertical:"auto"}},r.createElement(v.Z,null)))))},Z=(n(92222),n(97945)),P=n(82902),I=(n(82526),n(41817),function(e){var t=e.description,n=e.title,o=e.testId,i=e.children;return r.createElement(a.Flex,{"data-testid":o,column:!0,gap:2},r.createElement(a.H4,{color:"textDescription"},n),r.createElement(a.Flex,{column:!0,"data-testid":o,gap:2},r.createElement(a.Text,{color:"textDescription"},t),i))}),j=function(e){var t=e.children,n=e.testId,o=e.icon,i=void 0===o?"nodes_update":o;return r.createElement(a.Flex,{"data-testid":n,padding:[6],round:1,width:"100%",background:"modalInfoBackground"},r.createElement(a.Box,{margin:[0,4,0,0]},r.createElement(a.Box,{as:a.Icon,width:10,height:10,name:i})),t)},D=function(e){var t=e.title,n=e.desciription;return r.createElement(a.Flex,{column:!0},r.createElement(a.Flex,null,r.createElement(a.Box,{margin:[0,4,0,0]},r.createElement(a.Icon,{color:"main",name:"warning_triangle_hollow"})),r.createElement(a.H3,null,t)),r.createElement(a.Box,{margin:[6,0,0,0]},n))},N=n(91008),T=n(91268),F=n(89250),M=(n(64211),n(41874),n(11389)),_=n(22965),L=n(86711),A=n(83925);var B=[{id:"name",accessor:"name",header:"Name",cell:function(e){var t=e.getValue,n=e.row;return r.createElement(N.Z,{disabled:!n.original.isLive&&"stale"!==n.original.state,color:"text",hoverColor:"primary",visitedColor:"accent",Component:a.TextSmall},t())},minSize:60},{id:"version",accessor:"version",header:"Version",cell:function(e){var t=e.getValue;return r.createElement(a.Pill,{color:"neutralPillColor",flavour:"neutral"},t())}},{id:"state",accessor:"state",header:"Status",cell:function(e){var t=e.getValue;return r.createElement(M.Z,{state:t()})},sortingFn:function(e,t){return n=(0,_.Q5)(e.original.state),r=(0,_.Q5)(t.original.state),n===r?0:n>r?1:-1;var n,r},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||t===(0,_.Q5)(r.state)}))},meta:{tooltip:r.createElement(L.Z,null),filter:{component:"select",isMulti:!0,options:[{value:"Offline",label:"Offline"},{value:"Live",label:"Live"},{value:"Stale",label:"Stale"}]}}},{id:"updateSeverity",accessor:"updateSeverity",header:"Severity",cell:function(e){var t=e.getValue,n=e.row.original;return r.createElement(A.Z,{name:n.name,os:n.os.id,container:n.hw.container,warningLevel:n.updateSeverity,labels:n.labels||{},version:n.version,text:t()})}}],R=n(77823),U=(0,l.cn)({key:"notificationModal",default:!1}),z=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).resetOnUnmount,t=void 0!==e&&e,n=(0,l.rb)(U),o=(0,l.FV)(U),a=(0,p.Z)(o,2),i=a[0],c=a[1],u=(0,r.useCallback)((function(){return c(!0)}),[]),s=(0,r.useCallback)((function(){return c(!1)}),[]);return(0,R.Z)((function(){t&&n()})),{isModalVisible:i,openModal:u,closeModal:s,resetState:n}},V=[{id:"updateSeverity",desc:!1}],H=function(){var e=z().closeModal,t=(0,r.useMemo)((function(){return{goto:{handleAction:function(e){var t=((null===e||void 0===e?void 0:e.labels)||{})._install_type,n=void 0===t?null:t,r=e.hw.container,o=e.os.id,a=e.version,i=(0,P.Ly)({container:r,os:o,_install_type:n,version:a});window.open(i,"_blank","noopener,noreferrer")},tooltipText:"Go to documentation"}}}),[]),n=(0,F.s0)(),o=(0,Z.Hg)();return{onClickRow:(0,r.useCallback)((function(t){var r=t.data;if(r.isLive||"stale"===r.state){var a=o(r.id);n(a),e()}}),[]),sortBy:V,rowActions:t,columns:B,disableClickRow:function(e){var t=e.data;return!t.isLive&&"stale"!==t.state}}},W=n(18129),G={updateSeverity:!0,connectionToCloud:!1},K=function(e){var t=e.data,n=H(),o=n.rowActions,a=n.onClickRow,i=n.disableClickRow,c=n.sortBy;return r.createElement(T.Z,{"data-testid":"nodesTable-layout",overflow:"hidden",height:"100%"},r.createElement(W.Z,{customSortBy:c,customNodes:t,showdDefaultRowActions:!1,showDefaultBulkActions:!1,columnVisibility:G,customRowActions:o,enableSelection:!1,onClickRow:a,disableClickRow:i}))},Y=function(e){var t=e.onClose,n=(0,Z.Ng)(),o=(0,Z.Ne)(n),i=n.length,c="Need update (".concat(n.length," ").concat((0,P.V6)(n.length),")");return r.createElement(a.Modal,{backdropProps:{backdropBlur:!0}},r.createElement(a.ModalContent,{width:{min:200,base:270},height:200},r.createElement(a.ModalHeader,null,r.createElement(D,{title:"Nodes that need Attention",desciription:r.createElement(a.Text,null,"You have ",r.createElement(a.Text,{strong:!0},i)," ",(0,P.V6)(i)," that should be upgraded to ensure experience using Netdata")}),r.createElement(a.ModalCloseButton,{onClose:t,testId:"close-button"})),r.createElement(a.ModalBody,{overflow:"hidden"},r.createElement(j,null,r.createElement(I,{title:c},r.createElement(a.Text,null,r.createElement(a.Flex,{column:!0},r.createElement(a.Text,null,"Please upgrade to ensure you get the latest security and bug fixes.")," ",r.createElement(a.Box,null,"To update your nodes to the latest version"," ",r.createElement(N.Z,{href:P.XY.default,rel:"noopener noreferrer",strong:!0,target:"_blank"},"please read our documentation"," "),"and find direct links for each node depending on where it is running and/or how it was installed."))))),r.createElement(a.Box,{height:"calc(100% - 145px)",padding:[3,0],margin:[0,0,8,0]},r.createElement(K,{data:o})))))},J=n(48286),q=n(91128),Q=n(2379),$=n(54576),X=n(95665),ee=n(4822),te=function(e){var t=e.tagging,n=e.isPlaying,o=(0,ee.I0)(),a=(0,p.Z)(o,2),i=a[0],c=i.offset,l=i.after,u=i.before,s=a[1],d=(0,r.useCallback)((function(e){var t=e.start,n=void 0===t?-900:t,r=e.end;s({after:n,before:n<0?0:void 0===r?0:r})}),[]),m=(0,r.useMemo)((function(){return{start:l<0?l:Math.floor(l),end:l<0?0:Math.ceil(u)}}),[l,u]);return r.createElement(X.Z,{values:m,utc:c,onChange:d,tagging:t,isPlaying:n})},ne=n(92517),re=(0,w.default)(a.Flex).withConfig({displayName:"container__Container",componentId:"sc-qc13l0-0"})(["background:",";"],(function(e){var t=e.theme,n=e.isPlaying;return("Dark"===t.name?(0,a.getRgbColor)(n?["green","green40"]:["neutral","grey70"]):(0,a.getRgbColor)(n?["green","green190"]:["neutral","grey185"]))({theme:t})})),oe=n(70459),ae=(0,w.default)(O.Z).withConfig({displayName:"playPausePill__StyledTooltip",componentId:"sc-1umryvu-0"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),ie=function(e){var t=e.isPlaying,n=e.isForcePlaying,o=e.isDisabled,i=(0,oe.Z)(),c=i.play,l=i.pause,u=(0,r.useMemo)((function(){return function(e,t){return e?t?"forcePlay":"playSolid":"pauseSolid"}(t,n)}),[t,n]);return r.createElement(ae,{content:t?"Click to pause":"Click to play",align:"bottom",isDisabled:o},r.createElement(a.Box,{as:a.Pill,icon:u,onClick:t?l:c,isPlaying:t,"data-testid":"playPause-button",flavour:t?"success":"neutral",hollow:!0,_hover:{background:t?"accent":"neutralPillColor"},background:t?"primary":"neutralPillBg",color:"bright"},t?"Playing":"Paused"))},ce=(0,w.default)(a.Flex).attrs({padding:[1],role:"button"}).withConfig({displayName:"styled__MenuButton",componentId:"sc-3h0zgs-0"})(["cursor:pointer;"]),le=(0,w.default)(a.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,backdrop:!0,column:!0,padding:[2,0],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[.5,0,0],width:40}).withConfig({displayName:"styled__Dropdown",componentId:"sc-3h0zgs-1"})([""]),ue=(0,w.default)(O.Z).withConfig({displayName:"styled__StyledTooltip",componentId:"sc-3h0zgs-2"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),se=function(e){var t=e.target,n=e.isDisabled,o=(0,g.Z)(),i=(0,p.Z)(o,4),c=i[0],l=i[1],u=i[3],s=(0,oe.Z)(),d=s.play,m=s.pause,f=s.forcePlay;return r.createElement(r.Fragment,null,c?r.createElement(ce,{onClick:l,width:"auto","data-testid":"playOptions-picker"},r.createElement(a.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"})):r.createElement(ue,{content:"Play to refresh and have live content, pause to see historical, or force play to keep refreshing even when the tab loses focus at the expense of some system performance.",align:{bottom:"bottom",right:"right"},isDisabled:n,plain:!0},r.createElement(ce,{onClick:l,width:"auto","data-testid":"playOptions-picker"},r.createElement(a.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"}))),t.current&&c&&!n&&r.createElement(le,{target:t.current,onEsc:u,onClickOutside:u},r.createElement(h.Z,{icon:"playOutline",onClick:function(){d(),u()},testid:"playOptions-play"},"Play"),r.createElement(h.Z,{icon:"pauseOutline",onClick:function(){m(),u()},testid:"playOptions-pause"},"Pause"),r.createElement(h.Z,{icon:"forcePlayOutline",onClick:function(){f(),u()},testid:"playOptions-forcePlay"},"Force Play")))},de=(0,r.memo)(se),me=function(){var e=(0,Q.IX)(),t=(0,Q.o8)(),n=(0,Q.RT)(),o=(0,r.useRef)(),a=(0,Q.Cd)(),i=(0,$.useAttributeValue)("autofetchOnWindowBlur"),c=(0,q.Z)();return(0,J.Z)((function(){c(!!e||!!t)}),[e,t]),r.createElement(ne.Z,{hasBorder:!0,borderColor:"border",testId:"global-controls"},r.createElement(re,{isPlaying:a,padding:[1,2],round:!0,height:"100%",alignItems:"center",gap:1,isDisabled:e,ref:o},r.createElement(ie,{isPlaying:a,isForcePlaying:i,isDisabled:e||t}),r.createElement(de,{target:o,isDisabled:e||t}),!n&&r.createElement(te,{isPlaying:a,tagging:"global-view"})))},fe=n(96929),pe=n(78710),ge=function(e){var t=e.toggle,n=e.upToDate,o=e.hasBorder;return r.createElement(ne.Z,{borderColor:"borderSecondary",hasHoverBackground:!0,hasBorder:o},r.createElement(O.Z,{content:"News & Announcements",align:"bottom"},r.createElement(a.Button,{name:"news",icon:"insights",flavour:"borderless",neutral:n,warning:!n,onClick:t,"data-ga":"news::click-news::global-view"})))},ve=function(){var e=(0,fe.zN)().length>0;return r.createElement(a.News,{app:pe.ZP?(0,pe.iM)()?"agent":["cloud","agent"]:"cloud"},(function(t){var n=t.toggle,o=t.upToDate;return r.createElement(a.Flex,{alignItems:"center","data-testid":"cloud-app-news",flex:!0,gap:1},r.createElement(ge,{toggle:n,upToDate:o,hasBorder:!e}))}))},he=n(4514),be=function(e){var t=e.children,n=e.background,o=e.testId,i=e.onClose,c=o||"header-banner";return r.createElement(a.Flex,{background:n,"data-testid":c,height:{min:10},padding:[2,10,2,2],position:"sticky",zIndex:5},t,r.createElement(O.Z,{align:"bottom",content:"Dismiss message",isBasic:!0,plain:!0,stretch:"align"},i&&r.createElement(a.Box,{"data-testid":"".concat(c,"-close-button"),as:a.Icon,color:"text",cursor:"pointer",name:"x",position:"absolute",right:"8px",onClick:function(e){i&&(e.stopPropagation(),i())}})))},ye=n(62200),we={warning:{background:"warningBannerBg",isDissmissable:!0,icon:"warning_triangle_hollow",iconColor:"warning"},critical:{background:"errorBannerBg",isDissmissable:!1,icon:"warning_triangle_hollow",iconColor:"error"}},Ee=function(e){var t=e.iconColor,n=e.icon,o=e.warningLevel,i=e.numberOfNodesWithCriticalSeverity,c=e.onClickUpdate;return r.createElement(a.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},r.createElement(a.Icon,{"data-testid":"icon-banner-agent-outdated-".concat(o),color:t,name:n})," ",r.createElement(a.Text,{"data-testid":"text-agent-outdated-critical",color:"main"},i," ",(0,P.V6)(i)," ",i>1?"are":"is"," below recommend agent version"," ",ye._b,"."," ",r.createElement(a.Box,{"data-testid":"open-add-node",onClick:c,as:a.Text,cursor:"pointer",textDecoration:"underline",color:"main"},"Please update them")," ","to ensure you get the latest security bug fixes."))},Ce=function(e){var t=e.warningLevel,n=e.numberOfNodesWithCriticalSeverity,o=e.onClose,a=e.onClickUpdate,i=we[t],c=i.background,l=i.isDissmissable,u=i.icon,s=i.iconColor;return r.createElement(be,{background:c,onClose:l?o:null},r.createElement(Ee,{iconColor:s,icon:u,warningLevel:t,numberOfNodesWithCriticalSeverity:n,onClickUpdate:a}))},Oe=function(){var e=z().openModal,t=(0,Z.Ng)({severity:"critical"}).length;return t?r.createElement(Ce,{numberOfNodesWithCriticalSeverity:t,warningLevel:"critical",onClickUpdate:e}):r.createElement(r.Fragment,null)},xe=function(e){var t=e.onOpenModalClick,n=(0,Z.Ng)({severity:"critical"}).length,o=(0,Z.Ng)().length;return o?r.createElement(ne.Z,{borderColor:"borderSecondary",cursor:"pointer",testId:"update-netdata-version-menu-item",hasBorder:!0,padding:[2,0]},r.createElement(a.Pill,{"data-testid":"update-netdata-version-badge",flavour:n?"error":"warning",icon:"warning_triangle_hollow",iconSize:"16px",hollow:!0,onClick:t,size:"small"},o)):null},ke=n(24533),Se=n(70842),Ze=n(64599),Pe=n(87462),Ie=n(39979),je=n(46715),De=n(38314),Ne=n(99826),Te=(0,Ie.Z)(a.Button),Fe=function(e){var t=(0,F.s0)(),n=(0,i.Iy)("isAnonymous"),o=((0,je.RP)().value||{}).slug,a=(0,De.g5)(o),c=(0,d.gI)("billing:Manage"),l=(0,Ne.Z)("business").url,u=(0,r.useCallback)((function(){t(l,{replace:!0})}),[l]);return n||a||!c?null:r.createElement(O.Z,{plain:!0,content:"Upgrade to business plan and experience the full power of Netdata!",isBasic:!0},r.createElement("div",null,r.createElement(Te,(0,Pe.Z)({label:"Upgrade Now",isStart:!0,onClick:u,feature:"UpgradeToBusiness","data-testid":"upgradeToBusiness-header"},e))))},Me={offline:{icon:"switch_off",color:"attention",text:"Offline"},online:{icon:"checkmark_s",color:"primary",text:"Online"}},_e=function(){var e=(0,s.Q6)(),t=(0,i.Iy)("isAnonymous"),n=(0,ke.Lz)(),o=(0,p.Z)(n,1)[0],c=o.canBeClaimed,l=o.cloudStatus;if(t)return r.createElement(Ze.Z,null);if(!e)return r.createElement(Fe,null);if(Me[l]){var u=Me[l],d=u.icon,m=u.color,f=u.text;return r.createElement(a.Flex,{alignItems:"center",gap:1},r.createElement(a.Icon,{name:d,color:m,width:"14px",height:"14px"}),r.createElement(a.TextSmall,{color:m},f))}return c?r.createElement(Se.Z,null):null},Le=(0,o.Z)((function(){return Promise.all([n.e(4915),n.e(5933)]).then(n.bind(n,7922))}),"NodesIndicator"),Ae=function(){var e=z(),t=e.isModalVisible,n=e.closeModal,o=e.openModal;return r.createElement(r.Fragment,null,r.createElement(Oe,null),r.createElement(a.Flex,{as:"header","data-testid":"header",padding:[2],justifyContent:"between",alignItems:"center",height:12,position:"sticky",background:"topBarBg",zIndex:5},t&&r.createElement(Y,{onClose:n}),r.createElement(S,null),r.createElement(a.Flex,{alignItems:"center","data-testid":"header-features",gap:3},!window.envSettings.onprem&&r.createElement(ve,null),r.createElement(me,null),r.createElement(r.Suspense,{fallback:r.createElement(he.c,{disabled:!0})},r.createElement(Le,null)),r.createElement(_e,{margin:[0,1,0,0],padding:[2,4]}),r.createElement(xe,{onOpenModalClick:o}))))},Be=n(15257),Re=(0,w.default)(a.Flex).withConfig({displayName:"layout__UserControlContainer",componentId:"sc-18en99b-0"})(["bottom:0;left:0;"]),Ue=function(e){var t=e.children;return r.createElement(a.Flex,{width:"100vw",height:"100vh",column:!0,justifyContent:"center",alignItems:"center",background:"mainBackground",position:"relative"},t,r.createElement(Re,{position:"absolute",padding:[4]},r.createElement(Be.Z,null)))},ze=(0,w.keyframes)(["from{opacity:0.4;}to{opacity:1;}"]),Ve=(0,w.default)(a.Icon).withConfig({displayName:"loading__StyledIcon",componentId:"sc-11p1wp-0"})(["width:208px;height:177px;animation:"," 1.6s ease-in infinite;"],ze),He=function(){return r.createElement(r.Fragment,null,r.createElement(Ve,{name:"netdata",color:"primary",title:"Loading","data-testid":"spaceCreationLoading-logo"}),r.createElement(a.H3,{color:"text",margin:[1,0,0]},"We are attempting to create your space but the system is currently busy."),r.createElement(a.Text,{color:"text",margin:[4.5,0,0]},"Thank you for your patience!"))},We=n(83732),Ge=function(){var e=(0,i.jr)(),t=(0,i.Iy)("email"),n=(0,r.useState)(!1),o=(0,p.Z)(n,2),c=o[0],l=o[1],u=(0,r.useCallback)((function(){return l(!1)}),[]),s=(0,We.Z)({onSuccess:u,onError:u,isDefault:!0}),d=(0,r.useCallback)((function(){l(!0),s({userId:e,email:t})}),[e,t]);return r.createElement(a.Flex,{column:!0,gap:6,alignItems:"center"},r.createElement(a.Flex,{column:!0,gap:2,alignItems:"center"},r.createElement(a.H3,{color:"text"},"There was a problem with automatically creating your space"),r.createElement(a.Text,{color:"text"},"Please try again below")),r.createElement(a.Button,{label:"Continue",isLoading:c,onClick:d}))},Ke=function(){var e=(0,r.useState)(!0),t=(0,p.Z)(e,2),n=t[0],o=t[1];return(0,r.useEffect)((function(){var e=setTimeout((function(){return o(!1)}),1e4);return function(){return clearTimeout(e)}}),[]),r.createElement(Ue,null,n?r.createElement(He,null):r.createElement(Ge,null))},Ye=n(27622),Je=function(){return r.createElement(a.Flex,{background:"sideBarMini","data-testid":"workspaceBar",padding:[3,2],column:!0,alignItems:"center",gap:6,height:"100vh",justifyContent:"between"},r.createElement(Ye.Z,{"data-testid":"workspaceBar-netdataLogo"}))},qe=n(6308),Qe=n(65840),$e=(0,o.Z)((function(){return n.e(2713).then(n.bind(n,12713))}),"SpaceSidebar"),Xe=(0,o.Z)((function(){return Promise.all([n.e(8663),n.e(5969)]).then(n.bind(n,65969))}),"Modals"),et=(0,o.Z)((function(){return n.e(8102).then(n.bind(n,48102))}),"AcceptTermsDialog"),tt=(0,o.Z)((function(){return Promise.all([n.e(285),n.e(4794),n.e(7836),n.e(4915),n.e(8584),n.e(5962),n.e(3981),n.e(3360),n.e(3465),n.e(2376)]).then(n.bind(n,4781))}),"SpacePages"),nt=(0,r.memo)((function(){var e=(0,qe.c)().isIntegrationsPath,t=(0,Qe.x)();return r.createElement(a.Flex,{overflow:"hidden",height:"100vh",width:"100vw"},r.createElement(r.Suspense,{fallback:r.createElement(Je,null)},r.createElement($e,null)),r.createElement(a.Flex,{column:!0,position:"relative",overflow:"hidden",flex:!0},!t&&!e&&r.createElement(Ae,null),r.createElement(a.Flex,{column:!0,as:"main",background:"mainBackground",flex:!0,basis:"100%",height:"100%",overflow:"hidden"},r.createElement(r.Suspense,{fallback:r.createElement(f.Z,{title:"Loading your space..."})},r.createElement(tt,null)))),r.createElement(r.Suspense,{fallback:""},r.createElement(Xe,null),r.createElement(et,null)))})),rt=function(e){var t=e.isUserLoaded;!function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).isUserLoaded,t=(0,l._8)((function(e){var t=e.set;return function(e){var n=e.results;t((0,s.YH)(),n),n.forEach((function(e){var n=e.id,r=e.permissions;t((0,d.SX)(n),r)}))}}),[]);(0,c.Z)((function(){return{key:"spaces",cache:!1,autorun:!!e,fetch:u.oq,association:{getIds:function(){return(0,s.st)("ids")},getError:function(){return(0,s.st)("error")},getLoaded:function(){return(0,s.st)("loaded")},getUpdatedAt:function(){return(0,s.st)("updatedAt")}},getResource:function(e){return(0,s.U7)({id:e})},onReceive:t,pollingOptions:{pollingInterval:412e3}}}),[!!e])}({isUserLoaded:t}),(0,m.Z)();var n=(0,s.Iw)(),o=(0,s.GM)("loaded"),a=(0,s.GM)("error"),p=(0,i.Iy)("isAnonymous");if(!t||!a&&!p&&!o)return r.createElement(f.Z,{title:"Loading your space..."});var g=n.length;if(a&&!g)throw a;return pe.ZP||p||g?r.createElement(nt,null):r.createElement(Ke,null)}},27622:function(e,t,n){var r=n(87462),o=n(67294),a=n(59978);t.Z=function(e){return o.createElement(a.Icon,(0,r.Z)({name:"netdataPress",color:"success",height:"32px",width:"32px"},e))}},34885:function(e,t,n){n.d(t,{Z:function(){return m}});var r=n(87462),o=n(45987),a=n(67294),i=n(4211),c=n(59978),l=function(){return a.createElement(c.Text,null,"Something went wrong during document parsing")},u=["transformConfiguration","validationConfig","validate","errorComponent","children"],s=function(e){return function(t){var n=t.transformConfiguration,c=void 0===n?{}:n,s=t.validationConfig,d=void 0===s?{}:s,m=t.validate,f=t.errorComponent,p=t.children,g=(0,o.Z)(t,u),v=function(e){var t=e.markdocContent,n=e.validate,r=e.validationConfig,o=e.transformConfiguration;return(0,a.useMemo)((function(){var e=i.ZP.parse("string"===typeof t?t:""),a=[];return n&&(a=i.ZP.validate(e,r)),{tree:a.length?null:i.ZP.transform(e,o),errors:a}}),[t,n,r,o])}({markdocContent:p,validate:m,validationConfig:d,transformConfiguration:c}),h=v.tree,b=v.errors,y=f&&"function"==typeof f?f:l;return b.length?a.createElement(y,{errors:b}):a.createElement(e,(0,r.Z)({tree:h},g))}},d=(0,a.memo)(s((function(e){var t=e.tree,n=e.renderConfiguration;return i.ZP.renderers.react(t,a,n)}))),m=(s((function(e){var t=e.tree;return i.ZP.renderers.html(t)})),d)},67622:function(e,t,n){n.d(t,{z:function(){return s}});var r=n(87462),o=n(45987),a=n(67294),i=n(71893),c=n(59978),l=n(89250),u=["disabled","children","Wrapper","textProps","to","onClick","testid","icon","iconHeight","iconWidth","iconColor","textColor","padding","margin","round","gap","actions","selected","loading","width","isSidebar","isSecondary"],s=(0,i.default)(c.Flex).withConfig({displayName:"item__PanelRowContainer",componentId:"sc-lf007z-0"})(["cursor:pointer;&:hover{background:",";}",""],(function(e){return(0,c.getColor)((e.isSidebar,"selected"))(e)}),(function(e){return e.selected&&"background: ".concat((0,c.getColor)((e.isSidebar,"selected"))(e),";")})),d=(0,i.default)(c.Icon).withConfig({displayName:"item__StyledIcon",componentId:"sc-lf007z-1"})(["flex:0 0 auto;"]),m=(0,i.default)(c.IconComponents.LoaderIcon).withConfig({displayName:"item__StyledLoaderIcon",componentId:"sc-lf007z-2"})(["flex:0 0 auto;height:16px;width:16px;"]),f=(0,a.forwardRef)((function(e,t){var n=e.disabled,i=e.children,f=e.Wrapper,p=void 0===f?c.Text:f,g=e.textProps,v=e.to,h=void 0===v?"":v,b=e.onClick,y=e.testid,w=e.icon,E=e.iconHeight,C=void 0===E?"16px":E,O=e.iconWidth,x=void 0===O?"16px":O,k=e.iconColor,S=void 0===k?"text":k,Z=e.textColor,P=void 0===Z?"text":Z,I=e.padding,j=void 0===I?[2,4]:I,D=e.margin,N=void 0===D?[0]:D,T=e.round,F=void 0===T?0:T,M=e.gap,_=void 0===M?3:M,L=e.actions,A=e.selected,B=e.loading,R=e.width,U=void 0===R?"100%":R,z=e.isSidebar,V=void 0!==z&&z,H=e.isSecondary,W=(0,o.Z)(e,u),G=(0,l.s0)(),K=(0,a.useCallback)((function(){n||(b&&b(),h&&G(h))}),[b,n,h]),Y=W["data-ga"]||"";return a.createElement(s,(0,r.Z)({ref:t,flexWrap:!1,justifyContent:"between",alignItems:"center",padding:j,margin:N,round:F,onClick:K,"data-testid":y,width:U,selected:A,disabled:n,isSidebar:V},Y&&{"data-ga":Y}),a.createElement(c.Flex,{alignItems:"center",gap:_,flex:!0,basis:""},B?a.createElement(m,null):"string"===typeof w?a.createElement(d,{name:w,disabled:n,color:S,height:C,width:x}):w,a.createElement(p,(0,r.Z)({opacity:n?"medium":void 0,width:"150px",color:P,italic:H},g),i)),L)}));t.Z=f},61458:function(e,t,n){n.d(t,{g:function(){return u}});var r=n(87462),o=n(45987),a=n(67294),i=n(71893),c=n(59978),l=["disabled","isOpen","toggleOpen","label","children","headerTestId","Header"],u=(0,i.default)(c.H4).attrs({padding:[0,2],background:"error"}).withConfig({displayName:"list__DefaultListHeader",componentId:"sc-5df7lw-0"})(["cursor:pointer;pointer-events:",";"],(function(e){return e.disabled?"none":"auto"})),s=function(e){var t=e.disabled,n=e.toggleOpen,r=e.label,o=e.testid,i=e.Header,c=void 0===i?u:i;return a.createElement(c,{"data-testid":o,onClick:n,opacity:t?"medium":void 0,disabled:t},r)};t.Z=function(e){var t=e.disabled,n=e.isOpen,i=void 0!==n&&n,u=e.toggleOpen,d=e.label,m=e.children,f=e.headerTestId,p=e.Header,g=(0,o.Z)(e,l);return a.createElement(c.Flex,(0,r.Z)({column:!0},g),a.createElement(s,{disabled:t,Header:p,toggleOpen:u,label:d,testid:f}),a.createElement(c.Collapsible,{open:i},m))}},83925:function(e,t,n){var r=n(87462),o=n(4942),a=n(45987),i=(n(92222),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),n(67294)),c=n(59978),l=n(62200),u=n(82902),s=n(64637),d=["warningLevel","text","container","os","name","labels","version"];function m(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}var f={warning:{icon:"warning_triangle_hollow",iconColor:"warning",background:"warningSemi",color:"warning",border:"warning",reccomendedVersion:l.I3,warningText:"is below the latest stable agent version"},critical:{icon:"warning_triangle_hollow",iconColor:"error",background:"errorSemi",color:"error",border:"error",reccomendedVersion:l._b,warningText:"is below the recommend agent version"}},p=function(e){var t=e.icon,n=e.iconColor,r=e.warningLevel,o=e.handeleNavigateToDocs,a=e.message;return i.createElement(c.Flex,{column:!0,width:{max:"200px"},gap:2},i.createElement(c.Flex,{alignItems:"center",gap:2},i.createElement(c.Icon,{name:t,color:n}),i.createElement(c.TextMicro,{color:"white"},(0,s.fm)(r))),i.createElement(c.Flex,{column:!0,gap:2},i.createElement(c.TextMicro,{color:"white"},a),i.createElement(c.TextMicro,{"data-testid":"text-agent-outdated-critical",color:"white"},i.createElement(c.Box,{"data-testid":"open-add-node",onClick:o,as:c.TextMicro,cursor:"pointer",textDecoration:"underline",color:"white"}," ","Please update them"," "),"to ensure you get the latest security bug fixes.")))};t.Z=function(e){var t=e.warningLevel,n=e.text,l=void 0===n?"Needs Update":n,g=e.container,v=e.os,h=e.name,b=e.labels,y=e.version,w=(0,a.Z)(e,d),E=f[t],C=E.icon,O=(E.flavour,E.hollow,E.background),x=E.color,k=E.border,S=E.reccomendedVersion,Z=E.iconColor,P=E.warningText,I=(0,i.useCallback)((function(){var e=(0,u.Ly)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({container:g,os:v,version:y},b));window.open(e,"_blank","noopener,noreferrer")}),[g,v]),j="".concat(h," ").concat(P," ").concat(S);return i.createElement(c.Tooltip,{allowHoverOnTooltip:!0,content:i.createElement(p,{message:j,icon:C,iconColor:Z,warningLevel:t,handeleNavigateToDocs:I})},i.createElement(c.Pill,(0,r.Z)({icon:C,background:O,borderColor:k,color:x},w),(0,s.fm)(l)))}},11389:function(e,t,n){var r=n(67294),o=n(22965),a=n(62200),i=n(59978);t.Z=function(e){var t=e.state,n=e.rawState,c=n||(0,o.Q5)(t),l=a.WV[c.toLocaleLowerCase()],u=l.counterColor,s=l.indicatorWrapperColor;return r.createElement(i.Flex,{margin:[0,"auto",0,"auto"],width:20,height:"20px",padding:[.5,0],border:{side:"all",color:s},background:"nodeBadgeBackground",justifyContent:"center",round:4},r.createElement(i.TextMicro,{strong:!0,color:u},c))}},86711:function(e,t,n){var r=n(67294),o=n(59978);t.Z=function(){return r.createElement(o.Flex,{column:!0,width:{max:"200px"},gap:2},r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Live:")," ","Node is actual collecting and streaming metrics to Netdata"),r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Stale:")," ","Node is currently offline and not streaming metrics to Netdata. It can show historical data from a parent node"),r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Offline:")," ","Node is currently offline, not streaming metrics to Netdata and not available in any parent node"),r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Unseen:")," ","Nodes have never been connected to Netdata, they are claimed but no successful connection was established"))}},91268:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(59978),c=["children","sidebar"],l=(0,a.forwardRef)((function(e,t){var n=e.children,l=e.sidebar,u=void 0===l?null:l,s=(0,o.Z)(e,c);return a.createElement(i.Flex,{id:"main",height:"100%",width:"100%"},a.createElement(i.Flex,(0,r.Z)({column:!0,overflow:"hidden",width:"100%"},s,{ref:t}),n),u)}));t.Z=l},97346:function(e,t,n){var r=n(33335);t.Z=function(e){var t=e.permission,n=e.spaceId,o=e.children;return(0,r.gI)(t,n)?o:null}},14428:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(59978),c=n(33335),l=["ifForbidden","permission","spaceId"],u=(0,a.forwardRef)((function(e,t){var n=e.ifForbidden,u=void 0===n?"disabled":n,s=e.permission,d=e.spaceId,m=(0,o.Z)(e,l),f=(0,c.gI)(s,d);return"hide"!==u||f?a.createElement(i.Button,(0,r.Z)({ref:t,disabled:"disabled"===u&&!f||m.disabled},m)):null}));t.Z=u},15418:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(33335),c=["Component","ifForbidden","permission","children","spaceId"];t.Z=function(e){var t=e.Component,n=e.ifForbidden,l=void 0===n?"disabled":n,u=e.permission,s=e.children,d=e.spaceId,m=(0,o.Z)(e,c),f=(0,i.gI)(u,d);return"hide"!==l||f?"function"===typeof s?s(f):t?a.createElement(t,(0,r.Z)({},m,{disabled:"disabled"===l&&!f||m.disabled})):s:null}},37689:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(87462),o=n(45987),a=n(67294),i=n(71893),c=n(59978),l=(0,i.default)(c.TextInput).withConfig({displayName:"searchInput__SearchInput",componentId:"sc-1x493x7-0"})(["& input{background:transparent;}& > label{margin-bottom:0;}& > div{margin-top:0;}"]),u=["value","onChange"],s=(0,a.forwardRef)((function(e,t){var n=e.value,i=e.onChange,c=(0,o.Z)(e,u);return a.createElement(l,(0,r.Z)({inputRef:t,value:n,onChange:i,placeholder:"Search",name:"search",metaShrinked:!0},c))}))},65840:function(e,t,n){n.d(t,{M:function(){return i},x:function(){return a}});var r=n(4480),o=(0,r.cn)({key:"roomViewLoading",default:!0}),a=function(){return(0,r.sJ)(o)},i=function(){return(0,r.FV)(o)}},7693:function(e,t,n){n.d(t,{A:function(){return l},x:function(){return u}});var r=n(87462),o=n(45987),a=n(67294),i=n(59978),c=["children","isSubmodal","onClose","title"],l=14,u=function(e){var t=e.children,n=e.isSubmodal,u=e.onClose,s=e.title,d=(0,o.Z)(e,c);return a.createElement(i.Flex,{justifyContent:"between",background:"modalHeaderBackground",alignItems:"center",padding:[0,4]},a.createElement(i.Flex,{alignItems:"center",height:l},a.createElement(i.Button,{neutral:!0,flavour:"borderless",icon:n?"chevron_left":"x",onClick:u,"data-testid":"sidebarModalHeader_".concat(n?"chevron_left":"close_button")}),a.createElement(i.H4,(0,r.Z)({color:"text"},d),s)),t)}},16645:function(e,t,n){n.d(t,{TZ:function(){return s},ZW:function(){return d},oU:function(){return u},u6:function(){return l}});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(4942),o=n(71893),a=n(59978),i=n(7693);function c(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}var l=(0,o.default)(a.PortalSidebar).withConfig({displayName:"sidebar__SidebarModal",componentId:"sc-tmwerm-0"})(["z-index:35;background:",";width:50%;max-width:",";overflow:",";"],(0,a.getColor)("mainBackground"),(0,a.getSizeBy)(90),(function(e){var t=e.overflow;return void 0===t?"hidden":t})),u=(0,o.default)(a.PortalSidebar).withConfig({displayName:"sidebar__FullModal",componentId:"sc-tmwerm-1"})(["z-index:35;background:",";width:100%;overflow:",";"],(0,a.getColor)("mainBackground"),(function(e){var t=e.overflow;return void 0===t?"hidden":t})),s=(0,o.default)(a.Flex).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({column:!0,background:"mainBackground",width:"100%",padding:[3,3,0]},e)})).withConfig({displayName:"sidebar__SidebarContent",componentId:"sc-tmwerm-2"})(["overflow:",";height:calc( 100vh - "," );"],(function(e){var t=e.overflow;return void 0===t?"auto":t}),(function(e){var t=e.hasFooter,n=e.hasModalTitle,r=void 0===n||n?i.A:0;return(0,a.getSizeBy)(t?(i.A+r+20)/2:(i.A+r)/2)})),d=(0,o.default)(a.Flex).attrs({justifyContent:"end",alignItems:"center",padding:[3],background:"mainBackground",border:{side:"top",color:"borderSecondary"}}).withConfig({displayName:"sidebar__SidebarFooter",componentId:"sc-tmwerm-3"})([""])},73256:function(e,t,n){n.d(t,{G:function(){return c}});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(4942),o=n(71893),a=n(59978);function i(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}var c=(0,o.default)(a.Flex).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({padding:[4,6,0],width:"100%",background:"modalTabsBackground"},e)})).withConfig({displayName:"tabs__TabHeader",componentId:"sc-1ramyo4-0"})([""])},92903:function(e,t,n){n.d(t,{B:function(){return l}});var r=n(87462),o=n(45987),a=n(67294),i=n(59978),c=["children"],l=function(e){var t=e.children,n=(0,o.Z)(e,c);return a.createElement(i.Flex,(0,r.Z)({justifyContent:"between",background:"mainBackground",alignItems:"center",padding:[4,4,0]},n),a.createElement(i.H3,null,t))}},81488:function(e,t,n){var r=n(29439),o=n(67294),a=n(43337),i=n(59978),c=n(15794),l=n(20709);t.Z=function(e){var t=e.text,n=e.updatedAt,u=e.error,s=(0,o.useState)(),d=(0,r.Z)(s,2)[1],m=function(e){if(!e)return"";var t=new Date(e);return t.getTime()?(0,l.Z)(t,new Date):""}(n);return(0,a.Z)((function(){return d(Math.random())}),1e3),o.createElement(c.Z,{theme:"dark"},o.createElement(i.Flex,{column:!0,gap:3},o.createElement(i.TextSmall,{color:"key"},t),u&&o.createElement(i.Flex,{alignItems:"center",gap:2},o.createElement(i.Icon,{width:14,height:12,color:"text",name:"warning_triangle"}),o.createElement(i.TextSmall,null,"Error: ",m?"Data not updated":"No data")),m&&o.createElement(i.TextMicro,null,o.createElement(i.TextMicro,{color:"key"},"Last updated: "),m)))}},90025:function(e,t,n){var r=n(87462),o=n(4942),a=(n(21249),n(57640),n(9924),n(57327),n(41539),n(88449),n(2490),n(59849),n(26699),n(32023),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),i=n(59978),c=n(95383);function l(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}var u={closeMenuOnSelect:!1,backspaceRemovesValue:!1,isClearable:!1,blurInputOnSelect:!0,captureMenuScroll:!0,isMulti:!0};t.Z=function(e){var t=e.selectedValue,n=e.onChange,s=e.formatOptions,d=e.filterValues,m=e.placeholder,f=void 0===m?"search...":m,p=(0,c.J7)(),g=(0,a.useMemo)((function(){return p.map((function(e){var t=e.id,n=e.name;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({label:n,value:t},s&&s({id:t,name:n}))}))}),[p,s]),v=(0,a.useMemo)((function(){return g.filter((function(e){var n=e.label,r=e.value;return t.includes(r)||d&&d({label:n,value:r})}))}),[g,t,d]),h=(0,a.useCallback)((function(e){var t=e.map((function(e){return e.value}));n(t)}),[n]);return a.createElement(i.Select,(0,r.Z)({placeholder:f},u,{options:g,value:v,onChange:h}))}},88866:function(e,t,n){n.d(t,{V:function(){return c},_:function(){return l}});var r=n(4942);n(85827),n(41539),n(25387),n(2490),n(72608),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);function o(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var i=[{iconName:"osAlpineLinux",logoFilename:"alpine.svg",name:"alpine",osNames:["Alpine Linux"],title:"Alpine Linux"},{iconName:"osAmazonLinux",logoFilename:"linux.svg",name:"linux",osNames:["Amazon Linux","Amazon Linux AMI"],title:"Amazon Linux"},{iconName:"osArchLinux",logoFilename:"arch.svg",name:"archarm",osNames:["Archcraft","Arch Linux","Arch Linux 32","Arch Linux ARM","ArchLabs","ArchLinux"],title:"Arch Linux"},{iconName:"osCentos",logoFilename:"centos.svg",name:"centos",osNames:["CentOS","CentOS Linux","CentOS Stream"],title:"CentOS"},{iconName:"osCoreOS",logoFilename:"coreos.svg",name:"coreos",osNames:["Container Linux by CoreOS"],title:"CoreOS"},{iconName:"osDebian",logoFilename:"debian.svg",name:"debian",osNames:["Debian GNU/Linux"],title:"Debian"},{iconName:"osFedora",logoFilename:"fedora.svg",name:"fedora",osNames:["Fedora","Fedora Linux","Fedora Remix for WSL"],title:"Fedora"},{iconName:"osFreeBSD",logoFilename:"freebsd.svg",name:"freebsd",osNames:["FreeBSD"],title:"FreeBSD"},{iconName:"serviceFreeNAS",logoFilename:"freenas.svg",name:"freenas",osNames:[],title:"FreeNAS"},{iconName:"osGentoo",logoFilename:"gentoo.svg",name:"gentoo",osNames:["Gentoo"],title:"Gentoo"},{iconName:"serviceKubernetes",logoFilename:"kubernetes.svg",name:"kubernetes",osNames:[],title:"Kubernetes"},{iconName:"osLinux",logoFilename:"linux.svg",name:"linux",osNames:[],title:"Linux"},{iconName:"osMacOSX",logoFilename:"macos.svg",name:"macos",osNames:["mac"],title:"MacOS"},{iconName:"osMacOSX",logoFilename:"macos.svg",name:"mac",osNames:["mac"],title:"MacOS"},{iconName:"osLinuxManjaro",logoFilename:"manjaro.svg",name:"manjaro",osNames:["Manjaro Linux","Manjaro-ARM"],title:"Manjaro"},{iconName:"serviceOpenStack",logoFilename:"openstack.svg",name:"openstack",osNames:[],title:"OpenStack"},{iconName:"osSuseLinux",logoFilename:"opensuse.svg",name:"opensuse",osNames:["openSUSE","openSUSE Leap","openSUSE Leap Micro","openSUSE MicroOS","openSUSE Tumbleweed"],title:"Open Suse"},{iconName:"serviceOpenWrt",logoFilename:"openwrt.svg",name:"openwrt",osNames:["OpenWrt"],title:"OpenWRT"},{iconName:"osOracle",logoFilename:"oracle.svg",name:"oracle",osNames:["Oracle Linux Server"],title:"Oracle Linux"},{iconName:"servicePfSense",logoFilename:"pfsense.svg",name:"pfsense",osNames:[],title:"PFSense"},{logoFilename:"raspberry-pi.svg",name:"raspberry-pi",osNames:[],title:"Raspberry PI"},{iconName:"osRaspbian",name:"raspbian",osNames:["Raspbian","Raspbian GNU/Linux"],title:"Raspbian"},{iconName:"osRedHat",logoFilename:"redhat.svg",name:"redhat",osNames:["Red Hat Enterprise Linux","Red Hat Enterprise Linux Server","Red Hat Enterprise Linux Workstation","RedHatEnterpriseServer"],title:"Red Hat Enterprise Linux"},{iconName:"osSuseLinux",logoFilename:"suse.svg",name:"suse",osNames:[],title:"Suse"},{iconName:"osUbuntu",logoFilename:"ubuntu.svg",name:"ubuntu",osNames:["Ubuntu","Ubuntu Core"],title:"Ubuntu"}],c=i.reduce((function(e,t){return a(a({},e),{},(0,r.Z)({},t.name,t))}),{}),l=i.reduce((function(e,t){return a(a({},e),t.osNames.reduce((function(e,n){return a(a({},e),{},(0,r.Z)({},n,t))}),{}))}),{})},15257:function(e,t,n){n.d(t,{Z:function(){return N}});var r=n(87462),o=n(45987),a=n(29439),i=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(71893)),c=n(67294),l=n(59978),u=n(15794),s=n(67622),d=i.default.div.withConfig({displayName:"styled__Divider",componentId:"sc-14bbmjw-0"})(["background:",";height:1px;width:auto;margin:"," ",";"],(0,l.getColor)("disabled"),(0,l.getSizeBy)(1),(0,l.getSizeBy)(2)),m=n(31203),f=n(46667),p=n(13477),g=n(1043),v=n(83356),h=(n(88674),n(17727),n(16645)),b=n(7693),y=n(73256),w=n(79236),E=n(63346),C={flex:!0},O=function(e){var t=e.onClose,n=(0,c.useState)(!1),o=(0,a.Z)(n,2),i=o[0],u=o[1],s=(0,c.useState)(!1),d=(0,a.Z)(s,2),m=d[0],f=d[1],g=(0,c.useState)({}),v=(0,a.Z)(g,2),O=v[0],x=v[1],k=(0,w.Z)(),S=k.handleChangeTab,Z=k.activeTabIndex,P=k.tabsByName,I=k.tabs,j=(0,p.oH)(void 0,{shouldPersist:!0,onSuccess:t}),D=(0,c.useCallback)((function(){u(!0),j(O).finally((function(){return u(!1)}))}),[O]),N=(0,c.useMemo)((function(){return I.map((function(e){var n=P[e],o=n.label,a=n.testId,i=n.Component;return c.createElement(l.Tab,{key:e,label:o,"data-testid":"userProfileModal-".concat(a)},c.createElement(E.ZP,{tab:e},c.createElement(i,(0,r.Z)({},"profile"===e&&{setFormState:x,setFormValid:f},{onClose:t}))))}))}),[I]);return c.createElement(h.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},c.createElement(E.ZP,{feature:"UserSettings"},c.createElement(b.x,{onClose:t,title:"Settings"},"profile"===I[Z]&&c.createElement(l.Button,{disabled:!m,label:"Save",onClick:D,isLoading:i,loadingLabel:"saving..."})),c.createElement(l.Tabs,{selected:Z,onChange:S,TabContent:h.TZ,TabsHeader:y.G,tabsProps:C},N)))},x=n(82351),k=(0,i.default)(l.Flex).attrs({column:!0,round:1}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-w0ej6i-0"})(["box-shadow:0 4px 4px rgba(0,0,0,0.25);"]),S=n(78710),Z=n(39979),P=["hasSeparator","name"],I=(0,Z.Z)(s.Z),j={"Operational Status":function(){return!0},"Sign In":function(e){var t=e.isAgent,n=e.isAnonymous;return!t&&n},Settings:function(e){var t=e.isAgent,n=e.isAnonymous;return t||!n},"Sign Out":function(e){return!e.isAnonymous}},D=(0,i.default)(l.Button).withConfig({displayName:"userControl__SignInButton",componentId:"sc-n4ebn8-0"})(["&&{> .button-icon{width:24px;height:24px;}}"]),N=function(e){var t=e.dropdownBackground,n=void 0===t?"dropdown":t,i=(0,p.Iy)("avatarURL"),s=(0,p.Iy)("name"),h=(0,p.Iy)("isAnonymous"),b=(0,f.Z)(),y=(0,a.Z)(b,4),E=y[0],C=y[2],Z=y[3],N=(0,c.useCallback)((function(){window.open("https://status.netdata.cloud","_blank")}),[]),T=(0,g.UQ)(),F=(0,v.Z)(),M=(0,w.Z)(),_=M.handleOpenProfileModal,L=M.handleCloseProfileModal,A=M.isProfileModalOpen,B=(0,c.useMemo)((function(){return[{name:"Settings",onClick:_,hasSeparator:!1,testid:"userControl-settings"},{name:"Operational Status",onClick:N,hasSeparator:!1,testid:"userControl-operationalStatus"},{name:"Sign In",onClick:F,hasSeparator:!0,testid:"userControl-signOut"},{name:"Sign Out",onClick:T,hasSeparator:!0,testid:"userControl-signOut"}].filter((function(e){return j[e.name]({isAgent:S.ZP,isAnonymous:h})}))}),[h,S.ZP]);return c.createElement(u.Z,null,c.createElement(x.Z,!h&&{content:"Edit your account settings and manage your notifications",align:"right"},!S.ZP&&h?c.createElement(x.Z,{content:"Sign In",align:"right"},c.createElement(D,{small:!0,icon:"sign_in",onClick:C,"data-ga":"sidebar-sign-in::click-dropdown::global-view","data-testid":"sign-in-dropdown",iconSize:"medium",margin:[0,0,2]})):c.createElement(m.Z,{src:i||"","data-testid":"userControl-userAvatar",onClick:C,title:s})),E&&c.createElement(l.Layer,{margin:[5,17],position:"bottom-left",onClickOutside:Z,onEsc:Z},c.createElement(k,{background:n,padding:[2]},B.map((function(e){var t=e.hasSeparator,n=e.name,a=(0,o.Z)(e,P);return c.createElement(c.Fragment,{key:n},t&&c.createElement(d,{key:"".concat(n,"-itemSeparator")}),c.createElement(I,(0,r.Z)({key:n,round:1,payload:{description:"User menu - Click ".concat(n)}},a),n))})))),A&&c.createElement(O,{onClose:L}))}},16772:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(59978),c=["onChange","value","onKeyDown","label"];t.Z=function(e){var t=e.onChange,n=e.value,l=e.onKeyDown,u=e.label,s=(0,o.Z)(e,c);return a.createElement(i.TextInput,(0,r.Z)({label:u,name:"userEmail",placeholder:"Enter an email address",value:n,onChange:t,onKeyDown:l},s))}},79236:function(e,t,n){n.d(t,{Z:function(){return ot}});var r=n(29439),o=(n(57327),n(41539),n(88449),n(2490),n(59849),n(47941),n(26699),n(32023),n(67294)),a=n(65351),i=n(13477),c=n(59978),l=n(30688),u=n(31203),s=n(1043),d=n(46667),m=n(87462),f=n(93433),p=n(45987),g=(n(92222),n(71752)),v=["value","isValid","setIsValid","onChange","label","validators","fieldMessage"],h="User name cannot exceed ".concat(40," characters"),b=function(e){var t=e.length<=40;return(0,l.f)(t,h)},y=function(e){var t=e.value,n=e.isValid,a=e.setIsValid,i=e.onChange,u=e.label,s=e.validators,d=void 0===s?[]:s,h=e.fieldMessage,y=(0,p.Z)(e,v),w=(0,l.A)([b].concat((0,f.Z)(d))),E=(0,o.useState)(""),C=(0,r.Z)(E,2),O=C[0],x=C[1];return(0,o.useEffect)((function(){var e=w(t),r=e.isValid,o=(0,g.T)(e);!n&&r?a(!0):n&&!r&&a(!1),x(o||"")}),[n,t]),o.createElement(c.TextInput,(0,m.Z)({label:u||" ",name:"userName",placeholder:"Enter the user's name",value:t,onChange:i,fieldMessage:h,error:!n&&O},y))},w=n(16772),E=n(46715),C=n(74059),O=n(94666),x=n(72671),k=n(71893),S=(0,k.default)(c.Text).withConfig({displayName:"styled__Label",componentId:"sc-anprf9-0"})(["height:",";font-weight:bold;display:flex;align-items:center;margin-bottom:",";"],(0,c.getSizeBy)(3),(0,c.getSizeBy)(3)),Z=k.default.div.withConfig({displayName:"styled__AvatarBlock",componentId:"sc-anprf9-1"})(["height:",";display:flex;margin-bottom:",";"],(0,c.getSizeBy)(10),(0,c.getSizeBy)(4)),P=k.default.div.withConfig({displayName:"styled__RadioRow",componentId:"sc-anprf9-2"})(["display:flex;flex-flow:row nowrap;align-items:center;padding:0 0 "," ",";"],(0,c.getSizeBy)(2),(0,c.getSizeBy)(1)),I=k.default.section.withConfig({displayName:"styled__StyledSection",componentId:"sc-anprf9-3"})(["display:flex;margin-top:auto;justify-content:flex-end;"]),j=[function(e){return(0,l.f)(!!e,"Name should not be empty")}],D=function(){},N=(0,x.F)((function(e){var t=e.isLastMember,n=e.spaceName,r=e.children;return o.createElement(c.Flex,{column:!0,gap:2},o.createElement(c.Text,null,"You are about to delete your account at ",o.createElement("strong",null,"Netdata"),". All data related to your account will be deleted."),t&&o.createElement(o.Fragment,null,o.createElement(c.Text,null,o.createElement(c.Text,{strong:!0},n)," space will be deleted since you are the last member."),r),o.createElement(c.Text,null,"This cannot be undone. Are you sure you want to continue?"))})),T=function(e){var t=e.setFormValid,n=e.setFormState,a=(0,i.Iy)("name"),l=(0,c.useInputValue)({value:a,maxChars:40}),m=(0,r.Z)(l,4),f=m[0],p=m[1],g=m[2],v=m[3],h=(0,o.useState)(!1),b=(0,r.Z)(h,2),x=b[0],k=b[1],P=(0,d.Z)(),T=(0,r.Z)(P,4),F=T[0],M=T[2],_=T[3],L=(0,d.Z)(),A=(0,r.Z)(L,2),B=A[0],R=A[1],U=(0,E.RP)().value,z=(0,C.OS)(),V=1===(0,O.H4)().length,H=(0,i.Iy)("email"),W=(0,i.Iy)("avatarURL");(0,o.useEffect)((function(){v&&t(x)}),[v,x]),(0,o.useEffect)((function(){n({name:f})}),[f]);var G=(0,s.R2)();return o.createElement(o.Fragment,null,o.createElement(S,{"data-testid":"userProfile-label"},"Photo"),o.createElement(Z,{"data-testid":"userProfile-avatarSection"},o.createElement(u.Z,{src:W||"","data-testid":"userProfile-avatar",width:24,height:24})),o.createElement(y,{"data-testid":"userProfile-username",value:f,label:"Name",onChange:p,isValid:x,setIsValid:k,validators:j,fieldIndicator:g,instantFeedback:"positiveFirst",isDirty:v}),o.createElement(w.Z,{"data-testid":"userProfile-email",label:"Email",disabled:!0,value:H,onChange:D}),o.createElement(I,{"data-testid":"userProfile-actions"},o.createElement(c.Button,{danger:!0,onClick:M,label:"Delete account","data-ga":"user-profile-settings::click-delete::global-view","data-testid":"userProfile-deleteAccount-button"}),F&&o.createElement(c.ConfirmationDialog,{confirmLabel:B?"Deleting...":"Yes, delete","data-ga":"delete-account-dialog","data-testid":"deleteAccountDialog",handleConfirm:function(){R(),G()},handleDecline:_,message:o.createElement(N,{isLastMember:V,spaceName:z.name,currentPlan:U}),title:"Delete Account",isConfirmDisabled:B,isConfirmLoading:B,isDeclineDisabled:B})))},F=n(33937),M=function(){var e=(0,F.k)("theme"),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,o.useCallback)((function(e){return a(e.target.value)}),[]);return o.createElement(o.Fragment,null,o.createElement(S,null,"Netdata Theme"),o.createElement(P,null,o.createElement(c.RadioButton,{label:"Light Theme",checked:"light"===n,onChange:i,value:"light"})),o.createElement(P,null,o.createElement(c.RadioButton,{label:"Dark Theme",checked:"light"!==n,onChange:i,value:"dark"})))},_=n(92432),L=n(82351),A=n(93017),B=n(15861),R=n(64687),U=n.n(R),z=(n(73210),(0,n(39979).Z)(c.Button)),V=function(e){var t=e.onCloseModal,n=e.onCreate,a=(0,o.useState)(""),i=(0,r.Z)(a,2),l=i[0],u=i[1];return o.createElement(c.ModalContent,null,o.createElement(c.ModalHeader,null,"Create New Token",o.createElement(c.ModalCloseButton,{testId:"close-button",onClose:t})),o.createElement(c.ModalBody,null,o.createElement(c.Flex,{height:10,width:80},o.createElement(c.TextInput,{"data-testid":"description",placeholder:"Enter Description",onChange:function(e){var t=e.target;return u(t.value)},value:l}))),o.createElement(c.ModalFooter,null,o.createElement(z,{disabled:""===l.trim(),label:"Create",onClick:function(){return n(l)},"data-testid":"btn-create",payload:{description:"Modal - Create Token"}})))},H=k.default.div.withConfig({displayName:"styled__TokenContainer",componentId:"sc-s1axew-0"})(["display:flex;flex-direction:column;align-items:center;color:",";background:",";border:1px solid ",';border-radius:2px;overflow-wrap:anywhere;white-space:pre-wrap;padding:23px 27px 14px;width:100%;font-family:"Courier New",Courier,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;'],(0,c.getColor)("textDescription"),(0,c.getColor)("modalTabsBackground"),(0,c.getColor)("borderSecondary")),W=function(e){return o.createElement(c.Box,(0,m.Z)({},e,{as:c.Icon,sx:{borderRadius:"50%",overflow:"hidden",background:(0,c.getColor)(["neutral","white"])}}))},G=function(e){return o.createElement(c.Text,(0,m.Z)({},e,{color:["neutral","bluebayoux"]}))},K=function(e){return o.createElement(c.Flex,(0,m.Z)({},e,{as:c.Icon,sx:{alignSelf:"flex-end",cursor:"pointer"}}))},Y=(n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4942)),J=n(58206),q=n(55678),Q=n(74855);function $(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 X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){(0,Y.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,J.Z)(e);var n=(0,Q.sc)(X(X({},X({header:"Copied",text:"Token copied to your clipboard!",icon:"gear"},t)),{},{success:!0}));q.Am.success(n,{context:"copy"})}},te=n(63346),ne=function(e){var t=e.onCloseModal,n=e.token;return o.createElement(c.ModalContent,null,o.createElement(te.Xe,{feature:"TokenCreated"},o.createElement(c.ModalHeader,null,"Token Generated",o.createElement(c.ModalCloseButton,{testId:"close-button",onClose:t})),o.createElement(c.ModalBody,null,o.createElement(c.Flex,{column:!0,gap:4},o.createElement(H,null,o.createElement("span",{"data-testid":"token"},n),o.createElement(K,{name:"copy",size:"small",color:"primary",onClick:ee(n),"data-ga":"profile::click-copytoken::all-pages::api-token"})),o.createElement(c.Flex,{alignItems:"center",background:"warningBackground",gap:4,padding:[3,3],round:!0},o.createElement(W,{"data-testid":"noNodesView-warningBannerIcon",name:"exclamation",color:"warning"}),o.createElement(G,{"data-testid":"warning-message"},"Make sure to copy or store this token and add it where you need it. Once you close this modal you will not be able to retrieve it again.")))),o.createElement(c.ModalFooter,null,o.createElement(c.Button,{label:"Close",onClick:t}))))},re=(n(41817),n(26398)),oe=function(e){var t=e.description,n=e.scopes;return re.Z.post("/api/v1/auth/account/api-token",{description:t,scopes:n})},ae=function(e){return re.Z.delete("/api/v1/auth/account/api-token/".concat(e))},ie=function(e){var t=e.onCloseModal,n=e.onTokenCreated,a=e.view,i=e.token,l=(0,o.useState)(a),u=(0,r.Z)(l,2),s=u[0],d=u[1],m=(0,o.useState)(i),f=(0,r.Z)(m,2),p=f[0],g=f[1],v=function(){var e=(0,B.Z)(U().mark((function e(t){var r;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe({description:t});case 2:r=e.sent,(0,_.L)("api-token","create-token","profile",t),g(r.data.token),d("CopyTokenView"),n();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return o.createElement(c.Modal,null,"CreateView"===s&&o.createElement(V,{"data-testid":"create-view",onCloseModal:t,onCreate:v}),"CopyTokenView"===s&&p&&o.createElement(ne,{onCloseModal:t,token:p}))},ce=(n(21249),n(57640),n(9924),n(49546));function le(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 ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){(0,Y.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var se=function(){var e=(0,o.useState)([]),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,d.Z)(!0),c=(0,r.Z)(i,4),l=c[0],u=c[2],s=c[3],m=function(){var e=(0,B.Z)(U().mark((function e(){var t;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(),e.next=3,re.Z.get("/api/v1/auth/account/api-token");case 3:t=e.sent,s(),a(t.data.map((function(e){return ue(ue({},e),{},{created_at:e.created_at?(0,ce.default)(new Date(e.created_at),"dd/MM/yyyy"):null,last_used_at:e.last_used_at?(0,ce.default)(new Date(e.last_used_at),"dd/MM/yyyy"):null})})));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,o.useEffect)((function(){m()}),[]),{isLoading:l,data:n,setData:a,fetchData:m}},de=n(87267),me={right:["actions"]},fe=[{id:"description",header:"Description",size:250,meta:{cellStyles:{sx:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}}},cell:function(e){var t=e.getValue;return o.createElement(L.Z,{plain:!0,content:t()||"",isBasic:!0},o.createElement(c.Text,{whiteSpace:"nowrap",truncate:!0},t()||""))}},{id:"created_at",header:"Created at",cell:function(e){return(0,e.getValue)()||"-"}},{id:"last_used_at",header:"Used at",cell:function(e){return(0,e.getValue)()||"-"}},{id:"ends_with",header:"Token",cell:function(e){var t=e.getValue;return o.createElement(o.Fragment,null,o.createElement(c.Text,{style:{verticalAlign:"sub"}},"******"),t())}}],pe=function(){var e=(0,o.useState)(!1),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,o.useState)(!1),l=(0,r.Z)(i,2),u=l[0],s=l[1],d=(0,o.useState)(null),m=(0,r.Z)(d,2),f=m[0],p=m[1],g=se(),v=g.data,h=g.setData,b=g.fetchData,y=(0,de.Z)().sendButtonClickedLog,w=(0,o.useMemo)((function(){return{addEntry:{handleAction:function(){a(!0),y({label:"Create new token"},!0)},tooltipText:"Create new token"}}}),[y]),E=(0,A.Z)(),C=(0,r.Z)(E,2)[1],O=(0,o.useMemo)((function(){return{delete:{handleAction:function(e){var t=e.id;ae(t).then((function(){h((function(e){return e.filter((function(e){return e.id!==t}))})),(0,_.L)("api-token","delete-token","profile"),y({label:"Delete token"},!0)})).catch(C)},confirmationTitle:"Delete API Token",confirmationMessage:"You are about to delete API Token, are you sure you want to continue?"}}}),[v]);return o.createElement(o.Fragment,null,o.createElement(c.Table,{dataColumns:fe,data:v,bulkActions:w,rowActions:O,enableResizing:!0,enableSorting:!0,columnPinning:me,enableColumnPinning:!0}),n&&o.createElement(ie,{view:"CreateView",onCloseModal:function(){return a(!1)},onTokenCreated:b}),u&&o.createElement(ie,{view:"CopyTokenView",onCloseModal:function(){s(!1),p(null)},token:f}))},ge=n(3528),ve=n(72437),he=n(50308),be=n.n(he),ye=["disabledInfo"],we=["title","description","label","checked","onChange"],Ee=function(e){var t,n=e.title,r=void 0===n?"":n,a=e.description,i=void 0===a?"":a,l=e.label,u=void 0===l?"":l,s=e.checked,d=e.onChange,f=void 0===d?be():d,g=(0,p.Z)(e,we),v=(t=c.Toggle,function(e){var n=e.disabledInfo,r=void 0===n?"This setting is disabled":n,a=(0,p.Z)(e,ye);return(a||{}).disabled?o.createElement(L.Z,{content:r},o.createElement(c.Box,null,o.createElement(t,a))):o.createElement(t,a)});return o.createElement(c.Flex,{justifyContent:"between",alignItems:"center"},o.createElement(c.Box,null,o.createElement(c.H5,null,r),o.createElement(c.TextSmall,null,i)),o.createElement(v,(0,m.Z)({colored:!0,onChange:f,checked:s,"data-testid":"profileNotifications-".concat(u,"NotificationsToggle"),"data-ga":"profile-ntab::click-toggle::global-view::".concat(s?"enabled":"disabled")},g)))},Ce=n(1653),Oe=(n(66992),n(88674),n(78783),n(33948),function(e){var t=e.value;return o.createElement(c.Box,{width:"232px",height:"232px",background:"white",padding:[4],round:3},o.createElement(Ce.ZP,{size:200,value:t}))}),xe=function(e){var t=e.onClose,n=void 0===t?be():t,a=function(){var e=se(),t=e.isLoading,n=e.data,a=(0,o.useState)(),i=(0,r.Z)(a,2),c=i[0],l=i[1],u=(0,A.Z)(),s=(0,r.Z)(u,2)[1],d=function(){var e=(0,B.Z)(U().mark((function e(){var t,r;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null===n||void 0===n?void 0:n.length)>0)){e.next=3;break}return e.next=3,Promise.all(n.map((function(e){var t=e.id;return ae(t)}))).catch(s);case 3:return e.next=5,oe({description:"Mobile App",scopes:["scope:mobile-app"]});case 5:t=e.sent,null!==(r=t.data)&&void 0!==r&&r.token&&l(r.token);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,o.useEffect)((function(){t||d()}),[t]),{token:c}}(),i=a.token;return o.createElement(c.Modal,null,o.createElement(c.ModalContent,{width:{min:100,base:140}},o.createElement(c.ModalHeader,null,o.createElement(c.Text,null,"Scan QR Code"),o.createElement(c.ModalCloseButton,{onClose:n,testId:"close-button"})),o.createElement(c.ModalBody,null,o.createElement(c.Flex,{alignItems:"center",justifyContent:"center",height:100},i?o.createElement(Oe,{value:i}):o.createElement(c.Flex,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",padding:[4]},o.createElement(c.H3,null,"Generating token")))),o.createElement(c.ModalFooter,null,o.createElement(c.Flex,{justifyContent:"end",padding:[1,2]},o.createElement(c.Button,{label:"Done",onClick:n})))))},ke=function(){var e=(0,ge.MJ)("email"),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,o.useCallback)((function(){return a(!n)}),[n,a]),l=(0,ge.MJ)("mobileApp"),u=(0,r.Z)(l,2),s=u[0],m=u[1],f=(0,o.useCallback)((function(){m(!(null!==s&&void 0!==s&&s.enabled))}),[s,m]),p=(0,d.Z)(),g=(0,r.Z)(p,4),v=g[0],h=g[2],b=g[3];return o.createElement(c.Flex,{column:!0,gap:2},o.createElement(Ee,{title:"E-mail",description:"Netdata will send you health notifications via e-mails",label:"email",checked:n,onChange:i}),ve.xy&&o.createElement(c.Flex,{column:!0},o.createElement(Ee,{title:"Mobile App Notifications",description:"Netdata will send you health notifications via mobile app notifications",label:"mobileApp",checked:null===s||void 0===s?void 0:s.enabled,onChange:f,disabled:!(null!==s&&void 0!==s&&s.linked),disabledInfo:"You have to link a device first and then enable notifications"}),o.createElement(c.Flex,{justifyContent:"end"},o.createElement(c.Button,{flavour:"borderless",icon:"qrCode",iconColor:"primary",iconSize:"small",onClick:h},o.createElement(c.Text,{color:"primary"},"Show QR code"))),v&&o.createElement(xe,{onClose:b})))},Se=(n(85827),n(25387),n(72608),n(78266)),Ze=n(33335),Pe=(n(69826),n(31672),n(59461),n(89211)),Ie=n(45736),je=n(23383),De=n(95383),Ne=(n(26833),n(3689)),Te=n(8018),Fe=n(37518),Me=k.default.div.withConfig({displayName:"styled__Row",componentId:"sc-lpc291-0"})(["width:100%;height:",";display:flex;flex-flow:row nowrap;align-items:center;padding-left:",";margin-bottom:",";"],(0,c.getSizeBy)(5),(0,c.getSizeBy)(3),(0,c.getSizeBy)(2)),_e=(0,k.default)(c.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-lpc291-1"})(["width:20px;height:20px;margin-right:",";"],(0,c.getSizeBy)()),Le=(0,k.css)(["&&{width:200px;}margin-left:auto;"]),Ae=(0,k.default)(c.Select).withConfig({displayName:"styled__StyledSelect",componentId:"sc-lpc291-2"})(["",""],Le),Be=(0,k.default)(c.Button).withConfig({displayName:"styled__SettingsLoader",componentId:"sc-lpc291-3"})([""," color:",";border:1px solid ",";.path{stroke:",";}"],Le,(0,c.getColor)("text"),(0,c.getColor)("border"),(0,c.getColor)("text")),Re=function(e){var t=e.roomId,n=e.spaceId,a=(0,ge.dR)({roomId:t,spaceId:n,key:"alarms"}),i=(0,r.Z)(a,2),c=i[0],l=i[1],u=(0,o.useCallback)((function(e){l(e.value)}),[l]);return o.createElement(Ae,{options:Object.values(Ne.YM),value:Ne.YM[c],onChange:u})},Ue=function(e){var t=e.roomId,n=e.spaceId,a=(0,o.useState)(),i=(0,r.Z)(a,2),l=i[0],u=i[1],s=(0,Te.qn)(n,t,{onFail:function(){u(!1)},onSuccess:function(){u(!1)}}),d=(0,o.useCallback)((function(){u(!0),s()}),[s,t]);return o.createElement(c.Box,{margin:[0,2,0,"auto"]},o.createElement(L.Z,{content:"Join this room to activate notifications for it",isBasic:!0},o.createElement(c.Button,{isLoading:l,label:"Join",onClick:d,flavour:"hollow"})))},ze=function(e){var t=e.isMember,n=e.roomId,r=e.spaceId,a=(0,Fe.tE)(n,"name");return o.createElement(Me,{"data-testid":"roomSettings-room-".concat(a),"data-ga":"profile-ntab::click-join-room-".concat(a,"::global-view")},o.createElement(_e,{name:"room",color:"text"}),o.createElement(c.Text,null,a),t?o.createElement(o.Suspense,{fallback:o.createElement(Be,{isLoading:!0,flavour:"hollow",label:"Loading settings.."})},o.createElement(Re,{roomId:n,spaceId:r})):o.createElement(Ue,{roomId:n,spaceId:r}))},Ve=k.default.div.withConfig({displayName:"styled__CollapsibleRoot",componentId:"sc-1p8t8zr-0"})(["width:100%;height:",";display:flex;flex-flow:row nowrap;align-items:center;cursor:pointer;margin-bottom:",";"],(0,c.getSizeBy)(5),(0,c.getSizeBy)(2)),He=(0,k.default)(c.Icon).withConfig({displayName:"styled__OpenerIcon",componentId:"sc-1p8t8zr-1"})(["height:5px;width:6px;margin-right:",";",";"],(0,c.getSizeBy)(2),(function(e){return e.expanded&&"transform: rotate(90deg)"})),We=(0,k.default)(c.Icon).withConfig({displayName:"styled__SpaceIcon",componentId:"sc-1p8t8zr-2"})(["width:20px;height:20px;margin-right:",";"],(0,c.getSizeBy)()),Ge=(0,k.default)(c.Text).withConfig({displayName:"styled__SpaceLabel",componentId:"sc-1p8t8zr-3"})(["font-weight:bold;"]),Ke=(0,k.default)(c.TextSmall).withConfig({displayName:"styled__SettingsInfo",componentId:"sc-1p8t8zr-4"})(["margin-left:auto;opacity:0.8;"]),Ye=n(26913),Je=function(e){var t=e.expanded,n=e.onExpand,r=e.label,a=e.spaceId;(0,Ye.Z)(a);var i=(0,Ie.pV)(a,"channels").find((function(e){return"Email"===e.integration}))||{};return o.createElement(Ve,{onClick:n,"data-testid":"spaceRoot-space-".concat(r)},o.createElement(He,{name:"chevron_right_s",expanded:t,color:"text"}),o.createElement(We,{name:"space",color:"text"}),o.createElement(Ge,null,r),!i.enabled&&o.createElement(Ke,null,"E-mail notifications for this space has been disabled by admin"))},qe={width:"108px",height:"77px"},Qe=function(e){var t=e.spaceId,n=e.isCurrent,a=e.showAllRooms,i=(0,Pe.Z)(n),l=(0,r.Z)(i,2),u=l[0],s=l[1],d=(0,je.Z)(t,{autorun:!1,polling:!1}),m=(0,De.y3)(t,"loaded");(0,o.useEffect)((function(){t&&u&&!m&&d()}),[u,m,t,d]);var f=(0,C.vu)(t,"name"),p=(0,De.WY)(t),g=(0,o.useMemo)((function(){return a?p:p.filter((function(e){return e.isMember}))}),[p,a]),v=(0,o.useRef)();return(0,o.useEffect)((function(){u&&v.current&&v.current.scrollIntoView({behavior:"smooth",block:"start"})}),[u]),o.createElement(c.Flex,{column:!0,ref:v},o.createElement(Je,{expanded:u,onExpand:s,label:f,spaceId:t}),o.createElement(c.Collapsible,{open:u},(function(){return m?o.createElement(o.Fragment,null,g.map((function(e){var n=e.id,r=e.isMember;return o.createElement(ze,{isMember:r,key:n,roomId:n,spaceId:t})}))):o.createElement(Se.Z,{iconProps:qe,title:"Loading..."})})))},$e=n(22613),Xe={width:"108px",height:"77px"},et=function(){var e=(0,C.th)(),t=function(e){var t=(0,C.GM)("ids");return(0,o.useMemo)((function(){return t.reduce((function(t,n){return n===e?[n].concat((0,f.Z)(t)):[].concat((0,f.Z)(t),[n])}),[])}),[e,t])}(e),n=(0,Ze.gI)("room:ReadAll"),a=(0,o.useState)(!1),i=(0,r.Z)(a,2),l=i[0],u=i[1];return o.createElement(o.Fragment,null,o.createElement(c.H4,null,"Notifications for all your Netdata Spaces and all the Rooms you are in"),n&&o.createElement($e.Z,{onFilterClick:function(e){return function(t){t.stopPropagation(),u(e)}},showAllRooms:l,padding:[1,0]}),o.createElement(c.Flex,{overflow:{vertical:"auto"},column:!0,"data-testid":"spaceRoomNotifications-spacesContainer",padding:[3,0,3]},o.createElement(o.Suspense,{fallback:o.createElement(Se.Z,{iconProps:Xe,title:"Loading notification settings..."})},t.map((function(t){return o.createElement(Qe,{key:t,isCurrent:t===e,showAllRooms:l,spaceId:t})})))))},tt={offline:["basic"],online:["profile","basic","notifications","apiTokens"]},nt={profile:{Component:T,label:"Profile",order:0,testId:"profileTab"},basic:{Component:M,label:"Basic",order:1,testId:"baseTab"},notifications:{Component:(0,o.memo)((function(){return o.createElement(c.Flex,{overflow:{vertical:"hidden"},column:!0,gap:2},o.createElement(c.H4,null,"Notification Methods"),o.createElement(o.Suspense,{fallback:"..."},o.createElement(ke,null)),o.createElement(c.Flex,{height:"1px",background:"border"}),o.createElement(et,null))})),label:"Notifications",order:2,testId:"notificationsTab"},apiTokens:{Component:pe,label:"API tokens",order:3,testId:"apiTokensTab"}},rt=function(e){return(nt[e]||nt.profile).order},ot=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).modalName,t=void 0===e?"profile":e,n=(0,i.Iy)("isAnonymous"),c=(0,o.useMemo)((function(){return Object.keys(nt).filter((function(e){return tt[n?"offline":"online"].includes(e)}))}),[n]),l=(0,a.Z)(t),u=l.isModalOpen,s=l.currentModalTab,d=l.handleOpenModal,m=l.handleCloseModal,f=l.handleChangeModalTab,p=(0,o.useState)(rt(s)),g=(0,r.Z)(p,2),v=g[0],h=g[1],b=function(e){f(e)};return(0,o.useEffect)((function(){h(rt(s))}),[s]),{handleOpenProfileModal:function(){d(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"profile")},handleCloseProfileModal:function(){m()},getPreselectedTab:rt,setCurrentTab:b,handleChangeTab:function(e){var t=c[e];h(e),b(t)},tabs:c,tabsByName:nt,activeTabIndex:v,isProfileModalOpen:u}}},83356:function(e,t,n){n(74916),n(15306),n(92222);var r=n(67294),o=n(89250),a=n(64637),i=n(78710),c=n(73012);t.Z=function(){var e=(0,o.s0)();return(0,r.useCallback)((function(){if(i.ZP){var t=window.location.origin+window.location.pathname.replace(i.tj,""),n=(0,c.MQ)();window.location.href=(0,a.h2)("".concat(window.envSettings.cloudUrl,"/trust?redirect_uri=").concat(encodeURIComponent(window.location.href),"&agent_uri=").concat(encodeURIComponent(t||window.envSettings.agentApiUrl),"&telemetry_session_id=").concat(n))}else e("/sign-in")}),[])}},4808:function(e,t,n){n.d(t,{HZ:function(){return w},Ru:function(){return y},bj:function(){return Z},g3:function(){return P},oU:function(){return v}});var r=n(4942),o=n(29439),a=n(45987),i=(n(21249),n(57640),n(9924),n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(74916),n(23123),n(47941),n(26699),n(32023),n(77601),n(2707),n(39714),n(66992),n(78783),n(33948),n(41637),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),c=n(66152),l=n(39840),u=n(55436),s=n(78710),d=["spaceId","cloudNodeIds","nodeIds","fn","acceptedParams","merge","filters"],m=["nodeIds","spaceId","roomId","roomSlug","anchor","merge","after","before","filters","anchorOffset","cloudNodeIds"];function f(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function(e){var t=e.functions,n=e.nodes;return t.map((function(e){return{name:e.name,nodes:e.ni.reduce((function(e,t){return n[t]?(e[n[t].nd||n[t].mg]=!0,e):e}),{})}}))},v=function(e,t){return(0,s.Ly)(e)?i.Z.get("/api/v2/functions",{baseURL:window.envSettings.agentApiUrl,transform:g}):i.Z.post("/api/v3/spaces/".concat(e,"/rooms/").concat(t,"/functions"),{scope:{nodes:[]},selectors:{nodes:["*"]}},{transform:g})},h=function(e,t){var n=t.merge,r=t.direction,o=t.dataOnly,a=void 0!==o&&o,i=t.tail,l=void 0!==i&&i;return function(t){return(t=(0,c.Tg)(t,{omit:["histogram"]})).defaultCharts||"processes"!==e||(t.defaultCharts=[["CPU","Category"],["Memory","Category"]]),t.defaultCharts=t.defaultCharts||[],a||(t.aggregations=t.facets),t.merge=n,t.direction=r,t.dataOnly=a,t.tail=l,t}},b=function(e,t){return"after"===e||"before"===e?Math.floor(t/1e3):t},y=function(e){var t=e.spaceId,n=e.cloudNodeIds,r=e.nodeIds,c=e.fn,l=e.acceptedParams,u=void 0===l?[]:l,m=e.merge,f=void 0!==m&&m,p=e.filters,g=void 0===p?{}:p,v=(0,a.Z)(e,d),y=u.reduce((function(e,t){var n=b(t,v[t]);return(n="undefined"===typeof n||null===n?null:"".concat(n))?e?"".concat(e," ").concat(t,":").concat(n):"".concat(t,":").concat(n):e}),"");null!==u&&void 0!==u&&u.length&&(y=Object.keys(g).reduce((function(e,t){var n=b(t,g[t]);return n=function(e,t){return"query"===e&&t?t.split(/\s+/).join("|"):t}(t,n),(n="undefined"===typeof n||null===n?null:"".concat(n))?e?"".concat(e," ").concat(t,":").concat(n):"".concat(t,":").concat(n):e}),y));var w,E=(0,s.Ly)(t);if(y=y?"".concat(E?"%20":" ").concat(y):"",E){var C=(0,o.Z)(r,1)[0];w=i.Z.get("/host/".concat(C,"/api/v1/function?function=").concat(c).concat(y),{baseURL:window.envSettings.agentApiUrl,transform:h(c,{merge:f,direction:v.direction,dataOnly:v.data_only&&u.includes("data_only"),tail:v.tail})})}else{var O=(0,o.Z)(n,1)[0];w=i.Z.get("/api/v2/nodes/".concat(O,"/function"),{params:{function:"".concat(c).concat(y),timeout:12e4},transform:h(c,{merge:f,direction:v.direction,dataOnly:v.data_only&&u.includes("data_only"),tail:v.tail})})}return w.catch((function(e){throw e.merge=f,e.direction=v.direction,e.dataOnly=v.data_only&&u.includes("data_only"),e.tail=v.tail,e})),w},w=function(e){var t=e.spaceId,n=e.cloudNodeIds,r=e.nodeIds,a=e.fn,l=e.after,u=e.before,d=(0,s.Ly)(t),m="".concat(d?"%20":" ","info after:").concat(b("after",l)," before:").concat(b("before",u));if(d){var f=(0,o.Z)(r,1)[0];return i.Z.get("/host/".concat(f,"/api/v1/function?function=").concat(a).concat(m),{baseURL:window.envSettings.agentApiUrl,transform:c.Tg})}var p=(0,o.Z)(n,1)[0];return i.Z.get("/api/v2/nodes/".concat(p,"/function"),{params:{function:"".concat(a).concat(m),timeout:12e4},transform:c.Tg})},E={filter:!1,index:1,name:"Unknown",sort:"ascending",sortable:!1,sticky:!1,summary:"",type:"string",uniqueKey:!1,visible:!0,dummy:!1},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.Z)({},e,p(p({},E),{},{name:t.name||e},t))},O=p(p(p(p(p({},C("Timestamp",{type:"datetime",index:0})),C("Tags",{type:"pill",index:1,wrap:!0})),C("Description",{type:"feedTemplate",index:2})),C("source",{type:"feedTemplate",index:3,dummy:!0})),C("json",{type:"feedTemplate",index:4,dummy:!0})),x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,o.Z)(e,1)[0];return"retention"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type?/exceeds the maximum data retention/.test(t)?"You've exceeded your plan's retention limit":"":t},k=function(e,t){return function(n){var r,o,a,i=n.errors,c=void 0===i?[]:i,l=n.page_size,u=n.results,s=u.hits,d=u.aggregations,m=(null===s||void 0===s?void 0:s.hits)||[];return{columns:p({},O),data:m.map((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n._source,o=void 0===r?{}:r,a=n._source,i=a.event,c=a.host,l=void 0===c?[]:c,u=a.agent,s=void 0===u?{}:u,d=a.Netdata,m=a.tags,f=Array.isArray(l)?l:[l];return d=p(p({},d),d.alert?{alert:p(p(p({},d.alert),{},{id:null===(e=d.alert.transition)||void 0===e?void 0:e.id},d.alert.name?{name:Array.isArray(d.alert.name)?d.alert.name:[d.alert.name]}:{}),d.alert.current?{current:p(p({},d.alert.current),{},{status:d.alert.current.status?Array.isArray(d.alert.current.status)?d.alert.current.status:[d.alert.current.status]:[]})}:{})}:{}),[o["@timestamp"],m||[],i.id,p(p(p(p({},o),i),d),{},{hosts:f,agentId:s.id,roomId:t}),o]})),default_sort_column:null,type:"table",update_every:5,pageSize:l,totalSize:(null===(r=s.total)||void 0===r?void 0:r.value)||0,anchorBefore:null===(o=m[m.length-1])||void 0===o||null===(o=o.sort)||void 0===o?void 0:o[0],anchorAfter:null===(a=m[0])||void 0===a||null===(a=a.sort)||void 0===a?void 0:a[0],aggregations:d,merge:e,retentionWarning:x(c,{type:"retention"}),warning:x(c)}}},S=function(e,t,n,r){return function(n){var o,a=n.facets,i=void 0===a?[]:a,c=n.items,u=void 0===c?{}:c,s=n.transitions,d=void 0===s?[]:s,m=d.map((function(n){var r=n.machine_guid,o=n.transition_id,a=n.node_id,i=n.hostname,c=n.alert,u=n.new,s=u.status,d=u.value,m=n.when,f=n.old.status,p=n.instance,g=n.units,v={action:"alert-node-transition",space:{id:e},roomId:t,alert:{id:o,current:{status:[s],value_string:(0,l.m9)(d,g)},previous:{status:f},name:[c]},chart:{name:p},hosts:[{id:a||r,name:i}]};return[1e3*m,["alert","node_instance"],o,v,v,s,name,p]}));return{columns:p(p(p(p({},O),C("Status",{type:"value",index:5,dummy:!0,filter:"multiselect"})),C("Alert Name",{type:"value",index:6,dummy:!0,filter:"multiselect"})),C("Instance",{type:"value",index:7,dummy:!0,filter:"multiselect"})),data:m,default_sort_column:null,type:"table",update_every:5,pageSize:100,totalSize:(null===u||void 0===u?void 0:u.matched)||m.length,anchorBefore:null===(o=d[d.length-1])||void 0===o?void 0:o.gi,aggregations:i,merge:r,retentionWarning:null,warning:null}}},Z=function(e){var t,n=e.nodeIds,r=void 0===n?[]:n,o=e.spaceId,c=e.roomId,l=e.roomSlug,d=e.anchor,f=void 0===d?"":d,g=e.merge,v=void 0!==g&&g,h=e.after,b=e.before,y=e.filters,w=(e.anchorOffset,e.cloudNodeIds),E=(0,a.Z)(e,m);if((0,s.Ly)(o)){var C=new URLSearchParams(p(p(p({after:h?Math.floor(h/1e3):h,before:b?Math.ceil(b/1e3):b,last:200,anchor_gi:f,options:"minify"},y),E),{},{scope_nodes:r.join("|")||"*"})).toString();return i.Z.get("/api/v2/alert_transitions?".concat(C),{baseURL:window.envSettings.agentApiUrl,transform:S(o,c,0,v)})}return i.Z.post("/api/v1/feed/search",p(p(p({},y),E),{},{histogram_seconds:(null===(t=(0,u.BZ)(h,b))||void 0===t?void 0:t.secs)||1,node_ids:w,page_size:200,space_id:o,room_ids:"all-nodes"!==l?[c]:[],search_before:f||Date.now(),from_timestamp:h,to_timestamp:b}),{transform:k(v,c)})},P=function(){return i.Z.get("/api/v1/feed/static/facets")}},81732:function(e,t,n){n.d(t,{GQ:function(){return d},Zn:function(){return f},eX:function(){return l},p6:function(){return u}});var r=n(4942),o=(n(41539),n(88674),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),a=n(4808);function i(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=(0,o.cn)({key:"fnIndexHoverAtom",default:null}),u=(0,o.cn)({key:"fnClickPointAtom",default:null}),s=(0,o.xu)({key:"checkAgainFnsAtom",default:function(){return 1}}),d=(0,o.CG)({key:"availableFunctionsSelector",get:function(e){var t=e.spaceId,n=e.roomId,r=e.extraKey;return function(e){return(0,e.get)(s(t)),function(e){var t=e.spaceId,n=e.roomId;return"feed"===e.extraKey?Promise.resolve({data:[{name:"feed"}]}):(0,a.oU)(t,n)}({spaceId:t,roomId:n,extraKey:r})}}}),m={id:null,loading:!0,loaded:!1,loadingMore:!1,infoLoaded:!1,data:null,error:"",type:"",updateEvery:1,availableFilters:{},missingRequired:!1,lastModified:null,anchorAfter:null,offset:0,defaultCharts:[],acceptedParams:[],requiredParams:[]},f={table:c(c({},m),{},{sortColumn:"",sortDirection:"descending",columns:{},columnVisibility:{},sortedColumns:[],pinnedColumns:[],groupByColumns:null}),default:m};t.ZP=(0,o.xu)({key:"function",default:function(e){return c(c({},m),{},{id:e})}})},85672:function(e,t,n){n.d(t,{Ih:function(){return i},Kl:function(){return a},vK:function(){return r}});var r=["#19C89E","#14A6C7","#F3D63D","#E05296","#FF7448","#C082FF"],o=3600,a=86400,i=[{minLimit:350*a,secs:7*a,unit:"week"},{minLimit:50*a,secs:a,unit:"day"},{minLimit:13*a,secs:21600,unit:"hour"},{minLimit:5*a,secs:10800,unit:"hour"},{minLimit:136800,secs:o,unit:"hour"},{minLimit:61200,secs:1800,unit:"minute"},{minLimit:28800,secs:600,unit:"minute"},{minLimit:10800,secs:300,unit:"minute"},{minLimit:2280,secs:60,unit:"minute"},{minLimit:780,secs:30,unit:"second"},{minLimit:420,secs:10,unit:"second"},{minLimit:300,secs:5,unit:"second"},{minLimit:1,secs:1,unit:"second"}]},3322:function(e,t,n){n.d(t,{$0:function(){return M},CE:function(){return x},Cf:function(){return T},Eq:function(){return D},Hv:function(){return k},I_:function(){return Z},KO:function(){return w},MT:function(){return _},ZQ:function(){return S},fg:function(){return I},hx:function(){return F},kU:function(){return j},mO:function(){return P},tD:function(){return C}});n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(93433),o=n(45987),a=n(29439),i=n(4942),c=(n(41539),n(88674),n(2707),n(85827),n(25387),n(2490),n(72608),n(47941),n(21249),n(57640),n(9924),n(67294)),l=n(89250),u=n(4480),s=n(4822),d=n(74059),m=n(37518),f=n(78710),p=n(81732),g=n(4808),v=["key","flavour"],h=["key","flavour"];function b(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e){var t,n=(0,d.th)(),r=(0,m.UL)(),o=(0,u.$P)((0,p.GQ)({spaceId:n,roomId:r,extraKey:e})),a=(0,u._8)((function(t){var o=t.refresh;return function(){return o((0,p.GQ)({spaceId:n,roomId:r,extraKey:e}))}}),[n,r,e]);return{loaded:"loading"!==o.state,value:null===(t=o.contents)||void 0===t?void 0:t.data,hasError:"hasError"===o.state,refresh:a}},E=[],C=(0,u.CG)({key:"fnState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,p.ZP)(t));return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,r){var o=e.set,a=e.reset;r||n?o((0,p.ZP)(t),(function(e){return n?y(y({},e),{},(0,i.Z)({},n,r)):y(y({},e),r)})):a((0,p.ZP)(t))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),O={extraKey:"fn"},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=(0,s.tk)("selectedFn",y({defaultValue:E,flavour:"arr"},e));return(0,a.Z)(t,1)[0]},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;return(0,s.D0)("selectedFn",y({defaultValue:E,flavour:"arr"},e))},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;return function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:O).key;return(0,u.sJ)(C({id:e,key:t}))}(x(e),e)},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;return function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:O).key;return(0,u.Zl)(C({id:e,key:t}))}(x(e),e)},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;return[S(e),Z(e)]},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=e.key,n=e.flavour,r=(0,o.Z)(e,v),a=x(r);return(0,s.D0)(t,{extraKey:"".concat(a||r.extraKey,"Settings"),flavour:n})},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=e.key,n=e.flavour,r=(0,o.Z)(e,h),a=x(r);return(0,s.D0)(t,{extraKey:"".concat(a||r.extraKey,"Filters"),flavour:n})},D=function(e){var t=(0,l.s0)(),n=function(){var e=(0,m.A3)();return e&&"".concat(e,"/functions")}();return(0,c.useCallback)((function(){t(n,{state:{nodeId:arguments.length>0&&void 0!==arguments[0]?arguments[0]:e}})}),[n,t])},N=(0,u.CG)({key:"feedFacetsSelector",get:function(e){return function(){return e?(0,g.g3)():Promise.resolve({data:{}})}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),T=function(e){var t=(0,d.th)(),n=(0,f.Ly)(t),o=S({extraKey:e}),a=o.loading,i=o.loaded,l=o.aggregations,s=(0,u.$P)(N(!n&&"feed"===e));return(0,c.useMemo)((function(){var e;if("hasValue"!==s.state||!i)return[];if(!l)return[];if(Array.isArray(l))return l.reduce((function(e,t){return e.push(y(y({},t),{},{options:(0,r.Z)(t.options).sort((function(e,t){return e.order-t.order||(e.name?e.name.localeCompare(t.name,void 0,{sensitivity:"accent"}):t.count-e.count)}))})),e}),[]).sort((function(e,t){return e.order-t.order}));var t=(null===s||void 0===s||null===(e=s.contents)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.facets)||{};return Object.keys(t).sort((function(e,n){return t[e].order-t[n].order})).reduce((function(e,n){var r,o=t[n],a=o.display_name,i=o.field;return null!==(r=l[n])&&void 0!==r&&r.buckets?(e.push({id:n,name:a,options:l[n].buckets.map((function(e){var t,n;return{id:e.key,name:(null===(t=s.contents.data.fields)||void 0===t||null===(t=t[i])||void 0===t?void 0:t[e.key])||e.key,count:(null===(n=e.hits)||void 0===n?void 0:n.doc_count)||0}}))}),e):e}),[])}),[e,n,s.state,i,a])},F=function(){return(0,u.sJ)(p.eX)},M=function(){return(0,u.Zl)(p.eX)},_=function(){return(0,u.FV)(p.p6)}},55436:function(e,t,n){n.d(t,{BZ:function(){return u},Jw:function(){return i},Ol:function(){return l},kl:function(){return c}});n(54678),n(92222),n(69826),n(41539),n(31672),n(2490),n(59461);var r=n(67294),o=n(89405),a=n(85672),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.decimalPoints,r=t.defaultValue;return null===e?void 0===r?"":r:isNaN(n)?e:parseFloat(e).toFixed(n)},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.defaultValue,r=void 0===n?"":n,o=t.usec;if(void 0!==o&&o&&(e=e?Math.floor(e/1e3):e),null===e)return r;var a=Math.floor(e/86400);e-=24*a*3600;var i=Math.floor(e/3600);e-=3600*i;var c=Math.floor(e/60);return"".concat(a,"d ").concat(i,"h ").concat(c,"m")},l=function(){var e=(0,o.rA)(),t=e.localeTimeString,n=e.localeDateString;return(0,r.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.defaultValue,a=void 0===o?"":o,i=r.usec;void 0!==i&&i&&(e=e?Math.floor(e/1e3):e);var c=new Date(e);return isNaN(c.valueOf())?a:"".concat(n(c,{long:!1})," ").concat(t(c,{secs:!0}))}),[])},u=function(e,t){return a.Ih.find((function(n){var r=n.minLimit;return function(e,t){return e<0?Math.abs(t-e):(t-e)/1e3}(e,t)>=r}))}},67996:function(e,t,n){n.d(t,{Z:function(){return Q}});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(4942),o=n(67294),a=n(34885),i=n(87462),c=n(45987),l=(n(9653),n(71893)),u=n(59978),s=n(91008),d=n(57387),m=n(668),f=n(46189),p=["level"],g=["children","href"],v=["content"],h=["ordered","children"],b=["children"],y=l.default.article.withConfig({displayName:"nodes__StyledArticle",componentId:"sc-z8xzec-0"})(["padding-right:8px;padding-bottom:16px;"]),w=l.default.p.withConfig({displayName:"nodes__StyledParagraph",componentId:"sc-z8xzec-1"})(["margin-top:14px;line-height:1.5;"]),E=(0,l.default)(d.ZP).withConfig({displayName:"nodes__StyledCommand",componentId:"sc-z8xzec-2"})(["padding:8px;padding-right:32px;margin-top:8px;"]),C=l.default.ol.withConfig({displayName:"nodes__OrderedList",componentId:"sc-z8xzec-3"})(["list-style:roman;padding-left:16px;line-height:2;"]),O=l.default.ul.withConfig({displayName:"nodes__UnorderedList",componentId:"sc-z8xzec-4"})(['list-style-image:url("','/img/list-style-image.svg");padding-left:16px;line-height:2;'],f.Z.assetsBaseURL),x={document:{render:y},heading:{render:function(e){var t=e.level,n=void 0===t?1:t,r=(0,c.Z)(e,p),a={1:u.H1,2:u.H2,3:u.H3,4:u.H4,5:u.H5,6:u.H6}[n]||u.H1,l=n<=3?6-n:2;return o.createElement(a,(0,i.Z)({margin:[l,0,2,0]},r))},attributes:{id:{type:String},level:{type:Number}}},paragraph:{render:w},link:{render:function(e){var t=e.children,n=e.href,r=(0,c.Z)(e,g);return o.createElement(s.Z,(0,i.Z)({href:n,rel:"noopener noreferrer",target:"_blank"},r),t)},attributes:{href:{type:String}}},code:{render:function(e){var t=e.content,n=(0,c.Z)(e,v);return o.createElement(d.ZM,(0,i.Z)({as:"span"},n),t)},attributes:{content:{type:String}}},fence:{render:E,attributes:{content:{type:String}}},list:{render:function(e){var t=e.ordered,n=e.children,r=(0,c.Z)(e,h),a=t?C:O;return o.createElement(a,r,n)},attributes:{ordered:{type:Boolean}}},table:{render:function(e){var t=e.children,n=(0,c.Z)(e,b);return o.createElement(m.AB,n,t)}}},k=function(e){var t=e.summary,n=void 0===t?"":t,r=e.open,a=void 0!==r&&r,i=e.children;return o.createElement(u.Flex,{margin:[2,0,0,0]},o.createElement("details",{open:a},o.createElement("summary",null,o.createElement(u.Text,{strong:!0},n)),i))},S=n(29439),Z=(n(21249),n(57640),n(9924),n(88674),n(66342),n(62962),n(23748),(0,l.default)(u.Flex).attrs({column:!0}).withConfig({displayName:"styled__StyledTerminalCommand",componentId:"sc-3zs5xg-0"})(["position:relative;top:-1px;color:",";background:",";border:1px solid ",';cursor:pointer;overflow-wrap:anywhere;white-space:pre-wrap;padding:8px 16px 16px 8px;width:100%;font-family:"Courier New",Courier,monospace;font-weight:bold;letter-spacing:0.09px;line-height:16px;font-size:14px;word-break:break-word;overflow-y:auto;margin-top:',";"],(0,u.getColor)("primary"),(0,u.getColor)("terminalGreen"),(0,u.getColor)("terminalGreenBorder"),(function(e){return e.noMargin?"0":"16px"}))),P=(0,l.default)(u.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-3zs5xg-1"})(["display:flex;align-self:flex-end;cursor:pointer;position:absolute;bottom:8px;right:8px;"]),I=n(19480),j=n(52428),D=n(87267),N=["children"],T=function(e){var t=e.children,n=(0,c.Z)(e,N),r=(0,o.useMemo)((function(){return(0,I.$O)(t)}),[t]),a=(0,D.Z)(),l=a.sendLog,u=a.isReady,s=(0,o.useCallback)((function(){(0,j.J)(r,{text:"Config copied to your clipboard."})(),l({feature:"ConnectNode",isStart:!0,copyString:r})}),[u]);return o.createElement(Z,(0,i.Z)({onClick:s},n),t,o.createElement(P,{name:"copy",size:"small",color:"textLite"}))},F=function(e){var t=e.children,n=(0,o.useState)(0),r=(0,S.Z)(n,2),a=r[0],i=r[1],c=o.Children.toArray(t).map((function(e){return e.props}));return o.createElement(u.Flex,{column:!0,width:"100%",margin:[4,0,0,0]},o.createElement(u.Flex,{border:{side:"bottom",size:"1px",color:"borderSecondary"},padding:[0,4]},o.createElement(u.Tabs,{selected:a,onChange:i},c.map((function(e){var t=e.label;return o.createElement(u.Tab,{key:t,label:o.createElement(u.Text,null,t),minWidth:"auto",maxWidth:"auto",padding:[1,4],background:"mainBackground",small:!0})})))),o.createElement(u.Flex,{flex:!0},o.createElement(T,{noMargin:!0},c[a].children)))},M=n(4822),_=n(89250),L=n(74059),A=n(8641),B=n(67034),R=function(e){var t=e.children,n=e.onClick;return o.createElement(u.Box,{as:"a",cursor:"pointer",onClick:n},t)},U=function(e){var t=e.categoryId,n=e.navigateToSettings,r=e.children,a=(0,_.s0)(),i=(0,M.I0)("selectedIntegrationCategory"),c=(0,S.Z)(i,2)[1],l=(0,L.uk)(),u=(0,A.wC)().pushCategory,s=(0,B.Z)(),d=(0,o.useCallback)((function(){n?(c("deploy.docker-kubernetes"),a({pathname:"/spaces/".concat(l,"/settings/integrations"),replace:!0})):u(s(t))}),[u,t,s,n]);return o.createElement(R,{onClick:d},r)},z=(0,o.memo)(U),V=(n(74916),n(15306),n(68757),n(69826),n(31672),n(59461),n(13477)),H=n(33335),W=function(e){var t=e.showClaimingOptions,n=e.command,r=void 0===n?"":n,o=e.claimToken,a=void 0===o?"":o,i=e.claimUrl,c=void 0===i?"":i,l=e.claimRooms,u=void 0===l?"":l;if(t)return r.replaceAll(/{% if \$showClaimingOptions %}\n?/gi,"").replaceAll(/{% \/if %}\n?/gi,"").replaceAll(/{% claim_token %}/gi,a).replaceAll(/{% claim_url %}/gi,c).replaceAll(/{% \$claim_rooms %}/gi,u);return r.replaceAll(/\{%\s*if\s*\$showClaimingOptions\s*%\}[\s\S]*?\{%\s*\/if\s*%\}\n?/g,"")},G=function(e){var t,n=e.methods,r=e.isNightly,a=e.claimToken,i=void 0===a?"":a,c=e.claimUrl,l=void 0===c?"":c,s=e.claimRooms,d=void 0===s?"":s,m=r?"nightly":"stable",f=function(){var e=(0,V.Iy)("isAnonymous"),t=(0,H.gI)("node:Create");return{showClaimingOptions:!e&&t}}().showClaimingOptions;return n.length?f&&!i?o.createElement(u.Flex,{padding:[8,0]},o.createElement(u.Text,null,"Loading token...")):n.length>1?o.createElement(F,null,n.map((function(e){var t=e.method,n=(e.commands.find((function(e){return e.channel==m}))||{}).command;return o.createElement(u.Tab,{key:t,label:t},W({showClaimingOptions:f,command:n,claimToken:i,claimUrl:l,claimRooms:d}))}))):o.createElement(T,null,W({showClaimingOptions:f,command:((null===(t=n[0])||void 0===t?void 0:t.commands.find((function(e){return e.channel==m})))||{}).command||"",claimToken:i,claimUrl:l,claimRooms:d})):null},K={nodes:x,tags:{details:{render:k,attributes:{summary:{type:String,default:""},open:{type:Boolean,default:!1}}},tabs:{render:F},tab:{render:u.Tab,attributes:{label:{type:String,default:""}}},terminal:{render:T},goToCategory:{render:z,attributes:{categoryId:{type:String,default:""},navigateToSettings:{type:Boolean,default:!1}}},command:{render:G,attributes:{methods:{type:Array,default:[]},isNightly:{type:Boolean,default:!1},claimToken:{type:String,default:""},claimUrl:{type:String,default:""},claimRooms:{type:String,default:""}}}}};function Y(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 J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var q=function(e){var t=e.config,n=void 0===t?{}:t,r=e.children;return o.createElement(a.Z,{transformConfiguration:J(J({},K),n)},r)},Q=(0,o.memo)(q)},26017:function(e,t,n){var r=n(67294),o=n(59978),a=n(67996),i=n(74059),c=n(33582),l=n(37518);t.Z=function(e){var t=e.integration,n=void 0===t?{}:t,u=e.isNightly,s=e.rooms,d=void 0===s?[]:s,m=e.navigateToSettings,f=n.deployContent,p=n.methods,g=(0,i.th)(),v=(0,l.Jb)(),h=(0,l.Hm)(),b=null!==h&&void 0!==h&&h.loaded?h:v,y=null===b||void 0===b?void 0:b.id,w=(0,c.Z)(g),E=window.envSettings.apiUrl,C=d.length?d.join(","):y,O=(0,r.useMemo)((function(){var e;return{variables:{methods:p,isNightly:u,claimToken:null===w||void 0===w||null===(e=w[0])||void 0===e?void 0:e.token,claimUrl:E,claimRooms:C,navigateToSettings:m}}}),[p,u,w,E,C,m]);return r.createElement(o.Flex,{width:"100%",column:!0,gap:4,padding:[4,0,0,0]},r.createElement(a.Z,{config:O},f))}},35819:function(e,t,n){n(82526),n(41817);var r=n(67294),o=n(59978),a=n(91008),i=n(82351),c=n(50308),l=n.n(c),u=n(35253),s={left:"stable",right:"nightly"},d=function(e){var t=e.right,n=u.J[s[t?"right":"left"]]||{},a=n.title,c=n.description;return r.createElement(i.Z,{content:c,align:"bottom"},r.createElement(o.Text,{padding:t?[0,0,0,1]:[0,1,0,0]},a))};t.Z=function(e){var t=e.isNightly,n=e.toggleNightly,i=void 0===n?l():n;return r.createElement(o.Flex,{column:!0,gap:1},r.createElement(a.Z,{href:"https://learn.netdata.cloud/docs/getting-started/install-netdata#nightly-vs-stable-releases",rel:"noopener noreferrer",target:"_blank"},r.createElement(o.Flex,{alignItems:"center",gap:1},r.createElement(o.Text,{color:"primary"},"Updates channel"),r.createElement(o.Icon,{color:"primary",name:"goToNode",width:"18px",height:"18px"}))),r.createElement(o.Toggle,{labelLeft:"Stable",labelRight:"Nightly",Label:d,colored:!1,checked:t,disabled:!1,onChange:i}))}},41898:function(e,t,n){n.d(t,{vE:function(){return U},n5:function(){return Y},xN:function(){return J},Kl:function(){return z},p1:function(){return K},O_:function(){return V},RV:function(){return G},DW:function(){return R},ON:function(){return W},JZ:function(){return H}});var r=n(29439),o=n(87462),a=n(67294),i=n(50308),c=n.n(i),l=n(59978),u=n(27622),s=(n(26699),n(71893)),d=n(74059),m=n(20428),f=n(46667),p=n(54131),g=function(e){var t=e.name,n=e.onEdit,r=void 0===n?c():n;return a.createElement(l.Flex,{alignItems:"center",gap:2},a.createElement(l.TextBig,null,t),a.createElement(l.Button,{icon:"pencilOutline",flavour:"borderless",iconColor:"text",iconSize:"small",padding:[0],onClick:r}))},v=(0,s.default)(l.Flex).withConfig({displayName:"spaceInfo__StyledWrapper",componentId:"sc-166ce7m-0"})(["margin-top:-3px !important;margin-bottom:-3px !important;"]),h=function(e){var t=e.name,n=e.setName,o=void 0===n?c():n,i=e.onSave,u=void 0===i?c():i,s=e.onCancel,d=void 0===s?c():s,m=e.isLoading,f=(0,a.useState)(),g=(0,r.Z)(f,2),h=g[0],b=g[1],y=(0,a.useMemo)((function(){return(0,p.x3)(t)}),[t]);return a.createElement(v,{gap:2},a.createElement(l.TextInput,{value:t,onChange:function(e){b(!0),o(e.target.value)},onKeyDown:function(e){var t=e.code;["Enter","NumpadEnter"].includes(t)&&u()},disabled:m,size:"tiny",error:p.Qj[y],isDirty:h,instantFeedback:"all"}),a.createElement(l.Button,{label:"Save",flavour:"borderless",iconColor:"text",iconSize:"small",padding:[0],onClick:u,disabled:m||!!y}),a.createElement(l.Button,{label:"Cancel",flavour:"borderless",iconColor:"text",iconSize:"small",padding:[0],onClick:d,disabled:m}))},b=function(){var e=(0,d.OS)(),t=e.id,n=e.name,o=(0,m.Z)(t),i=(0,f.Z)(),c=(0,r.Z)(i,4),l=c[0],u=c[2],s=c[3],p=(0,f.Z)(),v=(0,r.Z)(p,4),b=v[0],y=v[2],w=v[3],E=(0,a.useState)(n),C=(0,r.Z)(E,2),O=C[0],x=C[1],k=(0,a.useCallback)((function(){s(),w()}),[]),S=(0,a.useCallback)((function(){u(),o({name:O},{onSuccess:k,onFail:s})}),[O]);return b?a.createElement(h,{name:O,setName:x,onSave:S,onCancel:w,isLoading:l}):a.createElement(g,{name:n,onEdit:y})},y=n(82351),w=n(89149),E=n(91008),C=n(37518),O=n(41379),x=n(53338),k=n(33937),S=n(33335),Z=(n(74916),n(15306),n(92222),n(46189)),P=(0,n(39979).Z)(l.Button),I={light:"primary",dark:"white",unspecified:"primary"},j=function(e){var t={icon:"add_user",flavour:"borderless",onClick:e.onClick,label:"Invite your team","data-ga":"integrations::click-invite-team::header"};return(0,S.gI)("space:InviteUser")?a.createElement(P,t):a.createElement(y.Z,{content:"You can't invite a user with your current permissions"},a.createElement(l.Flex,null,a.createElement(P,(0,o.Z)({},t,{disabled:!0}))))},D=function(e){var t=e.nodesCount,n=e.onClick,r=void 0===n?c():n,o=(0,S.gI)("node:Create"),i=(0,a.useMemo)((function(){return{onClick:r,disabled:!o}}),[o]),u=t>0?"Connect more!":"Connect a node";return o?a.createElement(E.Z,i,u):a.createElement(y.Z,{content:"You don't have permission to connect new nodes. Please contact an administrator to do it"},a.createElement(l.Box,null,a.createElement(E.Z,i,u)))},N=function(e){var t=e.nodesCount,n=e.onConnectClick,r=void 0===n?c():n;return a.createElement(l.Flex,{gap:2},a.createElement(D,{nodesCount:t,onClick:r}),a.createElement(l.Text,null,"to get started"))},T=function(e){var t=e.nodesCount,n=e.onConnectClick,r=void 0===n?c():n;return a.createElement(l.Flex,{gap:2},a.createElement(l.Text,null,"You have connected ",t," node",1===t?"":"s","."),a.createElement(D,{nodesCount:t,onClick:r}))},F=(0,a.memo)((function(e){var t=e.nodesCount,n=e.onConnectClick,r=void 0===n?c():n;return a.createElement(l.Flex,{gap:2},a.createElement(l.Text,null,"This is your new space"),t>0?a.createElement(T,{nodesCount:t,onConnectClick:r}):a.createElement(N,{nodesCount:t,onConnectClick:r}))})),M=function(e){var t=e.onInvite,n=void 0===t?c():t,o=(0,k.R)("theme"),i=(0,d.th)(),s=(0,C.UL)(),m=(0,C.HM)(i,x.i_),p=(0,f.Z)(),g=(0,r.Z)(p,4),v=g[0],h=g[2],y=g[3],E=function(){var e=(0,d.uk)(),t=(0,C.vf)(),n=Z.Z.defaultRoomView;return(0,a.useCallback)((function(){window.location.replace("/spaces/".concat(e,"/rooms/").concat(t,"/").concat(n))}),[])}(),S=(0,a.useState)([]),D=(0,r.Z)(S,2),N=D[0],T=D[1];(0,O.Z)({spaceId:i,id:s||m,pollingInterval:3e3,keepPolling:!0,onNodeIdsChange:function(e){var t=e.nodeIds;return T((null===t||void 0===t?void 0:t.length)||0)}});var M=N>0;return a.createElement(a.Fragment,null,a.createElement(u.Z,{height:"66px",width:"66px",color:I[o]}),a.createElement(l.H1,{strong:!1},"Welcome to Netdata!"),a.createElement(F,{nodesCount:N,onConnectClick:function(e){e.preventDefault,h()}}),a.createElement(b,null),a.createElement(l.Flex,{gap:4},a.createElement(j,{onClick:n}),a.createElement(P,{icon:"rocket",flavour:M?"default":"borderless",onClick:E,label:M?"Launch space":"Node Required for Launch",disabled:!M,fetaure:"LaunchSpace"})),v&&a.createElement(w.Z,{onClose:y,room:s}))},_=function(){return a.createElement(a.Fragment,null,a.createElement(l.H1,{strong:!1},"Integrations Made Easy!"),a.createElement(l.Text,null,"Unleash the Power of Connected Systems"))},L=n(26017),A=n(67996),B=function(e){var t=e.integration,n=void 0===t?{}:t;return a.createElement(l.Flex,{width:"100%",column:!0,gap:2,padding:[4,0,0,0]},a.createElement(A.Z,null,n.alerts))},R="deploy.operating-systems",U=34,z="data-collection",V="deploy-kubernetes",H={deploy:"rocket","data-collection":"collect",notify:"alarmFilled",export:"importExport"},W={deploy:L.Z,"alert-notifications":B},G={homePage:"homePage",settingsPage:"settingsPage",addNodesModal:"addNodesModal"},K=G.homePage,Y={homePage:{headerContent:M},settingsPage:{headerContent:_},addNodesModal:{headerContent:null}},J={homePage:{header:{height:284,wrapperProps:{padding:[4,0]}},search:{wrapperProps:{width:"500px",margin:[0]}},cncf:{height:80},categoryCharacterWidth:9},settingsPage:{header:{height:210,wrapperProps:{padding:[4,0]}},search:{wrapperProps:{width:"500px",margin:[0]}},cncf:{height:0},categoryCharacterWidth:9},addNodesModal:{header:{height:126,wrapperProps:{width:"100%",padding:[4]}},search:{wrapperProps:{width:"100%",margin:[0],flex:!0},inputProps:{size:"small"}},cncf:{height:16},categoryCharacterWidth:9}}},67034:function(e,t,n){n(69826),n(41539),n(31672),n(2490),n(59461);var r=n(8641);t.Z=function(){var e=(0,r.pZ)();return function(t){return e.find((function(e){return e.id==t}))}}},8641:function(e,t,n){n.d(t,{pZ:function(){return N},xh:function(){return j},mk:function(){return I},Oi:function(){return U},wC:function(){return D},RG:function(){return _},dG:function(){return A},lX:function(){return L},NE:function(){return M},P0:function(){return R},Si:function(){return B},Zc:function(){return F},BN:function(){return T}});var r=n(45987),o=n(4942),a=n(93433),i=n(29439),c=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(92222),n(47042),n(69826),n(31672),n(59461),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),l=n(4480),u=n(4822),s=(n(26699),n(32023),n(12934)),d=n(86348),m=n(85373),f=n(58591),p=n(41898);function g(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=(0,l.cn)({key:"integrationsCategoriesAtom",default:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).hideEmptyCategories,t=void 0===e||e,n=(0,d.bu)(s.b),r=(0,m.tE)(s.l),o=[];if(t){var a=(0,d.GP)(r,(function(e){return n.find((function(t){return t.id==e}))}),n);o=n.filter((function(e){var t=e.id;return a.includes(t)}))}else o=n;return o}()}),b=(0,l.cn)({key:"topLevelIntegrationsCategoriesAtom",default:(0,l.nZ)({key:"topLevelIntegrationsCategoriesState",get:function(e){var t=e.get;return(0,d.gP)(t(h))}})}),y=(0,l.cn)({key:"integrationsNavigationHistoryAtom",default:(0,l.nZ)({key:"integrationsNavigationHistoryState",get:function(e){var t=e.get;return function(e){var t,n=e.categories,r=e.integrations,o=(0,f.m$)(),a=o.selectedIntegrationCategory,i=o.selectedIntegration,c=n.find((function(e){return e.id==(a||p.DW)})),l=(0,d.QQ)({category:c,getCategoryById:function(e){return n.find((function(t){return t.id==e}))}}).tree,u=null===(t=r.filter((function(e){return e.id==i})))||void 0===t?void 0:t[0],s=l.filter(Boolean).map((function(e,t){return v(v({},e),{},{type:"category",level:t+1})}));return u&&s.push(v(v({},u),{},{type:"integration"})),s}({categories:t(h),integrations:t(w)})}})}),w=(0,l.cn)({key:"integrationsNormalized",default:(0,l.nZ)({key:"integrationsNormalizedState",get:function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,m.tE)(s.l,e)}((0,e.get)(h))}})}),E=(0,l.cn)({key:"integrationsSearchTerm",default:""}),C=(0,l.cn)({key:"integrationsHistoryBeforeSearch",default:null}),O=(0,l.cn)({key:"integrationsModalOpenAtom",default:"true"==(0,f.m$)().integrationsModalOpen}),x=n(67034),k=["flattenedCategory"];function S(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 Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=(0,l.nZ)({key:"integrationsQuickStart",get:function(e){var t=(0,e.get)(w).filter((function(e){return e.quickStart>=0}));return(0,m.mi)(t)}}),I=function(){return(0,l.sJ)(C)},j=function(){return(0,l.FV)(C)},D=function(){var e=N(),t=(0,x.Z)(),n=(0,l.FV)(y),o=(0,i.Z)(n,2),s=o[0],m=o[1],f=(0,l.rb)(C),g=(0,u.I0)("selectedIntegrationCategory"),v=(0,i.Z)(g,2)[1],h=(0,u.I0)("selectedIntegration"),b=(0,i.Z)(h,2)[1],w=(0,u.I0)("selectedIntegrationTab"),E=(0,i.Z)(w,2)[1],O=(0,c.useCallback)((function(e){var n=(0,d.QQ)({category:e,getCategoryById:t}).parents,r=[].concat((0,a.Z)(n),[e]).map((function(e,t){return Z(Z({},e),{},{type:"category",level:t+1})}));m(r),b(""),E(""),f()}),[e,m]),S=(0,c.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.flattenedCategory,o=(0,r.Z)(e,k),i=n||(o.categories||[])[0],c=i.categoryId||i.id,l=t(c),u=(0,d.QQ)({category:l,getCategoryById:t}).parents,s=[].concat((0,a.Z)(u),[l]).map((function(e,t){return Z(Z({},e),{},{type:"category",level:t+1})}));m([].concat((0,a.Z)(s),[Z(Z({},o),{},{type:"integration"})])),E(""),f()}),[]),P=(0,c.useCallback)((function(){s.length>0&&(m(s.slice(0,s.length-1)),f())}),[s,m]),I=(0,c.useMemo)((function(){var e=s[s.length-1];return"integration"==(null===e||void 0===e?void 0:e.type)?e:null}),[s]),j=(0,c.useMemo)((function(){var e=s.filter((function(e){return"category"==e.type}))||[];return e.length?e[e.length-1]:null}),[s]),D=(0,c.useCallback)((function(){var t=e.find((function(e){return e.id==p.DW})),n=[e.find((function(e){return e.id==t.parentId})),t].filter(Boolean).map((function(e,t){return Z(Z({},e),{},{type:"category",level:t+1})}));m(n),f()}),[e,m]),T=(0,c.useMemo)((function(){return null===j||void 0===j?void 0:j.level}),[j]);return(0,c.useEffect)((function(){null!==j&&void 0!==j&&j.id&&v(j.id)}),[j]),(0,c.useEffect)((function(){null!==I&&void 0!==I&&I.id&&b(I.id)}),[I]),{history:s,level:T,selectedCategory:j,selectedIntegration:I,pushCategory:O,pushIntegration:S,pop:P,reset:D,setHistory:m}},N=function(){return(0,l.sJ)(h)},T=function(){return(0,l.sJ)(b)},F=function(){var e=D().selectedCategory,t=N(),n=M();return(0,d.KU)({category:e,integrations:n,categories:t})},M=function(){return(0,l.sJ)(w)},_=function(){return(0,l.sJ)(P)},L=function(){return(0,l.sJ)(E)},A=function(){return(0,l.FV)(E)},B=function(){return(0,l.rb)(E)},R=function(){var e=B(),t=D().reset;return function(){e(),t()}},U=function(){return(0,l.FV)(O)}},668:function(e,t,n){n.d(t,{AB:function(){return f},DF:function(){return c},J3:function(){return i},MJ:function(){return l},SZ:function(){return m},ZL:function(){return s},Zb:function(){return u},_K:function(){return d},pV:function(){return g},u6:function(){return p}});var r=n(71893),o=n(59978),a=n(19480),i=r.default.div.withConfig({displayName:"styled__LayoutGrid",componentId:"sc-1kju9s3-0"})(["display:grid;grid-template-columns:"," auto;column-gap:32px;padding:0 24px;height:calc( 100vh - ","px - ","px );@media screen and ","{grid-template-columns:"," auto;}@media screen and ","{grid-template-columns:"," auto;}"],(function(e){return e.isSidebarCollapsed?"".concat(60,"px"):"35%"}),(function(e){return(0,a.CF)(e.flavour)}),(function(e){return(0,a.CY)(e.flavour)}),o.breakpoints.laptop,(function(e){return e.isSidebarCollapsed?"".concat(60,"px"):"30%"}),o.breakpoints.desktop,(function(e){return e.isSidebarCollapsed?"".concat(60,"px"):"25%"})),c=r.default.div.withConfig({displayName:"styled__StyledVirtualRow",componentId:"sc-1kju9s3-1"})(["display:grid;grid-template-columns:repeat(",",1fr);grid-auto-rows:","px;column-gap:16px;row-gap:16px;"],(function(e){return e.itemsPerRow}),(function(e){var t=e.rowHeight;return t>16?t-16:t})),l=(0,r.default)(o.Flex).withConfig({displayName:"styled__CategoryWrapper",componentId:"sc-1kju9s3-2"})(["cursor:pointer;&:hover{background-color:",";}"],(0,o.getColor)("integrationMenuItemHover")),u=(0,r.default)(o.Flex).withConfig({displayName:"styled__Card",componentId:"sc-1kju9s3-3"})(["background:",";img{transition:all 200ms ease-in-out;}&:hover{img{transform:scale(1.2);}}"],(0,o.getColor)("panelBg")),s=r.default.div.withConfig({displayName:"styled__CardOverlay",componentId:"sc-1kju9s3-4"})(["position:absolute;width:100%;top:0;bottom:0;filter:blur(70px);opacity:0.2;&& img{width:100%;height:100%;}"]),d=(0,r.default)(o.Icon).withConfig({displayName:"styled__CardIcon",componentId:"sc-1kju9s3-5"})(["position:absolute;top:-20px;left:-35px;transform:rotate(40deg);opacity:0.1;"]),m=(0,r.default)(o.Flex).withConfig({displayName:"styled__CardDescription",componentId:"sc-1kju9s3-6"})(["position:absolute;bottom:0;left:0;transform:translateY(100%);transition:all 200ms ease-in-out;&&.hover{transform:translateY(0);}"]),f=r.default.table.withConfig({displayName:"styled__ContentTable",componentId:"sc-1kju9s3-7"})(["width:100%;border:1px solid ",";margin-top:16px;tr:nth-child(even){background:",";}th{padding:8px 16px;background:",";}td{padding:6px;}"],(0,o.getColor)("borderSecondary"),(0,o.getColor)("mainBackground"),(0,o.getColor)("mainBackground")),p=(0,r.default)(o.PortalSidebar).withConfig({displayName:"styled__SidebarModal",componentId:"sc-1kju9s3-8"})(["width:calc(100vw - 54px);z-index:35;background:",";overflow:",";"],(0,o.getColor)("mainBackground"),(function(e){var t=e.overflow;return void 0===t?"hidden":t})),g=(0,r.default)(o.Icon).withConfig({displayName:"styled__CategoryArrow",componentId:"sc-1kju9s3-9"})(["opacity:",";"],(function(e){return e.disabled?"0":"1"}))},86348:function(e,t,n){n.d(t,{GP:function(){return x},KT:function(){return b},KU:function(){return w},Ov:function(){return v},QQ:function(){return C},XB:function(){return k},bu:function(){return g},gP:function(){return h},tu:function(){return E}});n(47941),n(82526),n(38880),n(49337),n(33321),n(69070);var r=n(29439),o=n(93433),a=n(4942),i=n(45987),c=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(15581),n(34514),n(54747),n(2707),n(57327),n(88449),n(59849),n(21249),n(57640),n(9924),n(26699),n(32023),n(69826),n(31672),n(59461),n(47042),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(91038),n(69720),n(50308)),l=n.n(c),u=n(41898),s=n(64637),d=n(19480),m=["children","most_popular"];function f(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function e(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(n,r){n.push(function(e){e.children;var t=e.most_popular,n=(0,i.Z)(e,m),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return p(p({},n),{},{name:(0,s.fm)(n.name),mostPopular:t,parentId:r})}(r,t));var a=r.children||[];return n=[].concat((0,o.Z)(n),(0,o.Z)(e(a,r.id)))}),[])},v=function(){var e=[],t=[];(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){void 0!==n.priority&&n.priority>=0?e.push(n):t.push(n)}));var n=[],r=[];t.forEach((function(e){e.mostPopular?n.push(e):r.push(e)}));var a=(0,d.BO)("priority"),i=(0,d.Of)("name"),c=[].concat((0,o.Z)(e.sort(a)),(0,o.Z)(n.sort(i)));return{categories:[].concat((0,o.Z)(c),(0,o.Z)(r.sort(i))),popular:c,rest:r}},h=function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[])||[]).filter((function(e){return null==e.parentId}))},b=function(e){var t=e.category;return e.categories.filter((function(e){var n=e.parentId;return t.id==n}))},y=function e(t){var n=t.category,r=t.categories,o=t.allSubcategories,a=void 0===o?[]:o;return(b({category:n,categories:r})||[]).forEach((function(t){a.push(t),e({category:t,categories:r,allSubcategories:a})})),a},w=function(e){var t=e.category,n=void 0===t?{}:t,r=e.integrations,a=void 0===r?[]:r,i=e.categories;if(null==n)return[];var c=y({category:n,categories:void 0===i?[]:i}),l=[n.id].concat((0,o.Z)(c.map((function(e){return e.id}))));return a.filter((function(e){for(var t=e.categories.map((function(e){return e.categoryId})),n=0;n<t.length;n++)if(l.includes(t[n]))return!0;return!1}))},E=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=n.find((function(e){return e.id==t}));return r?null===r.parentId?u.JZ[r.id]:e(r.parentId,n):null},C=function(e){var t=e.category,n=e.getCategoryById,r=void 0===n?l():n,o=function(e){return((null===e||void 0===e?void 0:e.id)||"").split(".").reduce((function(e,t){return e.length?e.push([e[e.length-1],t].join(".")):e.push(t),e}),[])}(t).map((function(e){return r(e)}));return{tree:o,parents:o.length>1?o.slice(0,o.length-1):[],topLevelCategory:o[0]}},O=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l(),o=arguments.length>3?arguments[3]:void 0;if(t){var a=r(t);if(a){n(a);var i=o.find((function(e){return e.id==(null===a||void 0===a?void 0:a.parentId)}));i&&e(i.id,n,r,o)}}},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=new Set,o=function(e){return r.add(e.id)};return e.forEach((function(e){e.categories.forEach((function(e){var r=e.categoryId;O(r,o,t,n)}))})),Array.from(r)},k=function(e){var t=e.height,n=e.topLevelCategories,o=void 0===n?[]:n,a=e.categories,i=void 0===a?[]:a,c=e.setState,s=void 0===c?l():c,d={};if(!t||!o.length||!i.length)return d;var m=Math.floor((t/o.length-u.vE)/u.vE);o.forEach((function(e){var t=b({category:e,categories:i});d[e.id]={subcategories:t.length,limit:t.length>m?m:0}})),Object.entries(d).forEach((function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1],a=o.subcategories,i=o.limit;n!=u.Kl&&i<m&&(d[u.Kl]=p(p({},d[u.Kl]),{},{limit:d[u.Kl].limit+(m-a)}))})),s(d)}},19480:function(e,t,n){n.d(t,{$O:function(){return l},BO:function(){return a},CF:function(){return i},CY:function(){return c},Of:function(){return o}});n(21249),n(57640),n(9924);var r=n(41898),o=function(e){return function(t,n){return t[e]<n[e]?-1:t[e]>n[e]?1:0}},a=function(e){return function(t,n){return t[e]-n[e]}},i=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.p1;return(null===(e=r.xN[t])||void 0===e||null===(e=e.header)||void 0===e?void 0:e.height)||0},c=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.p1;return(null===(e=r.xN[t])||void 0===e||null===(e=e.cncf)||void 0===e?void 0:e.height)||0},l=function e(t){var n;return"string"===typeof t?t:Array.isArray(t)?t.map(e).join(""):null!==t&&void 0!==t&&null!==(n=t.props)&&void 0!==n&&n.children?e(t.props.children):""}},85373:function(e,t,n){n.d(t,{QJ:function(){return b},_x:function(){return h},cW:function(){return v},mi:function(){return g},tE:function(){return p}});var r=n(93433),o=n(4942),a=n(45987),i=(n(21249),n(57640),n(9924),n(69826),n(41539),n(31672),n(2490),n(59461),n(15581),n(34514),n(54747),n(92222),n(2707),n(57327),n(88449),n(59849),n(26699),n(32023),n(85827),n(25387),n(72608),n(47941),n(82526),n(38880),n(49337),n(33321),n(69070),n(50308)),c=n.n(i),l=n(66152),u=n(19480),s=["meta"];function d(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?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[e.installDescription,"{% command methods=$methods isNightly=$isNightly claimToken=$claimToken claimUrl=$claimUrl claimRooms=$claimRooms /%}",e.additionalInfo,e.platformInfo].join("\n\n")},p=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.meta,n=void 0===t?{}:t,r=(0,a.Z)(e,s),o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=n.monitored_instance,c=n.keywords,u=void 0===c?[]:c,d=n.most_popular,p=n.community,g=i||n,v=g.name,h=g.categories,b=void 0===h?[]:h,y=g.icon_filename,w="deploy"==r.integration_type;return(0,l.k5)(m(m({name:v,categories:b.map((function(e){var t=o.find((function(t){return t.id==e}));return{categoryId:e,name:null===t||void 0===t?void 0:t.name}})),icon:"https://www.netdata.cloud/img/"+y,keywords:u,mostPopular:d,community:p},r),w?{deployContent:f({installDescription:r.install_description,methods:r.methods,additionalInfo:r.additional_info,platformInfo:r.platform_info})}:{}))}(t,e)}))},g=function(){var e=[],t=[];(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){void 0!==n.quickStart&&n.quickStart>=0?e.push(n):t.push(n)}));var n=[],o=[];t.forEach((function(e){e.mostPopular?n.push(e):o.push(e)}));var a=[],i=[];o.forEach((function(e){e.community?i.push(e):a.push(e)}));var c=(0,u.BO)("quickStart"),l=(0,u.Of)("name");return[].concat((0,r.Z)(e.sort(c)),(0,r.Z)(n.sort(l)),(0,r.Z)(a.sort(l)),(0,r.Z)(i.sort(l)))},v=function(e){var t=e.searchTerm,n=void 0===t?"":t,o=e.integrations,a=void 0===o?[]:o;if(!n)return a;var i=n.toLocaleLowerCase();return a.filter((function(e){var t=e.name,n=e.keywords,o=e.categories,a=void 0===o?[]:o;if(t.toLocaleLowerCase().includes(i))return!0;var c=a.map((function(e){return e.name})).filter(Boolean);return[].concat((0,r.Z)(n),(0,r.Z)(c)).join(",").toLocaleLowerCase().includes(i)}))},h=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){t.find((function(t){return t[e]==n[e]}))||t.push(n)})),t},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c();return e.reduce((function(e,n){return n.categories.forEach((function(r){e.push(function(e,t,n){return m(m({},e),{},{flattenedKey:"".concat(e.id,"-").concat(t.categoryId),flattenedCategory:n(t.categoryId)})}(n,r,t))})),e}),[])}},6585:function(e,t,n){n.d(t,{IC:function(){return g},Sq:function(){return f},cA:function(){return h},l9:function(){return p}});var r=n(87462),o=n(15861),a=n(64687),i=n.n(a),c=(n(92222),n(67294)),l=n(59978),u=n(55899),s="delete-node-dialog",d="deleteNodeDialog",m=function(e){var t=1===e;return"Delete ".concat(e," ").concat(t?"node":"nodes")},f=function(e){return"Delete ".concat(e," node")},p=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?f(t):m(n):""},g=function(e){var t=e.name;return c.createElement(c.Fragment,null,"You are about to delete offline node ",c.createElement("strong",null,t),".",c.createElement("br",null),"Node will be removed from all rooms and will no longer be accessible. Plus all metadata will be removed.",c.createElement("br",null),"Are you sure you want to continue?")},v=function(e){var t=e.nodesLength,n=1===t;return c.createElement(c.Fragment,null,"You are about to delete ",n?"this":"these"," ",c.createElement("strong",null,t," offline ",n?"node":"nodes"),".",c.createElement("br",null),n?"Node":"Nodes"," will be removed from all rooms and will no longer be accessible. Plus all metadata will be removed.",c.createElement("br",null),"Are you sure you want to continue?")},h=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?c.createElement(g,{name:t}):c.createElement(v,{nodesLength:n}):""};t.ZP=function(e){var t=e.ids,n=void 0===t?[]:t,a=e.name,p=e.onClose,h=(0,u.Z)(),b=function(){var e=(0,o.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h(n);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=a?{"data-ga":"".concat(s,"-with-name"),"data-testid":"".concat(d,"WithName"),message:c.createElement(g,{name:a}),title:f(a)}:{"data-ga":"".concat(s,"Bulk"),"data-testid":"".concat(d,"Bulk"),message:c.createElement(v,{nodesLength:n.length}),title:m(n.length)};return c.createElement(l.ConfirmationDialog,(0,r.Z)({confirmLabel:"Yes, delete",handleConfirm:b,handleDecline:p},y))}},97279:function(e,t,n){n.d(t,{Br:function(){return f},O3:function(){return v},ar:function(){return b},d1:function(){return g}});var r=n(87462),o=n(15861),a=n(64687),i=n.n(a),c=(n(92222),n(67294)),l=n(59978),u=n(27624),s=n(37518),d="remove-node-dialog",m="removeNodeDialog",f=function(e){return"Remove ".concat(e," node")},p=function(e){var t=1===e;return"Remove ".concat(e," ").concat(t?"node":"nodes")},g=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?f(t):p(n):""},v=function(e){var t=e.name,n=e.roomName;return c.createElement(c.Fragment,null,"You are about to remove ",c.createElement("strong",null,t)," from room ",c.createElement("strong",null,n),".",c.createElement("br",null),"Are you sure you want to continue?")},h=function(e){var t=e.nodesLength,n=e.roomName,r=1===t;return c.createElement(c.Fragment,null,"You are about to remove"," ",c.createElement("strong",null,t," ",r?"node":"nodes")," ","from room ",c.createElement("strong",null,n),".",c.createElement("br",null),"Are you sure you want to continue?")},b=function(e){var t=e.name,n=e.nodesLength,r=e.roomName;return n?1===n&&t?c.createElement(v,{name:t,roomName:r}):c.createElement(h,{nodesLength:n,roomName:r}):""};t.ZP=function(e){var t=e.ids,n=void 0===t?[]:t,a=e.name,g=e.onClose,b=(0,u.Z)(),y=n.length,w=(0,s.Hm)("name"),E=function(){var e=(0,o.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b(n);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=a?{"data-ga":"".concat(d,"WithName"),"data-testid":"".concat(m,"WithName"),message:c.createElement(v,{name:a,roomName:w}),title:f(a)}:{"data-ga":"".concat(d,"Bulk"),"data-testid":"".concat(m,"Bulk"),message:c.createElement(h,{nodesLength:y,roomName:w}),title:p(y)};return c.createElement(l.ConfirmationDialog,(0,r.Z)({handleConfirm:E,handleDecline:g},C))}},18129:function(e,t,n){n.d(t,{Z:function(){return q}});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(4942),o=n(67294),a=n(59978),i=n(96929),c=n(89149),l=n(33335),u=n(29439),s=(n(26699),n(32023),n(21249),n(57640),n(9924),n(89250)),d=n(37518),m=n(97945),f=n(46322),p=(n(64211),n(41874),n(11389)),g=(n(92222),n(62200)),v=n(64637),h=n(22965),b=function(e){var t=e.icon,n=e.status,r=e.handleNavigateToDocs,i=e.message;return o.createElement(a.Flex,{column:!0,width:{max:"200px"},gap:2},o.createElement(a.Flex,{alignItems:"center",gap:2},o.createElement(a.Icon,{name:t,color:"bright",size:"small"}),o.createElement(a.TextMicro,{color:"white"},(0,v.fm)(n))),o.createElement(a.Flex,{column:!0,gap:2},o.createElement(a.TextMicro,{color:"white"},i),r&&o.createElement(a.TextMicro,{"data-testid":"text-agent-outdated-critical",color:"white"},o.createElement(a.Box,{"data-testid":"open-add-node",onClick:r,as:a.TextMicro,cursor:"pointer",textDecoration:"underline",color:"white"}," ","Check here"," "),"for troubleshooting")))},y=function(e){var t=e.state,n=e.name,r=(0,h.Lt)(t),i=g.R7[r.toLocaleLowerCase()],c=i.icon,l=i.text,u=i.textColor,s=i.indicatorWrapperColor,d=i.tooltip,m=(0,o.useCallback)((function(){window.open("https://learn.netdata.cloud/guides/troubleshoot/troubleshooting-agent-with-cloud-connection","_blank","noopener,noreferrer")}),[]),f="".concat(n," ").concat(d);return o.createElement(a.Tooltip,{allowHoverOnTooltip:!0,content:o.createElement(b,{message:f,icon:c,status:l,handleNavigateToDocs:"Pending"===r?m:void 0})},o.createElement(a.Flex,{margin:[0,"auto",0,"auto"],height:"20px",padding:[.5,0],border:{side:"all",color:s},background:"nodeBadgeBackground",justifyContent:"center",width:30,round:4,gap:2,alignItems:"center"},o.createElement(a.Icon,{name:c,size:"small",color:u}),o.createElement(a.TextMicro,{strong:!0,color:u},l)))},w=n(86711),E=n(83925);function C(e,t){return e===t?0:e>t?1:-1}var O=[{id:"agent",accessorKey:"name",enableColumnFilter:!1,filterFn:function(e,t,n){var r,o=(null===(r=e.original)||void 0===r?void 0:r.name)||"";return null===o||void 0===o?void 0:o.toLowerCase().includes(n)},header:"Name",cell:function(e){var t=e.getValue;return o.createElement(a.TextSmall,null,t())}},{id:"version",accessorKey:"version",header:"Version",cell:function(e){var t=e.getValue,n=e.row;return o.createElement(a.Flex,{gap:1,flexWrap:!0},o.createElement(a.Pill,{color:"neutralPillColor",hollow:!0,margin:[1,0]},t()),n.original.updateSeverity&&o.createElement(E.Z,{name:n.original.name,os:n.original.os.id,container:n.original.hw.container,warningLevel:"critical"===n.original.updateSeverity?"critical":"warning",labels:n.original.labels,version:t(),margin:[1,0]}))}},{id:"state",accessorKey:"state",header:"Status",cell:function(e){var t=e.getValue;return o.createElement(p.Z,{state:t()})},sortingFn:function(e,t){return C((0,h.Q5)(e.original.state),(0,h.Q5)(t.original.state))},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original.state;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||t===(0,h.Q5)(r)}))},meta:{filter:{component:"select",isMulti:!0,options:[{value:"Offline",label:"Offline"},{value:"Live",label:"Live"},{value:"Stale",label:"Stale"},{value:"Unseen",label:"Unseen"}]},tooltip:o.createElement(w.Z,null)}},{id:"connectionToCloud",accessorKey:"state",header:"Connection To Cloud",cell:function(e){var t=e.getValue,n=e.row.original;return o.createElement(y,{state:t(),name:n.name})},sortingFn:function(e,t){return C((0,h.Lt)(e.original.state),(0,h.Lt)(t.original.state))},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original.state;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||("created"===r&&"created"===t||("created"!==r&&"completed"===t||void 0))}))},meta:{filter:{component:"select",isMulti:!0,options:[{value:"created",label:"Pending"},{value:"completed",label:"Completed"}]}}},{id:"updateSeverity",accessorKey:"updateSeverity",header:"Severity",cell:function(e){var t=e.getValue,n=e.row.original;return o.createElement(E.Z,{name:n.name,os:n.os.id,container:n.hw.container,warningLevel:n.updateSeverity,labels:n.labels||{},version:n.version,text:t()})}}],x=n(46667),k=n(15861),S=n(64687),Z=n.n(S),P=n(6585),I=n(97279),j=n(55899),D=n(27624);function N(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}var T=function(e){return Array.isArray(e)?e.filter((function(e){return!e.hasAccessibleData})):e.hasAccessibleData?[]:[{id:e.id}]},F=function(e){return Array.isArray(e)?e:[{id:e.id}]},M=function(e){var t=e.openClaimNodeModal,n=e.roomUntouchable,a=e.isSpace,i=(0,j.Z)(),c=(0,D.Z)(),u=(0,d.Hm)("name"),s=(0,l.gI)("node:Delete"),m=(0,l.gI)("room:RemoveNode"),f=(0,l.gI)("node:Create"),p=(0,l.gI)("room:AddNode"),g=function(){var e=(0,k.Z)(Z().mark((function e(t,n){var r,o;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return r=T(t),o=r.map((function(e){return e.id})),e.next=6,i(o,{onSuccess:n.resetRowSelection});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),v=function(){var e=(0,k.Z)(Z().mark((function e(t,n){var r,o;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return r=F(t),o=r.map((function(e){return e.id})),e.next=6,c(o,{onSuccess:n.resetRowSelection});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),h=(0,o.useMemo)((function(){return{delete:{confirmLabel:"Yes, delete",confirmationMessage:function(e){return o.createElement(P.IC,{name:e.name})},confirmationTitle:function(e){return(0,P.Sq)(e.name)},declineLabel:"Cancel",disabledTooltipText:s?"Delete is disabled":"Only admins can delete",handleAction:g,isVisible:!!a,isDisabled:function(e){return e.disabled||!s},tooltipText:"Delete node from space"},remove:{confirmLabel:"Yes, remove",confirmationMessage:function(e){return o.createElement(I.O3,{name:e.name,roomName:u})},confirmationTitle:function(e){return(0,I.Br)(e.name)},declineLabel:"Cancel",handleAction:v,tooltipText:"Remove node from room",isVisible:!a,isDisabled:function(e){return e.disabled||n||!m},disabledTooltipText:n?"Remove is disabled":"Only admins can remove"}}}),[P.IC,P.Sq,I.Br,g,v,I.O3,n,a,s,m]),b=(0,o.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({addEntry:{disabledTooltipText:a?"Only admins can connect new nodes":"Only admins can add nodes to the room",handleAction:t,isDisabled:a?!f:!(f||p&&!n),tooltipText:a?"Connect new nodes to space":"Add nodes to room"}},a?{delete:{confirmLabel:"Yes, delete",confirmationMessage:function(e,t){return o.createElement(P.cA,{name:t[0].name,nodesLength:t.length})},confirmationTitle:function(e,t){return(0,P.l9)({name:t[0].name,nodesLength:t.length})},disabledTooltipText:s?"Delete is disabled":"Only admins can delete",declineLabel:"Cancel",handleAction:g,isDisabled:!s,tooltipText:"Delete nodes from space"}}:{remove:{confirmLabel:"Yes, remove",confirmationMessage:function(e,t){return o.createElement(I.ar,{name:t[0].name,nodesLength:t.length,roomName:u})},confirmationTitle:function(e,t){return(0,I.d1)({name:t[0].name,nodesLength:t.length})},declineLabel:"Cancel",disabledTooltipText:n?"Remove is disabled":"Only admins can remove",handleAction:v,isDisabled:n||!m,tooltipText:"Remove nodes from room"}})}),[P.cA,P.l9,I.d1,g,v,f,s,m,I.ar,n,a]);return{rowActions:h,bulkActions:b,hasPermissionToDelete:s,hasPermissionToRemove:m}};function _(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 L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A={name:!1,updateSeverity:!1,connectionToCloud:!1},B=[{id:"state",desc:!1}],R=function(e){var t=e.roomUntouchable,n=e.customNodes,r=e.alwaysEnableNodeSelection,a=e.isSpace,c=(0,s.UO)().roomSlug,l=(0,d.UL)(c),p=(0,i.X7)(l,"ids"),g=(0,m.Ne)(p),v=(0,o.useMemo)((function(){return(0,f.C)(n||g)}),[n,p]),b=(0,o.useState)(""),y=(0,u.Z)(b,2)[1],w=(0,x.Z)(),E=(0,u.Z)(w,4),C=E[0],k=E[2],S=E[3],Z=M({openClaimNodeModal:k,roomUntouchable:t,isSpace:a}),P=Z.rowActions,I=Z.bulkActions,j=Z.hasPermissionToDelete,D=Z.hasPermissionToRemove,N=(0,o.useCallback)((function(e,t,n){var r=n.toLowerCase(),o=e.getValue("agent").toLowerCase(),a=(0,h.Q5)(e.getValue("state")).toLocaleLowerCase(),i=(0,h.Lt)(e.getValue("connectionToCloud")).toLocaleLowerCase(),c=(e.getValue("updateSeverity")||"").toLocaleLowerCase(),l=e.getValue("version").toLowerCase();return o.includes(r)||a.includes(r)||l.includes(r)||i.includes(r)||c.includes(r)}),[]);return{nodes:v.map((function(e){return L(L({},e),{},{disabled:a?!j||!r&&e.hasAccessibleData:!D})}))||[],nodeIds:p,columns:O,rowActions:P,bulkActions:I,isClaimNodeModalOpen:C,sortBy:B,columnVisibility:A,setGlobalFilter:y,openClaimNodeModal:k,closeClaimNodeModal:S,globalFilterFn:N}},U=n(90025),z=n(74059),V=n(33582),H=n(16645),W=n(7693),G=n(8741),K=function(e){var t=e.onClose,n=(0,z.th)(),r=(0,d.UL)(),i=(0,o.useState)((function(){return r?[r]:[]})),c=(0,u.Z)(i,2),l=c[0],s=c[1];return(0,V.Z)(n),o.createElement(H.u6,{onClose:t,"data-testid":"addNodes",right:!0,closeOnEsc:!0,closeOnOverlayClick:!0},o.createElement(W.x,{"data-testid":"addNodes-header",title:"Add Nodes",onClose:t}),o.createElement(H.TZ,{hasModalTitle:!1},o.createElement(a.Flex,{column:!0,"data-testid":"manageClaimedNodes-controls",gap:3},o.createElement(U.Z,{placeholder:"Select Rooms",selectedValue:l,onChange:s}),o.createElement(G.Z,{rooms:l}))))};function Y(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 J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var q=function(e){var t=e.roomUntouchable,n=e.showClaimNodeOnEmptySpace,r=void 0!==n&&n,u=e.customNodes,s=void 0===u?[]:u,d=e.customBulkActions,m=e.customRowActions,f=e.enableSelection,p=void 0===f||f,g=e.showdDefaultRowActions,v=void 0===g||g,h=e.showDefaultBulkActions,b=void 0===h||h,y=e.onRowSelected,w=e.onClickRow,E=e.disableClickRow,C=e.columnVisibility,O=e.customSortBy,x=e.showClaimModalWithRoomSelection,k=void 0!==x&&x,S=e.alwaysEnableNodeSelection,Z=void 0!==S&&S,P=e.isSpace,I=R({roomUntouchable:t,customNodes:s,alwaysEnableNodeSelection:Z,isSpace:P,showClaimModalWithRoomSelection:k}),j=I.nodes,D=I.columns,N=I.rowActions,T=I.bulkActions,F=I.sortBy,M=I.isClaimNodeModalOpen,_=I.openClaimNodeModal,L=I.closeClaimNodeModal,A=I.columnVisibility,B=I.setGlobalFilter,U=I.globalFilterFn,z=(0,l.gI)("node:Create"),V=(0,i.fD)();(0,o.useEffect)((function(){V&&r&&z&&0===j.length&&_()}),[V]);var H=(0,o.useMemo)((function(){return J(J({},A),C)}),[A,C]);return o.createElement(o.Fragment,null,o.createElement(a.Table,{onRowSelected:y,globalFilterFn:U,columnVisibility:H,enableSelection:p,enableSorting:!0,dataColumns:D,data:j,rowActions:v&&N||m,bulkActions:b&&T||d,sortBy:O||F,onSearch:B,testPrefixCallback:function(e){return e.hostname||e.name},onClickRow:w,disableClickRow:E}),M&&!k&&o.createElement(c.Z,{onClose:L,isSubmodal:!0}),M&&k&&o.createElement(K,{onClose:L}))}},22965:function(e,t,n){n.d(t,{Br:function(){return T},Dy:function(){return y},Lt:function(){return b},MC:function(){return C},O2:function(){return w},Q5:function(){return h},cB:function(){return E},hC:function(){return f},jG:function(){return F},jo:function(){return N},kR:function(){return g},yK:function(){return Z},yo:function(){return S},ys:function(){return x}});n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(15861),o=n(4942),a=n(64687),i=n.n(a),c=(n(92222),n(69826),n(41539),n(31672),n(2490),n(59461),n(47941),n(57327),n(88449),n(59849),n(26699),n(32023),n(21249),n(57640),n(9924),n(67294)),l=n(41379),u=n(71172);function s(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m="N/A",f=function(e){var t,n,r=e.isLive,o=e.health,a=void 0===o?{}:o;return r?null!==(t=a.alerts)&&void 0!==t&&t.critical?"critical":null!==(n=a.alerts)&&void 0!==n&&n.warning?"warning":"clear":"unreachable"},p=function(e){return e>9?"9+":"".concat(e)},g=function(e){var t=e.count,n=e.dataTestId,r=e.isLive,o=e.onAlertClick,a=e.type,i=n?"".concat(n,"-alertIndicator"):"alertIndicator",c={"data-testid":"".concat(i,"-").concat(a)};return r?d(d(d(d({},c),t&&{flavour:"critical"===a?"error":"warning"}),t&&o&&{onClick:function(){return o(a)}}),{},{text:p(t)}):c},v={created:"Unseen",reachable:"Live",stale:"Stale",unreachable:"Offline"},h=function(e){return v[e]||v.stale},b=function(e){return"created"===e?"Pending":"Completed"},y=function(e){return e?{background:"successSemi",border:"success",color:"success",label:"ON",status:"ON"}:{background:"warningSemi",border:"warning",color:"warning",label:"OFF",status:"OFF"}},w=function(e){return!e||"unknown"===e},E=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" \u2022 ";return w(e)?m:"".concat(e).concat(n).concat(t)},C=function(e,t){return w(e)?m:t?"".concat(e," ").concat(t):e},O={HZ:1,KHz:1e3,MHz:1e6,GHz:1e9,THz:1e12,PHz:1e15,EHz:1e18},x=function(e){if(w(e))return m;var t=Object.keys(O).find((function(t){return 1e3>e/O[t]}));return"".concat((e/=O[t]).toFixed(2)," ").concat(t||"")},k={B:1,KiB:1024,MiB:1048576,GiB:1073741824,TiB:1099511627776,PiB:0x4000000000000,EiB:0x1000000000000000},S=function(e){if(w(e))return m;var t=Object.keys(k).find((function(t){return 1024>e/k[t]}));return"".concat((e/=k[t]).toFixed(2)," ").concat(t||"")},Z=function(e,t,n,r,o){var a={Live:c.createElement(c.Fragment,null,"is currently connected"),Offline:c.createElement(c.Fragment,null,"is currently not connected"),Stale:c.createElement(c.Fragment,null,"is currently not connected and has only historical data")},i={actionObsolete:c.createElement(c.Fragment,null,"Delete Node"),actionRemove:c.createElement(c.Fragment,null,"Remove Node from room"),alerts:c.createElement(c.Fragment,null,"The current Critical and Warning alerts for ",r),cloudInfo:c.createElement(c.Fragment,null,r," cloud information:",c.createElement("br",null),"Cloud Provider \u2022 Instance Type"),connectivity:t in a?c.createElement(c.Fragment,null,r," ",a[t]):null,info:c.createElement(c.Fragment,null,"View node information"),k8s:c.createElement(c.Fragment,null,r," runs on Kubernetes cluster"),kernel:c.createElement(c.Fragment,null,"Kernel information of ",r),ml:c.createElement(c.Fragment,null,"Machine Learning status of ",r," is: ",n),fn:c.createElement(c.Fragment,null,"Functions capability of ",r," is: ",n),functions:c.createElement(c.Fragment,null,r," functions"),systemInfo:c.createElement(c.Fragment,null,r," hardware information:",c.createElement("br",null),"O/S \u2022 CPU Frequency \u2022 CPU Cores \u2022 Architecture \u2022 Memory \u2022 Hard Disk Space"),type:c.createElement(c.Fragment,null,"The type of ",r," is: ",o)};return e in i?i[e]:""},P={none:!0,null:!0,unknown:!0},I=function(e){return!!e&&!P[e]},j={container:"container","container-other":"container",other:"container"},D={"$(systemd-detect-virt -v)":"vm","$(systemd-detect-virt -v) docker-compose up":"vm","${VIRTUALIZATION}":"vm","(systemd-detect-virt -v)":"vm","detect-virt -v":"vm",lxc:"vm","none #vmware":"vmware",other:"vm","systemd-detect-virt -v":"vm",unknown:"vm","vm-other":"vm","VMware Virtual Platform":"vmware"},N=function(e,t){return I(e)?{icon:"container",iconSize:"18px",label:j[e]||e}:I(t)?{icon:"cluster",iconSize:"18px",label:D[t]||t}:{icon:"ram",iconSize:"14px",label:"Bare Metal"}},T=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.cacheKeyPrefix,r=t.nodeIds,o=t.roomId,a=t.spaceId,c=function(e){return e.results.filter((function(e){return!r.includes(e.id)}))},s="".concat(n).concat((0,l.A)({id:o,spaceId:a})),e.next=5,(0,u.c)({key:s,handleResults:c});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=(0,r.Z)(i().mark((function e(t){var n,o,a,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.cacheKeyPrefix,o=t.nodeIds,a=t.roomIds,c=t.spaceId,s=function(e){return e.results.filter((function(e){return!o.includes(e.id)}))},a.map(function(){var e=(0,r.Z)(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(n).concat((0,l.A)({id:t,spaceId:c})),e.next=3,(0,u.c)({key:r,handleResults:s});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},77184:function(e,t,n){n.d(t,{$3:function(){return h},G1:function(){return y},IU:function(){return g},JV:function(){return p},Y0:function(){return f},eZ:function(){return w},h3:function(){return m}});var r=n(4942),o=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(21249),n(57640),n(9924),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),a=n(64637),i=n(66152),c=n(3689),l=n(31790);function u(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t=e.integrations;return t.reduce((function(e,t){var n,r=(0,i.k5)(t),o=r.available?"available":"unavailable";return r.kindLabel=(0,a.fm)(r.kind,!0),r.docsLink=null===(n=t.schema)||void 0===n?void 0:n.annotations.docsUrl,r.internal||(r.fields=(0,l.sY)(r.schema),r.required=r.schema.required),e[o].push(r),e}),{available:[],unavailable:[],original:t})},m=function(e){return o.Z.get("/api/v2/spaces/".concat(e,"/integrations"),{transform:d})},f=function(e,t){return o.Z.post("/api/v2/spaces/".concat(e,"/channel"),t)},p=function(e,t){return o.Z.delete("/api/v2/spaces/".concat(e,"/channel/").concat(t))},g=function(e,t,n){return o.Z.put("/api/v2/spaces/".concat(e,"/channel/").concat(t),n)},v=function(e){var t,n=(0,i.k5)(e);return n.docsLink=null===(t=n.schema)||void 0===t?void 0:t.annotations.docsUrl,n.internal||(n.fields=(0,l.sY)(n.schema),n.required=n.schema.required),n},h=function(e,t){return o.Z.get("/api/v2/spaces/".concat(e,"/channel/").concat(t),{transform:v})},b=function(e){return{channels:e.map((function(e){return s(s({},(0,i.k5)(e)),{},{notificationLabel:c.uK[e.alarms].label,kindLabel:(0,a.fm)(e.kind,!0)})})),original:e}},y=function(e){return o.Z.get("/api/v2/spaces/".concat(e,"/channel"),{transform:b})},w=function(e,t,n){return o.Z.patch("/api/v2/spaces/".concat(e,"/channel/").concat(t),{enabled:n})}},45939:function(e,t,n){n.d(t,{C:function(){return c}});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(4942),o=n(4480);function a(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={additionalProperties:!1,alerts:"ALARMS_SETTING_ALL",description:"",enabled:!0,error:"",fields:[],icon:"",internal:!0,id:"",integration:"",integrationId:"",kind:"",loading:!0,loaded:!1,name:"",rooms:null,roomSelections:[n(3689).k_],secrets:{}},l=(0,o.xu)({key:"spaceChannel",default:function(e){return function(e){return i(i({},c),{},{id:e})}(e)}});t.Z=l},15635:function(e,t,n){n.d(t,{g:function(){return c}});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(4942),o=n(4480);function a(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={currentChannelId:"",channels:[],error:"",id:null,loading:!0,loaded:!1,original:[]},l=(0,o.xu)({key:"spaceChannels",default:function(e){return function(e){return i(i({},c),{},{id:e})}(e)}});t.Z=l},3689:function(e,t,n){n.d(t,{Nq:function(){return d},Ue:function(){return l},XH:function(){return b},XK:function(){return s},YM:function(){return p},aU:function(){return u},k_:function(){return i},mN:function(){return m},q7:function(){return v},rc:function(){return c},uK:function(){return f},yV:function(){return h},zK:function(){return g}});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(4942);function o(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var i={label:"All rooms",value:""},c={plan:"Your plan does not support this configuration.",role:"You do not have permission to change Global Notification configurations."},l="You do not have permission to add configurations. Contact a space administrator to add this configuration.",u={Discord:{name:"integrationDiscordColored"},Webhook:{name:"integrationWebhookColored"},Email:{name:"integrationEmailColored"},MobilePush:{color:"successLite",name:"mobilePushNotifications"},PagerDuty:{name:"integrationPagerdutyColored"},Slack:{name:"integrationSlackColored"},Opsgenie:{name:"integrationOpsgenieColored"},Mattermost:{name:"integrationMattermostColored"},RocketChat:{name:"integrationRocketChatColored"},MobileApp:{name:"integrationMobileAppColored"}},s={PERSONAL:{icon:"userPress",tooltip:"Notification methods whose destination will be a user-specific attribute, e.g. user's e-mail."},SYSTEM:{icon:"systemOverviewPress",tooltip:"Notification methods that the destination will be a target that usually isn't specific to a single user, e.g. Slack channel."}},d={ALARMS_SETTING_ALL:{value:"ALARMS_SETTING_ALL",label:"All Alerts and unreachable"},ALARMS_SETTING_ALL_BUT_UNREACHABLE:{value:"ALARMS_SETTING_ALL_BUT_UNREACHABLE",label:"All Alerts"},ALARMS_SETTING_CRITICAL:{value:"ALARMS_SETTING_CRITICAL",label:"Critical only"},ALARMS_SETTING_UNREACHABLE:{value:"ALARMS_SETTING_UNREACHABLE",label:"Unreachable only"}},m={label:"User defined",value:"USER_DEFINED"},f=a(a({},d),{},{USER_DEFINED:m}),p=a(a({},d),{},{ALARMS_SETTING_NONE:{value:"ALARMS_SETTING_NONE",label:"No notifications"}}),g={"^.*$":"input"},v={string:"input"},h=/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)/g,b="607bfd3c-02c1-4da2-b67a-0d01b518ce5d"},26913:function(e,t,n){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(4942),o=n(77184),a=n(45736),i=n(15635),c=n(5429);function l(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=(0,a.rz)(e);(0,c.Z)((function(){return{enabled:!!e,fetch:function(){return(0,o.G1)(e)},onFail:function(e){return t(u(u({},i.g),{},{error:e.message}))},onSettle:function(){return t({loading:!1,loaded:!0})},onSuccess:function(e){return t(u(u({},i.g),e))}}}),[e])}},69414:function(e,t,n){n.d(t,{E:function(){return c}});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(4942),o=n(4480);function a(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={available:[],error:"",id:null,loading:!0,loaded:!1,original:[],unavailable:[]};t.Z=(0,o.xu)({key:"spaceIntegrations",default:function(e){return function(e){return i(i({},c),{},{id:e})}(e)}})},3528:function(e,t,n){n.d(t,{dR:function(){return j},hd:function(){return P},MJ:function(){return I}});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(15861),o=n(29439),a=n(4942),i=n(71002),c=n(45987),l=n(64687),u=n.n(l),s=n(4480),d=n(93017),m=(n(92222),n(26398)),f=["domain"];function p(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={email:null,browser:null,mobile:null},h={alerts:null},b={me:function(){return"/api/v2/accounts/me/notifications/settings"},room:function(e){var t=e.spaceId,n=e.roomId;return"/api/v2/spaces/".concat(t,"/rooms/").concat(n,"/notifications/settings")}},y=function(e){var t=e.domain,n=(0,c.Z)(e,f);return(0,b[t])(n)},w=(0,s.xu)({key:"notificationsSettings",default:function(e){var t=function(e){var t=e.domain;return{me:v,room:h}[t]}(e),n=y(e);return m.Z.get(n).then((function(e){return g(g(g({},t),e.data),{},{isLoaded:!0})})).catch((function(){return g(g({},t),{},{isLoaded:!0})}))}}),E=n(68008),C=["prop"];function O(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 x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=(0,s.CG)({key:"notificationsSettings",get:function(e){return function(t){return(0,t.get)(w(e))}},set:function(e){return function(t,n){var r=t.set,o=e.prop,l=(0,c.Z)(e,C);r(w(l),(function(e){var t="object"==(0,i.Z)(e[o])?x(x({},e[o]),{},{enabled:n}):n;return o?x(x({},e),{},(0,a.Z)({},o,t)):t}))}}}),S=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shouldPersist,n=void 0===t||t,i=(0,s.Zl)(k(e)),c=function(e){return(0,E.Z)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m.Z.patch(y(e),t)}),[e.domain,e.spaceId,e.roomId])}(e),l=(0,d.Z)(),f=(0,o.Z)(l,2)[1];return(0,s._8)((function(t){var o=t.snapshot;return function(){var t=(0,r.Z)(u().mark((function t(r){var l,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i(r),n){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,o.getPromise(k(e));case 5:return l=t.sent,s=e.prop,t.prev=7,t.next=10,c(x({},s?(0,a.Z)({},s,r):r));case 10:t.next=16;break;case 12:t.prev=12,t.t0=t.catch(7),f(t.t0),i(s?l[s]:l);case 16:case"end":return t.stop()}}),t,null,[[7,12]])})));return function(e){return t.apply(this,arguments)}}()}),[e])},Z=function(e){return(0,s.$P)(k(e))},P=function(){return(0,s.$P)(w({domain:"me"}))},I=function(e){var t={domain:"me"},n=Z(t),r="hasValue"!==n.state?v:n.contents,o=S(x(x({},t),{},{prop:e}));return[e?r[e]:r,o]},j=function(e){var t=e.roomId,n=e.spaceId,r=e.key,o={domain:"room",roomId:t,spaceId:n},a=Z(o),i="hasValue"!==a.state?h:a.contents,c=S(x(x({},o),{},{prop:r}));return[r?i[r]:i,c]}},45736:function(e,t,n){n.d(t,{Cz:function(){return v},R1:function(){return w},h3:function(){return f},pV:function(){return g},ry:function(){return y},rz:function(){return h},su:function(){return m}});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(4942),o=n(4480),a=n(45939),i=n(15635),c=n(69414),l=n(31790);function u(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=(0,o.CG)({key:"spaceChannelState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,a.Z)(t));return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){(0,e.set)((0,a.Z)(t),(function(e){return n?s(s({},e),{},(0,r.Z)({},n,o)):s(s({},e),o)}))}}}),m=function(e,t){return(0,o.sJ)(d({id:e,key:t}))},f=function(e){return(0,o.rb)(d(e))},p=(0,o.CG)({key:"spaceChannelsState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,i.Z)(t));return r=s(s({},r),{},{channels:(0,l.SM)(r.channels)}),n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){(0,e.set)((0,i.Z)(t),(function(e){return n?s(s({},e),{},(0,r.Z)({},n,o)):s(s({},e),o)}))}}}),g=function(e,t){return(0,o.sJ)(p({id:e,key:t}))},v=function(e,t){return(0,o.Zl)(d({id:e,key:t}))},h=function(e,t){return(0,o.Zl)(p({id:e,key:t}))},b=(0,o.CG)({key:"spaceIntegrationsState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,c.Z)(t));return r=s(s({},r),{},{available:(0,l.SM)(r.available),unavailable:(0,l.SM)(r.unavailable)}),n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){(0,e.set)((0,c.Z)(t),(function(e){return n?s(s({},e),{},(0,r.Z)({},n,o)):s(s({},e),o)}))}}}),y=function(e,t){return(0,o.sJ)(b({id:e,key:t}))},w=function(e,t){return(0,o.Zl)(b({id:e,key:t}))}},31790:function(e,t,n){n.d(t,{SM:function(){return x},uf:function(){return h},xW:function(){return b},D4:function(){return y},sY:function(){return w},XM:function(){return E},ae:function(){return C},A_:function(){return O}});var r=n(29439),o=n(4942),a=(n(26699),n(32023),n(57327),n(41539),n(88449),n(2490),n(59849),n(82526),n(41817),n(85827),n(25387),n(72608),n(47941),n(92222),n(69826),n(31672),n(59461),n(26833),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(93433)),i=n(45987),c=(n(74916),n(4723),n(21249),n(57640),n(9924),n(69720),n(57557)),l=n.n(c),u=n(3689),s=["description","placeholder","title","type"];function d(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?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t,n){var c=t.description,d=t.placeholder,f=t.title,p=t.type,g=(0,i.Z)(t,s),v=n.includes(e),h={description:c,id:e,isRequired:v,placeholder:d||"",title:f||e};if("string"===p&&"selection"!==e){var b=g.format,y=g.maxLength,E=g.minLength;return m(m(m({component:"input",getValue:function(e){var t=e.id,n=e.secrets,r=e.subsetId;return(r?n[t][r]:n[t])||""},isValid:function(e){return!!("uri"!==b||null!==e&&void 0!==e&&e.match(u.yV))&&(!(E&&e.length<E)&&!(y&&e.length>y))}},y?{maxlength:y}:{}),E?{minlength:E}:{}),{},{onChange:function(e){var t=e.id,n=e.setSecrets,r=e.subsetId;return function(e){return n((function(n){return m(m({},n),{},r?(0,o.Z)({},t,m(m({},n[t]),{},(0,o.Z)({},r,e))):(0,o.Z)({},t,e))}))}},type:"uri"===b?"url":b||"text"},h)}if("object"===p){var C=g.oneOf,O=g.patternProperties;if(C)return m(m({component:"select",getValue:function(e){var t,n,r=e.id,o=e.secrets;return{label:(null===(t=C.find((function(e){var t;return e.properties.selection.const===(null===(t=o[r])||void 0===t?void 0:t.selection)})))||void 0===t?void 0:t.title)||(v?C[0].title:"None"),value:(null===(n=o[r])||void 0===n?void 0:n.selection)||(v?C[0].properties.selection.const:"")}},onChange:function(e){var t=e.id,n=e.setRequiredSubsets,r=e.setSecrets;return function(e){var a=e.label,i=e.value;if(!i)return n((function(e){return l()(e,t)})),void r((function(e){return l()(e,t)}));var c=C.find((function(e){return e.title===a}));null!==c&&void 0!==c&&c.required&&n((function(e){return m(m({},e),{},(0,o.Z)({},t,C.find((function(e){return e.title===a})).required))})),r((function(e){return m(m({},e),{},(0,o.Z)({},t,{selection:i}))}))}}},C.reduce((function(e,t){return{fields:m(m({},e.fields),{},(0,o.Z)({},t.properties.selection.const,w(t))),options:[].concat((0,a.Z)(e.options),[{label:t.title,value:t.properties.selection.const}]),required:m(m({},e.required),{},(0,o.Z)({},t.properties.selection.const,t.required))}}),{fields:{},options:v?[]:[{label:"None",value:""}],required:{}})),h);if(O)return m({component:"pairs",componentPairs:Object.entries(O).map((function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1].type;return[u.zK[n],u.q7[o]]}))},h)}return null},p=n(72437);function g(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e,t){var n=function(e){return e.toLowerCase().includes(t.toLowerCase()||"")};return e.filter((function(e){var t=e.classification,r=e.description,o=e.kind,a=e.title;return n(t)||n(r)||n(o)||n(a)}))},b=function(e,t,n){return!!t&&("selection"===e||("select"===n.component||n.isValid(t)))},y=function(e){return"Delete ".concat(e," channel")},w=function(e){var t=e.properties,n=e.required;return Object.keys(t).reduce((function(e,r){var a=f(r,t[r],n);return v(v({},e),a?(0,o.Z)({},r,a):{})}),{})},E=function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1];return n===o?"".concat(n,"s"):"".concat(n,"/").concat(o)},C=function(e){var t=e.roomIds,n=e.roomOptions;return t.reduce((function(e,t){var r=n.find((function(e){return e.value===t}));return r&&e.push(r.label),e}),[]).join(", ")},O=function(e,t){return Object.values(e).reduce((function(e,n){return"select"===n.component&&t.includes(n.id)?v(v({},e),{},(0,o.Z)({},n.id,{selection:n.options[0].value})):e}),{})},x=function(e){return p.xy?e:e.filter((function(e){return e.id!==u.XH}))}},28350:function(e,t,n){n.d(t,{Z:function(){return E}});var r=n(87462),o=n(45987),a=n(67294),i=n(59978),c=n(91268),l=n(74059),u=n(37518),s=n(18129),d=n(46189),m=n(15418),f=function(e){var t=e.spaceName;return a.createElement(i.Text,{textAlign:"center"},"Please ask your administrator to claim more nodes to\xa0",a.createElement(i.Text,{strong:!0},t)," and you will be able to add them to this room")},p=function(){return a.createElement(i.Text,{textAlign:"center"},"To add nodes to this room, you first need to claim them to its space.")},g=function(e){var t=e.spaceName,n="".concat(d.Z.assetsBaseURL,"/img/rack.png");return a.createElement(i.Flex,{column:!0,padding:[4,8,0],alignItems:"center",gap:4},a.createElement("img",{src:n,alt:"server-rack",width:"188px",height:"188px"}),a.createElement(i.H4,{textAlign:"center"},"No claimed nodes available in this Space: ",t),a.createElement(m.Z,{permission:"node:Create"},(function(e){return e?a.createElement(p,null):a.createElement(f,{spaceName:t})})))},v=n(93433),h=n(29439),b=(n(21249),n(57640),n(9924),n(85827),n(41539),n(25387),n(2490),n(72608),n(57327),n(88449),n(59849),n(26699),n(32023),n(92222),function(e){var t=e.setNodes,n=(0,a.useState)(""),r=(0,h.Z)(n,2),o=r[0],i=r[1],c=(0,a.useState)(!0),l=(0,h.Z)(c,2),u=l[0],s=l[1],d=(0,a.useState)([]),m=(0,h.Z)(d,2),f=m[0],p=m[1];return(0,a.useEffect)((function(){var e=f.map((function(e){return e.id}));e.length||!o||u||t((function(e){return o.split(",").reduce((function(e,t){return e.filter((function(e){return e.id!==t}))}),e)})),e.length&&e.join()!==o&&(t((function(t){var n=t.map((function(e){return e.id}));return e.reduce((function(e,t,r){return n.includes(t)?e:[].concat((0,v.Z)(e),[f[r]])}),t)})),s(!1)),i(e.join())}),[f]),{onRowSelected:p}}),y=["claimedNodeIds","data","roomId","setNodes","showHeader","onAddNodes","canAddNodes","addNodesGA"],w={connectionToCloud:!1},E=function(e){var t=e.claimedNodeIds,n=e.data,d=e.roomId,m=e.setNodes,f=e.showHeader,p=e.onAddNodes,v=e.canAddNodes,h=e.addNodesGA,E=(0,o.Z)(e,y),C=b({setNodes:m}).onRowSelected,O=(0,l.OS)(),x=(0,u.tE)(d),k=(0,a.useMemo)((function(){return{addEntry:{handleAction:p,tooltipText:"Add the selected nodes to the room",isDisabled:!v,disabledTooltipText:"Select some nodes to add to the room","data-ga":h}}}),[p,v]);return a.createElement(i.Flex,(0,r.Z)({column:!0,gap:3,padding:[2,0,0],flex:"grow",width:"100%",height:"100%"},E),f&&a.createElement(i.Flex,{margin:[0,0,5]},a.createElement(i.H3,null,"Available Nodes (",t.length,")")),f&&a.createElement(i.Flex,null,a.createElement(i.Text,{color:"textDescription"},"Nodes in ",O.name," that can be added to ",x.name)),t.length>0?a.createElement(c.Z,{"data-testid":"nodesTable-layout",overflow:"hidden",height:"100%"},a.createElement(s.Z,{enableSelection:!0,customNodes:n,showdDefaultRowActions:!1,showDefaultBulkActions:!1,customBulkActions:k,onRowSelected:C,columnVisibility:w,alwaysEnableNodeSelection:!0})):a.createElement(g,{spaceName:O.name}))}},86242:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(29439),o=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(26699),n(32023),n(67294)),a=n(62554),i=n(74059),c=n(37518),l=n(53338),u=n(25819),s=n(96929),d=n(46322),m=n(5429),f=n(93017),p=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).addNodesCallback,n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(0,o.useState)(e),n=(0,r.Z)(t,2),i=n[0],c=n[1],l=(0,o.useState)([]),u=(0,r.Z)(l,2),s=u[0],d=u[1];(0,a.Z)((function(){d([i])}),300,[i]);var m=(0,o.useCallback)((function(e){return c(e.currentTarget.value)}),[c]);return[i,m,s]}(),p=(0,r.Z)(n,3),g=p[0],v=p[1],h=p[2],b=(0,o.useState)([]),y=(0,r.Z)(b,2),w=y[0],E=y[1],C=(0,i.th)(),O=(0,c.HM)(C,l.i_),x=(0,f.Z)(),k=(0,r.Z)(x,2)[1],S=(0,m.Z)((function(){return{enabled:!!O,fetch:function(){return(0,u.Fz)({roomId:O,spaceId:C})},initialValue:[],onFail:function(e){k(e)}}}),[O,C]),Z=(0,r.Z)(S,1)[0],P=(0,s.X7)(e,"ids"),I=(0,o.useMemo)((function(){return Z.map((function(e){return e.id})).filter((function(e){return!P.includes(e)}))}),[P,Z]),j=(0,o.useMemo)((function(){return(0,d.C)(Z)}),[Z]),D=(0,s.iB)(C,e,{onSuccess:t});return[{claimedNodeIds:I,data:j,filter:g,setFilter:v,debouncedFilter:h,setNodes:E},{onAddNodes:(0,o.useCallback)((function(){return D(w.map((function(e){return e.id})))}),[D,w]),onAddNode:(0,o.useCallback)((function(e){D([e],{makeCallback:!1})}),[D]),selectedNodes:w}]}},89149:function(e,t,n){n.d(t,{Z:function(){return _}});var r=n(87462),o=n(29439),a=(n(66992),n(41539),n(88674),n(78783),n(33948),n(67294)),i=n(2145),c=n(59978),l=n(37518),u=n(74059),s=n(16645),d=n(7693),m=n(92903),f=n(668),p=n(97346),g=n(8741),v=n(28350),h=n(86242),b=n(78266),y=n(45987),w=n(33582),E=n(50308),C=n.n(E),O=(n(92222),n(71893)),x=n(16931),k=n(52428),S=(0,O.default)(c.Icon).withConfig({displayName:"copyInfo__StyledIcon",componentId:"sc-fgr5qt-0"})(["display:flex;align-self:center;cursor:pointer;position:absolute;right:16px;"]),Z=function(e){var t=e.gaPrefix,n=void 0===t?"claim-nodes":t,r=e.info,o=e.title,i=void 0===o?"Claim token":o,l=e.type,u=void 0===l?"token":l,s=e.copyDisabled,d=void 0!==s&&s;return a.createElement(c.Flex,{cursor:"pointer","data-testid":"".concat(u,"Copy"),gap:2,onClick:(0,k.J)(r,{text:"".concat(i," copied to clipboard")}),position:"relative"},a.createElement(x.U8,{"data-testid":"".concat(u,"TextBlock")},r),!d&&a.createElement(S,{"data-testid":"".concat(u,"CopyButton"),"data-ga":"".concat(n,"::click-copy-").concat(u,"::allpages"),name:"copy",size:"small",color:"primary",onClick:(0,k.J)(r,{text:"".concat(i," copied to clipboard")})}))},P=function(e){var t=e.title,n=void 0===t?"":t,r=e.info,o=void 0===r?"Loading...":r,i=e.copyDisabled,l=void 0!==i&&i,u=e.onClose,s=void 0===u?C():u;return a.createElement(c.Modal,null,a.createElement(c.ModalContent,{width:{min:80,base:150},height:30},a.createElement(c.ModalHeader,null,a.createElement(c.H3,null,n),a.createElement(c.ModalCloseButton,{onClose:s})),a.createElement(c.ModalBody,null,a.createElement(Z,{info:o,copyDisabled:l}))))},I=["spaceId"],j=function(e){var t,n,o=e.spaceId,i=(0,y.Z)(e,I),c=(0,w.Z)(o);return a.createElement(P,(0,r.Z)({title:"Claim Token",info:null===(t=c[0])||void 0===t?void 0:t.token,copyDisabled:!(null!==(n=c[0])&&void 0!==n&&n.token)},i))},D=n(41898),N=n(46667),T=n(63346),F=(0,i.Z)((function(){return Promise.all([n.e(6502),n.e(8663),n.e(6129),n.e(8447)]).then(n.bind(n,66129))})),M={default:{modal:{"data-testid":"addWarRoomModal"},sidebarModalHeader:{"data-testid":"addWarRoomModal-header"},sidebarContent:{"data-testid":"addWarRoomModal-content",overflow:"auto",hasFooter:!1}},integrations:{modal:{"data-testid":"addIntegrationModal"},sidebarModalHeader:{"data-testid":"addIntegration-header"},sidebarContent:{"data-testid":"addIntegration-content",overflow:"hidden",hasFooter:!1,padding:[0],hasModalTitle:!1}}},_=function(e){var t=e.title,n=void 0===t?"Add Nodes":t,i=e.onClose,y=e.isSubmodal,w=e.flavour,E=void 0===w?"default":w,C=(0,u.th)(),O=(0,l.Hm)(),x=(0,l.Jb)(),k=null!==O&&void 0!==O&&O.loaded?O:x,S=null===k||void 0===k?void 0:k.id,Z=(0,a.useMemo)((function(){return M[E]}),[E]),I="integrations"==E,_=I?f.u6:s.u6,L=(0,h.Z)(S,{addNodesCallback:i}),A=(0,o.Z)(L,2),B=A[0],R=A[1],U=R.onAddNodes,z=R.selectedNodes,V=(0,N.Z)(),H=(0,o.Z)(V,4),W=H[0],G=H[2],K=H[3],Y=(0,N.Z)(),J=(0,o.Z)(Y,4),q=J[0],Q=J[2],$=J[3];return a.createElement(T.ZP,{feature:"AddNodes"},a.createElement(_,(0,r.Z)({right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:i},Z.modal),a.createElement(d.x,(0,r.Z)({title:I?a.createElement(c.TextBig,{color:"textLite"},n):a.createElement(a.Fragment,null,"Manage room",a.createElement(c.TextBig,{color:"textLite"},"\xa0/ Add Nodes")),isSubmodal:y,onClose:i},Z.sidebarModalHeader||{}),!I&&a.createElement(p.Z,{permission:"node:Create"},a.createElement(c.Flex,{gap:2},a.createElement(c.Button,{flavour:"borderless",onClick:G},"Claim Token"),a.createElement(c.Button,{flavour:"borderless",onClick:Q},"Room ID")))),!I&&a.createElement(m.B,{"data-testid":"addWarRoomModal-title"},"Add nodes to\xa0",null===k||void 0===k?void 0:k.name),a.createElement(s.TZ,Z.sidebarContent||{},I?a.createElement(a.Suspense,{fallback:a.createElement(b.Z,{title:"Loading integrations..."})},a.createElement(F,{flavour:D.RV.addNodesModal})):a.createElement(p.Z,{permission:"node:Create"},a.createElement(a.Fragment,null,a.createElement(g.Z,{rooms:[S]}),!k.untouchable&&a.createElement(v.Z,(0,r.Z)({"data-testid":"addWarRoomModal-availableNodes"},B,{onAddNodes:U,canAddNodes:!!z.length,addNodesGA:"add-war-room-modal::click-add-node::global-view"})))))),!I&&W&&a.createElement(T.ZP,{subModal:"ClaimTokenModal"},a.createElement(j,{spaceId:C,onClose:K})),!I&&q&&a.createElement(T.ZP,{subModal:"RoomIdModal"},a.createElement(P,{title:"Room ID",info:S,copyDisabled:!S,onClose:$})))}},8741:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(29439),o=(n(21249),n(57640),n(9924),n(67294)),a=n(59978),i=n(74059),c=n(8641),l=n(35819),u=n(26017),s=n(35253),d=function(e){var t=e.label;return t?o.createElement(o.Fragment,null,o.createElement(a.Icon,{name:"code",size:"small"}),o.createElement(a.TextNano,{strong:!0,textTransform:"uppercase"},t)):null},m=(0,o.memo)(d),f=n(16931),p=(n(69826),n(41539),n(31672),n(2490),n(59461),function(e){var t=e.integrationId,n=e.rooms,d=void 0===n?[]:n,p=(0,c.RG)(),g=(0,i.OS)("plan"),v=function(){var e=(0,c.NE)();return function(t){return e.find((function(e){return e.id==t}))}}(),h=v(t),b=(0,o.useState)(0),y=(0,r.Z)(b,2),w=y[0],E=y[1],C=(0,o.useState)(s.N[g]||s.N.default),O=(0,r.Z)(C,2),x=O[0],k=O[1];return o.createElement(a.Flex,{column:!0,gap:4,width:"100%"},o.createElement(a.Flex,{justifyContent:"end"},o.createElement(l.Z,{isNightly:"nightly"==x,toggleNightly:function(e){var t=e.target.checked?"nightly":"stable";k(t)}})),h?o.createElement(u.Z,{integration:h,isNightly:"nightly"==x,rooms:d,navigateToSettings:!0}):o.createElement(a.Tabs,{selected:w,onChange:E,TabContent:f.m7,tabsProps:{gap:1,margin:[0,0,4,0]}},p.map((function(e){return o.createElement(a.Tab,{as:f.Sn,key:e.name,label:o.createElement(m,{label:e.name})},o.createElement(u.Z,{integration:e,isNightly:"nightly"==x,rooms:d,navigateToSettings:!0}))}))))})},56662:function(e,t,n){n.d(t,{U:function(){return f}});var r=n(29439),o=n(67294),a=n(89250),i=n(12599),c=n(59978),l=n(97323),u=n(74059),s=n(37518),d=n(16645),m=n(7693),f=function(e){var t=e.onClose,n=e.onDone,f=e.isSubmodal,p=void 0===f||f,g=(0,u.th)(),v=(0,o.useState)(""),h=(0,r.Z)(v,2),b=h[0],y=h[1],w=(0,c.useInputValue)({maxChars:255,value:""}),E=(0,r.Z)(w,3),C=E[0],O=E[1],x=E[2],k=function(e){var t=(0,a.s0)(),n=(0,u.uk)();return(0,o.useMemo)((function(){return function(r){var o=r.slug,a=(0,i.Gn)("/spaces/:spaceSlug/rooms/:roomSlug",{spaceSlug:n,roomSlug:o});e(),t(a)}}),[n])}(t),S=(0,s.Dq)(g,{onSuccess:n||k}),Z=(0,o.useCallback)((function(){S({name:b,description:C})}),[b,C]);return o.createElement(d.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},o.createElement(m.x,{onClose:t,isSubmodal:p,title:"Create a new room"},o.createElement(c.Button,{label:"Add",onClick:Z,disabled:!b})),o.createElement(d.TZ,null,o.createElement(l.Q,{roomName:b,setRoomName:y,roomDescription:C,charsDescIndicator:x,setRoomDescription:O,isCreateForm:!0})))}},7724:function(e,t,n){n.d(t,{CE:function(){return s},M5:function(){return m},R4:function(){return d}});var r=n(29439),o=(n(92222),n(67294)),a=n(59978),i=n(74059),c=n(46667),l=n(37518),u=n(33335),s=function(e){var t=1===e;return"Delete ".concat(e," ").concat(t?"room":"rooms")},d=function(e){return"Delete ".concat(e," room")},m=function(e){var t=e.name,n=e.roomsLength,r=e.spaceName,a=t||"".concat(n,1===n?" room":" rooms");return o.createElement(o.Fragment,null,"You are about to delete ",o.createElement("strong",null,a)," from ",o.createElement("strong",null,r)," space.",o.createElement("br",null),"This cannot be undone. Are you sure you want to continue?")};t.ZP=function(e){var t=e.id,n=e.name,s=e.navigateToParent,f=(0,i.OS)("name"),p=(0,l.tE)(t,"untouchable"),g=(0,u.gI)("room:Delete")&&!p,v=(0,l.IX)(t,{onSuccess:s}),h=(0,c.Z)(),b=(0,r.Z)(h,4),y=b[0],w=b[2],E=b[3];return g?o.createElement(o.Fragment,null,o.createElement(a.Button,{"data-testid":"manageWarRoom-delete",flavour:"hollow",onClick:w,label:"Delete room",danger:!0}),y&&o.createElement(a.ConfirmationDialog,{confirmLabel:"Yes, delete","data-ga":"delete-war-room-dialog","data-testid":"deleteWarRoomDialog",handleConfirm:v,handleDecline:E,message:o.createElement(m,{name:n,spaceName:f}),title:d(n)})):null}},97323:function(e,t,n){n.d(t,{Q:function(){return k}});var r=n(87462),o=n(29439),a=n(45987),i=(n(24603),n(74916),n(88386),n(39714),n(82526),n(41817),n(77601),n(67294)),c=n(59978),l=n(62200),u=n(95383),s=n(37518),d=n(33335),m=n(1229),f=n(46667),p="leave-war-room-dialog",g="leaveWarRoomDialog",v=function(e){var t=e.id,n=e.name,a=e.navigateToParent,l=(0,m.IT)(t,"ids"),u=(0,s.iC)(t,{onSuccess:a}),d=(0,s.tE)(t,"untouchable"),v=(0,f.Z)(),h=(0,o.Z)(v,4),b=h[0],y=h[2],w=h[3],E=1===l.length&&!d?{"data-ga":"".concat(p,"-last-member"),"data-testid":"".concat(g,"LastMember"),message:i.createElement(i.Fragment,null,"If you leave, ",i.createElement("strong",null,n)," room will be deleted immediately.",i.createElement("br",null),"Are you sure you want to continue?"),title:"Leave and delete ".concat(n," room")}:{"data-ga":p,"data-testid":g,message:i.createElement(i.Fragment,null,"You are about to leave ",i.createElement("strong",null,n)," room.",i.createElement("br",null),"Are you sure you want to continue?"),title:"Leave ".concat(n," room")};return i.createElement(i.Fragment,null,i.createElement(c.Button,{"data-ga":"manage-war-room-tab::click-leave-war-room::manage-war-room-modal","data-testid":"manageWarRoom-leave",icon:"switch_off",flavour:"borderless",label:"Leave room",neutral:!0,padding:[0],width:"fit-content",onClick:y}),b&&i.createElement(c.ConfirmationDialog,(0,r.Z)({confirmLabel:"Yes, leave",handleConfirm:u,handleDecline:w},E)))},h=n(7724),b=n(30688),y=["charsIndicator","isDisabled","isValid","handleChange","setIsValid","setValidationMessage","validationMessage","value"],w=(0,b.A)([function(e){var t=e.length>=1;return(0,b.f)(t,"Give your room a name that's at least one character.")},function(e){var t=e.length<=20;return(0,b.f)(t,"A room's name can't exceed 20 characters.")}]),E=function(e){var t=e.charsIndicator,n=e.isDisabled,l=e.isValid,u=e.handleChange,s=e.setIsValid,d=e.setValidationMessage,m=e.validationMessage,f=e.value,p=(0,a.Z)(e,y),g=(0,c.useTouchedState)({}),v=(0,o.Z)(g,2),h=v[0],b=v[1];return(0,i.useEffect)((function(){var e=w(f),t=e.isValid,n=e.messages&&e.messages.length?e.messages[0]:void 0;!l&&t?s(!0):l&&!t&&s(!1),n&&d(n)}),[l,s,f,h,d]),i.createElement(c.TextInput,(0,r.Z)({"data-testid":"warRoomOptions-warRoomNameInput",label:"Room name",name:"createRoom",placeholder:"Enter your room's name",fieldMessage:"Tip: Use rooms to group your Nodes by their service, purpose, or location.",fieldIndicator:t,value:f,touched:h,onBlur:b,onChange:u,success:l,error:!l&&m,instantFeedback:"all",disabled:n,autoFocus:!0},p))},C=n(63346),O=["id","navigateToParent","isCreateForm","roomName","setRoomName","roomDescription","setRoomDescription","charsDescIndicator","onSaveClick"],x=new RegExp(/^[\w\s\d]*?$/),k=function(e){var t=e.id,n=e.navigateToParent,m=e.isCreateForm,f=e.roomName,p=e.setRoomName,g=e.roomDescription,b=e.setRoomDescription,y=e.charsDescIndicator,w=e.onSaveClick,k=(0,a.Z)(e,O),S=(0,s.tE)(t),Z=(0,u.J7)(),P=(0,i.useState)(!1),I=(0,o.Z)(P,2),j=I[0],D=I[1],N=(0,i.useState)(""),T=(0,o.Z)(N,2),F=T[0],M=T[1],_=(0,i.useState)(""),L=(0,o.Z)(_,2),A=L[0],B=L[1],R=(0,c.useInputValue)({maxChars:l.v$}),U=(0,o.Z)(R,1)[0],z=(0,i.useCallback)((function(e){return p(e.target.value)}),[p]),V=!!t,H=((0,d.gI)("room:LeaveAllNodes")||!S.untouchable)&&Z.length>1&&S.isMember,W=(0,c.useTouchedState)({defaultState:!0}),G=(0,o.Z)(W,2),K=G[0],Y=G[1],J=!S.name||f===S.name&&g===S.description;return(0,i.useEffect)((function(){B(x.test(g)&&K?"":"The description can only contain digits, letters, and spaces.")}),[K,g]),i.createElement(C.ZP,{tab:"Room::RoomForm"},i.createElement(c.Flex,(0,r.Z)({column:!0,"data-testid":"manageWarRoom",flex:"grow",justifyContent:"between",height:"100%"},k),i.createElement(c.Flex,{column:!0,"data-testid":"manageWarRoom-settings",gap:2},i.createElement(c.Box,{"data-testid":"manageWarRoom-createRoomInputBox"},i.createElement(E,{"data-testid":"manageWarRoom-createRoomInput",value:f,handleChange:z,charsIndicator:U,validationMessage:F,setValidationMessage:M,isValid:j,setIsValid:D,isDisabled:V&&S.untouchable})),i.createElement(c.Box,{"data-testid":"manageWarRoom-descriptionInputBox"},i.createElement(c.TextInput,{"data-testid":"manageWarRoom-descriptionInput",label:"Description",name:"roomDescription",placeholder:"A room description...",instantFeedback:"positiveFirst",touched:K,onBlur:Y,fieldIndicator:y,error:""!==A&&A,success:""===A,value:g,onChange:b}))),i.createElement(c.Flex,{"data-testid":"manageWarRoom-actions"},i.createElement(c.Flex,{"data-testid":"manageWarRoom-deleteLeaveActions",gap:4},V&&H&&i.createElement(v,{id:t,name:S.name,navigateToParent:n}),V&&i.createElement(h.ZP,{id:t,name:f,navigateToParent:n})),!m&&i.createElement(c.Button,{"data-ga":"manage-war-room-tab::click-save::manage-war-room-modal","data-testid":"manageRoom-saveButton",label:"Save",onClick:w,disabled:J,margin:[0,0,0,"auto"]}))))}},46322:function(e,t,n){n.d(t,{C:function(){return l},k:function(){return c}});var r=n(4942),o=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(46189)),a=n(88866);function i(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}var c=function(e){var t=e.data,n=e.untouchable,r=e.currentUserId,o=e.canRemoveUser;return t.reduce((function(e,t){var a=r===(null===t||void 0===t?void 0:t.id);return e.push({name:t.name,email:t.email,user:{avatarURL:t.avatarURL,name:t.name,email:t.email,id:t.id},type:t.role,disabled:!o||a||n}),e}),[])},l=function(e){return e.reduce((function(e,t){var n;return e.push(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({name:t.name||"",os:t.os.id||"",node:{id:t.id,name:t.name||"",os:t.os?"".concat(o.Z.assetsBaseURL,"/img/logos/os/").concat((null===(n=a.V[t.os.id])||void 0===n?void 0:n.logoFilename)||"placeholder.svg"):"".concat(o.Z.assetsBaseURL,"/img/logos/os/placeholder.svg")}},t)),e}),[])}},20031:function(e,t,n){var r=n(87462),o=n(67294),a=n(59978),i=n(82351);t.Z=function(e){return o.createElement(i.Z,{content:"Room you're a member of. You're able to receive notifications related to nodes in this room"},o.createElement(a.Icon,(0,r.Z)({name:"checkmark",width:"12px",height:"12px"},e)))}},41379:function(e,t,n){n.d(t,{A:function(){return v}});var r=n(29439),o=(n(92222),n(57327),n(41539),n(88449),n(2490),n(59849),n(26699),n(32023),n(67294)),a=n(50308),i=n.n(a),c=n(92432),l=n(78710),u=n(68035),s=n(97945),d=n(48854),m=n(4822),f=n(33335),p=n(25819),g=n(96929),v=l.ZP?function(e){var t=e.id;return"rooms.".concat(t,".nodes")}:function(e){var t=e.id,n=e.spaceId;return"spaces.".concat(n,".rooms.").concat(t,".nodes")};t.Z=function(e){var t=e.id,n=e.spaceId,a=e.pollingInterval,l=void 0===a?63e3:a,h=e.polling,b=void 0===h||h,y=e.keepPolling,w=e.onNodeIdsChange,E=void 0===w?i():w,C=(0,m.XT)(),O=(0,g.X7)(t,"ids"),x=(0,o.useState)((function(){return(null===O||void 0===O?void 0:O.length)||0})),k=(0,r.Z)(x,2),S=k[0],Z=k[1],P=(0,g.X7)(t,"loaded"),I=(0,f.gI)("room:Read");(0,o.useEffect)((function(){P&&(E({nodeIds:O}),C((function(e){return e&&e.filter((function(e){return O.includes(e)}))})))}),[O,P]),(0,o.useEffect)((function(){P&&S!==O.length&&((0,c.L)("node-count","node-count-changed-from-".concat(S,"-to-").concat(O.length),"","","","node-count-change"),Z(O.length))}),[O.length,S,P]),(0,u.Z)((function(){return{key:v({id:t,spaceId:n}),autorun:!!I&&!!n&&!!t,fetch:function(){return(0,p.Fz)({roomId:t,spaceId:n})},polling:b,association:{getError:function(){return(0,g.kY)({id:t,key:"error"})},getIds:function(){return(0,g.kY)({id:t,key:"ids"})},getLoaded:function(){return(0,g.kY)({id:t,key:"loaded"})},getUpdatedAt:function(){return(0,g.kY)({id:t,key:"updatedAt"})}},sort:function(e,t){return e.name.localeCompare(t.name,void 0,{sensitivity:"accent"})},getResource:function(e){return(0,s.zP)({id:e})},getResourcesInitializer:function(){return s.Jz},getResourceInitialState:function(){return d.a},pollingOptions:{pollingInterval:l},maxCacheAge:900,force:!0,keepPolling:y}}),[n,t,l])}},45781:function(e,t,n){n.d(t,{e:function(){return m},M:function(){return f}});var r=n(4942),o=(n(66992),n(41539),n(33948),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),a=n(18446),i=n.n(a),c=n(74059),l={loaded:!1,entries:[],error:null,updatedAt:""},u=(0,o.xu)({key:"spaceAlerts",default:l});function s(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=(0,o.CG)({key:"spaceAlertState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(u(t))[n]}},set:function(e){var t=e.id,n=e.key;return function(e,r){var o=e.set;o(u(t),"error"!==n?function(e){return{loaded:!0,entries:i()(r,e.entries)?e.entries:r,updatedAt:(new Date).toISOString()}}:d(d({},l),{},{error:r}))}}}),f=function(e){return function(e,t){return(0,o.sJ)(m({id:e,key:t}))}((0,c.th)(),e)}},69019:function(e,t,n){n.d(t,{Cl:function(){return h},E3:function(){return s},Vs:function(){return b},ZQ:function(){return p},fA:function(){return w},fh:function(){return g},fz:function(){return y},uV:function(){return E}});var r=n(4942),o=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),a=n(50308),i=n.n(a),c=n(66152);function l(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={id:null,name:"",description:"",commitment:!1,pricing:[],enrolledAt:null,currentPeriodFrom:null,currentPeriodTo:null,committedNodes:0,billingEmail:"",balance:{amount:0,currency:"usd"}},d={Pro:"pro",Professional:"pro",Community:"free",EarlyBird:"earlyBird",Business:"business"},m=function(e){var t=d[e.class],n=(0,c.k5)(e),o=Array.isArray(n.pricing)?n.pricing.reduce((function(e,t){return u(u({},e),{},(0,r.Z)({},t.type,t))}),{}):{};return u(u(u({},s),n),{},{pricing:o,slug:t})},f=function(e){return(0,c.k5)(e)},p=function(e){return o.Z.get("/api/v2/spaces/".concat(e,"/billing/plans"),{transform:function(e){return e.plans.reduce((function(e,t){var n=m(t),r=e[n.slug]||[];return"year"===n.interval?r.unshift(n):r.push(n),e[n.slug]=r,e}),{})}})},g=function(e){return o.Z.get("/api/v2/spaces/".concat(e,"/billing/plan"),{transform:m})},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update";return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="update"==e?o.Z.put:o.Z.post;return"function"!==typeof r?i():r("/api/v2/spaces/".concat(t,"/billing/plan"),(0,c.v)(n),{transform:function(e){return e.url}})}},h=function(e,t){return v("checkout")(e,t)},b=function(e,t){return v()(e,t)},y=function(e,t){return o.Z.get("/api/v2/spaces/".concat(e,"/billing/portal?redirect_url=").concat(encodeURIComponent(t)),{transform:function(e){return e.url}})},w=function(e,t){var n=t.after,r=t.before;return o.Z.get("/api/v2/spaces/".concat(e,"/billing/node-count?from=").concat(n,"&to=").concat(r))},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.Z.put("/api/v2/spaces/".concat(e,"/billing/plan/preview"),(0,c.v)(t),{transform:f})}},46715:function(e,t,n){n.d(t,{Gl:function(){return p},RP:function(){return y},SH:function(){return w},Zn:function(){return O},eY:function(){return C},fG:function(){return h}});var r=n(29439),o=(n(41539),n(88674),n(17727),n(67294)),a=n(4480),i=n(50308),c=n.n(i),l=n(74059),u=n(93017),s=n(69019),d=n(49489),m=[],f=(0,a.CG)({key:"plans",get:function(e){return function(){return(0,s.ZQ)(e)}}}),p=function(){var e,t=(0,l.th)(),n=(0,a.$P)(f(t));return{loaded:"loading"!==n.state,value:(null===(e=n.contents)||void 0===e?void 0:e.data)||m,hasError:"hasError"===n.state}},g=(0,a.CG)({key:"previewPlan",get:function(e){var t=e.spaceId,n=e.payload;return function(){return(0,s.uV)(t,n)}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),v=function(e){var t;return d.Fi[null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.errorMsgKey]},h=function(e,t){var n,r=(0,l.th)(),o=(0,a.$P)(g({spaceId:r,payload:e,forceFetch:t}));return{loading:"loading"===o.state,value:(null===(n=o.contents)||void 0===n?void 0:n.data)||{},promoCodeError:"hasError"===o.state?v(o.contents):void 0}},b=(0,a.CG)({key:"currentPlan",get:function(e){return function(){return e?(0,s.fh)(e):Promise.resolve()}}}),y=function(){var e,t=(0,l.th)(),n=(0,a.$P)(b(t)),r=(0,a.C)(b(t));return{loaded:"loading"!==n.state,value:(null===(e=n.contents)||void 0===e?void 0:e.data)||s.E3,hasError:"hasError"===n.state,refresh:r}},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href,t=(0,o.useState)(!1),n=(0,r.Z)(t,2),a=n[0],i=n[1],c=(0,l.th)();return[(0,o.useCallback)((function(){i(!0),(0,s.fz)(c,e).then((function(e){var t=e.data;return location.href=t})).finally((function(){return i(!1)}))}),[c,e]),a]},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Vs,t=(0,u.Z)(),n=(0,r.Z)(t,2)[1],o=(0,l.th)(),a=y();return!a.loaded||a.hasError?c():function(t){return e(o,t).then((function(e){a.refresh(),null!==e&&void 0!==e&&e.data&&(location.href=e.data)})).catch(n)}},C=function(){return E(s.Cl)},O=function(){return E()}},33582:function(e,t,n){n.d(t,{Z:function(){return f}});var r=n(15861),o=n(64687),a=n.n(o),i=n(67294),c=n(4480),l=n(33335),u=n(26398),s=function(e){return u.Z.post("/api/v1/spaces/".concat(e,"/tokens"),void 0,{allow401:!0})},d=(0,c.xu)({key:"spaceClaimingTokens",default:[]}),m=(0,c.CG)({key:"claimingTokensState",get:function(e){return function(t){return(0,t.get)(d(e))}},set:function(e){return function(t,n){(0,t.set)(d(e),[n])}}}),f=function(e){var t=(0,c.sJ)(m(e)),n=(0,l.gI)("node:Create",e),o=(0,c._8)((function(e){var t=e.snapshot,n=e.set;return function(){var e=(0,r.Z)(a().mark((function e(r){var o,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getPromise(m(r));case 2:if(e.sent.length){e.next=9;break}return e.next=6,s(r);case 6:o=e.sent,i=o.data,n(m(r),i);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),[]);return(0,i.useEffect)((function(){n&&e&&o(e)}),[n,e]),t}},49489:function(e,t,n){n.d(t,{FC:function(){return o},Fi:function(){return i},Vc:function(){return r},go:function(){return a}});var r={free:{level:0,title:"Community"},earlyBird:{level:0,title:"Early Bird",features:['"Member" role available with existing permissions.','"Member" role with access to _All Nodes_ room.']},pro:{level:10,title:"Pro",features:["7 days of alert history and auditing events.",'Unlock the "Troubleshooter" role and add members to the space without providing management permission.',"Enable webhook alert notification integration."]},business:{level:20,title:"Business",features:["Up-to 90 days of alert history and topology events. Never miss an important event while troubleshooting.",'Unlock all user roles including "Manager", "Observer" and "Billing". Empower your teams to excel.',"Enable alert notification integrations (Slack, PagerDuty and more)."]}},o=["year","month"],a={year:"yearly",month:"monthly"},i={ErrInvalidPromotionCode:"Promotion code is invalid",ErrInactivePromotionCode:"Promotion code is inactive",ErrInvalidPromotionCodePlan:"Promotion code cannot be applied to this plan"}},99826:function(e,t,n){n(92222);var r=n(67294),o=n(46715),a=n(74059);t.Z=function(e){var t=(0,o.RP)(),n=t.loaded,i=t.value,c=t.hasError,l=(0,a.uk)(),u=n&&i?i.billingEmail?"update":"checkout":"",s=(0,r.useCallback)((function(e){return n&&i?"/spaces/".concat(l,"/settings/billing/all-plans#billingModalType=").concat(u,"&billingModalSlug=").concat(e):null}),[e,l,u]),d=e?s(e):null;return{loaded:n,getUrl:s,url:d,hasError:c}}},38314:function(e,t,n){n.d(t,{$s:function(){return l},$y:function(){return s},BT:function(){return r},GA:function(){return c},J3:function(){return i},NU:function(){return d},WT:function(){return m},c1:function(){return a},g5:function(){return o},rQ:function(){return u}});n(26699),n(57327),n(41539),n(88449),n(2490),n(59849);var r=function(e){return["free","earlyBird"].includes(e)},o=function(e){return"business"==e},a=function(e,t){var n=t.amountPerNode;if(e.amountPerNode&&e.monthlyDiscountPercentagePerNode){var r=e.amountPerNode/12;n=p(r,e.monthlyDiscountPercentagePerNode)}return n},i=function(e){var t=e.amountFlat||0;if(e.monthlyDiscountPercentagePerNode&&e.amountFlat){var n=e.amountFlat/12;t=p(n,e.monthlyDiscountPercentagePerNode)}return t},c=function(e){if(!e)return null;var t=e.city,n=e.country,r=e.line_1,o=e.line_2,a=e.postalCode,i=e.state;return[[r,o].filter(Boolean).join(" "),t,a,i,n].filter(Boolean).join(", ")},l=function(e){var t=e.currentPlan,n=e.slug,o=t.slug,a=t.interval;return o===n?r(n)?"Current plan":"year"===a?"Update plan options":"Change billing frequency":r(o)&&!r(n)||"pro"===o&&"business"===n?"Upgrade":"Select"},u=function(e,t){return r(t)?"hollow":"business"===t||"pro"===t&&r(e)?"default":"hollow"},s=function(){return{cellStyles:{height:"40px"},headStyles:{height:"32px"}}},d=function(){var e=f.apply(void 0,arguments);return e<0?0:e},m=function(e,t,n,r,o){if(!r)return r;var a=f(o,e,t,n);return r-a<0?r:a},f=function(e,t,n,r,o){return((t||0)-e)*(n||0)+(r||0)-(o||0)},p=function(e,t){return e*(1/(1-t))}},36065:function(e,t,n){n.d(t,{Z:function(){return b}});var r=n(29439),o=n(67294),a=n(59978),i=n(83732),c=n(62200),l=n(16645),u=n(7693),s=n(92903),d=(n(24603),n(74916),n(88386),n(39714),n(77601),n(46585)),m=n(30688),f=new RegExp(/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|[!@#$%^&*()_+=\-])/),p=(0,m.A)([function(e){var t=e.length>=d.Pf;return(0,m.f)(t,"Please enter a name for the Space that is at least 5 characters.")},function(e){var t=e.length<=d.Qy;return(0,m.f)(t,"A Space's name can't exceed 20 characters.")},function(e){return f.test(e)?{isValid:!1,message:"There's an unexpected character in the Space's name. Use only alphanumberic characters (A-Z, a-z, 0-9) and spaces."}:{isValid:!0}}]),g=function(e){var t=e.value,n=e.isValid,i=e.setIsValid,c=e.charsIndicator,l=e.isDirty,u=e.handleChange,s=e.validationMessage,d=e.setValidationMessage,m=e.onKeyDown,f=(0,a.useTouchedState)({}),g=(0,r.Z)(f,2),v=g[0],h=g[1];return(0,o.useEffect)((function(){var e=p(t),r=e.isValid,o=e.messages&&e.messages.length?e.messages[0]:void 0;!n&&r?i(!0):n&&!r&&i(!1),o&&d(o)}),[n,t,v,i,d]),o.createElement(a.TextInput,{label:"Space name",name:"createWorkspace",placeholder:"Enter your Space's name",fieldMessage:"Give your Space a name that's between 5-20 characters. This cannot change.",fieldIndicator:c,value:t,touched:v,onBlur:h,onChange:u,success:n,error:!n&&s,instantFeedback:"positiveFirst",isDirty:l,onKeyDown:m})},v=n(87267),h=n(63346),b=function(e){var t=e.onClose,n=e.onDone,m=(0,o.useState)(!1),f=(0,r.Z)(m,2),p=f[0],b=f[1],y=(0,o.useState)(!1),w=(0,r.Z)(y,2),E=w[0],C=w[1],O=(0,a.useInputValue)({maxChars:d.Qy}),x=(0,r.Z)(O,4),k=x[0],S=x[1],Z=x[2],P=x[3],I=(0,o.useState)(""),j=(0,r.Z)(I,2),D=j[0],N=j[1],T=(0,v.Z)(),F=T.sendLog,M=T.isReady,_=(0,o.useCallback)((function(e){C(!1),t(),null===n||void 0===n||n(e),F({feature:"CreateSpace",isSuccess:!0})}),[t,F,M]),L=(0,o.useCallback)((function(){C(!1),F({feature:"CreateSpace",isFailure:!0})}),[F,M]),A=(0,i.Z)({onSuccess:_,onError:L}),B=(0,o.useCallback)((function(){p&&(C(!0),A({name:k}))}),[k,p]);return o.createElement(l.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},o.createElement(h.ZP,{feature:"CreateSpace"},o.createElement(u.x,{onClose:t,title:"Create Space"},o.createElement(a.Button,{disabled:!p,isLoading:E,loadingLabel:"Creating",label:"Save",onClick:B})),o.createElement(s.B,null,"Create a new Space"),o.createElement(l.TZ,null,o.createElement(g,{isDirty:P,isValid:p,setIsValid:b,value:k,handleChange:S,charsIndicator:Z,validationMessage:D,setValidationMessage:N,onKeyDown:function(e){e.keyCode===c.DV&&p&&B()}}))))}},2509:function(e,t,n){n.d(t,{Q$:function(){return s},Sr:function(){return v},bK:function(){return u},dH:function(){return f},eq:function(){return i},fM:function(){return d},fV:function(){return p},m3:function(){return a},xN:function(){return h},z2:function(){return g}});var r,o=n(4942),a="info",i="rooms",c="nodes",l="users",u="notifications",s="integrations",d="billing",m="integrations",f=[a,i,c,l,u,d,m],p=(r={},(0,o.Z)(r,a,"Info"),(0,o.Z)(r,i,"Rooms"),(0,o.Z)(r,c,"Nodes"),(0,o.Z)(r,l,"Users"),(0,o.Z)(r,u,"Alerts & Notifications"),(0,o.Z)(r,s,"Services"),(0,o.Z)(r,d,"Plan & Billing"),(0,o.Z)(r,m,"Integrations"),r),g=f[0],v="/spaces/:spaceSlug/settings/:settingsTab/*",h="/spaces/:spaceSlug/settings/:settingsTab/:settingsSubTab/*"},72671:function(e,t,n){n.d(t,{F:function(){return C}});var r=n(87462),o=n(29439),a=n(45987),i=(n(92222),n(26699),n(41539),n(88674),n(17727),n(67294)),c=n(89250),l=n(59978),u=n(97346),s=n(91008),d=n(82351),m=n(53606),f=n(46585),p=n(13477),g=n(46667),v=n(46715),h=n(39979),b=n(87267),y=["currentPlan"],w=["id","isLastSpace","name","onClose"],E=(0,h.Z)(l.Button),C=function(e){return function(t){var n=t.currentPlan,r=(0,a.Z)(t,y),o=n.class,c=n.interval,u=n.billingEmail,d="year"===c?"yearly":"monthy",m="".concat(o," ").concat(d),f=!["Community","EarlyBird"].includes(o),p=!!u&&!f;return i.createElement(e,r,f&&i.createElement(i.Fragment,null,i.createElement(l.Text,null,"You are currently on ",i.createElement(l.Text,{strong:!0},m)," subscription, which will be cancelled automatically and any due credit from unused period will be given to your credit balance."),i.createElement(l.Text,null,"Any available credit with us won't be automatically lost. If you want to use it in the future, within the defined period on our"," ",i.createElement(s.Z,{href:"https://www.netdata.cloud/service-terms/",rel:"noopener noreferrer",target:"_blank"},"Terms of Service"),", or have any requests about previous invoices you can reach out to"," ",i.createElement(l.Text,{strong:!0},"support@netdata.cloud"))),p&&i.createElement(l.Text,null,"You will lose direct access to you invoices and billing information. If you want to retrieve this information in the future, you'll have to contact"," ",i.createElement(l.Text,{strong:!0},"support@netdata.cloud")))}},O=C((function(e){var t=e.spaceName,n=e.children;return i.createElement(l.Flex,{column:!0,gap:2},i.createElement(l.Text,null,"You are about to delete ",i.createElement("strong",null,t)," space."),n,i.createElement(l.Text,null,"Are you sure you want to continue?"))}));t.Z=function(e){var t=e.id,n=e.isLastSpace,s=e.name,h=e.onClose,y=(0,a.Z)(e,w),C=(0,c.s0)(),x=(0,m.Z)(t),k=(0,p.jr)(),S=(0,v.RP)().value,Z=(0,g.Z)(),P=(0,o.Z)(Z,4),I=P[0],j=P[2],D=P[3],N=(0,g.Z)(),T=(0,o.Z)(N,2),F=T[0],M=T[1],_=(0,b.Z)(),L=_.sendLog,A=_.sendButtonClickedLog,B=_.isReady,R=(0,i.useCallback)((function(e){h(),L({feature:"DeleteSpace",isSuccess:!0}).finally((function(){return C("/spaces/".concat(e))}))}),[L,B]),U=(0,i.useCallback)((function(){M(),x({onSuccess:R}),A({feature:"DeleteSpace",label:"Confirm Delete"})}),[A,B]),z=(0,i.useCallback)((function(){D(),L({feature:"DeleteSpace",isFailure:!0,eventReason:"User canceled"})}),[L,B]);return k&&i.createElement(u.Z,{permission:"space:Delete"},i.createElement(d.Z,{align:"top",content:n&&f.T$.delete,isBasic:!0,stretch:"align"},i.createElement(l.Box,null,i.createElement(E,(0,r.Z)({danger:!0,"data-ga":"manage-space-tab::click-delete-space::manage-space-modal","data-testid":"deleteSpace-button",disabled:n,flavour:"hollow",label:"DELETE SPACE",onClick:j,isStart:!0,feature:"DeleteSpace"},y)))),I&&i.createElement(l.ConfirmationDialog,{confirmLabel:F?"Deleting...":"Yes, delete","data-ga":"delete-space","data-testid":"deleteSpaceDialog",handleConfirm:U,handleDecline:z,message:i.createElement(O,{spaceName:s,currentPlan:S}),title:"Delete ".concat(s," space"),isConfirmDisabled:F,isConfirmLoading:F,isDeclineDisabled:F}))}},54131:function(e,t,n){n.d(t,{Qj:function(){return o},uB:function(){return i},x3:function(){return a}});n(74916),n(77601);var r=/^[a-zA-Z0-9@_.-\s!]*$/,o={minLength:"Space name should be more than 4 characters",allowedChars:"Please use alphanumberic characters (A-Z, a-z, 0-9), spaces, periods and supported special characters @, -, _,."},a=function(e){return e.length<5?"minLength":!r.test(e)&&"allowedChars"},i=function(e){return!r.test(e)&&"allowedChars"}},73398:function(e,t,n){n.d(t,{Z:function(){return C}});var r=n(87462),o=n(45987),a=(n(92222),n(67294)),i=n(59978),c=n(45781),l=(n(69826),n(41539),n(31672),n(2490),n(59461),n(4480)),u=n(74059),s={alertCounter:{warning:0,critical:0},unreachableCount:0},d=(0,l.CG)({key:"roomAlertSummaryState",get:function(e){var t=e.id,n=e.key;return function(e){var r=e.get,o=r(u.BN),a=r((0,c.e)({id:o,key:"entries"})).find((function(e){return e.id===t}))||s;return n?a[n]:a}}}),m=n(37518),f=n(67622),p=n(82351),g=n(71893),v=(0,g.default)(i.Flex).attrs({flex:{grow:0,shrink:0},width:2,height:2,margin:[0,1,0,0],round:1,background:"error",justifyContent:"center",alignItems:"center"}).withConfig({displayName:"indicators__ErrorIndicator",componentId:"sc-19hg3ay-0"})([""]),h=(0,g.default)(v).attrs({background:"warning"}).withConfig({displayName:"indicators__WarningIndicator",componentId:"sc-19hg3ay-1"})([""]),b=(0,g.default)(v).attrs({background:"textLite"}).withConfig({displayName:"indicators__UnreachableIndicator",componentId:"sc-19hg3ay-2"})([""]),y=n(81488),w=n(20031),E=["id","selectedId","spaceSlug","isSidebar","hideAlerts","differentiateIsMember"],C=function(e){var t=e.id,n=e.selectedId,u=e.spaceSlug,s=e.isSidebar,g=e.hideAlerts,C=e.differentiateIsMember,O=(0,o.Z)(e,E),x=function(e,t){return(0,l.sJ)(d({id:e,key:t}))}(t),k=x.alertCounter,S=k.critical,Z=k.warning,P=x.unreachableCount,I=(0,m.tE)(t,"slug"),j=(0,m.tE)(t,"name"),D=(0,m.tE)(t,"isMember"),N=(0,c.M)("error"),T=(0,c.M)("updatedAt");return a.createElement(f.Z,(0,r.Z)({},!!u&&{to:"/spaces/".concat(u,"/rooms/").concat(I)},{testid:"roomLabel-warRoom-".concat(j),actions:g?null:a.createElement(p.Z,{content:a.createElement(y.Z,{error:N,text:"Room alerts",updatedAt:T}),isBasic:!0,align:"right"},a.createElement(i.Flex,{flex:!1,flexWrap:!1,justifyContent:"end",width:{min:6},height:{min:2}},S>0&&a.createElement(v,null),Z>0&&a.createElement(h,null),P>0&&a.createElement(b,null))),icon:C&&D&&a.createElement(w.Z,null),iconColor:"successLite",iconHeight:"12px",iconWidth:"12px",gap:1,textProps:C&&!D&&{padding:[0,0,0,4]},selected:t===n,isSidebar:s,isSecondary:!D},O),j)}},22613:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(59978),c=n(55917),l=["onFilterClick","showAllRooms"];t.Z=function(e){var t=e.onFilterClick,n=e.showAllRooms,u=(0,o.Z)(e,l);return a.createElement(i.Flex,(0,r.Z)({gap:2,padding:[1,2],"data-testid":"roomFilterPills"},u),a.createElement(c.S,{flavour:n?"hollow":"default",onClick:t(!1),label:"My Rooms","data-ga":"roomFilterPills::click-my::global-view","data-testid":"roomFilterPills-showMy"}),a.createElement(c.S,{flavour:n?"default":"hollow",onClick:t(!0),label:"All Rooms","data-ga":"roomFilterPills::click-show-all::global-view","data-testid":"roomFilterPills-showAll"}))}},59636:function(e,t,n){var r=n(87462),o=n(29439),a=n(45987),i=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(67294)),c=n(48286),l=n(59978),u=n(95383),s=n(74059),d=n(37518),m=n(33335),f=n(73398),p=n(22613),g=["isSidebar"];t.Z=function(e){var t=e.isSidebar,n=(0,a.Z)(e,g),v=(0,u.J7)(),h=(0,i.useState)(!1),b=(0,o.Z)(h,2),y=b[0],w=b[1],E=(0,s.th)(),C=(0,s.uk)();(0,c.Z)((function(){w(!1)}),[E]);var O=(0,m.gI)("room:ReadAll"),x=(0,i.useMemo)((function(){return v.filter((function(e){return e.isMember}))}),[v]),k=O&&x.length>0,S=k&&!y?x:v,Z=(0,d.UL)();return i.createElement(i.Fragment,null,k&&i.createElement(p.Z,{onFilterClick:function(e){return function(t){t.stopPropagation(),w(e)}},showAllRooms:y}),S.map((function(e,o){var a=e.id,c=e.untouchable;return i.createElement(i.Fragment,{key:a},i.createElement(f.Z,(0,r.Z)({id:a,hideAlerts:!t,Wrapper:l.Text,isSidebar:t,differentiateIsMember:y,spaceSlug:C,selectedId:Z},n)),c&&o!==S.length-1&&i.createElement(l.Flex,{border:{side:"top",color:"border"},margin:[1.5,0],"data-testid":"roomLabel-warRoomSeparator"}))})))}},55917:function(e,t,n){n.d(t,{S:function(){return i},x:function(){return a}});var r=n(71893),o=n(59978),a=(0,r.default)(o.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-i0gfkp-0"})(["transform:",";"],(function(e){return e.right?"rotate(0)":"rotate(180deg)"})),i=(0,r.default)(o.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-i0gfkp-1"})(["&&{padding:2px 16px;font-size:12px;height:auto;width:auto;min-width:96px;}"])},77872:function(e,t,n){var r=n(87462),o=n(4942),a=n(45987),i=n(29439),c=(n(92222),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),n(67294)),l=n(71893),u=n(89250),s=n(59978),d=n(82351),m=n(74059),f=["active","background","showFullname"],p=["active","spaceId","testIdPrefix","local","onClick","showFullname","color"];function g(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}var v,h=[],b=(0,l.default)(s.Flex).attrs((function(e){var t=e.active,n=(e.background,e.showFullname);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:n?"auto":7,height:7,background:t?"spaceSelected":"spaceIdle",justifyContent:"center",alignItems:"center",round:.5,padding:n?[0,1]:[0],margin:n?[0,0,1]:[0]},(0,a.Z)(e,f))})).withConfig({displayName:"spaceLabel__SpaceBox",componentId:"sc-1e67mnq-0"})(["cursor:pointer;&:hover{background:",";}"],(function(e){return e.active?(0,s.getColor)("spaceSelected"):(0,s.getColor)("spaceHovered")}));t.Z=(v=function(e){var t=e.active,n=e.spaceId,o=e.testIdPrefix,l=e.local,d=void 0!==l&&l,f=e.onClick,g=e.showFullname,v=e.color,y=(0,a.Z)(e,p),w=(0,u.s0)(),E=(0,m.vu)(n),C=function(e){if(!e)return h;var t=e.split(" "),n=(0,i.Z)(t,2),r=n[0],o=n[1];return[r[0],o?o[0]:""]}(E.name),O=(0,i.Z)(C,2),x=O[0],k=O[1],S=(0,c.useCallback)((function(){return f?f(E):w(d?"/overview":"/spaces/".concat(E.slug))}),[E.slug,d,f]);return c.createElement(b,(0,r.Z)({active:t,"data-testid":"".concat(o||"spaceLabel-space","-").concat(E.slug),onClick:S},y,{showFullname:g}),d?c.createElement(s.Icon,{name:"node",color:t?"text":"textLite"}):g?c.createElement(s.TextSmall,{strong:!0,color:t?"main":v||"textLite"},E.name):c.createElement(c.Fragment,null,c.createElement(s.TextSmall,{strong:!0,color:t?"text":v||"textLite"},x),c.createElement(s.TextSmall,{strong:!0,color:t?"textLite":v||"textLite"},k)))},function(e){var t=(0,m.vu)(e.spaceId);return e.showFullname?c.createElement(v,e):c.createElement(d.Z,{content:null===t||void 0===t?void 0:t.name,align:"right",isBasic:!0},c.createElement(s.Box,null,c.createElement(v,e)))})},94666:function(e,t,n){n.d(t,{zm:function(){return f},ZN:function(){return p},WA:function(){return m},J9:function(){return g},Wy:function(){return b},nP:function(){return C},H4:function(){return v},kf:function(){return h},Qk:function(){return w}});n(47941),n(82526),n(38880),n(49337),n(33321),n(69070);var r=n(4942),o=(n(41539),n(15581),n(2490),n(34514),n(54747),n(26833),n(21249),n(57640),n(9924),n(57327),n(88449),n(59849),n(4480)),a=n(34912),i=n(13477),c=n(74059),l={ids:(0,o.xu)({key:"spaceMemberIds",default:[]}),updatedAt:(0,o.xu)({key:"spaceMembersUpdatedAt",default:""}),loaded:(0,o.xu)({key:"spaceMembersLoaded",default:!1})},u=(0,o.xu)({key:"spaceMemberRole",default:""});function s(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=(0,o.CG)({key:"spaceMemberState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(l[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){(0,e.set)(l[n](t),r)}}}),f=function(e,t){Object.values(l).forEach((function(n){return e(n(t))}))},p=(0,o.CG)({key:"spaceMemberRoleState",get:function(e){var t=e.id,n=e.spaceId;return function(e){return(0,e.get)(u({id:t,spaceId:n}))}},set:function(e){var t=e.id,n=e.spaceId;return function(e,r){(0,e.set)(u({id:t,spaceId:n}),r)}}}),g=(0,o.CG)({key:"spaceMembersRoleState",set:function(e){return function(t,n){var r=t.set;n.forEach((function(t){var n=t.id,o=t.role;r(p({id:n,spaceId:e}),o)}))}},get:function(e){var t=e.ids,n=e.spaceId;return function(e){var r=e.get;return t.map((function(e){return r(p({id:e,spaceId:n}))}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),v=function(){var e,t,n=(0,c.th)();return e=n,t="ids",(0,o.sJ)(m({id:e,key:t}))},h=function(e){var t=(0,c.th)();return(0,o.sJ)(g({ids:e,spaceId:t}))},b=function(){return"admin"===function(e){var t=(0,c.th)();return(0,o.sJ)(p({id:e,spaceId:t}))}((0,i.Iy)("id"))},y=(0,o.CG)({key:"currentSpaceMembersState",get:function(e){var t=e.ids,n=e.spaceId;return function(e){var r=e.get;return t.map((function(e){var t=r((0,a.mX)({id:e})),o=r(p({id:e,spaceId:n}));return d(d({},t),{},{role:o})}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),w=function(){var e=(0,c.th)(),t=v();return(0,o.sJ)(y({ids:t,spaceId:e}))},E=(0,o.CG)({key:"spaceAdminsState",get:function(e){var t=e.memberIds,n=e.spaceId;return function(e){return(0,e.get)(y({ids:t,spaceId:n})).filter((function(e){return"admin"===e.role}))}}}),C=function(){var e=(0,c.th)(),t=v();return(0,o.sJ)(E({memberIds:t,spaceId:e}))}},83732:function(e,t,n){var r=n(93433),o=n(15861),a=n(64687),i=n.n(a),c=(n(66992),n(41539),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(4480)),l=n(30266),u=n(74059),s=n(58502);t.Z=function(e){var t=e.onSuccess,n=e.onError,a=e.isDefault,d=void 0!==a&&a;return(0,c._8)((function(e){var a=e.set;return function(){var e=(0,o.Z)(i().mark((function e(o){var c,m,f,p,g,v,h,b;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=o.name,m=o.userId,f=o.email,e.prev=1,!d){e.next=8;break}return e.next=5,(0,l.A6)(m,f);case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,(0,l.wh)(c);case 10:e.t0=e.sent;case 11:p=e.t0,g=p.data,v=g.id,h=g.slug,b=g.name,a((0,s.ZP)(v),{id:v,slug:h,name:d?b:c,loaded:!0}),a((0,s.bo)(h),v),a((0,u.st)("ids"),(function(e){return e=(0,r.Z)(new Set([].concat((0,r.Z)(e),[v])))})),a((0,u.st)("loaded"),!0),t&&t(g),e.next=24;break;case 21:e.prev=21,e.t1=e.catch(1),n&&n();case 24:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t){return e.apply(this,arguments)}}()}),[t,n])}},53606:function(e,t,n){var r=n(15861),o=n(29439),a=n(64687),i=n.n(a),c=(n(57327),n(41539),n(88449),n(2490),n(59849),n(4480)),l=n(93017),u=n(30266),s=n(46585),d=n(74059),m=n(58502),f=n(57079),p=n(94666),g=n(95383);t.Z=function(e){var t=(0,l.Z)(),n=(0,o.Z)(t,2)[1];return(0,c._8)((function(t){var a=t.snapshot,c=t.set,l=t.reset;return function(){var t=(0,r.Z)(i().mark((function t(r){var v,h,b,y,w,E,C,O;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v=r.onSuccess,h=r.onError,t.next=3,a.getPromise((0,d.st)("ids"));case 3:if(b=t.sent,y=b.filter((function(t){return e!==t})),w=(0,o.Z)(y,1),E=w[0]){t.next=9;break}return n({header:"Spaces",text:s.T$.delete}),t.abrupt("return");case 9:if(t.t0=E,!t.t0){t.next=14;break}return t.next=13,a.getPromise((0,m.ZP)(E));case 13:t.t0=t.sent;case 14:return C=t.t0,O=C.slug,c((0,d.st)("ids"),y),c(f.Z,(function(t){return t.filter((function(t){return t!==e}))})),t.prev=18,t.next=21,(0,u.Ns)(e);case 21:v&&v(O),(0,p.zm)(l,e),(0,g.r1)(l,e),l((0,m.ZP)(e)),t.next=32;break;case 27:t.prev=27,t.t1=t.catch(18),c((0,d.st)("ids"),b),n(t.t1),h&&h();case 32:case"end":return t.stop()}}),t,null,[[18,27]])})));return function(e){return t.apply(this,arguments)}}()}),[e])}},20428:function(e,t,n){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(4942),o=n(15861),a=n(29439),i=n(64687),c=n.n(i),l=n(4480),u=n(74059),s=n(30266),d=n(93017);function m(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=(0,d.Z)(),n=(0,a.Z)(t,2),r=n[0],i=n[1];return(0,l._8)((function(t){var n=t.snapshot,a=t.set;return function(){var t=(0,o.Z)(c().mark((function t(o,l){var d,m,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return d=l.onSuccess,m=l.onFail,t.next=3,n.getPromise((0,u.U7)({id:e}));case 3:return p=t.sent,a((0,u.U7)({id:e}),(function(e){return f(f({},e),o)})),t.prev=5,t.next=8,(0,s.$F)(e,o);case 8:r({header:"Space successfully updated!"}),d&&d(),t.next=17;break;case 12:t.prev=12,t.t0=t.catch(5),a((0,u.U7)({id:e}),p),i(t.t0),m&&m();case 17:case"end":return t.stop()}}),t,null,[[5,12]])})));return function(e,n){return t.apply(this,arguments)}}()}),[e])}},65351:function(e,t,n){var r=n(29439),o=n(67294),a=n(4822);t.Z=function(e,t,n,i){var c=(0,a.I0)("modal"),l=(0,r.Z)(c,2),u=l[0],s=l[1],d=(0,a.I0)("modalTab"),m=(0,r.Z)(d,2),f=m[0],p=m[1],g=(0,a.I0)("modalParams"),v=(0,r.Z)(g,2),h=v[0],b=v[1],y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;"string"===typeof t&&p(t),s(e),n&&b(n)};return(0,o.useEffect)((function(){t&&y(n,i)}),[]),{isModalOpen:e===u,currentModalTab:f,handleChangeModalTab:p,handleOpenModal:y,handleCloseModal:function(){p(""),s(""),b()},params:h}}},55899:function(e,t,n){var r=n(15861),o=n(64687),a=n.n(o),i=n(67294),c=n(7335),l=n(22965),u=n(96929),s=n(74059),d=n(95383),m=n(19368);t.Z=function(){var e=(0,m.P)(),t=(0,d.yE)(),n=(0,s.th)(),o=(0,c.XU)(),f=(0,u.Ww)(n,t);return(0,i.useCallback)(function(){var i=(0,r.Z)(a().mark((function r(i){var c,u,s,d=arguments;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=(c=d.length>1&&void 0!==d[1]?d[1]:{}).onSuccess,s=c.onFail,r.next=3,f(i,{onSuccess:function(r){(0,l.jG)({cacheKeyPrefix:e,nodeIds:r,roomIds:t,spaceId:n}),null===u||void 0===u||u()},onFail:s});case 3:return r.next=5,o(i);case 5:case"end":return r.stop()}}),r)})));return function(e){return i.apply(this,arguments)}}(),[f,o])}},91128:function(e,t,n){var r=n(29439),o=n(48286),a=n(46667),i=n(9058);t.Z=function(){var e=(0,a.Z)(!1),t=(0,r.Z)(e,2),n=t[0],c=t[1],l=(0,i.e)();return(0,o.Z)((function(){if(l)return l.getRoot().updateAttribute("paused",!l.getRoot().getAttribute("autofetchOnWindowBlur")&&l.getRoot().getAttribute("blurred")||n),function(){return l.getRoot().updateAttribute("paused",!l.getRoot().getAttribute("autofetchOnWindowBlur")&&l.getRoot().getAttribute("blurred"))}}),[n]),c}},93033:function(e,t,n){var r=n(89250),o=n(67294),a=n(12599),i=n(74059),c=n(2509);t.Z=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).roomSlug,t=(0,i.uk)(),n=(0,r.s0)(),l=(0,r.TH)().pathname,u="".concat(l);return(0,o.useCallback)((function(){var r=e?(0,a.Gn)(c.xN,{spaceSlug:t,settingsTab:c.eq,settingsSubTab:e}):"/spaces/".concat(t,"/settings");n(r,{state:{previousUrlPath:u}})}),[u,n,e,t])}},27624:function(e,t,n){var r=n(37518),o=n(96929),a=n(22965),i=n(19368);t.Z=function(e){var t=(0,i.P)(),n=(0,r.UL)(),c=(0,r.tE)(e||n,"spaceId");return(0,o.nI)(c,e||n,{onSuccess:function(r){return(0,a.Br)({cacheKeyPrefix:t,nodeIds:r,roomId:e||n,spaceId:c})}})}},61152:function(e,t,n){var r=n(65351);t.Z=function(e,t){var n=(0,r.Z)(e,t),o=n.isModalOpen,a=n.handleOpenModal,i=n.handleCloseModal;return[o,o?i:a,a,i,n.params]}}}]); \ No newline at end of file