import { $ as l } from "./useEffectEvent-B4Fd4l1o.es.js";
import { useRef as c, useEffect as u } from "react";
function p(s, r) {
  const t = c(!0), e = c(null);
  let o = l(s);
  u(() => (t.current = !0, () => {
    t.current = !1;
  }), []), u(() => {
    let f = e.current;
    t.current ? t.current = !1 : (!f || r.some((a, n) => !Object.is(a, f[n]))) && o(), e.current = r;
  }, r);
}
export {
  p as $
};
//# sourceMappingURL=useUpdateEffect-CxkSZ4PM.es.js.map
