import{n as b,s as l,a as p}from"./utils.CCeXIeLi.js";const i=[];function _(e,r){return{subscribe:d(e,r).subscribe}}function d(e,r=b){let t=null;const o=new Set;function u(n){if(p(e,n)&&(e=n,t)){const c=!i.length;for(const s of o)s[1](),i.push(s,e);if(c){for(let s=0;s{o.delete(s),o.size===0&&t&&(t(),t=null)}}return{set:u,update:f,subscribe:a}}function h(e){let r;return l(e,t=>r=t)(),r}export{h as g,_ as r,d as w}; //# sourceMappingURL=index.BivHbqgg.js.map