import r from"@babel/runtime/helpers/defineProperty";import{useRef as e,useEffect as t}from"react";import{isEqual as o}from"lodash";function n(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function c(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var i=function(r,n,i){var f=e(n);t((function(){if(r){var e={},t=!1;i.forEach((function(r){var c=r.key,i=r.equals,p=void 0===i?o:i,a=r.transform,u=n[c],O=a?a(u,n):u,b=f.current[c];void 0===O||p(O,b)||(e[c]=O,t=!0)})),t&&(r.setState(e),f.current=c(c({},f.current),e))}}),[r,n,i])};export{i as useSyncProps};
//# sourceMappingURL=useSyncProps.js.map
