try{let 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]="568f6483-fff7-49e9-b001-c9c2ce50127e",e._sentryDebugIdIdentifier="sentry-dbid-568f6483-fff7-49e9-b001-c9c2ce50127e")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"5d649380d18bd074b7bbfcec2ab9936055a4607a"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[2314],{25291:(e,t,o)=>{o.d(t,{A:()=>f});var r=o(64867),n=o(42790),s=o(53749),d=o(97940),i=o(96540),l=o(258);const f=function(e,t){let{spaceId:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[f,a]=(0,i.useState)(null),{after:c,before:u}=(0,n.rW)(),g=(0,i.useRef)();g.current={after:c<0?c:Math.floor(c/1e3),before:c<0?0:Math.ceil(u/1e3)};const h=(0,i.useRef)(!0),b=e=>{if(e&&e?.response){const{data:t}=e.response,{errorMsgKey:o}=t;a(o)}else w((e=>({...e,contextsHardHash:"invalid"}))),a(e)},y=(0,i.useMemo)((()=>(0,r.O)(f)?5e3:65e3),[f]),p=(0,i.useRef)(),w=(0,s.DQ)(e,!0),I=e=>{let{results:t,versions:o}=e;w((e=>({...e,contextsHardHash:"invalid",...o}))),a((!t||!Object.keys(t).length)&&"No data for this period")};return(0,d.A)((()=>({cache:!1,key:`spaces.${o}.rooms.${e}.charts`,polling:!0,autorun:!!o&&!!e,fetch:()=>(h.current=!1,(0,l.a9)(o,e,t,{...g.current})),association:{getIds:()=>(0,s.Uo)({roomId:e,merge:p.current===t}),getError:()=>(0,s.Zr)({id:e,key:"error"}),getLoaded:()=>(0,s.Zr)({id:e,key:"loaded"}),getUpdatedAt:()=>(0,s.Zr)({id:e,key:"updatedAt"})},getResource:t=>(0,s.YP)({id:e,key:t}),getResourcesInitializer:()=>{const o=(0,s.b0)({id:e,merge:p.current===t,nodeIds:t});return p.current=t,o},getResourceInitialState:e=>({fullyLoaded:!0,...e}),onFail:b,pollingOptions:{pollingInterval:y},onReceive:I,after:c,nodeIds:t,force:!0,throwAllErrors:!0})),[o,e,y,t,c,u]),f}},64867:(e,t,o)=>{o.d(t,{O:()=>n});const r={ErrNoChartExist:"ErrNoChartExist"},n=function(e){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:r)[e]}},85660:(e,t,o)=>{o.d(t,{A:()=>s});var r=o(96540);const n={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0},s=()=>{const[e,t]=(0,r.useState)(null),[o,s]=(0,r.useState)(n),d=(0,r.useMemo)((()=>new window.ResizeObserver((e=>{if(e[0]){const{x:t,y:o,width:r,height:n,top:d,left:i,bottom:l,right:f}=e[0].contentRect;s({x:t,y:o,width:r,height:n,top:d,left:i,bottom:l,right:f})}}))),[]);return(0,r.useLayoutEffect)((()=>{if(e)return d.observe(e),()=>{d.disconnect()}}),[e]),[t,o]}}}]);