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