import{a9 as g,aa as d,u as i,V as m,ab as e}from"./rpcWorker-CVTx5FIM.js";import{a as y}from"./aborting-9Hf1R5vU.js";function E(t){g(t,d(async()=>{try{const a=i.getContainingView(t);if(!a.initialized||!t.statsReadyAndRegionNotTooLarge)return;const{rpcManager:n}=i.getSession(t),{sources:o,mafFilter:s,adapterConfig:c}=t;if(!o)return;const r=m.getRpcSessionId(t),u=await n.call(r,"MultiVariantGetSimplifiedFeatures",{regions:a.dynamicBlocks.contentBlocks,sources:o,mafFilter:s,sessionId:r,adapterConfig:c});e(t)&&t.setFeatures(u.map(p=>new i.SimpleFeature(p)))}catch(a){!y.isAbortException(a)&&e(t)&&(console.error(a),i.getSession(t).notifyError(`${a}`,a))}},{delay:1e3}))}export{E as getMultiVariantFeaturesAutorun};
