import{bZ as e,g as t}from"./vendor-zU9dkAB-.js";function o(o){let n=null;const c="undefined"==typeof document?null:document.createElement("div"),r=()=>n??c??{},s=e({count:o.count(),getScrollElement:r,estimateSize:o.estimateSize,overscan:o.overscan??8}),l=()=>{queueMicrotask(()=>{try{s.measure()}catch{}})};t(()=>{const e=o.count();s.setOptions({...s.options,count:e}),l()});return{virtualizer:s,setScrollElement:e=>{n=e??null,s.setOptions({...s.options,getScrollElement:r}),l()},measure:()=>{try{s.measure()}catch{}},scrollToIndex:(e,t)=>{try{s.scrollToIndex(e,t)}catch{}}}}export{o as c};
