New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

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

Package Overview
Dependencies
Maintainers
2
Versions
113
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 2.0.3 to 2.0.4

4

dist/cjs/whyDidYouRender.js

@@ -148,3 +148,3 @@ 'use strict';

var _diffTypesDescription;
var moreInfoUrl = 'https://goo.gl/hnfMPb';
var moreInfoUrl = 'http://bit.ly/wdyr02';
var diffTypesDescriptions = (_diffTypesDescription = {}, _defineProperty(_diffTypesDescription, diffTypes.different, 'different objects.'), _defineProperty(_diffTypesDescription, diffTypes.deepEquals, 'different objects that are equal by value.'), _defineProperty(_diffTypesDescription, diffTypes.date, 'different date objects with the same value.'), _defineProperty(_diffTypesDescription, diffTypes.regex, 'different regular expressions with the same value.'), _defineProperty(_diffTypesDescription, diffTypes.reactElement, 'different React elements with the same displayName.'), _defineProperty(_diffTypesDescription, diffTypes.function, 'different functions with the same name.'), _diffTypesDescription);

@@ -179,3 +179,3 @@

options.consoleLog("".concat(diffTypesDescriptions[diffType], " (more info at ").concat(moreInfoUrl, ")"));
options.consoleLog("prev '".concat(pathString, "':"), prevValue, ' !== ', nextValue, ":next '".concat(pathString, "'"));
options.consoleLog(_defineProperty({}, "prev ".concat(pathString), prevValue), '!==', _defineProperty({}, "next ".concat(pathString), nextValue));
options.consoleGroupEnd();

@@ -182,0 +182,0 @@ });

@@ -1,2 +0,2 @@

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var _isString=_interopDefault(require("lodash/isString")),_reduce=_interopDefault(require("lodash/reduce")),_has=_interopDefault(require("lodash/has")),_keys=_interopDefault(require("lodash/keys")),_isFunction=_interopDefault(require("lodash/isFunction")),_isRegExp=_interopDefault(require("lodash/isRegExp")),_isDate=_interopDefault(require("lodash/isDate")),_isPlainObject=_interopDefault(require("lodash/isPlainObject")),_isArray=_interopDefault(require("lodash/isArray"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_defineProperty(e,t,n[t])})}return e}function _inherits(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&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var _diffTypesDescription,diffTypes={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},moreInfoUrl="https://goo.gl/hnfMPb",diffTypesDescriptions=(_defineProperty(_diffTypesDescription={},diffTypes.different,"different objects."),_defineProperty(_diffTypesDescription,diffTypes.deepEquals,"different objects that are equal by value."),_defineProperty(_diffTypesDescription,diffTypes.date,"different date objects with the same value."),_defineProperty(_diffTypesDescription,diffTypes.regex,"different regular expressions with the same value."),_defineProperty(_diffTypesDescription,diffTypes.reactElement,"different React elements with the same displayName."),_defineProperty(_diffTypesDescription,diffTypes.function,"different functions with the same name."),_diffTypesDescription);function shouldLog(e,t,n){return!!n.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some(function(e){return e.diffType===diffTypes.different})||e.stateDifferences&&e.stateDifferences.some(function(e){return e.diffType===diffTypes.different})))}function logDifference(e,t,n,r,o,i,f){o&&o.length>0?(f.consoleLog(_defineProperty({},t,e),"".concat(n," of ").concat(r," changes:")),o.forEach(function(e){var t=e.pathString,n=e.diffType,o=e.prevValue,i=e.nextValue;f.consoleGroup("%c".concat(r,".%c").concat(t,"%c"),"color:blue;","color:red;","color:black;"),f.consoleLog("".concat(diffTypesDescriptions[n]," (more info at ").concat(moreInfoUrl,")")),f.consoleLog("prev '".concat(t,"':"),o," !== ",i,":next '".concat(t,"'")),f.consoleGroupEnd()})):o&&(f.consoleLog(_defineProperty({},t,e),"".concat(n," the ").concat(r," object itself changed but it's values are all equal."),"props"===r?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(moreInfoUrl)),f.consoleLog("prev ".concat(r,":"),i.prev," !== ",i.next,":next ".concat(r)))}function defaultNotifier(e){var t=e.Component,n=e.displayName,r=e.prevProps,o=e.prevState,i=e.nextProps,f=e.nextState,a=e.reason,s=e.options;if(shouldLog(a,t,s)){s.consoleGroup("%c".concat(n),"color: #058;");var c="Re-rendered because";a.propsDifferences&&(logDifference(t,n,c,"props",a.propsDifferences,{prev:r,next:i},s),c="And because"),a.stateDifferences&&logDifference(t,n,c,"state",a.stateDifferences,{prev:o,next:f},s),a.propsDifferences||a.stateDifferences||s.consoleLog(_defineProperty({},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(moreInfoUrl)),s.consoleGroupEnd()}}var emptyFn=function(){};function normalizeOptions(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,n=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,n=emptyFn),_objectSpread({include:null,exclude:null,notifier:defaultNotifier,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:n,logOnDifferentValues:!1},e)}function getDisplayName(e){return _isString(e)?e:e.displayName||e.name}var hasElementType="undefined"!=typeof Element,hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE$1=hasSymbol?Symbol.for("react.element"):60103,isReactElement=function(e){return e.$$typeof===REACT_ELEMENT_TYPE$1};function trackDiff(e,t,n,r,o){return n.push({diffType:o,pathString:r,prevValue:e,nextValue:t}),o!==diffTypes.different}function accumulateDeepEqualDiffs(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===t)return!0;if(!e||!t)return trackDiff(e,t,n,r,diffTypes.different);if(_isArray(e)&&_isArray(t)){var o=e.length;if(o!==t.length)return trackDiff(e,t,n,r,diffTypes.different);for(var i=!0,f=o;0!=f--;)accumulateDeepEqualDiffs(e[f],t[f],n,"".concat(r,"[").concat(f,"]"))||(i=!1);return trackDiff(e,t,n,r,i?diffTypes.deepEquals:diffTypes.different)}if(_isDate(e)&&_isDate(t))return e.getTime()===t.getTime()?trackDiff(e,t,n,r,diffTypes.date):trackDiff(e,t,n,r,diffTypes.different);if(_isRegExp(e)&&_isRegExp(t))return e.toString()===t.toString()?trackDiff(e,t,n,r,diffTypes.regex):trackDiff(e,t,n,r,diffTypes.different);if(hasElementType&&e instanceof Element&&t instanceof Element)return trackDiff(e,t,n,r,diffTypes.different);if(isReactElement(e)&&isReactElement(t))return e.type===t.type?trackDiff(e,t,n,r,diffTypes.reactElement):trackDiff(e,t,n,r,diffTypes.different);if(_isFunction(e)&&_isFunction(t))return e.name===t.name?trackDiff(e,t,n,r,diffTypes.function):trackDiff(e,t,n,r,diffTypes.different);if(_isPlainObject(e)&&_isPlainObject(t)){var a=_keys(e),s=a.length;if(s!==_keys(t).length)return trackDiff(e,t,n,r,diffTypes.different);for(var c=s;0!=c--;)if(!_has(t,a[c]))return trackDiff(e,t,n,r,diffTypes.different);for(var p=!0,u=s;0!=u--;){var l=a[u];accumulateDeepEqualDiffs(e[l],t[l],n,"".concat(r,".").concat(l))||(p=!1)}return trackDiff(e,t,n,r,p?diffTypes.deepEquals:diffTypes.different)}return trackDiff(e,t,n,r,diffTypes.different)}function calculateDeepEqualDiffs(e,t,n){try{var r=[];return accumulateDeepEqualDiffs(e,t,r,n),r}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 emptyObject={};function findObjectsDifferences(e,t){if(e===t)return!1;var n=e||emptyObject,r=t||emptyObject,o=_keys(_objectSpread({},n,r));return _reduce(o,function(e,t){var o=calculateDeepEqualDiffs(n[t],r[t],t);return o&&(e=_toConsumableArray(e||[]).concat(_toConsumableArray(o))),e},[])}function getUpdateReason(e,t,n,r){return{propsDifferences:findObjectsDifferences(e,n,"props"),stateDifferences:findObjectsDifferences(t,r,"state")}}function getUpdateInfo(e){var t=e.Component,n=e.prevProps,r=e.prevState,o=e.nextProps,i=e.nextState,f=e.options;return{Component:t,displayName:getDisplayName(t),prevProps:n,prevState:r,nextProps:o,nextState:i,options:f,reason:getUpdateReason(n,r,o,i)}}function shouldInclude(e,t){return t.include&&t.include.length>0&&t.include.some(function(t){return t.test(e)})}function shouldExclude(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some(function(t){return t.test(e)})}function shouldTrack(e,t,n){return!shouldExclude(t,n)&&!(!e.whyDidYouRender&&!shouldInclude(t,n))}var patchClassComponent=function(e,t){var n=function(n){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).apply(this,arguments))}return _inherits(r,e),_createClass(r,[{key:"componentDidUpdate",value:function(n,r,o){t.notifier(getUpdateInfo({Component:e,prevProps:n,prevState:r,nextProps:this.props,nextState:this.state,options:t})),"function"==typeof e.prototype.componentDidUpdate&&e.prototype.componentDidUpdate.call(this,n,r,o)}}]),r}();return n.displayName=getDisplayName(e),n},patchFunctionalComponent=function(e,t,n){var r=function(r){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,_getPrototypeOf(o).apply(this,arguments))}return _inherits(o,t.Component),_createClass(o,[{key:"render",value:function(){return e(this.props)}},{key:"componentDidUpdate",value:function(t){n.notifier(getUpdateInfo({Component:e,prevProps:t,nextProps:this.props,options:n}))}}]),o}();return r.displayName=getDisplayName(e),r};function createPatchedComponent(e,t,n,r){return t.prototype&&"function"==typeof t.prototype.render?patchClassComponent(t,r):patchFunctionalComponent(t,n,r)}function getPatchedComponent(e,t,n,r){if(e.has(t))return e.get(t);var o=createPatchedComponent(e,t,n,r);return e.set(t,o),o}function whyDidYouRender(e,t){var n=normalizeOptions(t),r=e.createElement,o=new Map;return e.createElement=function(t){for(var i="function"==typeof t&&shouldTrack(t,getDisplayName(t),n),f=arguments.length,a=new Array(f>1?f-1:0),s=1;s<f;s++)a[s-1]=arguments[s];if(!i)return r.apply(e,[t].concat(a));var c=getPatchedComponent(o,t,e,n);return r.apply(e,[c].concat(a))},e.__REVERT_WHY_DID_YOU_RENDER__=function(){e.createElement=r,delete e.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},e}module.exports=whyDidYouRender;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var _isString=_interopDefault(require("lodash/isString")),_reduce=_interopDefault(require("lodash/reduce")),_has=_interopDefault(require("lodash/has")),_keys=_interopDefault(require("lodash/keys")),_isFunction=_interopDefault(require("lodash/isFunction")),_isRegExp=_interopDefault(require("lodash/isRegExp")),_isDate=_interopDefault(require("lodash/isDate")),_isPlainObject=_interopDefault(require("lodash/isPlainObject")),_isArray=_interopDefault(require("lodash/isArray"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_defineProperty(e,t,n[t])})}return e}function _inherits(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&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var _diffTypesDescription,diffTypes={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},moreInfoUrl="http://bit.ly/wdyr02",diffTypesDescriptions=(_defineProperty(_diffTypesDescription={},diffTypes.different,"different objects."),_defineProperty(_diffTypesDescription,diffTypes.deepEquals,"different objects that are equal by value."),_defineProperty(_diffTypesDescription,diffTypes.date,"different date objects with the same value."),_defineProperty(_diffTypesDescription,diffTypes.regex,"different regular expressions with the same value."),_defineProperty(_diffTypesDescription,diffTypes.reactElement,"different React elements with the same displayName."),_defineProperty(_diffTypesDescription,diffTypes.function,"different functions with the same name."),_diffTypesDescription);function shouldLog(e,t,n){return!!n.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some(function(e){return e.diffType===diffTypes.different})||e.stateDifferences&&e.stateDifferences.some(function(e){return e.diffType===diffTypes.different})))}function logDifference(e,t,n,r,o,i,f){o&&o.length>0?(f.consoleLog(_defineProperty({},t,e),"".concat(n," of ").concat(r," changes:")),o.forEach(function(e){var t=e.pathString,n=e.diffType,o=e.prevValue,i=e.nextValue;f.consoleGroup("%c".concat(r,".%c").concat(t,"%c"),"color:blue;","color:red;","color:black;"),f.consoleLog("".concat(diffTypesDescriptions[n]," (more info at ").concat(moreInfoUrl,")")),f.consoleLog(_defineProperty({},"prev ".concat(t),o),"!==",_defineProperty({},"next ".concat(t),i)),f.consoleGroupEnd()})):o&&(f.consoleLog(_defineProperty({},t,e),"".concat(n," the ").concat(r," object itself changed but it's values are all equal."),"props"===r?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(moreInfoUrl)),f.consoleLog("prev ".concat(r,":"),i.prev," !== ",i.next,":next ".concat(r)))}function defaultNotifier(e){var t=e.Component,n=e.displayName,r=e.prevProps,o=e.prevState,i=e.nextProps,f=e.nextState,a=e.reason,s=e.options;if(shouldLog(a,t,s)){s.consoleGroup("%c".concat(n),"color: #058;");var c="Re-rendered because";a.propsDifferences&&(logDifference(t,n,c,"props",a.propsDifferences,{prev:r,next:i},s),c="And because"),a.stateDifferences&&logDifference(t,n,c,"state",a.stateDifferences,{prev:o,next:f},s),a.propsDifferences||a.stateDifferences||s.consoleLog(_defineProperty({},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(moreInfoUrl)),s.consoleGroupEnd()}}var emptyFn=function(){};function normalizeOptions(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,n=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,n=emptyFn),_objectSpread({include:null,exclude:null,notifier:defaultNotifier,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:n,logOnDifferentValues:!1},e)}function getDisplayName(e){return _isString(e)?e:e.displayName||e.name}var hasElementType="undefined"!=typeof Element,hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE$1=hasSymbol?Symbol.for("react.element"):60103,isReactElement=function(e){return e.$$typeof===REACT_ELEMENT_TYPE$1};function trackDiff(e,t,n,r,o){return n.push({diffType:o,pathString:r,prevValue:e,nextValue:t}),o!==diffTypes.different}function accumulateDeepEqualDiffs(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===t)return!0;if(!e||!t)return trackDiff(e,t,n,r,diffTypes.different);if(_isArray(e)&&_isArray(t)){var o=e.length;if(o!==t.length)return trackDiff(e,t,n,r,diffTypes.different);for(var i=!0,f=o;0!=f--;)accumulateDeepEqualDiffs(e[f],t[f],n,"".concat(r,"[").concat(f,"]"))||(i=!1);return trackDiff(e,t,n,r,i?diffTypes.deepEquals:diffTypes.different)}if(_isDate(e)&&_isDate(t))return e.getTime()===t.getTime()?trackDiff(e,t,n,r,diffTypes.date):trackDiff(e,t,n,r,diffTypes.different);if(_isRegExp(e)&&_isRegExp(t))return e.toString()===t.toString()?trackDiff(e,t,n,r,diffTypes.regex):trackDiff(e,t,n,r,diffTypes.different);if(hasElementType&&e instanceof Element&&t instanceof Element)return trackDiff(e,t,n,r,diffTypes.different);if(isReactElement(e)&&isReactElement(t))return e.type===t.type?trackDiff(e,t,n,r,diffTypes.reactElement):trackDiff(e,t,n,r,diffTypes.different);if(_isFunction(e)&&_isFunction(t))return e.name===t.name?trackDiff(e,t,n,r,diffTypes.function):trackDiff(e,t,n,r,diffTypes.different);if(_isPlainObject(e)&&_isPlainObject(t)){var a=_keys(e),s=a.length;if(s!==_keys(t).length)return trackDiff(e,t,n,r,diffTypes.different);for(var c=s;0!=c--;)if(!_has(t,a[c]))return trackDiff(e,t,n,r,diffTypes.different);for(var p=!0,u=s;0!=u--;){var l=a[u];accumulateDeepEqualDiffs(e[l],t[l],n,"".concat(r,".").concat(l))||(p=!1)}return trackDiff(e,t,n,r,p?diffTypes.deepEquals:diffTypes.different)}return trackDiff(e,t,n,r,diffTypes.different)}function calculateDeepEqualDiffs(e,t,n){try{var r=[];return accumulateDeepEqualDiffs(e,t,r,n),r}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 emptyObject={};function findObjectsDifferences(e,t){if(e===t)return!1;var n=e||emptyObject,r=t||emptyObject,o=_keys(_objectSpread({},n,r));return _reduce(o,function(e,t){var o=calculateDeepEqualDiffs(n[t],r[t],t);return o&&(e=_toConsumableArray(e||[]).concat(_toConsumableArray(o))),e},[])}function getUpdateReason(e,t,n,r){return{propsDifferences:findObjectsDifferences(e,n,"props"),stateDifferences:findObjectsDifferences(t,r,"state")}}function getUpdateInfo(e){var t=e.Component,n=e.prevProps,r=e.prevState,o=e.nextProps,i=e.nextState,f=e.options;return{Component:t,displayName:getDisplayName(t),prevProps:n,prevState:r,nextProps:o,nextState:i,options:f,reason:getUpdateReason(n,r,o,i)}}function shouldInclude(e,t){return t.include&&t.include.length>0&&t.include.some(function(t){return t.test(e)})}function shouldExclude(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some(function(t){return t.test(e)})}function shouldTrack(e,t,n){return!shouldExclude(t,n)&&!(!e.whyDidYouRender&&!shouldInclude(t,n))}var patchClassComponent=function(e,t){var n=function(n){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).apply(this,arguments))}return _inherits(r,e),_createClass(r,[{key:"componentDidUpdate",value:function(n,r,o){t.notifier(getUpdateInfo({Component:e,prevProps:n,prevState:r,nextProps:this.props,nextState:this.state,options:t})),"function"==typeof e.prototype.componentDidUpdate&&e.prototype.componentDidUpdate.call(this,n,r,o)}}]),r}();return n.displayName=getDisplayName(e),n},patchFunctionalComponent=function(e,t,n){var r=function(r){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,_getPrototypeOf(o).apply(this,arguments))}return _inherits(o,t.Component),_createClass(o,[{key:"render",value:function(){return e(this.props)}},{key:"componentDidUpdate",value:function(t){n.notifier(getUpdateInfo({Component:e,prevProps:t,nextProps:this.props,options:n}))}}]),o}();return r.displayName=getDisplayName(e),r};function createPatchedComponent(e,t,n,r){return t.prototype&&"function"==typeof t.prototype.render?patchClassComponent(t,r):patchFunctionalComponent(t,n,r)}function getPatchedComponent(e,t,n,r){if(e.has(t))return e.get(t);var o=createPatchedComponent(e,t,n,r);return e.set(t,o),o}function whyDidYouRender(e,t){var n=normalizeOptions(t),r=e.createElement,o=new Map;return e.createElement=function(t){for(var i="function"==typeof t&&shouldTrack(t,getDisplayName(t),n),f=arguments.length,a=new Array(f>1?f-1:0),s=1;s<f;s++)a[s-1]=arguments[s];if(!i)return r.apply(e,[t].concat(a));var c=getPatchedComponent(o,t,e,n);return r.apply(e,[c].concat(a))},e.__REVERT_WHY_DID_YOU_RENDER__=function(){e.createElement=r,delete e.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},e}module.exports=whyDidYouRender;
//# sourceMappingURL=whyDidYouRender.min.js.map

