try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cfc00e38-e914-4264-9d5d-41059b2caf6d",e._sentryDebugIdIdentifier="sentry-dbid-cfc00e38-e914-4264-9d5d-41059b2caf6d")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"bbf0f036d26e8d5cdf711f08d224a9283a4dee0b"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1861],{61841:(e,t,n)=>{n.d(t,{Ay:()=>i,KI:()=>f,TP:()=>l});var o=n(96540),r=n(88934),d=n(19186),s=n(24609);const a=(e,t,n)=>{const r=t();(0,o.useLayoutEffect)((()=>{r!==e&&n(e)}),[r,e])},l=()=>{const{roomSlug:e}=(0,r.g)(),t=(0,d.A2)();return a(e,d.QW,t),e},f=()=>{const{spaceSlug:e}=(0,r.g)(),t=(0,s.hX)();return a(e,s.bq,t),e},i=()=>[f(),l()]},85660:(e,t,n)=>{n.d(t,{A:()=>d});var o=n(96540);const r={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0},d=()=>{const[e,t]=(0,o.useState)(null),[n,d]=(0,o.useState)(r),s=(0,o.useMemo)((()=>new window.ResizeObserver((e=>{if(e[0]){const{x:t,y:n,width:o,height:r,top:s,left:a,bottom:l,right:f}=e[0].contentRect;d({x:t,y:n,width:o,height:r,top:s,left:a,bottom:l,right:f})}}))),[]);return(0,o.useLayoutEffect)((()=>{if(e)return s.observe(e),()=>{s.disconnect()}}),[e]),[t,n]}},96026:(e,t,n)=>{n.d(t,{l:()=>u,q:()=>c});n(25509),n(65223),n(60321),n(41927),n(11632),n(64377),n(66771),n(12516),n(68931),n(52514),n(35694),n(52774),n(49536),n(21926),n(94483),n(16215);var o=n(96540),r=n(88934),d=n(42790),s=n(61841),a=n(24609),l=n(24013),f=n(19075),i=n(91421);const c=e=>{let{alertId:t,alertName:n,nodeIds:d=[]}=e;const a=(0,r.Zp)(),{setState:c}=(0,i.$h)(),[u]=(0,s.Ay)(),{name:h}=(0,f.JL)(t),b=n||h,{isParent:g}=(0,l.xY)(d[0]),{loaded:y,value:p,hasError:w,error:m}=(0,i.wd)({node:{value:d[0],isParent:g},path:"/health"}),E=!!p?.tree?.["/health/alerts/prototypes"]?.[`health:alert:prototype:${b}`],[,I]=(0,i.PJ)();return{canEdit:y&&!w&&E,goToEdit:(0,o.useCallback)((e=>{d=e?Array.from(new Set([e,...d])):d,c({alertName:b,isAlert:!0}),I(!0,{nodeId:d[0]})}),[b,d,u,c,a]),error:m?.errorMessage||m}},u=()=>{const e=(0,r.Zp)(),{slug:t}=(0,a.ap)(),n=(0,d.rI)();return(0,o.useCallback)((o=>{o&&(n((e=>({...e,dyncfgSearchTerm:o}))),e(`/spaces/${t}/settings/configurations`,{replace:!0}))}),[e,n,t])}}}]);