!function(e,n){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=n(require("micro-memoize"),require("fast-equals")):"function"==typeofdefine&&define.amd?define(["micro-memoize","fast-equals"],n):(e="undefined"!=typeofglobalThis?globalThis:e||self).moize=n(e.memoize,e.fe)}(this,(function(e,n){"use strict";functiont(){returnt=Object.assign?Object.assign.bind():function(e){for(varn=1;n<arguments.length;n++){vart=arguments[n];for(varrint)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}returne},t.apply(this,arguments)}varr={isDeepEqual:!1,isPromise:!1,isReact:!1,isSerialized:!1,isShallowEqual:!1,matchesArg:void0,matchesKey:void0,maxAge:void0,maxArgs:void0,maxSize:1,onExpire:void0,profileName:void0,serializer:void0,updateCacheForKey:void0,transformArgs:void0,updateExpire:!1};functioni(){for(vare=arguments.length,n=newArray(e),t=0;t<e;t++)n[t]=arguments[t];returnn.reduce((function(e,n){return"function"==typeofe?"function"==typeofn?function(){e.apply(this,arguments),n.apply(this,arguments)}:e:"function"==typeofn?n:void0}))}functiono(){for(vare=arguments.length,n=newArray(e),t=0;t<e;t++)n[t]=arguments[t];returnn.reduce((function(e,n){return"function"==typeofe?"function"==typeofn?function(){returne(n.apply(this,arguments))}:e:"function"==typeofn?n:void0}))}functiona(e,n){for(vart=0;t<e.length;t++)if(e[t].key===n)returnt;return-1}functionu(e,n){vart="function"==typeofn?n:function(n,t){for(varr=0;r<t.length;r++)if(!e(n[r],t[r]))return!1;return!0};returnfunction(e,n){for(varr=0;r<e.length;r++)if(e[r].length===n.length&&t(e[r],n))returnr;return-1}}functions(e,n){returnn&&n!==r?t({},e,n,{onCacheAdd:i(e.onCacheAdd,n.onCacheAdd),onCacheChange:i(e.onCacheChange,n.onCacheChange),onCacheHit:i(e.onCacheHit,n.onCacheHit),transformArgs:o(e.transformArgs,n.transformArgs)}):e}functionc(e,n,t){try{varr=t||n||"anonymous";Object.defineProperty(e,"name",{configurable:!0,enumerable:!1,value:"moized("+r+")",writable:!0})}catch(e){}}functionf(e,n,t){varr=a(e,n);-1!==r&&(clearTimeout(e[r].timeoutId),t&&e.splice(r,1))}functionl(e,n){vart=setTimeout(e,n);return"function"==typeoft.unref&&t.unref(),t}functionp(e,n){returnfunction(t){varr=t.keys[0],i=a(e,r);~i&&(f(e,r,!1),e[i].timeoutId=l(e[i].expirationMethod,n.maxAge))}}functionm(e,n,t,r){vari="number"==typeofn.maxAge&&isFinite(n.maxAge)?function(e,n,t,r){vari=n.maxAge;returnfunctiono(s,c,p){varm=s.keys[0];if(-1===a(e,m)){varh=function(){vari=u(t,r)(s.keys,m),a=s.values[i];~i&&(s.keys.splice(i,1),s.values.splice(i,1),"function"==typeofn.onCacheChange&&n.onCacheChange(s,c,p)),f(e,m,!0),"function"==typeofn.onExpire&&!1===n.onExpire(m)&&(s.keys.unshift(m),s.values.unshift(a),o(s,c,p),"function"==typeofn.onCacheChange&&n.onCacheChange(s,c,p))};e.push({expirationMethod:h,key:m,timeoutId:l(h,i)})}}}(e,n,t,r):void0;return{onCacheAdd:i,onCacheHit:i&&n.updateExpire?p(e,n):void0}}varh={anonymousProfileNameCounter:1,isCollectingStats:!1,profiles:{}},g=!1;functiony(e){e?deleteh.profiles[e]:h.profiles={}}functiond(e){varn=e.profileName;returnfunction(){n&&!h.profiles[n]&&(h.profiles[n]={calls:0,hits:0}),h.profiles[n].calls++}}functionv(e){returnfunction(){varn=h.profiles,t=e.profileName;n[t]||(n[t]={calls:0,hits:0}),n[t].calls++,n[t].hits++}}functionx(e){returne.displayName||e.name||"Anonymous "+h.anonymousProfileNameCounter++}functionC(e,n){returne?(n/e*100).toFixed(4)+"%":"0.0000%"}functionA(e){h.isCollectingStats||g||(console.warn('Stats are not currently being collected, please run "collectStats" to enable them.'),g=!0);varn=h.profiles;if(e){if(!n[e])return{calls:0,hits:0,usage:"0.0000%"};varr=n[e];returnt({},r,{usage:C(r.calls,r.hits)})}vari=Object.keys(h.profiles).reduce((function(e,t){returne.calls+=n[t].calls,e.hits+=n[t].hits,e}),{calls:0,hits:0});returnt({},i,{profiles:Object.keys(n).reduce((function(e,n){returne[n]=A(n),e}),{}),usage:C(i.calls,i.hits)})}varz={arguments:!0,callee:!0,caller:!0,constructor:!0,length:!0,name:!0,prototype:!0};functionS(e,n,t){void0===t&&(t=[]),Object.getOwnPr