@@ -144,3 +144,3 @@ import _isString from 'lodash/isString';

var _diffTypesDescription;
var moreInfoUrl = 'https://goo.gl/hnfMPb';
var moreInfoUrl = 'http://bit.ly/wdyr02';
var diffTypesDescriptions = (_diffTypesDescription = {}, _defineProperty(_diffTypesDescription, diffTypes.different, 'different objects.'), _defineProperty(_diffTypesDescription, diffTypes.deepEquals, 'different objects that are equal by value.'), _defineProperty(_diffTypesDescription, diffTypes.date, 'different date objects with the same value.'), _defineProperty(_diffTypesDescription, diffTypes.regex, 'different regular expressions with the same value.'), _defineProperty(_diffTypesDescription, diffTypes.reactElement, 'different React elements with the same displayName.'), _defineProperty(_diffTypesDescription, diffTypes.function, 'different functions with the same name.'), _diffTypesDescription);

@@ -175,3 +175,3 @@

options.consoleLog("".concat(diffTypesDescriptions[diffType], " (more info at ").concat(moreInfoUrl, ")"));
options.consoleLog("prev '".concat(pathString, "':"), prevValue, ' !== ', nextValue, ":next '".concat(pathString, "'"));
options.consoleLog(_defineProperty({}, "prev ".concat(pathString), prevValue), '!==', _defineProperty({}, "next ".concat(pathString), nextValue));
options.consoleGroupEnd();

@@ -178,0 +178,0 @@ });

@@ -1,2 +0,2 @@

