import{A as a,z as b}from"./index-DWyDLubb.js";class i{#r=new WeakMap;#s;#e;static entries=new WeakMap;constructor(r){this.#e=r}observe(r,s){var e=this.#r.get(r)||new Set;return e.add(s),this.#r.set(r,e),this.#t().observe(r,this.#e),()=>{var o=this.#r.get(r);o.delete(s),o.size===0&&(this.#r.delete(r),this.#s.unobserve(r))}}#t(){return this.#s??(this.#s=new ResizeObserver(r=>{for(var s of r){i.entries.set(s.target,s);for(var e of this.#r.get(s.target)||[])e(s)}}))}}var v=new i({box:"border-box"});function n(t,r,s){var e=v.observe(t,()=>s(t[r]));a(()=>(b(()=>s(t[r])),e))}export{n as b};
