import{u as i,A as s,E as c,I as d}from"./index-Bm2SqMk3.js";async function u(t){const{rpcSessionId:a}=i.getContainingTrack(t),{rpcManager:o}=i.getSession(t),n=i.getContainingView(t);if(!n.initialized||t.error||!t.statsReadyAndRegionNotTooLarge)return;t.setLoading(!0);const e=await o.call(a,"CoreGetFeatures",{sessionId:a,regions:n.staticBlocks.contentBlocks,adapterConfig:t.adapterConfig});t.setFeatures(i.dedupe(e,r=>r.id())),t.setLoading(!1)}function g(t,a,o){s(t,c(async()=>{try{await a()}catch(n){d(t)&&t.setError(n)}},o))}function y(t){g(t,async()=>{await u(t)},{delay:1e3})}export{y as doAfterAttach};