import _isString from"lodash/isString";import _reduce from"lodash/reduce";import _has from"lodash/has";import _keys from"lodash/keys";import _isFunction from"lodash/isFunction";import _isRegExp from"lodash/isRegExp";import _isDate from"lodash/isDate";import _isPlainObject from"lodash/isPlainObject";import _isArray from"lodash/isArray";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_defineProperty(e,t,n[t])})}return e}function _inherits(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&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var _diffTypesDescription,diffTypes={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},moreInfoUrl="https://goo.gl/hnfMPb",diffTypesDescriptions=(_defineProperty(_diffTypesDescription={},diffTypes.different,"different objects."),_defineProperty(_diffTypesDescription,diffTypes.deepEquals,"different objects that are equal by value."),_defineProperty(_diffTypesDescription,diffTypes.date,"different date objects with the same value."),_defineProperty(_diffTypesDescription,diffTypes.regex,"different regular expressions with the same value."),_defineProperty(_diffTypesDescription,diffTypes.reactElement,"different React elements with the same displayName."),_defineProperty(_diffTypesDescription,diffTypes.function,"different functions with the same name."),_diffTypesDescription);function shouldLog(e,t,n){return!!n.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some(function(e){return e.diffType===diffTypes.different})||e.stateDifferences&&e.stateDifferences.some(function(e){return e.diffType===diffTypes.different})))}function logDifference(e,t,n,r,o,i,f){o&&o.length>0?(f.consoleLog(_defineProperty({},t,e),"".concat(n," of ").concat(r," changes:")),o.forEach(function(e){var t=e.pathString,n=e.diffType,o=e.prevValue,i=e.nextValue;f.consoleGroup("%c".concat(r,".%c").concat(t,"%c"),"color:blue;","color:red;","color:black;"),f.consoleLog("".concat(diffTypesDescriptions[n]," (more info at ").concat(moreInfoUrl,")")),f.consoleLog("prev '".concat(t,"':"),o," !== ",i,":next '".concat(t,"'")),f.consoleGroupEnd()})):o&&(f.consoleLog(_defineProperty({},t,e),"".concat(n," the ").concat(r," object itself changed but it's values are all equal."),"props"===r?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(moreInfoUrl)),f.consoleLog("prev ".concat(r,":"),i.prev," !== ",i.next,":next ".concat(r)))}function defaultNotifier(e){var t=e.Component,n=e.displayName,r=e.prevProps,o=e.prevState,i=e.nextProps,f=e.nextState,a=e.reason,s=e.options;if(shouldLog(a,t,s)){s.consoleGroup("%c".concat(n),"color: #058;");var c="Re-rendered because";a.propsDifferences&&(logDifference(t,n,c,"props",a.propsDifferences,{prev:r,next:i},s),c="And because"),a.stateDifferences&&logDifference(t,n,c,"state",a.stateDifferences,{prev:o,next:f},s),a.propsDifferences||a.stateDifferences||s.consoleLog(_defineProperty({},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(moreInfoUrl)),s.consoleGroupEnd()}}var emptyFn=function(){};function normalizeOptions(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,n=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,n=emptyFn),_objectSpread({include:null,exclude:null,notifier:defaultNotifier,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:n,logOnDifferentValues:!1},e)}function getDisplayName(e){return _isString(e)?e:e.displayName||e.name}var hasElementType="undefined"!=typeof Element,hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE$1=hasSymbol?Symbol.for("react.element"):60103,isReactElement=function(e){return e.$$typeof===REACT_ELEMENT_TYPE$1};function trackDiff(e,t,n,r,o){return n.push({diffType:o,pathString:r,prevValue:e,nextValue:t}),o!==diffTypes.different}function accumulateDeepEqualDiffs(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===t)return!0;if(!e||!t)return trackDiff(e,t,n,r,diffTypes.different);if(_isArray(e)&&_isArray(t)){var o=e.length;if(o!==t.length)return trackDiff(e,t,n,r,diffTypes.different);for(var i=!0,f=o;0!=f--;)accumulateDeepEqualDiffs(e[f],t[f],n,"".concat(r,"[").concat(f,"]"))||(i=!1);return trackDiff(e,t,n,r,i?diffTypes.deepEquals:diffTypes.different)}if(_isDate(e)&&_isDate(t))return e.getTime()===t.getTime()?trackDiff(e,t,n,r,diffTypes.date):trackDiff(e,t,n,r,diffTypes.different);if(_isRegExp(e)&&_isRegExp(t))return e.toString()===t.toString()?trackDiff(e,t,n,r,diffTypes.regex):trackDiff(e,t,n,r,diffTypes.different);if(hasElementType&&e instanceof Element&&t instanceof Element)return trackDiff(e,t,n,r,diffTypes.different);if(isReactElement(e)&&isReactElement(t))return e.type===t.type?trackDiff(e,t,n,r,diffTypes.reactElement):trackDiff(e,t,n,r,diffTypes.different);if(_isFunction(e)&&_isFunction(t))return e.name===t.name?trackDiff(e,t,n,r,diffTypes.function):trackDiff(e,t,n,r,diffTypes.different);if(_isPlainObject(e)&&_isPlainObject(t)){var a=_keys(e),s=a.length;if(s!==_keys(t).length)return trackDiff(e,t,n,r,diffTypes.different);for(var c=s;0!=c--;)if(!_has(t,a[c]))return trackDiff(e,t,n,r,diffTypes.different);for(var p=!0,u=s;0!=u--;){var l=a[u];accumulateDeepEqualDiffs(e[l],t[l],n,"".concat(r,".").concat(l))||(p=!1)}return trackDiff(e,t,n,r,p?diffTypes.deepEquals:diffTypes.different)}return trackDiff(e,t,n,r,diffTypes.different)}function calculateDeepEqualDiffs(e,t,n){try{var r=[];return accumulateDeepEqualDiffs(e,t,r,n),r}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 emptyObject={};function findObjectsDifferences(e,t){if(e===t)return!1;var n=e||emptyObject,r=t||emptyObject,o=_keys(_objectSpread({},n,r));return _reduce(o,function(e,t){var o=calculateDeepEqualDiffs(n[t],r[t],t);return o&&(e=_toConsumableArray(e||[]).concat(_toConsumableArray(o))),e},[])}function getUpdateReason(e,t,n,r){return{propsDifferences:findObjectsDifferences(e,n,"props"),stateDifferences:findObjectsDifferences(t,r,"state")}}function getUpdateInfo(e){var t=e.Component,n=e.prevProps,r=e.prevState,o=e.nextProps,i=e.nextState,f=e.options;return{Component:t,displayName:getDisplayName(t),prevProps:n,prevState:r,nextProps:o,nextState:i,options:f,reason:getUpdateReason(n,r,o,i)}}function shouldInclude(e,t){return t.include&&t.include.length>0&&t.include.some(function(t){return t.test(e)})}function shouldExclude(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some(function(t){return t.test(e)})}function shouldTrack(e,t,n){return!shouldExclude(t,n)&&!(!e.whyDidYouRender&&!shouldInclude(t,n))}var patchClassComponent=function(e,t){var n=function(n){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).apply(this,arguments))}return _inherits(r,e),_createClass(r,[{key:"componentDidUpdate",value:function(n,r,o){t.notifier(getUpdateInfo({Component:e,prevProps:n,prevState:r,nextProps:this.props,nextState:this.state,options:t})),"function"==typeof e.prototype.componentDidUpdate&&e.prototype.componentDidUpdate.call(this,n,r,o)}}]),r}();return n.displayName=getDisplayName(e),n},patchFunctionalComponent=function(e,t,n){var r=function(r){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,_getPrototypeOf(o).apply(this,arguments))}return _inherits(o,t.Component),_createClass(o,[{key:"render",value:function(){return e(this.props)}},{key:"componentDidUpdate",value:function(t){n.notifier(getUpdateInfo({Component:e,prevProps:t,nextProps:this.props,options:n}))}}]),o}();return r.displayName=getDisplayName(e),r};function createPatchedComponent(e,t,n,r){return t.prototype&&"function"==typeof t.prototype.render?patchClassComponent(t,r):patchFunctionalComponent(t,n,r)}function getPatchedComponent(e,t,n,r){if(e.has(t))return e.get(t);var o=createPatchedComponent(e,t,n,r);return e.set(t,o),o}function whyDidYouRender(e,t){var n=normalizeOptions(t),r=e.createElement,o=new Map;return e.createElement=function(t){for(var i="function"==typeof t&&shouldTrack(t,getDisplayName(t),n),f=arguments.length,a=new Array(f>1?f-1:0),s=1;s<f;s++)a[s-1]=arguments[s];if(!i)return r.apply(e,[t].concat(a));var c=getPatchedComponent(o,t,e,n);return r.apply(e,[c].concat(a))},e.__REVERT_WHY_DID_YOU_RENDER__=function(){e.createElement=r,delete e.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},e}export default whyDidYouRender;
import _isString from"lodash/isString";import _reduce from"lodash/reduce";import _has from"lodash/has";import _keys from"lodash/keys";import _isFunction from"lodash/isFunction";import _isRegExp from"lodash/isRegExp";import _isDate from"lodash/isDate";import _isPlainObject from"lodash/isPlainObject";import _isArray from"lodash/isArray";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_defineProperty(e,t,n[t])})}return e}function _inherits(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&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var _diffTypesDescription,diffTypes={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},moreInfoUrl="http://bit.ly/wdyr02",diffTypesDescriptions=(_defineProperty(_diffTypesDescription={},diffTypes.different,"different objects."),_defineProperty(_diffTypesDescription,diffTypes.deepEquals,"different objects that are equal by value."),_defineProperty(_diffTypesDescription,diffTypes.date,"different date objects with the same value."),_defineProperty(_diffTypesDescription,diffTypes.regex,"different regular expressions with the same value."),_defineProperty(_diffTypesDescription,diffTypes.reactElement,"different React elements with the same displayName."),_defineProperty(_diffTypesDescription,diffTypes.function,"different functions with the same name."),_diffTypesDescription);function shouldLog(e,t,n){return!!n.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some(function(e){return e.diffType===diffTypes.different})||e.stateDifferences&&e.stateDifferences.some(function(e){return e.diffType===diffTypes.different})))}function logDifference(e,t,n,r,o,i,f){o&&o.length>0?(f.consoleLog(_defineProperty({},t,e),"".concat(n," of ").concat(r," changes:")),o.forEach(function(e){var t=e.pathString,n=e.diffType,o=e.prevValue,i=e.nextValue;f.consoleGroup("%c".concat(r,".%c").concat(t,"%c"),"color:blue;","color:red;","color:black;"),f.consoleLog("".concat(diffTypesDescriptions[n]," (more info at ").concat(moreInfoUrl,")")),f.consoleLog(_defineProperty({},"prev ".concat(t),o),"!==",_defineProperty({},"next ".concat(t),i)),f.consoleGroupEnd()})):o&&(f.consoleLog(_defineProperty({},t,e),"".concat(n," the ").concat(r," object itself changed but it's values are all equal."),"props"===r?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(moreInfoUrl)),f.consoleLog("prev ".concat(r,":"),i.prev," !== ",i.next,":next ".concat(r)))}function defaultNotifier(e){var t=e.Component,n=e.displayName,r=e.prevProps,o=e.prevState,i=e.nextProps,f=e.nextState,a=e.reason,s=e.options;if(shouldLog(a,t,s)){s.consoleGroup("%c".concat(n),"color: #058;");var c="Re-rendered because";a.propsDifferences&&(logDifference(t,n,c,"props",a.propsDifferences,{prev:r,next:i},s),c="And because"),a.stateDifferences&&logDifference(t,n,c,"state",a.stateDifferences,{prev:o,next:f},s),a.propsDifferences||a.stateDifferences||s.consoleLog(_defineProperty({},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(moreInfoUrl)),s.consoleGroupEnd()}}var emptyFn=function(){};function normalizeOptions(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,n=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,n=emptyFn),_objectSpread({include:null,exclude:null,notifier:defaultNotifier,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:n,logOnDifferentValues:!1},e)}function getDisplayName(e){return _isString(e)?e:e.displayName||e.name}var hasElementType="undefined"!=typeof Element,hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE$1=hasSymbol?Symbol.for("react.element"):60103,isReactElement=function(e){return e.$$typeof===REACT_ELEMENT_TYPE$1};function trackDiff(e,t,n,r,o){return n.push({diffType:o,pathString:r,prevValue:e,nextValue:t}),o!==diffTypes.different}function accumulateDeepEqualDiffs(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===t)return!0;if(!e||!t)return trackDiff(e,t,n,r,diffTypes.different);if(_isArray(e)&&_isArray(t)){var o=e.length;if(o!==t.length)return trackDiff(e,t,n,r,diffTypes.different);for(var i=!0,f=o;0!=f--;)accumulateDeepEqualDiffs(e[f],t[f],n,"".concat(r,"[").concat(f,"]"))||(i=!1);return trackDiff(e,t,n,r,i?diffTypes.deepEquals:diffTypes.different)}if(_isDate(e)&&_isDate(t))return e.getTime()===t.getTime()?trackDiff(e,t,n,r,diffTypes.date):trackDiff(e,t,n,r,diffTypes.different);if(_isRegExp(e)&&_isRegExp(t))return e.toString()===t.toString()?trackDiff(e,t,n,r,diffTypes.regex):trackDiff(e,t,n,r,diffTypes.different);if(hasElementType&&e instanceof Element&&t instanceof Element)return trackDiff(e,t,n,r,diffTypes.different);if(isReactElement(e)&&isReactElement(t))return e.type===t.type?trackDiff(e,t,n,r,diffTypes.reactElement):trackDiff(e,t,n,r,diffTypes.different);if(_isFunction(e)&&_isFunction(t))return e.name===t.name?trackDiff(e,t,n,r,diffTypes.function):trackDiff(e,t,n,r,diffTypes.different);if(_isPlainObject(e)&&_isPlainObject(t)){var a=_keys(e),s=a.length;if(s!==_keys(t).length)return trackDiff(e,t,n,r,diffTypes.different);for(var c=s;0!=c--;)if(!_has(t,a[c]))return trackDiff(e,t,n,r,diffTypes.different);for(var p=!0,u=s;0!=u--;){var l=a[u];accumulateDeepEqualDiffs(e[l],t[l],n,"".concat(r,".").concat(l))||(p=!1)}return trackDiff(e,t,n,r,p?diffTypes.deepEquals:diffTypes.different)}return trackDiff(e,t,n,r,diffTypes.different)}function calculateDeepEqualDiffs(e,t,n){try{var r=[];return accumulateDeepEqualDiffs(e,t,r,n),r}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 emptyObject={};function findObjectsDifferences(e,t){if(e===t)return!1;var n=e||emptyObject,r=t||emptyObject,o=_keys(_objectSpread({},n,r));return _reduce(o,function(e,t){var o=calculateDeepEqualDiffs(n[t],r[t],t);return o&&(e=_toConsumableArray(e||[]).concat(_toConsumableArray(o))),e},[])}function getUpdateReason(e,t,n,r){return{propsDifferences:findObjectsDifferences(e,n,"props"),stateDifferences:findObjectsDifferences(t,r,"state")}}function getUpdateInfo(e){var t=e.Component,n=e.prevProps,r=e.prevState,o=e.nextProps,i=e.nextState,f=e.options;return{Component:t,displayName:getDisplayName(t),prevProps:n,prevState:r,nextProps:o,nextState:i,options:f,reason:getUpdateReason(n,r,o,i)}}function shouldInclude(e,t){return t.include&&t.include.length>0&&t.include.some(function(t){return t.test(e)})}function shouldExclude(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some(function(t){return t.test(e)})}function shouldTrack(e,t,n){return!shouldExclude(t,n)&&!(!e.whyDidYouRender&&!shouldInclude(t,n))}var patchClassComponent=function(e,t){var n=function(n){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).apply(this,arguments))}return _inherits(r,e),_createClass(r,[{key:"componentDidUpdate",value:function(n,r,o){t.notifier(getUpdateInfo({Component:e,prevProps:n,prevState:r,nextProps:this.props,nextState:this.state,options:t})),"function"==typeof e.prototype.componentDidUpdate&&e.prototype.componentDidUpdate.call(this,n,r,o)}}]),r}();return n.displayName=getDisplayName(e),n},patchFunctionalComponent=function(e,t,n){var r=function(r){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,_getPrototypeOf(o).apply(this,arguments))}return _inherits(o,t.Component),_createClass(o,[{key:"render",value:function(){return e(this.props)}},{key:"componentDidUpdate",value:function(t){n.notifier(getUpdateInfo({Component:e,prevProps:t,nextProps:this.props,options:n}))}}]),o}();return r.displayName=getDisplayName(e),r};function createPatchedComponent(e,t,n,r){return t.prototype&&"function"==typeof t.prototype.render?patchClassComponent(t,r):patchFunctionalComponent(t,n,r)}function getPatchedComponent(e,t,n,r){if(e.has(t))return e.get(t);var o=createPatchedComponent(e,t,n,r);return e.set(t,o),o}function whyDidYouRender(e,t){var n=normalizeOptions(t),r=e.createElement,o=new Map;return e.createElement=function(t){for(var i="function"==typeof t&&shouldTrack(t,getDisplayName(t),n),f=arguments.length,a=new Array(f>1?f-1:0),s=1;s<f;s++)a[s-1]=arguments[s];if(!i)return r.apply(e,[t].concat(a));var c=getPatchedComponent(o,t,e,n);return r.apply(e,[c].concat(a))},e.__REVERT_WHY_DID_YOU_RENDER__=function(){e.createElement=r,delete e.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},e}export default whyDidYouRender;
//# sourceMappingURL=whyDidYouRender.min.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.whyDidYouRender=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){n(t,e,r[e])})}return t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var s,l={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},p="https://goo.gl/hnfMPb",v=(n(s={},l.different,"different objects."),n(s,l.deepEquals,"different objects that are equal by value."),n(s,l.date,"different date objects with the same value."),n(s,l.regex,"different regular expressions with the same value."),n(s,l.reactElement,"different React elements with the same displayName."),n(s,l.function,"different functions with the same name."),s);function h(t,e,r,o,a,i,u){a&&a.length>0?(u.consoleLog(n({},e,t),"".concat(r," of ").concat(o," changes:")),a.forEach(function(t){var e=t.pathString,r=t.diffType,n=t.prevValue,a=t.nextValue;u.consoleGroup("%c".concat(o,".%c").concat(e,"%c"),"color:blue;","color:red;","color:black;"),u.consoleLog("".concat(v[r]," (more info at ").concat(p,")")),u.consoleLog("prev '".concat(e,"':"),n," !== ",a,":next '".concat(e,"'")),u.consoleGroupEnd()})):a&&(u.consoleLog(n({},e,t),"".concat(r," the ").concat(o," object itself changed but it's values are all equal."),"props"===o?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(p)),u.consoleLog("prev ".concat(o,":"),i.prev," !== ",i.next,":next ".concat(o)))}function y(t){var e=t.Component,r=t.displayName,o=t.prevProps,a=t.prevState,i=t.nextProps,u=t.nextState,c=t.reason,f=t.options;if(function(t,e,r){return!!r.logOnDifferentValues||!(!e.whyDidYouRender||!e.whyDidYouRender.logOnDifferentValues)||!(t.propsDifferences&&t.propsDifferences.some(function(t){return t.diffType===l.different})||t.stateDifferences&&t.stateDifferences.some(function(t){return t.diffType===l.different}))}(c,e,f)){f.consoleGroup("%c".concat(r),"color: #058;");var s="Re-rendered because";c.propsDifferences&&(h(e,r,s,"props",c.propsDifferences,{prev:o,next:i},f),s="And because"),c.stateDifferences&&h(e,r,s,"state",c.stateDifferences,{prev:a,next:u},f),c.propsDifferences||c.stateDifferences||f.consoleLog(n({},r,e),"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(p)),f.consoleGroupEnd()}}var d=function(){};var b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t,e){return t(e={exports:{}},e.exports),e.exports}var _="object"==typeof b&&b&&b.Object===Object&&b,j="object"==typeof self&&self&&self.Object===Object&&self,m=_||j||Function("return this")(),O=m.Symbol,w=Object.prototype,E=w.hasOwnProperty,x=w.toString,S=O?O.toStringTag:void 0;var D=function(t){var e=E.call(t,S),r=t[S];try{t[S]=void 0}catch(t){}var n=x.call(t);return e?t[S]=r:delete t[S],n},P=Object.prototype.toString;var A=function(t){return P.call(t)},z="[object Null]",T="[object Undefined]",R=O?O.toStringTag:void 0;var k=function(t){return null==t?void 0===t?T:z:R&&R in Object(t)?D(t):A(t)},L=Array.isArray;var V=function(t){return null!=t&&"object"==typeof t},C="[object String]";var U=function(t){return"string"==typeof t||!L(t)&&V(t)&&k(t)==C};function $(t){return U(t)?t:t.displayName||t.name}var M=function(t,e,r,n){var o=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++o]);++o<a;)r=e(r,t[o],o,t);return r};var N=function(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),u=i.length;u--;){var c=i[t?u:++o];if(!1===r(a[c],c,a))break}return e}}();var F=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},q="[object Arguments]";var I=function(t){return V(t)&&k(t)==q},G=Object.prototype,Y=G.hasOwnProperty,B=G.propertyIsEnumerable,W=I(function(){return arguments}())?I:function(t){return V(t)&&Y.call(t,"callee")&&!B.call(t,"callee")};var H=function(){return!1},J=g(function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?m.Buffer:void 0,a=(o?o.isBuffer:void 0)||H;t.exports=a}),K=9007199254740991,Q=/^(?:0|[1-9]\d*)$/;var X=function(t,e){var r=typeof t;return!!(e=null==e?K:e)&&("number"==r||"symbol"!=r&&Q.test(t))&&t>-1&&t%1==0&&t<e},Z=9007199254740991;var tt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Z},et={};et["[object Float32Array]"]=et["[object Float64Array]"]=et["[object Int8Array]"]=et["[object Int16Array]"]=et["[object Int32Array]"]=et["[object Uint8Array]"]=et["[object Uint8ClampedArray]"]=et["[object Uint16Array]"]=et["[object Uint32Array]"]=!0,et["[object Arguments]"]=et["[object Array]"]=et["[object ArrayBuffer]"]=et["[object Boolean]"]=et["[object DataView]"]=et["[object Date]"]=et["[object Error]"]=et["[object Function]"]=et["[object Map]"]=et["[object Number]"]=et["[object Object]"]=et["[object RegExp]"]=et["[object Set]"]=et["[object String]"]=et["[object WeakMap]"]=!1;var rt=function(t){return V(t)&&tt(t.length)&&!!et[k(t)]};var nt=function(t){return function(e){return t(e)}},ot=g(function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&_.process,a=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}),at=ot&&ot.isTypedArray,it=at?nt(at):rt,ut=Object.prototype.hasOwnProperty;var ct=function(t,e){var r=L(t),n=!r&&W(t),o=!r&&!n&&J(t),a=!r&&!n&&!o&&it(t),i=r||n||o||a,u=i?F(t.length,String):[],c=u.length;for(var f in t)!e&&!ut.call(t,f)||i&&("length"==f||o&&("offset"==f||"parent"==f)||a&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||X(f,c))||u.push(f);return u},ft=Object.prototype;var st=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ft)};var lt=function(t,e){return function(r){return t(e(r))}},pt=lt(Object.keys,Object),vt=Object.prototype.hasOwnProperty;var ht=function(t){if(!st(t))return pt(t);var e=[];for(var r in Object(t))vt.call(t,r)&&"constructor"!=r&&e.push(r);return e};var yt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},dt="[object AsyncFunction]",bt="[object Function]",gt="[object GeneratorFunction]",_t="[object Proxy]";var jt=function(t){if(!yt(t))return!1;var e=k(t);return e==bt||e==gt||e==dt||e==_t};var mt=function(t){return null!=t&&tt(t.length)&&!jt(t)};var Ot=function(t){return mt(t)?ct(t):ht(t)};var wt=function(t,e){return function(r,n){if(null==r)return r;if(!mt(r))return t(r,n);for(var o=r.length,a=e?o:-1,i=Object(r);(e?a--:++a<o)&&!1!==n(i[a],a,i););return r}}(function(t,e){return t&&N(t,e,Ot)});var Et=function(){this.__data__=[],this.size=0};var xt=function(t,e){return t===e||t!=t&&e!=e};var St=function(t,e){for(var r=t.length;r--;)if(xt(t[r][0],e))return r;return-1},Dt=Array.prototype.splice;var Pt=function(t){var e=this.__data__,r=St(e,t);return!(r<0||(r==e.length-1?e.pop():Dt.call(e,r,1),--this.size,0))};var At=function(t){var e=this.__data__,r=St(e,t);return r<0?void 0:e[r][1]};var zt=function(t){return St(this.__data__,t)>-1};var Tt=function(t,e){var r=this.__data__,n=St(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Rt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Rt.prototype.clear=Et,Rt.prototype.delete=Pt,Rt.prototype.get=At,Rt.prototype.has=zt,Rt.prototype.set=Tt;var kt=Rt;var Lt=function(){this.__data__=new kt,this.size=0};var Vt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var Ct=function(t){return this.__data__.get(t)};var Ut,$t=function(t){return this.__data__.has(t)},Mt=m["__core-js_shared__"],Nt=(Ut=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+Ut:"";var Ft=function(t){return!!Nt&&Nt in t},qt=Function.prototype.toString;var It=function(t){if(null!=t){try{return qt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Gt=/^\[object .+?Constructor\]$/,Yt=Function.prototype,Bt=Object.prototype,Wt=Yt.toString,Ht=Bt.hasOwnProperty,Jt=RegExp("^"+Wt.call(Ht).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Kt=function(t){return!(!yt(t)||Ft(t))&&(jt(t)?Jt:Gt).test(It(t))};var Qt=function(t,e){return null==t?void 0:t[e]};var Xt=function(t,e){var r=Qt(t,e);return Kt(r)?r:void 0},Zt=Xt(m,"Map"),te=Xt(Object,"create");var ee=function(){this.__data__=te?te(null):{},this.size=0};var re=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ne="__lodash_hash_undefined__",oe=Object.prototype.hasOwnProperty;var ae=function(t){var e=this.__data__;if(te){var r=e[t];return r===ne?void 0:r}return oe.call(e,t)?e[t]:void 0},ie=Object.prototype.hasOwnProperty;var ue=function(t){var e=this.__data__;return te?void 0!==e[t]:ie.call(e,t)},ce="__lodash_hash_undefined__";var fe=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=te&&void 0===e?ce:e,this};function se(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}se.prototype.clear=ee,se.prototype.delete=re,se.prototype.get=ae,se.prototype.has=ue,se.prototype.set=fe;var le=se;var pe=function(){this.size=0,this.__data__={hash:new le,map:new(Zt||kt),string:new le}};var ve=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var he=function(t,e){var r=t.__data__;return ve(e)?r["string"==typeof e?"string":"hash"]:r.map};var ye=function(t){var e=he(this,t).delete(t);return this.size-=e?1:0,e};var de=function(t){return he(this,t).get(t)};var be=function(t){return he(this,t).has(t)};var ge=function(t,e){var r=he(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function _e(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_e.prototype.clear=pe,_e.prototype.delete=ye,_e.prototype.get=de,_e.prototype.has=be,_e.prototype.set=ge;var je=_e,me=200;var Oe=function(t,e){var r=this.__data__;if(r instanceof kt){var n=r.__data__;if(!Zt||n.length<me-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new je(n)}return r.set(t,e),this.size=r.size,this};function we(t){var e=this.__data__=new kt(t);this.size=e.size}we.prototype.clear=Lt,we.prototype.delete=Vt,we.prototype.get=Ct,we.prototype.has=$t,we.prototype.set=Oe;var Ee=we,xe="__lodash_hash_undefined__";var Se=function(t){return this.__data__.set(t,xe),this};var De=function(t){return this.__data__.has(t)};function Pe(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new je;++e<r;)this.add(t[e])}Pe.prototype.add=Pe.prototype.push=Se,Pe.prototype.has=De;var Ae=Pe;var ze=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var Te=function(t,e){return t.has(e)},Re=1,ke=2;var Le=function(t,e,r,n,o,a){var i=r&Re,u=t.length,c=e.length;if(u!=c&&!(i&&c>u))return!1;var f=a.get(t);if(f&&a.get(e))return f==e;var s=-1,l=!0,p=r&ke?new Ae:void 0;for(a.set(t,e),a.set(e,t);++s<u;){var v=t[s],h=e[s];if(n)var y=i?n(h,v,s,e,t,a):n(v,h,s,t,e,a);if(void 0!==y){if(y)continue;l=!1;break}if(p){if(!ze(e,function(t,e){if(!Te(p,e)&&(v===t||o(v,t,r,n,a)))return p.push(e)})){l=!1;break}}else if(v!==h&&!o(v,h,r,n,a)){l=!1;break}}return a.delete(t),a.delete(e),l},Ve=m.Uint8Array;var Ce=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r};var Ue=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r},$e=1,Me=2,Ne="[object Boolean]",Fe="[object Date]",qe="[object Error]",Ie="[object Map]",Ge="[object Number]",Ye="[object RegExp]",Be="[object Set]",We="[object String]",He="[object Symbol]",Je="[object ArrayBuffer]",Ke="[object DataView]",Qe=O?O.prototype:void 0,Xe=Qe?Qe.valueOf:void 0;var Ze=function(t,e,r,n,o,a,i){switch(r){case Ke:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Je:return!(t.byteLength!=e.byteLength||!a(new Ve(t),new Ve(e)));case Ne:case Fe:case Ge:return xt(+t,+e);case qe:return t.name==e.name&&t.message==e.message;case Ye:case We:return t==e+"";case Ie:var u=Ce;case Be:var c=n&$e;if(u||(u=Ue),t.size!=e.size&&!c)return!1;var f=i.get(t);if(f)return f==e;n|=Me,i.set(t,e);var s=Le(u(t),u(e),n,o,a,i);return i.delete(t),s;case He:if(Xe)return Xe.call(t)==Xe.call(e)}return!1};var tr=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var er=function(t,e,r){var n=e(t);return L(t)?n:tr(n,r(t))};var rr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a};var nr=function(){return[]},or=Object.prototype.propertyIsEnumerable,ar=Object.getOwnPropertySymbols,ir=ar?function(t){return null==t?[]:(t=Object(t),rr(ar(t),function(e){return or.call(t,e)}))}:nr;var ur=function(t){return er(t,Ot,ir)},cr=1,fr=Object.prototype.hasOwnProperty;var sr=function(t,e,r,n,o,a){var i=r&cr,u=ur(t),c=u.length;if(c!=ur(e).length&&!i)return!1;for(var f=c;f--;){var s=u[f];if(!(i?s in e:fr.call(e,s)))return!1}var l=a.get(t);if(l&&a.get(e))return l==e;var p=!0;a.set(t,e),a.set(e,t);for(var v=i;++f<c;){var h=t[s=u[f]],y=e[s];if(n)var d=i?n(y,h,s,e,t,a):n(h,y,s,t,e,a);if(!(void 0===d?h===y||o(h,y,r,n,a):d)){p=!1;break}v||(v="constructor"==s)}if(p&&!v){var b=t.constructor,g=e.constructor;b!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g)&&(p=!1)}return a.delete(t),a.delete(e),p},lr=Xt(m,"DataView"),pr=Xt(m,"Promise"),vr=Xt(m,"Set"),hr=Xt(m,"WeakMap"),yr=It(lr),dr=It(Zt),br=It(pr),gr=It(vr),_r=It(hr),jr=k;(lr&&"[object DataView]"!=jr(new lr(new ArrayBuffer(1)))||Zt&&"[object Map]"!=jr(new Zt)||pr&&"[object Promise]"!=jr(pr.resolve())||vr&&"[object Set]"!=jr(new vr)||hr&&"[object WeakMap]"!=jr(new hr))&&(jr=function(t){var e=k(t),r="[object Object]"==e?t.constructor:void 0,n=r?It(r):"";if(n)switch(n){case yr:return"[object DataView]";case dr:return"[object Map]";case br:return"[object Promise]";case gr:return"[object Set]";case _r:return"[object WeakMap]"}return e});var mr=jr,Or=1,wr="[object Arguments]",Er="[object Array]",xr="[object Object]",Sr=Object.prototype.hasOwnProperty;var Dr=function(t,e,r,n,o,a){var i=L(t),u=L(e),c=i?Er:mr(t),f=u?Er:mr(e),s=(c=c==wr?xr:c)==xr,l=(f=f==wr?xr:f)==xr,p=c==f;if(p&&J(t)){if(!J(e))return!1;i=!0,s=!1}if(p&&!s)return a||(a=new Ee),i||it(t)?Le(t,e,r,n,o,a):Ze(t,e,c,r,n,o,a);if(!(r&Or)){var v=s&&Sr.call(t,"__wrapped__"),h=l&&Sr.call(e,"__wrapped__");if(v||h){var y=v?t.value():t,d=h?e.value():e;return a||(a=new Ee),o(y,d,r,n,a)}}return!!p&&(a||(a=new Ee),sr(t,e,r,n,o,a))};var Pr=function t(e,r,n,o,a){return e===r||(null==e||null==r||!V(e)&&!V(r)?e!=e&&r!=r:Dr(e,r,n,o,t,a))},Ar=1,zr=2;var Tr=function(t,e,r,n){var o=r.length,a=o,i=!n;if(null==t)return!a;for(t=Object(t);o--;){var u=r[o];if(i&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],f=t[c],s=u[1];if(i&&u[2]){if(void 0===f&&!(c in t))return!1}else{var l=new Ee;if(n)var p=n(f,s,c,t,e,l);if(!(void 0===p?Pr(s,f,Ar|zr,n,l):p))return!1}}return!0};var Rr=function(t){return t==t&&!yt(t)};var kr=function(t){for(var e=Ot(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Rr(o)]}return e};var Lr=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}};var Vr=function(t){var e=kr(t);return 1==e.length&&e[0][2]?Lr(e[0][0],e[0][1]):function(r){return r===t||Tr(r,t,e)}},Cr="[object Symbol]";var Ur=function(t){return"symbol"==typeof t||V(t)&&k(t)==Cr},$r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mr=/^\w*$/;var Nr=function(t,e){if(L(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Ur(t))||Mr.test(t)||!$r.test(t)||null!=e&&t in Object(e)},Fr="Expected a function";function qr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Fr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(qr.Cache||je),r}qr.Cache=je;var Ir=qr,Gr=500;var Yr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Br=/\\(\\)?/g,Wr=function(t){var e=Ir(t,function(t){return r.size===Gr&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Yr,function(t,r,n,o){e.push(n?o.replace(Br,"$1"):r||t)}),e});var Hr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Jr=1/0,Kr=O?O.prototype:void 0,Qr=Kr?Kr.toString:void 0;var Xr=function t(e){if("string"==typeof e)return e;if(L(e))return Hr(e,t)+"";if(Ur(e))return Qr?Qr.call(e):"";var r=e+"";return"0"==r&&1/e==-Jr?"-0":r};var Zr=function(t){return null==t?"":Xr(t)};var tn=function(t,e){return L(t)?t:Nr(t,e)?[t]:Wr(Zr(t))},en=1/0;var rn=function(t){if("string"==typeof t||Ur(t))return t;var e=t+"";return"0"==e&&1/t==-en?"-0":e};var nn=function(t,e){for(var r=0,n=(e=tn(e,t)).length;null!=t&&r<n;)t=t[rn(e[r++])];return r&&r==n?t:void 0};var on=function(t,e,r){var n=null==t?void 0:nn(t,e);return void 0===n?r:n};var an=function(t,e){return null!=t&&e in Object(t)};var un=function(t,e,r){for(var n=-1,o=(e=tn(e,t)).length,a=!1;++n<o;){var i=rn(e[n]);if(!(a=null!=t&&r(t,i)))break;t=t[i]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&tt(o)&&X(i,o)&&(L(t)||W(t))};var cn=function(t,e){return null!=t&&un(t,e,an)},fn=1,sn=2;var ln=function(t,e){return Nr(t)&&Rr(e)?Lr(rn(t),e):function(r){var n=on(r,t);return void 0===n&&n===e?cn(r,t):Pr(e,n,fn|sn)}};var pn=function(t){return t};var vn=function(t){return function(e){return null==e?void 0:e[t]}};var hn=function(t){return function(e){return nn(e,t)}};var yn=function(t){return Nr(t)?vn(rn(t)):hn(t)};var dn=function(t){return"function"==typeof t?t:null==t?pn:"object"==typeof t?L(t)?ln(t[0],t[1]):Vr(t):yn(t)};var bn=function(t,e,r,n,o){return o(t,function(t,o,a){r=n?(n=!1,t):e(r,t,o,a)}),r};var gn=function(t,e,r){var n=L(t)?M:bn,o=arguments.length<3;return n(t,dn(e,4),r,o,wt)},_n=Object.prototype.hasOwnProperty;var jn=function(t,e){return null!=t&&_n.call(t,e)};var mn=function(t,e){return null!=t&&un(t,e,jn)},On="[object RegExp]";var wn=function(t){return V(t)&&k(t)==On},En=ot&&ot.isRegExp,xn=En?nt(En):wn,Sn="[object Date]";var Dn=function(t){return V(t)&&k(t)==Sn},Pn=ot&&ot.isDate,An=Pn?nt(Pn):Dn,zn=lt(Object.getPrototypeOf,Object),Tn="[object Object]",Rn=Function.prototype,kn=Object.prototype,Ln=Rn.toString,Vn=kn.hasOwnProperty,Cn=Ln.call(Object);var Un=function(t){if(!V(t)||k(t)!=Tn)return!1;var e=zn(t);if(null===e)return!0;var r=Vn.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ln.call(r)==Cn},$n="undefined"!=typeof Element,Mn="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,Nn=function(t){return t.$$typeof===Mn};function Fn(t,e,r,n,o){return r.push({diffType:o,pathString:n,prevValue:t,nextValue:e}),o!==l.different}function qn(t,e,r){try{var n=[];return function t(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===r)return!0;if(!e||!r)return Fn(e,r,n,o,l.different);if(L(e)&&L(r)){var a=e.length;if(a!==r.length)return Fn(e,r,n,o,l.different);for(var i=!0,u=a;0!=u--;)t(e[u],r[u],n,"".concat(o,"[").concat(u,"]"))||(i=!1);return Fn(e,r,n,o,i?l.deepEquals:l.different)}if(An(e)&&An(r))return e.getTime()===r.getTime()?Fn(e,r,n,o,l.date):Fn(e,r,n,o,l.different);if(xn(e)&&xn(r))return e.toString()===r.toString()?Fn(e,r,n,o,l.regex):Fn(e,r,n,o,l.different);if($n&&e instanceof Element&&r instanceof Element)return Fn(e,r,n,o,l.different);if(Nn(e)&&Nn(r))return e.type===r.type?Fn(e,r,n,o,l.reactElement):Fn(e,r,n,o,l.different);if(jt(e)&&jt(r))return e.name===r.name?Fn(e,r,n,o,l.function):Fn(e,r,n,o,l.different);if(Un(e)&&Un(r)){var c=Ot(e),f=c.length;if(f!==Ot(r).length)return Fn(e,r,n,o,l.different);for(var s=f;0!=s--;)if(!mn(r,c[s]))return Fn(e,r,n,o,l.different);for(var p=!0,v=f;0!=v--;){var h=c[v];t(e[h],r[h],n,"".concat(o,".").concat(h))||(p=!1)}return Fn(e,r,n,o,p?l.deepEquals:l.different)}return Fn(e,r,n,o,l.different)}(t,e,n,r),n}catch(t){if(t.message&&t.message.match(/stack|recursion/i)||-2146828260===t.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",t.name,t.message),!1;throw t}}var In={};function Gn(t,e){if(t===e)return!1;var r=t||In,n=e||In,a=Ot(o({},r,n));return gn(a,function(t,e){var o=qn(r[e],n[e],e);return o&&(t=f(t||[]).concat(f(o))),t},[])}function Yn(t){var e=t.Component,r=t.prevProps,n=t.prevState,o=t.nextProps,a=t.nextState,i=t.options;return{Component:e,displayName:$(e),prevProps:r,prevState:n,nextProps:o,nextState:a,options:i,reason:function(t,e,r,n){return{propsDifferences:Gn(t,r),stateDifferences:Gn(e,n)}}(r,n,o,a)}}var Bn=function(e,n){var o=function(o){function u(){return t(this,u),c(this,i(u).apply(this,arguments))}return a(u,e),r(u,[{key:"componentDidUpdate",value:function(t,r,o){n.notifier(Yn({Component:e,prevProps:t,prevState:r,nextProps:this.props,nextState:this.state,options:n})),"function"==typeof e.prototype.componentDidUpdate&&e.prototype.componentDidUpdate.call(this,t,r,o)}}]),u}();return o.displayName=$(e),o},Wn=function(e,n,o){var u=function(u){function f(){return t(this,f),c(this,i(f).apply(this,arguments))}return a(f,n.Component),r(f,[{key:"render",value:function(){return e(this.props)}},{key:"componentDidUpdate",value:function(t){o.notifier(Yn({Component:e,prevProps:t,nextProps:this.props,options:o}))}}]),f}();return u.displayName=$(e),u};function Hn(t,e,r,n){if(t.has(e))return t.get(e);var o=function(t,e,r,n){return e.prototype&&"function"==typeof e.prototype.render?Bn(e,n):Wn(e,r,n)}(0,e,r,n);return t.set(e,o),o}return function(t,e){var r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=console.group,r=console.groupEnd;return t.collapseGroups?e=console.groupCollapsed:t.onlyLogs&&(e=console.log,r=d),o({include:null,exclude:null,notifier:y,onlyLogs:!1,consoleLog:console.log,consoleGroup:e,consoleGroupEnd:r,logOnDifferentValues:!1},t)}(e),n=t.createElement,a=new Map;return t.createElement=function(e){for(var o="function"==typeof e&&function(t,e,r){return!(function(t,e){return e.exclude&&e.exclude.length>0&&e.exclude.some(function(e){return e.test(t)})}(e,r)||!t.whyDidYouRender&&!function(t,e){return e.include&&e.include.length>0&&e.include.some(function(e){return e.test(t)})}(e,r))}(e,$(e),r),i=arguments.length,u=new Array(i>1?i-1:0),c=1;c<i;c++)u[c-1]=arguments[c];if(!o)return n.apply(t,[e].concat(u));var f=Hn(a,e,t,r);return n.apply(t,[f].concat(u))},t.__REVERT_WHY_DID_YOU_RENDER__=function(){t.createElement=n,delete t.__REVERT_WHY_DID_YOU_RENDER__,a.clear()},t}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.whyDidYouRender=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){n(t,e,r[e])})}return t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var s,l={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},p="http://bit.ly/wdyr02",v=(n(s={},l.different,"different objects."),n(s,l.deepEquals,"different objects that are equal by value."),n(s,l.date,"different date objects with the same value."),n(s,l.regex,"different regular expressions with the same value."),n(s,l.reactElement,"different React elements with the same displayName."),n(s,l.function,"different functions with the same name."),s);function h(t,e,r,o,a,i,u){a&&a.length>0?(u.consoleLog(n({},e,t),"".concat(r," of ").concat(o," changes:")),a.forEach(function(t){var e=t.pathString,r=t.diffType,a=t.prevValue,i=t.nextValue;u.consoleGroup("%c".concat(o,".%c").concat(e,"%c"),"color:blue;","color:red;","color:black;"),u.consoleLog("".concat(v[r]," (more info at ").concat(p,")")),u.consoleLog(n({},"prev ".concat(e),a),"!==",n({},"next ".concat(e),i)),u.consoleGroupEnd()})):a&&(u.consoleLog(n({},e,t),"".concat(r," the ").concat(o," object itself changed but it's values are all equal."),"props"===o?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(p)),u.consoleLog("prev ".concat(o,":"),i.prev," !== ",i.next,":next ".concat(o)))}function y(t){var e=t.Component,r=t.displayName,o=t.prevProps,a=t.prevState,i=t.nextProps,u=t.nextState,c=t.reason,f=t.options;if(function(t,e,r){return!!r.logOnDifferentValues||!(!e.whyDidYouRender||!e.whyDidYouRender.logOnDifferentValues)||!(t.propsDifferences&&t.propsDifferences.some(function(t){return t.diffType===l.different})||t.stateDifferences&&t.stateDifferences.some(function(t){return t.diffType===l.different}))}(c,e,f)){f.consoleGroup("%c".concat(r),"color: #058;");var s="Re-rendered because";c.propsDifferences&&(h(e,r,s,"props",c.propsDifferences,{prev:o,next:i},f),s="And because"),c.stateDifferences&&h(e,r,s,"state",c.stateDifferences,{prev:a,next:u},f),c.propsDifferences||c.stateDifferences||f.consoleLog(n({},r,e),"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(p)),f.consoleGroupEnd()}}var d=function(){};var b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t,e){return t(e={exports:{}},e.exports),e.exports}var _="object"==typeof b&&b&&b.Object===Object&&b,j="object"==typeof self&&self&&self.Object===Object&&self,m=_||j||Function("return this")(),O=m.Symbol,w=Object.prototype,E=w.hasOwnProperty,x=w.toString,S=O?O.toStringTag:void 0;var D=function(t){var e=E.call(t,S),r=t[S];try{t[S]=void 0}catch(t){}var n=x.call(t);return e?t[S]=r:delete t[S],n},P=Object.prototype.toString;var A=function(t){return P.call(t)},z="[object Null]",T="[object Undefined]",R=O?O.toStringTag:void 0;var k=function(t){return null==t?void 0===t?T:z:R&&R in Object(t)?D(t):A(t)},L=Array.isArray;var V=function(t){return null!=t&&"object"==typeof t},C="[object String]";var U=function(t){return"string"==typeof t||!L(t)&&V(t)&&k(t)==C};function $(t){return U(t)?t:t.displayName||t.name}var N=function(t,e,r,n){var o=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++o]);++o<a;)r=e(r,t[o],o,t);return r};var F=function(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),u=i.length;u--;){var c=i[t?u:++o];if(!1===r(a[c],c,a))break}return e}}();var M=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},q="[object Arguments]";var I=function(t){return V(t)&&k(t)==q},G=Object.prototype,Y=G.hasOwnProperty,B=G.propertyIsEnumerable,W=I(function(){return arguments}())?I:function(t){return V(t)&&Y.call(t,"callee")&&!B.call(t,"callee")};var H=function(){return!1},J=g(function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?m.Buffer:void 0,a=(o?o.isBuffer:void 0)||H;t.exports=a}),K=9007199254740991,Q=/^(?:0|[1-9]\d*)$/;var X=function(t,e){var r=typeof t;return!!(e=null==e?K:e)&&("number"==r||"symbol"!=r&&Q.test(t))&&t>-1&&t%1==0&&t<e},Z=9007199254740991;var tt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Z},et={};et["[object Float32Array]"]=et["[object Float64Array]"]=et["[object Int8Array]"]=et["[object Int16Array]"]=et["[object Int32Array]"]=et["[object Uint8Array]"]=et["[object Uint8ClampedArray]"]=et["[object Uint16Array]"]=et["[object Uint32Array]"]=!0,et["[object Arguments]"]=et["[object Array]"]=et["[object ArrayBuffer]"]=et["[object Boolean]"]=et["[object DataView]"]=et["[object Date]"]=et["[object Error]"]=et["[object Function]"]=et["[object Map]"]=et["[object Number]"]=et["[object Object]"]=et["[object RegExp]"]=et["[object Set]"]=et["[object String]"]=et["[object WeakMap]"]=!1;var rt=function(t){return V(t)&&tt(t.length)&&!!et[k(t)]};var nt=function(t){return function(e){return t(e)}},ot=g(function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&_.process,a=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}),at=ot&&ot.isTypedArray,it=at?nt(at):rt,ut=Object.prototype.hasOwnProperty;var ct=function(t,e){var r=L(t),n=!r&&W(t),o=!r&&!n&&J(t),a=!r&&!n&&!o&&it(t),i=r||n||o||a,u=i?M(t.length,String):[],c=u.length;for(var f in t)!e&&!ut.call(t,f)||i&&("length"==f||o&&("offset"==f||"parent"==f)||a&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||X(f,c))||u.push(f);return u},ft=Object.prototype;var st=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ft)};var lt=function(t,e){return function(r){return t(e(r))}},pt=lt(Object.keys,Object),vt=Object.prototype.hasOwnProperty;var ht=function(t){if(!st(t))return pt(t);var e=[];for(var r in Object(t))vt.call(t,r)&&"constructor"!=r&&e.push(r);return e};var yt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},dt="[object AsyncFunction]",bt="[object Function]",gt="[object GeneratorFunction]",_t="[object Proxy]";var jt=function(t){if(!yt(t))return!1;var e=k(t);return e==bt||e==gt||e==dt||e==_t};var mt=function(t){return null!=t&&tt(t.length)&&!jt(t)};var Ot=function(t){return mt(t)?ct(t):ht(t)};var wt=function(t,e){return function(r,n){if(null==r)return r;if(!mt(r))return t(r,n);for(var o=r.length,a=e?o:-1,i=Object(r);(e?a--:++a<o)&&!1!==n(i[a],a,i););return r}}(function(t,e){return t&&F(t,e,Ot)});var Et=function(){this.__data__=[],this.size=0};var xt=function(t,e){return t===e||t!=t&&e!=e};var St=function(t,e){for(var r=t.length;r--;)if(xt(t[r][0],e))return r;return-1},Dt=Array.prototype.splice;var Pt=function(t){var e=this.__data__,r=St(e,t);return!(r<0||(r==e.length-1?e.pop():Dt.call(e,r,1),--this.size,0))};var At=function(t){var e=this.__data__,r=St(e,t);return r<0?void 0:e[r][1]};var zt=function(t){return St(this.__data__,t)>-1};var Tt=function(t,e){var r=this.__data__,n=St(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Rt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Rt.prototype.clear=Et,Rt.prototype.delete=Pt,Rt.prototype.get=At,Rt.prototype.has=zt,Rt.prototype.set=Tt;var kt=Rt;var Lt=function(){this.__data__=new kt,this.size=0};var Vt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var Ct=function(t){return this.__data__.get(t)};var Ut,$t=function(t){return this.__data__.has(t)},Nt=m["__core-js_shared__"],Ft=(Ut=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||""))?"Symbol(src)_1."+Ut:"";var Mt=function(t){return!!Ft&&Ft in t},qt=Function.prototype.toString;var It=function(t){if(null!=t){try{return qt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Gt=/^\[object .+?Constructor\]$/,Yt=Function.prototype,Bt=Object.prototype,Wt=Yt.toString,Ht=Bt.hasOwnProperty,Jt=RegExp("^"+Wt.call(Ht).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Kt=function(t){return!(!yt(t)||Mt(t))&&(jt(t)?Jt:Gt).test(It(t))};var Qt=function(t,e){return null==t?void 0:t[e]};var Xt=function(t,e){var r=Qt(t,e);return Kt(r)?r:void 0},Zt=Xt(m,"Map"),te=Xt(Object,"create");var ee=function(){this.__data__=te?te(null):{},this.size=0};var re=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ne="__lodash_hash_undefined__",oe=Object.prototype.hasOwnProperty;var ae=function(t){var e=this.__data__;if(te){var r=e[t];return r===ne?void 0:r}return oe.call(e,t)?e[t]:void 0},ie=Object.prototype.hasOwnProperty;var ue=function(t){var e=this.__data__;return te?void 0!==e[t]:ie.call(e,t)},ce="__lodash_hash_undefined__";var fe=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=te&&void 0===e?ce:e,this};function se(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}se.prototype.clear=ee,se.prototype.delete=re,se.prototype.get=ae,se.prototype.has=ue,se.prototype.set=fe;var le=se;var pe=function(){this.size=0,this.__data__={hash:new le,map:new(Zt||kt),string:new le}};var ve=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var he=function(t,e){var r=t.__data__;return ve(e)?r["string"==typeof e?"string":"hash"]:r.map};var ye=function(t){var e=he(this,t).delete(t);return this.size-=e?1:0,e};var de=function(t){return he(this,t).get(t)};var be=function(t){return he(this,t).has(t)};var ge=function(t,e){var r=he(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function _e(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_e.prototype.clear=pe,_e.prototype.delete=ye,_e.prototype.get=de,_e.prototype.has=be,_e.prototype.set=ge;var je=_e,me=200;var Oe=function(t,e){var r=this.__data__;if(r instanceof kt){var n=r.__data__;if(!Zt||n.length<me-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new je(n)}return r.set(t,e),this.size=r.size,this};function we(t){var e=this.__data__=new kt(t);this.size=e.size}we.prototype.clear=Lt,we.prototype.delete=Vt,we.prototype.get=Ct,we.prototype.has=$t,we.prototype.set=Oe;var Ee=we,xe="__lodash_hash_undefined__";var Se=function(t){return this.__data__.set(t,xe),this};var De=function(t){return this.__data__.has(t)};function Pe(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new je;++e<r;)this.add(t[e])}Pe.prototype.add=Pe.prototype.push=Se,Pe.prototype.has=De;var Ae=Pe;var ze=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var Te=function(t,e){return t.has(e)},Re=1,ke=2;var Le=function(t,e,r,n,o,a){var i=r&Re,u=t.length,c=e.length;if(u!=c&&!(i&&c>u))return!1;var f=a.get(t);if(f&&a.get(e))return f==e;var s=-1,l=!0,p=r&ke?new Ae:void 0;for(a.set(t,e),a.set(e,t);++s<u;){var v=t[s],h=e[s];if(n)var y=i?n(h,v,s,e,t,a):n(v,h,s,t,e,a);if(void 0!==y){if(y)continue;l=!1;break}if(p){if(!ze(e,function(t,e){if(!Te(p,e)&&(v===t||o(v,t,r,n,a)))return p.push(e)})){l=!1;break}}else if(v!==h&&!o(v,h,r,n,a)){l=!1;break}}return a.delete(t),a.delete(e),l},Ve=m.Uint8Array;var Ce=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r};var Ue=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r},$e=1,Ne=2,Fe="[object Boolean]",Me="[object Date]",qe="[object Error]",Ie="[object Map]",Ge="[object Number]",Ye="[object RegExp]",Be="[object Set]",We="[object String]",He="[object Symbol]",Je="[object ArrayBuffer]",Ke="[object DataView]",Qe=O?O.prototype:void 0,Xe=Qe?Qe.valueOf:void 0;var Ze=function(t,e,r,n,o,a,i){switch(r){case Ke:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Je:return!(t.byteLength!=e.byteLength||!a(new Ve(t),new Ve(e)));case Fe:case Me:case Ge:return xt(+t,+e);case qe:return t.name==e.name&&t.message==e.message;case Ye:case We:return t==e+"";case Ie:var u=Ce;case Be:var c=n&$e;if(u||(u=Ue),t.size!=e.size&&!c)return!1;var f=i.get(t);if(f)return f==e;n|=Ne,i.set(t,e);var s=Le(u(t),u(e),n,o,a,i);return i.delete(t),s;case He:if(Xe)return Xe.call(t)==Xe.call(e)}return!1};var tr=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var er=function(t,e,r){var n=e(t);return L(t)?n:tr(n,r(t))};var rr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a};var nr=function(){return[]},or=Object.prototype.propertyIsEnumerable,ar=Object.getOwnPropertySymbols,ir=ar?function(t){return null==t?[]:(t=Object(t),rr(ar(t),function(e){return or.call(t,e)}))}:nr;var ur=function(t){return er(t,Ot,ir)},cr=1,fr=Object.prototype.hasOwnProperty;var sr=function(t,e,r,n,o,a){var i=r&cr,u=ur(t),c=u.length;if(c!=ur(e).length&&!i)return!1;for(var f=c;f--;){var s=u[f];if(!(i?s in e:fr.call(e,s)))return!1}var l=a.get(t);if(l&&a.get(e))return l==e;var p=!0;a.set(t,e),a.set(e,t);for(var v=i;++f<c;){var h=t[s=u[f]],y=e[s];if(n)var d=i?n(y,h,s,e,t,a):n(h,y,s,t,e,a);if(!(void 0===d?h===y||o(h,y,r,n,a):d)){p=!1;break}v||(v="constructor"==s)}if(p&&!v){var b=t.constructor,g=e.constructor;b!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g)&&(p=!1)}return a.delete(t),a.delete(e),p},lr=Xt(m,"DataView"),pr=Xt(m,"Promise"),vr=Xt(m,"Set"),hr=Xt(m,"WeakMap"),yr=It(lr),dr=It(Zt),br=It(pr),gr=It(vr),_r=It(hr),jr=k;(lr&&"[object DataView]"!=jr(new lr(new ArrayBuffer(1)))||Zt&&"[object Map]"!=jr(new Zt)||pr&&"[object Promise]"!=jr(pr.resolve())||vr&&"[object Set]"!=jr(new vr)||hr&&"[object WeakMap]"!=jr(new hr))&&(jr=function(t){var e=k(t),r="[object Object]"==e?t.constructor:void 0,n=r?It(r):"";if(n)switch(n){case yr:return"[object DataView]";case dr:return"[object Map]";case br:return"[object Promise]";case gr:return"[object Set]";case _r:return"[object WeakMap]"}return e});var mr=jr,Or=1,wr="[object Arguments]",Er="[object Array]",xr="[object Object]",Sr=Object.prototype.hasOwnProperty;var Dr=function(t,e,r,n,o,a){var i=L(t),u=L(e),c=i?Er:mr(t),f=u?Er:mr(e),s=(c=c==wr?xr:c)==xr,l=(f=f==wr?xr:f)==xr,p=c==f;if(p&&J(t)){if(!J(e))return!1;i=!0,s=!1}if(p&&!s)return a||(a=new Ee),i||it(t)?Le(t,e,r,n,o,a):Ze(t,e,c,r,n,o,a);if(!(r&Or)){var v=s&&Sr.call(t,"__wrapped__"),h=l&&Sr.call(e,"__wrapped__");if(v||h){var y=v?t.value():t,d=h?e.value():e;return a||(a=new Ee),o(y,d,r,n,a)}}return!!p&&(a||(a=new Ee),sr(t,e,r,n,o,a))};var Pr=function t(e,r,n,o,a){return e===r||(null==e||null==r||!V(e)&&!V(r)?e!=e&&r!=r:Dr(e,r,n,o,t,a))},Ar=1,zr=2;var Tr=function(t,e,r,n){var o=r.length,a=o,i=!n;if(null==t)return!a;for(t=Object(t);o--;){var u=r[o];if(i&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],f=t[c],s=u[1];if(i&&u[2]){if(void 0===f&&!(c in t))return!1}else{var l=new Ee;if(n)var p=n(f,s,c,t,e,l);if(!(void 0===p?Pr(s,f,Ar|zr,n,l):p))return!1}}return!0};var Rr=function(t){return t==t&&!yt(t)};var kr=function(t){for(var e=Ot(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Rr(o)]}return e};var Lr=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}};var Vr=function(t){var e=kr(t);return 1==e.length&&e[0][2]?Lr(e[0][0],e[0][1]):function(r){return r===t||Tr(r,t,e)}},Cr="[object Symbol]";var Ur=function(t){return"symbol"==typeof t||V(t)&&k(t)==Cr},$r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nr=/^\w*$/;var Fr=function(t,e){if(L(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Ur(t))||Nr.test(t)||!$r.test(t)||null!=e&&t in Object(e)},Mr="Expected a function";function qr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Mr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(qr.Cache||je),r}qr.Cache=je;var Ir=qr,Gr=500;var Yr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Br=/\\(\\)?/g,Wr=function(t){var e=Ir(t,function(t){return r.size===Gr&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Yr,function(t,r,n,o){e.push(n?o.replace(Br,"$1"):r||t)}),e});var Hr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Jr=1/0,Kr=O?O.prototype:void 0,Qr=Kr?Kr.toString:void 0;var Xr=function t(e){if("string"==typeof e)return e;if(L(e))return Hr(e,t)+"";if(Ur(e))return Qr?Qr.call(e):"";var r=e+"";return"0"==r&&1/e==-Jr?"-0":r};var Zr=function(t){return null==t?"":Xr(t)};var tn=function(t,e){return L(t)?t:Fr(t,e)?[t]:Wr(Zr(t))},en=1/0;var rn=function(t){if("string"==typeof t||Ur(t))return t;var e=t+"";return"0"==e&&1/t==-en?"-0":e};var nn=function(t,e){for(var r=0,n=(e=tn(e,t)).length;null!=t&&r<n;)t=t[rn(e[r++])];return r&&r==n?t:void 0};var on=function(t,e,r){var n=null==t?void 0:nn(t,e);return void 0===n?r:n};var an=function(t,e){return null!=t&&e in Object(t)};var un=function(t,e,r){for(var n=-1,o=(e=tn(e,t)).length,a=!1;++n<o;){var i=rn(e[n]);if(!(a=null!=t&&r(t,i)))break;t=t[i]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&tt(o)&&X(i,o)&&(L(t)||W(t))};var cn=function(t,e){return null!=t&&un(t,e,an)},fn=1,sn=2;var ln=function(t,e){return Fr(t)&&Rr(e)?Lr(rn(t),e):function(r){var n=on(r,t);return void 0===n&&n===e?cn(r,t):Pr(e,n,fn|sn)}};var pn=function(t){return t};var vn=function(t){return function(e){return null==e?void 0:e[t]}};var hn=function(t){return function(e){return nn(e,t)}};var yn=function(t){return Fr(t)?vn(rn(t)):hn(t)};var dn=function(t){return"function"==typeof t?t:null==t?pn:"object"==typeof t?L(t)?ln(t[0],t[1]):Vr(t):yn(t)};var bn=function(t,e,r,n,o){return o(t,function(t,o,a){r=n?(n=!1,t):e(r,t,o,a)}),r};var gn=function(t,e,r){var n=L(t)?N:bn,o=arguments.length<3;return n(t,dn(e,4),r,o,wt)},_n=Object.prototype.hasOwnProperty;var jn=function(t,e){return null!=t&&_n.call(t,e)};var mn=function(t,e){return null!=t&&un(t,e,jn)},On="[object RegExp]";var wn=function(t){return V(t)&&k(t)==On},En=ot&&ot.isRegExp,xn=En?nt(En):wn,Sn="[object Date]";var Dn=function(t){return V(t)&&k(t)==Sn},Pn=ot&&ot.isDate,An=Pn?nt(Pn):Dn,zn=lt(Object.getPrototypeOf,Object),Tn="[object Object]",Rn=Function.prototype,kn=Object.prototype,Ln=Rn.toString,Vn=kn.hasOwnProperty,Cn=Ln.call(Object);var Un=function(t){if(!V(t)||k(t)!=Tn)return!1;var e=zn(t);if(null===e)return!0;var r=Vn.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ln.call(r)==Cn},$n="undefined"!=typeof Element,Nn="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,Fn=function(t){return t.$$typeof===Nn};function Mn(t,e,r,n,o){return r.push({diffType:o,pathString:n,prevValue:t,nextValue:e}),o!==l.different}function qn(t,e,r){try{var n=[];return function t(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===r)return!0;if(!e||!r)return Mn(e,r,n,o,l.different);if(L(e)&&L(r)){var a=e.length;if(a!==r.length)return Mn(e,r,n,o,l.different);for(var i=!0,u=a;0!=u--;)t(e[u],r[u],n,"".concat(o,"[").concat(u,"]"))||(i=!1);return Mn(e,r,n,o,i?l.deepEquals:l.different)}if(An(e)&&An(r))return e.getTime()===r.getTime()?Mn(e,r,n,o,l.date):Mn(e,r,n,o,l.different);if(xn(e)&&xn(r))return e.toString()===r.toString()?Mn(e,r,n,o,l.regex):Mn(e,r,n,o,l.different);if($n&&e instanceof Element&&r instanceof Element)return Mn(e,r,n,o,l.different);if(Fn(e)&&Fn(r))return e.type===r.type?Mn(e,r,n,o,l.reactElement):Mn(e,r,n,o,l.different);if(jt(e)&&jt(r))return e.name===r.name?Mn(e,r,n,o,l.function):Mn(e,r,n,o,l.different);if(Un(e)&&Un(r)){var c=Ot(e),f=c.length;if(f!==Ot(r).length)return Mn(e,r,n,o,l.different);for(var s=f;0!=s--;)if(!mn(r,c[s]))return Mn(e,r,n,o,l.different);for(var p=!0,v=f;0!=v--;){var h=c[v];t(e[h],r[h],n,"".concat(o,".").concat(h))||(p=!1)}return Mn(e,r,n,o,p?l.deepEquals:l.different)}return Mn(e,r,n,o,l.different)}(t,e,n,r),n}catch(t){if(t.message&&t.message.match(/stack|recursion/i)||-2146828260===t.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",t.name,t.message),!1;throw t}}var In={};function Gn(t,e){if(t===e)return!1;var r=t||In,n=e||In,a=Ot(o({},r,n));return gn(a,function(t,e){var o=qn(r[e],n[e],e);return o&&(t=f(t||[]).concat(f(o))),t},[])}function Yn(t){var e=t.Component,r=t.prevProps,n=t.prevState,o=t.nextProps,a=t.nextState,i=t.options;return{Component:e,displayName:$(e),prevProps:r,prevState:n,nextProps:o,nextState:a,options:i,reason:function(t,e,r,n){return{propsDifferences:Gn(t,r),stateDifferences:Gn(e,n)}}(r,n,o,a)}}var Bn=function(e,n){var o=function(o){function u(){return t(this,u),c(this,i(u).apply(this,arguments))}return a(u,e),r(u,[{key:"componentDidUpdate",value:function(t,r,o){n.notifier(Yn({Component:e,prevProps:t,prevState:r,nextProps:this.props,nextState:this.state,options:n})),"function"==typeof e.prototype.componentDidUpdate&&e.prototype.componentDidUpdate.call(this,t,r,o)}}]),u}();return o.displayName=$(e),o},Wn=function(e,n,o){var u=function(u){function f(){return t(this,f),c(this,i(f).apply(this,arguments))}return a(f,n.Component),r(f,[{key:"render",value:function(){return e(this.props)}},{key:"componentDidUpdate",value:function(t){o.notifier(Yn({Component:e,prevProps:t,nextProps:this.props,options:o}))}}]),f}();return u.displayName=$(e),u};function Hn(t,e,r,n){if(t.has(e))return t.get(e);var o=function(t,e,r,n){return e.prototype&&"function"==typeof e.prototype.render?Bn(e,n):Wn(e,r,n)}(0,e,r,n);return t.set(e,o),o}return function(t,e){var r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=console.group,r=console.groupEnd;return t.collapseGroups?e=console.groupCollapsed:t.onlyLogs&&(e=console.log,r=d),o({include:null,exclude:null,notifier:y,onlyLogs:!1,consoleLog:console.log,consoleGroup:e,consoleGroupEnd:r,logOnDifferentValues:!1},t)}(e),n=t.createElement,a=new Map;return t.createElement=function(e){for(var o="function"==typeof e&&function(t,e,r){return!(function(t,e){return e.exclude&&e.exclude.length>0&&e.exclude.some(function(e){return e.test(t)})}(e,r)||!t.whyDidYouRender&&!function(t,e){return e.include&&e.include.length>0&&e.include.some(function(e){return e.test(t)})}(e,r))}(e,$(e),r),i=arguments.length,u=new Array(i>1?i-1:0),c=1;c<i;c++)u[c-1]=arguments[c];if(!o)return n.apply(t,[e].concat(u));var f=Hn(a,e,t,r);return n.apply(t,[f].concat(u))},t.__REVERT_WHY_DID_YOU_RENDER__=function(){t.createElement=n,delete t.__REVERT_WHY_DID_YOU_RENDER__,a.clear()},t}});
//# sourceMappingURL=whyDidYouRender.min.js.map
{
"name": "@welldone-software/why-did-you-render",
"version": "2.0.3",
"description": "Patch React to discover unnecessary re-renders.",
"version": "2.0.4",
"description": "Monkey patches React to notify you about avoidable re-renders.",
"main": "dist/cjs/whyDidYouRender.min.js",

@@ -22,3 +22,4 @@ "module": "dist/esm/whyDidYouRender.min.js",

"watch": "concurrently --names \"Serve,Lint,Test\" \"npm:start\" \"npm:lint:watch\" \"npm:test:watch\"",
"prepublishOnly": "npm run build && npm run test && npm run lint"
"version": "npm run lint && npm run test && npm run build && git add --all dist",
"postversion": "git push && git push --tags"
},

