Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@welldone-software/why-did-you-render

Package Overview
Dependencies
Maintainers
2
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@welldone-software/why-did-you-render - npm Package Compare versions

Comparing version 5.0.0-alpha.3 to 5.0.0-alpha.4

4

dist/whyDidYouRender.min.js
/**
* @welldone-software/why-did-you-render 5.0.0-alpha.3
* @welldone-software/why-did-you-render 5.0.0-alpha.4
* MIT Licensed

@@ -8,3 +8,3 @@ * Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).whyDidYouRender=t(e.lodash)}(this,(function(e){"use strict";function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(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(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?c(e):t}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function u(e,t,r){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw a}}return r}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}var m,v="different",g="deepEquals",b="date",D="regex",w="reactElement",O="function",_="same",k=(r(m={},v,"different objects"),r(m,g,"different objects that are equal by value"),r(m,b,"different date objects with the same value"),r(m,D,"different regular expressions with the same value"),r(m,w,"different React elements (remember that the <jsx/> syntax always produces a *NEW* immutable React element so a component that receives <jsx/> as props always re-renders)"),r(m,O,"different functions with the same name"),r(m,_,"same objects by ref (===)"),m),R="function"==typeof Symbol&&Symbol.for,E=R?Symbol.for("react.memo"):60115,S=R?Symbol.for("react.forward_ref"):60112,N="undefined"!=typeof Element,j="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,x=function(e){return e.$$typeof===j};function C(e,t,r,n,o){return r.push({diffType:o,pathString:n,prevValue:e,nextValue:t}),o!==v}var T=new WeakMap;function P(t,r,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4?arguments[4]:void 0,c=i.detailed;if(t===r)return c&&C(t,r,n,a,_),!0;if(!t||!r)return C(t,r,n,a,v);if(e.isArray(t)&&e.isArray(r)){var s=t.length;if(s!==r.length)return C(p(t),p(r),n,a,v);for(var f=[],u=0,l=s;l--;l>0){var d=P(t[l],r[l],f,"".concat(a,"[").concat(l,"]"),{detailed:c});d&&u++}return(c||u!==s)&&n.push.apply(n,f),C(p(t),p(r),n,a,u===s?g:v)}if(e.isSet(t)&&e.isSet(r)){if(t.size!==r.size)return C(new Set(t),new Set(r),n,a,v);var y,m=h(t);try{for(m.s();!(y=m.n()).done;){var k=y.value;if(!r.has(k))return C(new Set(t),new Set(r),n,a,v)}}catch(e){m.e(e)}finally{m.f()}return C(new Set(t),new Set(r),n,a,g)}if(e.isDate(t)&&e.isDate(r))return t.getTime()===r.getTime()?C(new Date(t),new Date(r),n,a,b):C(new Date(t),new Date(r),n,a,v);if(e.isRegExp(t)&&e.isRegExp(r))return t.toString()===r.toString()?C(t,r,n,a,D):C(t,r,n,a,v);if(N&&t instanceof Element&&r instanceof Element)return C(t,r,n,a,v);if(x(t)&&x(r)){if(t.type!==r.type)return C(t,r,n,a,v);var R=P(t.props,r.props,[],"".concat(a,".props"),{detailed:c});return C(t,r,n,a,R?w:v)}if(e.isFunction(t)&&e.isFunction(r)){if(t.name!==r.name)return C(t,r,n,a,v);var E=T.get(t),S=T.get(r);if(null!=E&&null!=S){var j=P(E,S,n,"".concat(a,":dependencies"),{detailed:c});return C(t,r,n,a,j?O:v)}return C(t,r,n,a,O)}if(e.isPlainObject(t)&&e.isPlainObject(r)){var Y=e.keys(t),L=Y.length;if(L!==e.keys(r).length)return C(o({},t),o({},r),n,a,v);for(var H=L;H--;H>0)if(!e.has(r,Y[H]))return C(o({},t),o({},r),n,a,v);for(var I=[],M=0,A=L;A--;A>0){var W=Y[A],F=P(t[W],r[W],I,"".concat(a,".").concat(W),{detailed:c});F&&M++}return(c||M!==L)&&n.push.apply(n,I),C(o({},t),o({},r),n,a,M===L?g:v)}return C(t,r,n,a,v)}function Y(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.detailed,a=void 0!==o&&o;try{var i=[];return P(e,t,i,r,{detailed:a}),i}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var L=!1;function H(t){var n=t.Component,o=t.displayName,a=t.hookName,i=t.prefixMessage,c=t.diffObjType,s=t.differences,f=t.values,u=t.options;s&&s.length>0?(u.consoleLog(r({},o,n),"".concat(i," of ").concat(c," changes:")),s.forEach((function(t){var n=t.pathString,o=t.diffType,i=t.prevValue,s=t.nextValue;u.consoleGroup("%c".concat("hook"===c?"[hook ".concat(a," result]"):"".concat(c,"."),"%c").concat(n,"%c"),"color:".concat(u.diffNameColor,";"),"color:".concat(u.diffPathColor,";"),"color:default;"),u.consoleLog("".concat(k[o],". (more info at ").concat(a?"http://bit.ly/wdyr3":"http://bit.ly/wdyr02",")")),u.consoleLog(r({},"prev ".concat(n),i),"!==",r({},"next ".concat(n),s)),o===g&&u.consoleLog({"For detailed diff, right click the following fn, save as global, and run: ":function(){!function(t,r,n){var o=n.pathString,a=n.consoleLog,i=Y(t,r,o,{detailed:!0}),c=Math.max.apply(Math,p(i.map((function(e){return e.pathString.length}))))+2;Object.entries(e.groupBy(e.sortBy(i,"pathString"),"diffType")).forEach((function(e){var t=l(e,2),r=t[0],n=t[1];a("%c".concat(k[r],":"),"text-decoration: underline; color: blue;"),n.forEach((function(e){a("".concat(e.pathString,":").padEnd(c," "),e.prevValue)}))}))}(i,s,{pathString:n,consoleLog:u.consoleLog})}}),u.consoleGroupEnd()}))):s&&(u.consoleLog(r({},o,n),"".concat(i," the ").concat(c," object itself changed but its values are all equal."),"props"===c?"This could have been avoided by making the component pure, or by preventing its father from re-rendering.":"This usually means this component called setState when no changes in its state actually occurred.","More info at ".concat("http://bit.ly/wdyr02")),u.consoleLog("prev ".concat(c,":"),f.prev," !== ",f.next,":next ".concat(c)))}function I(e){var t=e.Component,n=e.displayName,o=e.hookName,a=e.prevProps,i=e.prevState,c=e.prevHook,s=e.nextProps,f=e.nextState,u=e.nextHook,l=e.reason,p=e.options,d=e.ownerDataMap;if(function(e,t,r){return!(L||!r.logOnDifferentValues&&(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)&&(e.propsDifferences&&e.propsDifferences.some((function(e){return e.diffType===v}))||e.stateDifferences&&e.stateDifferences.some((function(e){return e.diffType===v}))||e.hookDifferences&&e.hookDifferences.some((function(e){return e.diffType===v}))))}(l,t,p)){p.consoleGroup("%c".concat(n),"color: ".concat(p.titleColor,";"));var y="Re-rendered because";if(l.propsDifferences&&(H({Component:t,displayName:n,prefixMessage:y,diffObjType:"props",differences:l.propsDifferences,values:{prev:a,next:s},options:p}),y="And because"),l.stateDifferences&&H({Component:t,displayName:n,prefixMessage:y,diffObjType:"state",differences:l.stateDifferences,values:{prev:i,next:f},options:p}),l.hookDifferences&&H({Component:t,displayName:n,prefixMessage:y,diffObjType:"hook",differences:l.hookDifferences,values:{prev:c,next:u},hookName:o,options:p}),l.propsDifferences&&l.ownerDifferences){var h=d.get(a),m=d.get(s);p.consoleGroup("Rendered by ".concat(m.displayName));var g="Re-rendered because";l.ownerDifferences.propsDifferences&&(H({Component:m.Component,displayName:m.displayName,prefixMessage:g,diffObjType:"props",differences:l.ownerDifferences.propsDifferences,values:{prev:h.props,next:m.props},options:p}),g="And because"),l.ownerDifferences.stateDifferences&&H({Component:m.Component,displayName:m.displayName,prefixMessage:g,diffObjType:"state",differences:l.ownerDifferences.stateDifferences,values:{prev:h.state,next:m.state},options:p}),l.ownerDifferences.hookDifferences&&l.ownerDifferences.hookDifferences.forEach((function(e,t){var r=e.hookName,n=e.differences;return H({Component:m.Component,displayName:m.displayName,prefixMessage:g,diffObjType:"hook",differences:n,values:{prev:h.hooks[t].result,next:m.hooks[t].result},hookName:r,options:p})})),p.consoleGroupEnd()}l.propsDifferences||l.stateDifferences||l.hookDifferences||p.consoleLog(r({},n,t),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat("http://bit.ly/wdyr02")),p.consoleGroupEnd()}}function M(e){return e&&"undefined"!=typeof module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler((function(t){"idle"===t&&(L=!0,setTimeout((function(){L=!1}),e))})),I}var A=function(){};function W(t){return t.displayName||t.name||t.type&&W(t.type)||t.render&&W(t.render)||(e.isString(t)?t:void 0)}var F={};function U(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.shallow,i=void 0===a||a;if(t===r)return!1;if(!i)return Y(t,r);var c=t||F,s=r||F,f=Object.keys(o(o({},c),s));return e.reduce(f,(function(e,t){var r=Y(c[t],s[t],t);return r&&(e=[].concat(p(e),p(r))),e}),[])}function V(e){var t=e.prevOwnerData,r=e.nextOwnerData;if(!t||!r)return!1;var n=(t.hooks.length===2*r.hooks.length?t.hooks.slice(t.hooks.length/2):t.hooks).map((function(e,t){return{hookName:e.hookName,differences:U(e.result,r.hooks[t].result,{shallow:!1})}}));return{propsDifferences:U(t.props,r.props),stateDifferences:U(t.state,r.state),hookDifferences:n.length>0&&n}}function B(e,t,r,n,o,a,i){var c=i.get(e),s=i.get(n);return{propsDifferences:U(e,n),stateDifferences:U(t,o),hookDifferences:U(r,a,{shallow:!1}),ownerDifferences:V({prevOwnerData:c,nextOwnerData:s})}}function G(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,c=e.nextProps,s=e.nextState,f=e.nextHook,u=e.options,l=e.ownerDataMap;return{Component:t,displayName:r,hookName:n,prevProps:o,prevState:a,prevHook:i,nextProps:c,nextState:s,nextHook:f,options:u,ownerDataMap:l,reason:B(o,a,i,c,s,f,l)}}function $(e){return e.prototype&&!!e.prototype.isReactComponent}function q(e){return e.$$typeof===E}function z(e){return e.$$typeof===S}function J(e){var t=e.Component,r=e.displayName,n=e.options,o=e.React,a=e.isHookChange;return!function(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some((function(t){return t.test(e)}))}(r,n)&&(!1!==t.whyDidYouRender&&((!a||!t.whyDidYouRender||!1!==t.whyDidYouRender.trackHooks)&&!!(t.whyDidYouRender||n.trackAllPureComponents&&(t&&t.prototype instanceof o.PureComponent||q(t))||function(e,t){return t.include&&t.include.length>0&&t.include.some((function(t){return t.test(e)}))}(r,n))))}function K(r,n,o,s,l){var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(h,e);var o,p,d,y=f(h);function h(e,t){var n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(o=y.call(this,e,t))._WDYR={renderNumber:0};var i=u((n=c(o),a(h.prototype)),"render",n)||o.render;return i!==r.prototype.render&&(o.render=function(){return h.prototype.render.apply(c(o)),i()}),o}return o=h,(p=[{key:"render",value:function(){if(this._WDYR.renderNumber++,"isStrictMode"in this._WDYR||(this._WDYR.isStrictMode=function(e){for(var t=e&&e._reactInternalFiber;t;){if(1&t.mode)return!0;t=t.return}return!1}(this)),!this._WDYR.isStrictMode||this._WDYR.renderNumber%2!=1){if(this._WDYR.prevProps){var e=G({Component:r,displayName:n,prevProps:this._WDYR.prevProps,prevState:this._WDYR.prevState,nextProps:this.props,nextState:this.state,options:s,ownerDataMap:l});s.notifier(e)}this._WDYR.prevProps=this.props,this._WDYR.prevState=this.state}return u(a(h.prototype),"render",this)?u(a(h.prototype),"render",this).call(this):null}}])&&t(o.prototype,p),d&&t(o,d),h}(r);try{p.displayName=n}catch(e){}return e.defaults(p,r),p}function Q(t,r,n,o,a,i){var c="string"==typeof t?function(e,t){return function(r){return t.createElement(e,r)}}(t,o):t;function s(){var e=arguments[0],t=o.useRef(),s=t.current;if(t.current=e,s){var f=G({Component:c,displayName:n,prevProps:s,nextProps:e,options:a,ownerDataMap:i}),u=!f.reason.propsDifferences||r&&0===f.reason.propsDifferences.length;u||a.notifier(f)}return c.apply(void 0,arguments)}try{s.displayName=n}catch(e){}return s.ComponentForHooksTracking=c,e.defaults(s,c),s}var X=Symbol("initial-hook-value");function Z(t,r,n,o,a,i,c){var s=r.path,f=s?e.get(n,s):n,u=o.useRef(1);null!=c.current[0]&&u.current!==c.current[0].renderNumber&&(c.current=[]),c.current.push({hookName:t,result:f,renderNumber:u.current}),u.current++;var l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED&&o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current,p=o.useRef(X);if(!l)return n;var d=l.type.ComponentForHooksTracking||l.type,y=W(d);if(!J({Component:d,displayName:y,options:a,React:o,isHookChange:!0}))return n;var h=p.current;if(p.current=n,h!==X){var m=G({Component:d,displayName:y,hookName:t,prevHook:s?e.get(h,s):h,nextHook:f,options:a,ownerDataMap:i});m.reason.hookDifferences&&a.notifier(m)}return n}function ee(t,r,n,o,a,i){return q(r)?function t(r,n,o,a,i){var c=r.type,s=$(c),f=z(c),u=q(c),l=f?c.render:c,p=s?K(l,n,0,a,i):u?t(l,n,o,a,i):Q(l,!0,n,o,a,i);try{p.displayName=W(l)}catch(e){}p.ComponentForHooksTracking=r,e.defaults(p,l);var d=o.memo(f?o.forwardRef(p):p,r.compare);try{d.displayName=n}catch(e){}return e.defaults(d,r),d}(r,n,o,a,i):z(r)?function(t,r,n,o,a){var i=t.render,c=q(i),s=c?i.type:i,f=Q(s,c,r,n,o,a);f.displayName=W(s),f.ComponentForHooksTracking=s,e.defaults(f,s);var u=n.forwardRef(c?n.memo(f,i.compare):f);try{u.displayName=r}catch(e){}return e.defaults(u,t),u}(r,n,o,a,i):$(r)?K(r,n,0,a,i):Q(r,!1,n,o,a,i)}function te(e,t,r,n,o,a){if(e.has(t))return e.get(t);var i=ee(0,t,r,n,o,a);return e.set(t,i),i}function re(e){return!!e&&(q(e)?re(e.type):z(e)?re(e.render):"function"==typeof e||void 0)}var ne={useState:{path:"0"},useReducer:{path:"0"},useContext:!0,useMemo:{dependenciesPath:"1"},useCallback:{dependenciesPath:"1"}};function oe(t,r){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=A),o({include:null,exclude:null,notifier:e.notifier||M("hotReloadBufferMs"in e?e.hotReloadBufferMs:500),onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1,logOwnerReasons:!0,trackHooks:!0,titleColor:"#058",diffNameColor:"blue",diffPathColor:"red",trackExtraHooks:[],trackAllPureComponents:!1},e)}(r),a=t.createElement,i=t.createFactory,c=t.cloneElement,s=new WeakMap,f=new WeakMap,u={current:[]};function d(e){var r=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;if(r){var n=r.type.ComponentForHooksTracking||r.type,o=W(n);f.set(e.props,{Component:n,displayName:o,props:r.pendingProps,state:null!=r.stateNode?r.stateNode.state:null,hooks:u.current})}}var y=null;t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED&&Object.defineProperty(t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,"current",{get:function(){return y},set:function(e){y=e,u.current=[]}}),t.createElement=function(e){for(var r=null,o=null,i=null,c=arguments.length,u=new Array(c>1?c-1:0),l=1;l<c;l++)u[l-1]=arguments[l];try{if(r=re(e)&&J({Component:e,displayName:W(e),React:t,options:n})){o=e&&e.whyDidYouRender&&e.whyDidYouRender.customName||W(e),i=te(s,e,o,t,n,f);var p=a.apply(t,[i].concat(u));return n.logOwnerReasons&&d(p),p}}catch(t){n.consoleLog("whyDidYouRender error. Please file a bug at https://github.com/welldone-software/why-did-you-render/issues.",{errorInfo:{error:t,componentNameOrComponent:e,rest:u,options:n,isShouldTrack:r,displayName:o,WDYRPatchedComponent:i}})}return a.apply(t,[e].concat(u))},Object.assign(t.createElement,a),t.createFactory=function(e){var r=t.createElement.bind(null,e);return r.type=e,r},Object.assign(t.createFactory,i),t.cloneElement=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a=c.apply(t,r);return n.logOwnerReasons&&d(a),a},Object.assign(t.cloneElement,c);var h=!!t.useState;if(n.trackHooks&&h){var m=Object.entries(ne).map((function(e){var r=l(e,2),n=r[0],o=r[1];return[t,n,o]}));[].concat(p(m),p(n.trackExtraHooks)).forEach((function(r){var o=l(r,3),a=o[0],i=o[1],c=o[2],s=void 0===c?{}:c,p=a[i],d=i[0].toUpperCase()+i.slice(1),y=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var c=p.call.apply(p,[this].concat(o)),l=s.dependenciesPath;return null!=l&&e.isFunction(c)&&T.set(c,e.get(o,l)),Z(i,s,c,t,n,f,u),c};Object.defineProperty(y,"name",{value:d,writable:!1}),Object.assign(y,{originalHook:p}),a[i]=y}))}return t.__REVERT_WHY_DID_YOU_RENDER__=function(){Object.assign(t,{createElement:a,createFactory:i,cloneElement:c}),s=null,[].concat(p(Object.keys(ne).map((function(e){return[t,e]}))),p(n.trackExtraHooks)).forEach((function(e){var t=l(e,2),r=t[0],n=t[1];r[n].originalHook&&(r[n]=r[n].originalHook)})),delete t.__REVERT_WHY_DID_YOU_RENDER__},t}return oe.defaultNotifier=I,oe}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).whyDidYouRender=t(e.lodash)}(this,(function(e){"use strict";function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(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(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?c(e):t}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function u(e,t,r){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw a}}return r}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}var m,v="different",g="deepEquals",b="date",D="regex",w="reactElement",O="function",_="same",k=(r(m={},v,"different objects"),r(m,g,"different objects that are equal by value"),r(m,b,"different date objects with the same value"),r(m,D,"different regular expressions with the same value"),r(m,w,"different React elements (remember that the <jsx/> syntax always produces a *NEW* immutable React element so a component that receives <jsx/> as props always re-renders)"),r(m,O,"different functions with the same name"),r(m,_,"same objects by ref (===)"),m),R="function"==typeof Symbol&&Symbol.for,E=R?Symbol.for("react.memo"):60115,S=R?Symbol.for("react.forward_ref"):60112,N="undefined"!=typeof Element,j="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,x=function(e){return e.$$typeof===j};function C(e,t,r,n,o){return r.push({diffType:o,pathString:n,prevValue:e,nextValue:t}),o!==v}var T=new WeakMap;function P(t,r,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4?arguments[4]:void 0,c=i.detailed;if(t===r)return c&&C(t,r,n,a,_),!0;if(!t||!r)return C(t,r,n,a,v);if(e.isArray(t)&&e.isArray(r)){var s=t.length;if(s!==r.length)return C(p(t),p(r),n,a,v);for(var f=[],u=0,l=s;l--;l>0){var d=P(t[l],r[l],f,"".concat(a,"[").concat(l,"]"),{detailed:c});d&&u++}return(c||u!==s)&&n.push.apply(n,f),C(p(t),p(r),n,a,u===s?g:v)}if(e.isSet(t)&&e.isSet(r)){if(t.size!==r.size)return C(new Set(t),new Set(r),n,a,v);var y,m=h(t);try{for(m.s();!(y=m.n()).done;){var k=y.value;if(!r.has(k))return C(new Set(t),new Set(r),n,a,v)}}catch(e){m.e(e)}finally{m.f()}return C(new Set(t),new Set(r),n,a,g)}if(e.isDate(t)&&e.isDate(r))return t.getTime()===r.getTime()?C(new Date(t),new Date(r),n,a,b):C(new Date(t),new Date(r),n,a,v);if(e.isRegExp(t)&&e.isRegExp(r))return t.toString()===r.toString()?C(t,r,n,a,D):C(t,r,n,a,v);if(N&&t instanceof Element&&r instanceof Element)return C(t,r,n,a,v);if(x(t)&&x(r)){if(t.type!==r.type)return C(t,r,n,a,v);var R=P(t.props,r.props,[],"".concat(a,".props"),{detailed:c});return C(t,r,n,a,R?w:v)}if(e.isFunction(t)&&e.isFunction(r)){if(t.name!==r.name)return C(t,r,n,a,v);var E=T.get(t),S=T.get(r);if(null!=E&&null!=S){var j=P(E,S,n,"".concat(a,":dependencies"),{detailed:c});return C(t,r,n,a,j?O:v)}return C(t,r,n,a,O)}if(e.isPlainObject(t)&&e.isPlainObject(r)){var Y=e.keys(t),L=Y.length;if(L!==e.keys(r).length)return C(o({},t),o({},r),n,a,v);for(var H=L;H--;H>0)if(!e.has(r,Y[H]))return C(o({},t),o({},r),n,a,v);for(var I=[],M=0,A=L;A--;A>0){var W=Y[A],F=P(t[W],r[W],I,"".concat(a,".").concat(W),{detailed:c});F&&M++}return(c||M!==L)&&n.push.apply(n,I),C(o({},t),o({},r),n,a,M===L?g:v)}return C(t,r,n,a,v)}function Y(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.detailed,a=void 0!==o&&o;try{var i=[];return P(e,t,i,r,{detailed:a}),i}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var L="http://bit.ly/wdyr02",H=!1;function I(t){var n=t.Component,o=t.displayName,a=t.hookName,i=t.prefixMessage,c=t.diffObjType,s=t.differences,f=t.values,u=t.options;s&&s.length>0?(u.consoleLog(r({},o,n),"".concat(i," of ").concat(c," changes:")),s.forEach((function(t){var n=t.pathString,o=t.diffType,i=t.prevValue,s=t.nextValue;u.consoleGroup("%c".concat("hook"===c?"[hook ".concat(a," result]"):"".concat(c,"."),"%c").concat(n,"%c"),"color:".concat(u.diffNameColor,";"),"color:".concat(u.diffPathColor,";"),"color:default;"),u.consoleLog("".concat(k[o],". (more info at ").concat(a?"http://bit.ly/wdyr3":L,")")),u.consoleLog(r({},"prev ".concat(n),i),"!==",r({},"next ".concat(n),s)),o===g&&u.consoleLog({"For detailed diff, right click the following fn, save as global, and run: ":function(){!function(t,r,n){var o=n.pathString,a=n.consoleLog,i=Y(t,r,o,{detailed:!0}),c=Math.max.apply(Math,p(i.map((function(e){return e.pathString.length}))))+2;Object.entries(e.groupBy(e.sortBy(i,"pathString"),"diffType")).forEach((function(e){var t=l(e,2),r=t[0],n=t[1];a("%c".concat(k[r],":"),"text-decoration: underline; color: blue;"),n.forEach((function(e){a("".concat(e.pathString,":").padEnd(c," "),e.prevValue)}))}))}(i,s,{pathString:n,consoleLog:u.consoleLog})}}),u.consoleGroupEnd()}))):s&&(u.consoleLog(r({},o,n),"".concat(i," the ").concat(c," object itself changed but its values are all equal."),"props"===c?"This could have been avoided by making the component pure, or by preventing its father from re-rendering.":"This usually means this component called setState when no changes in its state actually occurred.","More info at ".concat(L)),u.consoleLog("prev ".concat(c,":"),f.prev," !== ",f.next,":next ".concat(c)))}function M(e){var t=e.Component,n=e.displayName,o=e.hookName,a=e.prevProps,i=e.prevState,c=e.prevHook,s=e.nextProps,f=e.nextState,u=e.nextHook,l=e.reason,p=e.options,d=e.ownerDataMap;if(function(e,t,r){return!(H||!r.logOnDifferentValues&&(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)&&(e.propsDifferences&&e.propsDifferences.some((function(e){return e.diffType===v}))||e.stateDifferences&&e.stateDifferences.some((function(e){return e.diffType===v}))||e.hookDifferences&&e.hookDifferences.some((function(e){return e.diffType===v}))))}(l,t,p)){p.consoleGroup("%c".concat(n),"color: ".concat(p.titleColor,";"));var y="Re-rendered because";if(l.propsDifferences&&(I({Component:t,displayName:n,prefixMessage:y,diffObjType:"props",differences:l.propsDifferences,values:{prev:a,next:s},options:p}),y="And because"),l.stateDifferences&&I({Component:t,displayName:n,prefixMessage:y,diffObjType:"state",differences:l.stateDifferences,values:{prev:i,next:f},options:p}),l.hookDifferences&&I({Component:t,displayName:n,prefixMessage:y,diffObjType:"hook",differences:l.hookDifferences,values:{prev:c,next:u},hookName:o,options:p}),l.propsDifferences&&l.ownerDifferences){var h=d.get(a),m=d.get(s);p.consoleGroup("Rendered by ".concat(m.displayName));var g="Re-rendered because";l.ownerDifferences.propsDifferences&&(I({Component:m.Component,displayName:m.displayName,prefixMessage:g,diffObjType:"props",differences:l.ownerDifferences.propsDifferences,values:{prev:h.props,next:m.props},options:p}),g="And because"),l.ownerDifferences.stateDifferences&&I({Component:m.Component,displayName:m.displayName,prefixMessage:g,diffObjType:"state",differences:l.ownerDifferences.stateDifferences,values:{prev:h.state,next:m.state},options:p}),l.ownerDifferences.hookDifferences&&l.ownerDifferences.hookDifferences.forEach((function(e,t){var r=e.hookName,n=e.differences;return I({Component:m.Component,displayName:m.displayName,prefixMessage:g,diffObjType:"hook",differences:n,values:{prev:h.hooks[t].result,next:m.hooks[t].result},hookName:r,options:p})})),p.consoleGroupEnd()}l.propsDifferences||l.stateDifferences||l.hookDifferences||p.consoleLog(r({},n,t),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat(L)),p.consoleGroupEnd()}}function A(e){return e&&"undefined"!=typeof module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler((function(t){"idle"===t&&(H=!0,setTimeout((function(){H=!1}),e))})),M}var W=function(){};function F(t){return t.displayName||t.name||t.type&&F(t.type)||t.render&&F(t.render)||(e.isString(t)?t:void 0)}var U={};function V(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.shallow,i=void 0===a||a;if(t===r)return!1;if(!i)return Y(t,r);var c=t||U,s=r||U,f=Object.keys(o(o({},c),s));return e.reduce(f,(function(e,t){var r=Y(c[t],s[t],t);return r&&(e=[].concat(p(e),p(r))),e}),[])}function B(e){var t=e.prevOwnerData,r=e.nextOwnerData;if(!t||!r)return!1;var n=(t.hooks.length===2*r.hooks.length?t.hooks.slice(t.hooks.length/2):t.hooks).map((function(e,t){return{hookName:e.hookName,differences:V(e.result,r.hooks[t].result,{shallow:!1})}}));return{propsDifferences:V(t.props,r.props),stateDifferences:V(t.state,r.state),hookDifferences:n.length>0&&n}}function G(e,t,r,n,o,a,i){var c=i.get(e),s=i.get(n);return{propsDifferences:V(e,n),stateDifferences:V(t,o),hookDifferences:V(r,a,{shallow:!1}),ownerDifferences:B({prevOwnerData:c,nextOwnerData:s})}}function $(e){var t=e.Component,r=e.displayName,n=e.hookName,o=e.prevProps,a=e.prevState,i=e.prevHook,c=e.nextProps,s=e.nextState,f=e.nextHook,u=e.options,l=e.ownerDataMap;return{Component:t,displayName:r,hookName:n,prevProps:o,prevState:a,prevHook:i,nextProps:c,nextState:s,nextHook:f,options:u,ownerDataMap:l,reason:G(o,a,i,c,s,f,l)}}function q(e){return e.prototype&&!!e.prototype.isReactComponent}function z(e){return e.$$typeof===E}function J(e){return e.$$typeof===S}function K(e){var t=e.Component,r=e.displayName,n=e.options,o=e.React,a=e.isHookChange;return!function(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some((function(t){return t.test(e)}))}(r,n)&&(!1!==t.whyDidYouRender&&((!a||!t.whyDidYouRender||!1!==t.whyDidYouRender.trackHooks)&&!!(t.whyDidYouRender||n.trackAllPureComponents&&(t&&t.prototype instanceof o.PureComponent||z(t))||function(e,t){return t.include&&t.include.length>0&&t.include.some((function(t){return t.test(e)}))}(r,n))))}function Q(r,n,o,s,l){var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(h,e);var o,p,d,y=f(h);function h(e,t){var n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(o=y.call(this,e,t))._WDYR={renderNumber:0};var i=u((n=c(o),a(h.prototype)),"render",n)||o.render;return i!==r.prototype.render&&(o.render=function(){return h.prototype.render.apply(c(o)),i()}),o}return o=h,(p=[{key:"render",value:function(){if(this._WDYR.renderNumber++,"isStrictMode"in this._WDYR||(this._WDYR.isStrictMode=function(e){for(var t=e&&e._reactInternalFiber;t;){if(1&t.mode)return!0;t=t.return}return!1}(this)),!this._WDYR.isStrictMode||this._WDYR.renderNumber%2!=1){if(this._WDYR.prevProps){var e=$({Component:r,displayName:n,prevProps:this._WDYR.prevProps,prevState:this._WDYR.prevState,nextProps:this.props,nextState:this.state,options:s,ownerDataMap:l});s.notifier(e)}this._WDYR.prevProps=this.props,this._WDYR.prevState=this.state}return u(a(h.prototype),"render",this)?u(a(h.prototype),"render",this).call(this):null}}])&&t(o.prototype,p),d&&t(o,d),h}(r);try{p.displayName=n}catch(e){}return e.defaults(p,r),p}function X(t,r,n,o,a,i){var c="string"==typeof t?function(e,t){return function(r){return t.createElement(e,r)}}(t,o):t;function s(){var e=arguments[0],t=o.useRef(),s=t.current;if(t.current=e,s){var f=$({Component:c,displayName:n,prevProps:s,nextProps:e,options:a,ownerDataMap:i}),u=!f.reason.propsDifferences||r&&0===f.reason.propsDifferences.length;u||a.notifier(f)}return c.apply(void 0,arguments)}try{s.displayName=n}catch(e){}return s.ComponentForHooksTracking=c,e.defaults(s,c),s}function Z(t,r,n,o,a){var i=t.type,c=q(i),s=J(i),f=z(i),u=s?i.render:i,l=c?Q(u,r,0,o,a):f?Z(u,r,n,o,a):X(u,!0,r,n,o,a);try{l.displayName=F(u)}catch(e){}l.ComponentForHooksTracking=t,e.defaults(l,u);var p=n.memo(s?n.forwardRef(l):l,t.compare);try{p.displayName=r}catch(e){}return e.defaults(p,t),p}var ee=Symbol("initial-hook-value");function te(t,r,n,o,a,i,c){var s=r.path,f=s?e.get(n,s):n,u=o.useRef(1);null!=c.current[0]&&u.current!==c.current[0].renderNumber&&(c.current=[]),c.current.push({hookName:t,result:f,renderNumber:u.current}),u.current++;var l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED&&o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current,p=o.useRef(ee);if(!l)return n;var d=l.type.ComponentForHooksTracking||l.type,y=F(d);if(!K({Component:d,displayName:y,options:a,React:o,isHookChange:!0}))return n;var h=p.current;if(p.current=n,h!==ee){var m=$({Component:d,displayName:y,hookName:t,prevHook:s?e.get(h,s):h,nextHook:f,options:a,ownerDataMap:i});m.reason.hookDifferences&&a.notifier(m)}return n}function re(t,r,n,o,a,i){return z(r)?Z(r,n,o,a,i):J(r)?function(t,r,n,o,a){var i=t.render,c=z(i),s=c?i.type:i,f=X(s,c,r,n,o,a);f.displayName=F(s),f.ComponentForHooksTracking=s,e.defaults(f,s);var u=n.forwardRef(c?n.memo(f,i.compare):f);try{u.displayName=r}catch(e){}return e.defaults(u,t),u}(r,n,o,a,i):q(r)?Q(r,n,0,a,i):X(r,!1,n,o,a,i)}function ne(e,t,r,n,o,a){if(e.has(t))return e.get(t);var i=re(0,t,r,n,o,a);return e.set(t,i),i}function oe(e){return!!e&&(z(e)?oe(e.type):J(e)?oe(e.render):"function"==typeof e||void 0)}var ae={useState:{path:"0"},useReducer:{path:"0"},useContext:!0,useMemo:{dependenciesPath:"1"},useCallback:{dependenciesPath:"1"}};function ie(t,r){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=W),o({include:null,exclude:null,notifier:e.notifier||A("hotReloadBufferMs"in e?e.hotReloadBufferMs:500),onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1,logOwnerReasons:!0,trackHooks:!0,titleColor:"#058",diffNameColor:"blue",diffPathColor:"red",trackExtraHooks:[],trackAllPureComponents:!1},e)}(r),a=t.createElement,i=t.createFactory,c=t.cloneElement,s=new WeakMap,f=new WeakMap,u={current:[]};function d(e){var r=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;if(r){var n=r.type.ComponentForHooksTracking||r.type,o=F(n);f.set(e.props,{Component:n,displayName:o,props:r.pendingProps,state:null!=r.stateNode?r.stateNode.state:null,hooks:u.current})}}var y=null;t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED&&Object.defineProperty(t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,"current",{get:function(){return y},set:function(e){y=e,u.current=[]}}),t.createElement=function(e){for(var r=null,o=null,i=null,c=arguments.length,u=new Array(c>1?c-1:0),l=1;l<c;l++)u[l-1]=arguments[l];try{if(r=oe(e)&&K({Component:e,displayName:F(e),React:t,options:n})){o=e&&e.whyDidYouRender&&e.whyDidYouRender.customName||F(e),i=ne(s,e,o,t,n,f);var p=a.apply(t,[i].concat(u));return n.logOwnerReasons&&d(p),p}}catch(t){n.consoleLog("whyDidYouRender error. Please file a bug at https://github.com/welldone-software/why-did-you-render/issues.",{errorInfo:{error:t,componentNameOrComponent:e,rest:u,options:n,isShouldTrack:r,displayName:o,WDYRPatchedComponent:i}})}return a.apply(t,[e].concat(u))},Object.assign(t.createElement,a),t.createFactory=function(e){var r=t.createElement.bind(null,e);return r.type=e,r},Object.assign(t.createFactory,i),t.cloneElement=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a=c.apply(t,r);return n.logOwnerReasons&&d(a),a},Object.assign(t.cloneElement,c);var h=!!t.useState;if(n.trackHooks&&h){var m=Object.entries(ae).map((function(e){var r=l(e,2),n=r[0],o=r[1];return[t,n,o]}));[].concat(p(m),p(n.trackExtraHooks)).forEach((function(r){var o=l(r,3),a=o[0],i=o[1],c=o[2],s=void 0===c?{}:c,p=a[i],d=i[0].toUpperCase()+i.slice(1),y=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var c=p.call.apply(p,[this].concat(o)),l=s.dependenciesPath;return null!=l&&e.isFunction(c)&&T.set(c,e.get(o,l)),te(i,s,c,t,n,f,u),c};Object.defineProperty(y,"name",{value:d,writable:!1}),Object.assign(y,{originalHook:p}),a[i]=y}))}return t.__REVERT_WHY_DID_YOU_RENDER__=function(){Object.assign(t,{createElement:a,createFactory:i,cloneElement:c}),s=null,[].concat(p(Object.keys(ae).map((function(e){return[t,e]}))),p(n.trackExtraHooks)).forEach((function(e){var t=l(e,2),r=t[0],n=t[1];r[n].originalHook&&(r[n]=r[n].originalHook)})),delete t.__REVERT_WHY_DID_YOU_RENDER__},t}return ie.defaultNotifier=M,ie}));
//# sourceMappingURL=whyDidYouRender.min.js.map
{
"name": "@welldone-software/why-did-you-render",
"version": "5.0.0-alpha.3",
"version": "5.0.0-alpha.4",
"description": "Monkey patches React to notify you about avoidable re-renders.",

@@ -63,13 +63,13 @@ "types": "types.d.ts",

"devDependencies": {
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.1",
"@babel/eslint-parser": "^7.11.3",
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/eslint-parser": "^7.11.5",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.11.0",
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"@rollup/plugin-babel": "^5.2.0",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@testing-library/jest-dom": "^5.11.3",
"@testing-library/react": "^10.4.8",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.0.4",
"@types/react-redux": "^7.1.9",

@@ -85,14 +85,14 @@ "@welldone-software/jest-console-handler": "^0.1.1",

"cross-env": "^7.0.2",
"cypress": "^4.12.1",
"eslint": "^7.7.0",
"cypress": "^5.2.0",
"eslint": "^7.9.0",
"eslint-plugin-cypress": "^2.11.1",
"eslint-plugin-jest": "^23.20.0",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-react": "^7.20.6",
"express": "^4.17.1",
"express-history-api-fallback": "^2.2.1",
"husky": "^4.2.5",
"jest": "^26.4.0",
"jest-cli": "^26.4.0",
"husky": "^4.3.0",
"jest": "^26.4.2",
"jest-cli": "^26.4.2",
"magic-string": "^0.25.7",
"nollup": "^0.13.4",
"nollup": "^0.13.10",
"react": "^16.13.1",

@@ -106,11 +106,11 @@ "react-dom": "npm:@hot-loader/react-dom@^16.13.0",

"rimraf": "^3.0.2",
"rollup": "^2.26.0",
"rollup-plugin-commonjs-alternate": "^0.5.1",
"rollup": "^2.27.1",
"rollup-plugin-commonjs-alternate": "^0.6.1",
"rollup-plugin-license": "^2.2.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.0",
"start-server-and-test": "^1.11.3",
"styled-components": "^5.1.1",
"typescript": "^3.9.7"
"rollup-plugin-terser": "^7.0.2",
"start-server-and-test": "^1.11.4",
"styled-components": "^5.2.0",
"typescript": "^4.0.3"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc