import{n as b,l as m,r as q,s as v,m as x}from"./scheduler.BVZXYSFx.js";const u=[];function z(s,i){return{subscribe:A(s,i).subscribe}}function A(s,i=b){let r;const n=new Set;function a(t){if(v(s,t)&&(s=t,r)){const o=!u.length;for(const e of n)e[1](),u.push(e,s);if(o){for(let e=0;e<u.length;e+=2)u[e][0](u[e+1]);u.length=0}}}function l(t){a(t(s))}function f(t,o=b){const e=[t,o];return n.add(e),n.size===1&&(r=i(a,l)||b),t(s),()=>{n.delete(e),n.size===0&&r&&(r(),r=null)}}return{set:a,update:l,subscribe:f}}function E(s,i,r){const n=!Array.isArray(s),a=n?[s]:s;if(!a.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=i.length<2;return z(r,(f,t)=>{let o=!1;const e=[];let d=0,p=b;const g=()=>{if(d)return;p();const c=i(n?e[0]:e,f,t);l?f(c):p=x(c)?c:b},k=a.map((c,_)=>m(c,w=>{e[_]=w,d&=~(1<<_),o&&g()},()=>{d|=1<<_}));return o=!0,g(),function(){q(k),p(),o=!1}})}function S(s){return{subscribe:s.subscribe.bind(s)}}var h;const T=((h=globalThis.__sveltekit_kfanec)==null?void 0:h.base)??"/assets/caknatani/know-your-food";var y;const j=((y=globalThis.__sveltekit_kfanec)==null?void 0:y.assets)??T;export{S as a,T as b,j as c,E as d,z as r,A as w};