@@ -81,2 +82,3 @@ "husky": {

"component",
"pure",
"performance",

@@ -83,0 +85,0 @@ "render",

@@ -5,6 +5,18 @@ # Why Did You Render

`why-did-you-render` monkey patches `React.CreateElement` to notify you about avoidable re-renders.
`why-did-you-render` monkey patches `React` to notify you about avoidable re-renders.
For example, when you pass `style={{width: '100%'}}` to a big pure component and make it always re-render:
![](https://raw.githubusercontent.com/welldone-software/why-did-you-render/master/demo-image.png)
It can also help you to simply track when and why a certain component re-renders.
You can read more about the library
[>> HERE <<](http://bit.ly/wdyr1).
And about common fixing scenarios this library can hep with
[>> HERE <<](http://bit.ly/wdyr02).
You can test the library in it's sandbox [>> HERE <<](http://bit.ly/wdyrsb).
### Setup

@@ -19,6 +31,2 @@ ```

### Sandbox
You can test the library [>> HERE <<](https://goo.gl/6TdqeQ)
(don't forget to open the browser's console).
### Usage

@@ -50,5 +58,3 @@ Execute `whyDidYouRender` with `React` as it's first argument.

```
Functional components, or class components if you don't use
[`@babel/plugin-proposal-class-properties`](https://babeljs.io/docs/en/babel-plugin-proposal-class-properties)
can be tracked by assigning `whyDidYouRender` on them:
Or like this:
```js

@@ -55,0 +61,0 @@ const BigListPureComponent = props => (

import {diffTypes} from './consts'
const moreInfoUrl = 'https://goo.gl/hnfMPb'
const moreInfoUrl = 'http://bit.ly/wdyr02'

@@ -40,3 +40,3 @@ const diffTypesDescriptions = {

options.consoleLog(`${diffTypesDescriptions[diffType]} (more info at ${moreInfoUrl})`)
options.consoleLog(`prev '${pathString}':`, prevValue, ' !== ', nextValue, `:next '${pathString}'`)
options.consoleLog({[`prev ${pathString}`]: prevValue}, '!==', {[`next ${pathString}`]: nextValue})
options.consoleGroupEnd()

@@ -43,0 +43,0 @@ })

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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