"use strict";exports.id=50242,exports.ids=[50242],exports.modules={50242:(a,b,c)=>{c.d(b,{m:()=>j});var d=c(67484),e=c(4218);let f=null,g=null;function h(){return!f||Date.now()-f.at>9e4?null:f.data}async function i(a=!1){if(!a){let a=h();if(a)return a;if(g)return g}return g=(0,e.eh)().then(a=>(f={data:a,at:Date.now()},a)).finally(()=>{g=null})}function j(a=!0){let[b,c]=(0,d.useState)(()=>a?h():null),[e,k]=(0,d.useState)(()=>a&&!h()),[l,m]=(0,d.useState)(!1),n=(0,d.useCallback)(async(b=!1)=>{if(a){k(!0),m(!1);try{let a=await i(b);c(a)}catch{c(null),m(!0)}finally{k(!1)}}},[a]),o=b?.subscription??null;return{workspace:b,subscription:o,loading:e,error:l,refresh:()=>(f=null,g=null,n(!0))}}}};