1 | !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).UseDeepCompareEffect={},e.React)}(this,(function(e,r){"use strict";function t(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var n=t(r);function f(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(!e)return;if("string"==typeof e)return o(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,r)}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var i=Object.prototype.hasOwnProperty;function u(e,r,t){for(var n,o=f(e.keys());!(n=o()).done;)if(a(t=n.value,r))return t}function a(e,r){var t,n,o;if(e===r)return!0;if(e&&r&&(t=e.constructor)===r.constructor){if(t===Date)return e.getTime()===r.getTime();if(t===RegExp)return e.toString()===r.toString();if(t===Array){if((n=e.length)===r.length)for(;n--&&a(e[n],r[n]););return-1===n}if(t===Set){if(e.size!==r.size)return!1;for(var c,l=f(e);!(c=l()).done;){if((o=n=c.value)&&"object"==typeof o&&!(o=u(r,o)))return!1;if(!r.has(o))return!1}return!0}if(t===Map){if(e.size!==r.size)return!1;for(var s,y=f(e);!(s=y()).done;){if((o=(n=s.value)[0])&&"object"==typeof o&&!(o=u(r,o)))return!1;if(!a(n[1],r.get(o)))return!1}return!0}if(t===ArrayBuffer)e=new Uint8Array(e),r=new Uint8Array(r);else if(t===DataView){if((n=e.byteLength)===r.byteLength)for(;n--&&e.getInt8(n)===r.getInt8(n););return-1===n}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===r.byteLength)for(;n--&&e[n]===r[n];);return-1===n}if(!t||"object"==typeof e){for(t in n=0,e){if(i.call(e,t)&&++n&&!i.call(r,t))return!1;if(!(t in r)||!a(e[t],r[t]))return!1}return Object.keys(r).length===n}}return e!=e&&r!=r}function c(e){var r=n.useRef(e),t=n.useRef(0);return a(e,r.current)||(r.current=e,t.current+=1),n.useMemo((function(){return r.current}),[t.current])}e.default=function(e,r){return n.useEffect(e,c(r))},e.useDeepCompareEffectNoCheck=function(e,r){return n.useEffect(e,c(r))},e.useDeepCompareMemoize=c,Object.defineProperty(e,"__esModule",{value:!0})}));
|