import{h as c,b as n,d as E,E as T,e as k,g as S,i as y,j as A,k as d,u as q,q as u,S as x}from"./runtime.BHiCNJhu.js";function N(r,f,i){c&&n();var t=r,a,s;E(()=>{a!==(a=f())&&(s&&(y(s),s=null),a&&(s=k(()=>i(t,a))))},T),c&&(t=S)}function h(r,f){return r===f||(r==null?void 0:r[x])===f}function R(r={},f,i,t){return A(()=>{var a,s;return d(()=>{a=s,s=[],q(()=>{r!==i(...s)&&(f(r,...s),a&&h(i(...a),r)&&f(null,...a))})}),()=>{u(()=>{s&&h(i(...s),r)&&f(null,...s)})}}),r}export{R as b,N as c};
