import{__spreadValues as t}from"./chunk.6M63UXML.js";function watch(a,i){const s=t({waitUntilFirstUpdate:!1},i);return(t,i)=>{const{update:n}=t,r=Array.isArray(a)?a:[a];t.update=function(t){r.forEach((a=>{const n=a;if(t.has(n)){const a=t.get(n),r=this[n];a!==r&&(s.waitUntilFirstUpdate&&!this.hasUpdated||this[i](a,r))}})),n.call(this,t)}}}export{watch};