{"version":3,"file":"reactstrap.min.js","sources":["../node_modules/object-assign/index.js","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/prop-types/factoryWithThrowingShims.js","../src/utils.js","../node_modules/dom-helpers/class/removeClass.js","../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","../src/Fade.js","../src/CustomInput.js","../src/TooltipPopoverWrapper.js","../src/Modal.js","../src/TabPane.js","../src/Alert.js","../src/Toast.js","../src/Collapse.js","../node_modules/react-is/index.js","../node_modules/prop-types/factoryWithTypeCheckers.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/index.js","../node_modules/classnames/index.js","../src/Container.js","../src/Row.js","../src/Col.js","../src/Navbar.js","../src/NavbarBrand.js","../src/NavbarText.js","../src/NavbarToggler.js","../src/Nav.js","../src/NavItem.js","../src/NavLink.js","../src/Breadcrumb.js","../src/BreadcrumbItem.js","../src/Button.js","../src/ButtonToggle.js","../src/DropdownContext.js","../src/Dropdown.js","../src/ButtonDropdown.js","../src/ButtonGroup.js","../src/ButtonToolbar.js","../src/DropdownItem.js","../src/DropdownMenu.js","../src/DropdownToggle.js","../node_modules/@babel/runtime/helpers/interopRequireDefault.js","../node_modules/dom-helpers/class/hasClass.js","../node_modules/dom-helpers/class/addClass.js","../node_modules/react-transition-group/utils/PropTypes.js","../node_modules/react-transition-group/Transition.js","../node_modules/react-transition-group/CSSTransition.js","../node_modules/react-transition-group/utils/ChildMapping.js","../node_modules/react-transition-group/TransitionGroup.js","../node_modules/react-transition-group/ReplaceTransition.js","../node_modules/react-transition-group/index.js","../src/Badge.js","../src/Card.js","../src/CardGroup.js","../src/CardDeck.js","../src/CardColumns.js","../src/CardBody.js","../src/CardLink.js","../src/CardFooter.js","../src/CardHeader.js","../src/CardImg.js","../src/CardImgOverlay.js","../src/CarouselItem.js","../src/Carousel.js","../src/CarouselControl.js","../src/CarouselIndicators.js","../src/CarouselCaption.js","../src/UncontrolledCarousel.js","../src/CardSubtitle.js","../src/CardText.js","../src/CardTitle.js","../src/CustomFileInput.js","../src/PopperContent.js","../src/PopperTargetHelper.js","../src/Popover.js","../src/UncontrolledPopover.js","../src/PopoverHeader.js","../src/PopoverBody.js","../src/Progress.js","../src/Portal.js","../src/ModalHeader.js","../src/ModalBody.js","../src/ModalFooter.js","../src/Tooltip.js","../src/Table.js","../src/ListGroup.js","../src/Form.js","../src/FormFeedback.js","../src/FormGroup.js","../src/FormText.js","../src/Input.js","../src/InputGroup.js","../src/InputGroupText.js","../src/InputGroupAddon.js","../src/InputGroupButtonDropdown.js","../src/Label.js","../src/Media.js","../src/Pagination.js","../src/PaginationItem.js","../src/PaginationLink.js","../src/TabContext.js","../src/TabContent.js","../src/Jumbotron.js","../src/ToastBody.js","../src/ToastHeader.js","../src/ListGroupItem.js","../src/ListGroupItemHeading.js","../src/ListGroupItemText.js","../src/List.js","../src/ListInlineItem.js","../src/UncontrolledAlert.js","../src/UncontrolledButtonDropdown.js","../src/UncontrolledCollapse.js","../src/UncontrolledDropdown.js","../src/UncontrolledTooltip.js","../src/Spinner.js","../src/polyfill.js"],"sourcesContent":["/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","import PropTypes from 'prop-types';\n\n// https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/js/src/modal.js#L436-L443\nexport function getScrollbarWidth() {\n let scrollDiv = document.createElement('div');\n // .modal-scrollbar-measure styles // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/scss/_modal.scss#L106-L113\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n}\n\nexport function setScrollbarWidth(padding) {\n document.body.style.paddingRight = padding > 0 ? `${padding}px` : null;\n}\n\nexport function isBodyOverflowing() {\n return document.body.clientWidth < window.innerWidth;\n}\n\nexport function getOriginalBodyPadding() {\n const style = window.getComputedStyle(document.body, null);\n\n return parseInt((style && style.getPropertyValue('padding-right')) || 0, 10);\n}\n\nexport function conditionallyUpdateScrollbar() {\n const scrollbarWidth = getScrollbarWidth();\n // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.6/js/src/modal.js#L433\n const fixedContent = document.querySelectorAll(\n '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\n )[0];\n const bodyPadding = fixedContent\n ? parseInt(fixedContent.style.paddingRight || 0, 10)\n : 0;\n\n if (isBodyOverflowing()) {\n setScrollbarWidth(bodyPadding + scrollbarWidth);\n }\n}\n\nlet globalCssModule;\n\nexport function setGlobalCssModule(cssModule) {\n globalCssModule = cssModule;\n}\n\nexport function mapToCssModules(className = '', cssModule = globalCssModule) {\n if (!cssModule) return className;\n return className\n .split(' ')\n .map(c => cssModule[c] || c)\n .join(' ');\n}\n\n/**\n * Returns a new object with the key/value pairs from `obj` that are not in the array `omitKeys`.\n */\nexport function omit(obj, omitKeys) {\n const result = {};\n Object.keys(obj).forEach(key => {\n if (omitKeys.indexOf(key) === -1) {\n result[key] = obj[key];\n }\n });\n return result;\n}\n\n/**\n * Returns a filtered copy of an object with only the specified keys.\n */\nexport function pick(obj, keys) {\n const pickKeys = Array.isArray(keys) ? keys : [keys];\n let length = pickKeys.length;\n let key;\n const result = {};\n\n while (length > 0) {\n length -= 1;\n key = pickKeys[length];\n result[key] = obj[key];\n }\n return result;\n}\n\nlet warned = {};\n\nexport function warnOnce(message) {\n if (!warned[message]) {\n /* istanbul ignore else */\n if (typeof console !== 'undefined') {\n console.error(message); // eslint-disable-line no-console\n }\n warned[message] = true;\n }\n}\n\nexport function deprecated(propType, explanation) {\n return function validate(props, propName, componentName, ...rest) {\n if (props[propName] !== null && typeof props[propName] !== 'undefined') {\n warnOnce(\n `\"${propName}\" property of \"${componentName}\" has been deprecated.\\n${explanation}`\n );\n }\n\n return propType(props, propName, componentName, ...rest);\n };\n}\n\n// Shim Element if needed (e.g. in Node environment)\nconst Element = (typeof window === 'object' && window.Element) || function() {};\n\nexport function DOMElement(props, propName, componentName) {\n if (!(props[propName] instanceof Element)) {\n return new Error(\n 'Invalid prop `' +\n propName +\n '` supplied to `' +\n componentName +\n '`. Expected prop to be an instance of Element. Validation failed.'\n );\n }\n}\n\nexport const targetPropType = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.func,\n DOMElement,\n PropTypes.shape({ current: PropTypes.any }),\n]);\n\nexport const tagPropType = PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.string,\n PropTypes.shape({ $$typeof: PropTypes.symbol, render: PropTypes.func }),\n PropTypes.arrayOf(PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.string,\n PropTypes.shape({ $$typeof: PropTypes.symbol, render: PropTypes.func }),\n ]))\n]);\n\n/* eslint key-spacing: [\"error\", { afterColon: true, align: \"value\" }] */\n// These are all setup to match what is in the bootstrap _variables.scss\n// https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss\nexport const TransitionTimeouts = {\n Fade: 150, // $transition-fade\n Collapse: 350, // $transition-collapse\n Modal: 300, // $modal-transition\n Carousel: 600, // $carousel-transition\n};\n\n// Duplicated Transition.propType keys to ensure that Reactstrap builds\n// for distribution properly exclude these keys for nested child HTML attributes\n// since `react-transition-group` removes propTypes in production builds.\nexport const TransitionPropTypeKeys = [\n 'in',\n 'mountOnEnter',\n 'unmountOnExit',\n 'appear',\n 'enter',\n 'exit',\n 'timeout',\n 'onEnter',\n 'onEntering',\n 'onEntered',\n 'onExit',\n 'onExiting',\n 'onExited',\n];\n\nexport const TransitionStatuses = {\n ENTERING: 'entering',\n ENTERED: 'entered',\n EXITING: 'exiting',\n EXITED: 'exited',\n};\n\nexport const keyCodes = {\n esc: 27,\n space: 32,\n enter: 13,\n tab: 9,\n up: 38,\n down: 40,\n home: 36,\n end: 35,\n n: 78,\n p: 80,\n};\n\nexport const PopperPlacements = [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nexport function isReactRefObj(target) {\n if (target && typeof target === 'object') {\n return 'current' in target;\n }\n return false;\n}\n\nfunction getTag(value) {\n if (value == null) {\n return value === undefined ? '[object Undefined]' : '[object Null]'\n }\n return Object.prototype.toString.call(value)\n}\n\nexport function toNumber(value) {\n const type = typeof value;\n const NAN = 0 / 0;\n if (type === 'number') {\n return value\n }\n if (type === 'symbol' || (type === 'object' && getTag(value) === '[object Symbol]')) {\n return NAN\n }\n if (isObject(value)) {\n const other = typeof value.valueOf === 'function' ? value.valueOf() : value;\n value = isObject(other) ? `${other}` : other\n }\n if (type !== 'string') {\n return value === 0 ? value : +value\n }\n value = value.replace(/^\\s+|\\s+$/g, '');\n const isBinary = /^0b[01]+$/i.test(value);\n return (isBinary || /^0o[0-7]+$/i.test(value))\n ? parseInt(value.slice(2), isBinary ? 2 : 8)\n : (/^[-+]0x[0-9a-f]+$/i.test(value) ? NAN : +value)\n}\n\nexport function isObject(value) {\n const type = typeof value;\n return value != null && (type === 'object' || type === 'function')\n}\n\nexport function isFunction(value) {\n if (!isObject(value)) {\n return false\n }\n\n const tag = getTag(value);\n return tag === '[object Function]' || tag === '[object AsyncFunction]' ||\n tag === '[object GeneratorFunction]' || tag === '[object Proxy]'\n}\n\nexport function findDOMElements(target) {\n if (isReactRefObj(target)) {\n return target.current;\n }\n if (isFunction(target)) {\n return target();\n }\n if (typeof target === 'string' && canUseDOM) {\n let selection = document.querySelectorAll(target);\n if (!selection.length) {\n selection = document.querySelectorAll(`#${target}`);\n }\n if (!selection.length) {\n throw new Error(\n `The target '${target}' could not be identified in the dom, tip: check spelling`\n );\n }\n return selection;\n }\n return target;\n}\n\nexport function isArrayOrNodeList(els) {\n if (els === null) {\n return false;\n }\n return Array.isArray(els) || (canUseDOM && typeof els.length === 'number');\n}\n\nexport function getTarget(target, allElements) {\n const els = findDOMElements(target);\n if (allElements) {\n if (isArrayOrNodeList(els)) {\n return els;\n }\n if (els === null) {\n return [];\n }\n return [els];\n } else {\n if (isArrayOrNodeList(els)) {\n return els[0];\n }\n return els;\n }\n}\n\nexport const defaultToggleEvents = ['touchstart', 'click'];\n\nexport function addMultipleEventListeners(_els, handler, _events, useCapture) {\n let els = _els;\n if (!isArrayOrNodeList(els)) {\n els = [els];\n }\n\n let events = _events;\n if (typeof events === 'string') {\n events = events.split(/\\s+/);\n }\n\n if (\n !isArrayOrNodeList(els) ||\n typeof handler !== 'function' ||\n !Array.isArray(events)\n ) {\n throw new Error(`\n The first argument of this function must be DOM node or an array on DOM nodes or NodeList.\n The second must be a function.\n The third is a string or an array of strings that represents DOM events\n `);\n }\n\n Array.prototype.forEach.call(events, event => {\n Array.prototype.forEach.call(els, el => {\n el.addEventListener(event, handler, useCapture);\n });\n });\n return function removeEvents() {\n Array.prototype.forEach.call(events, event => {\n Array.prototype.forEach.call(els, el => {\n el.removeEventListener(event, handler, useCapture);\n });\n });\n };\n}\n\nexport const focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=hidden])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'object',\n 'embed',\n '[tabindex]:not(.modal)',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n];\n","'use strict';\n\nfunction replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp('(^|\\\\s)' + classToRemove + '(?:\\\\s|$)', 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nmodule.exports = function removeClass(element, className) {\n if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Transition } from 'react-transition-group';\nimport { mapToCssModules, omit, pick, TransitionPropTypeKeys, TransitionTimeouts, tagPropType } from './utils';\n\nconst propTypes = {\n ...Transition.propTypes,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]),\n tag: tagPropType,\n baseClass: PropTypes.string,\n baseClassActive: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n innerRef: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.string,\n PropTypes.func,\n ]),\n};\n\nconst defaultProps = {\n ...Transition.defaultProps,\n tag: 'div',\n baseClass: 'fade',\n baseClassActive: 'show',\n timeout: TransitionTimeouts.Fade,\n appear: true,\n enter: true,\n exit: true,\n in: true,\n};\n\nfunction Fade(props) {\n const {\n tag: Tag,\n baseClass,\n baseClassActive,\n className,\n cssModule,\n children,\n innerRef,\n ...otherProps\n } = props;\n\n const transitionProps = pick(otherProps, TransitionPropTypeKeys);\n const childProps = omit(otherProps, TransitionPropTypeKeys);\n\n return (\n