diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
commit | 0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch) | |
tree | f9864d4a4148621378958794cbbfdc2393733283 /node_modules/react/cjs/react.development.js | |
parent | 6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff) |
upgrade dependencies
Diffstat (limited to 'node_modules/react/cjs/react.development.js')
-rw-r--r-- | node_modules/react/cjs/react.development.js | 995 |
1 files changed, 327 insertions, 668 deletions
diff --git a/node_modules/react/cjs/react.development.js b/node_modules/react/cjs/react.development.js index 142d987e7..2c83fb95d 100644 --- a/node_modules/react/cjs/react.development.js +++ b/node_modules/react/cjs/react.development.js @@ -1,4 +1,4 @@ -/** @license React v16.0.0 +/** @license React v16.2.0 * react.development.js * * Copyright (c) 2013-present, Facebook, Inc. @@ -6,39 +6,122 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + 'use strict'; -if (process.env.NODE_ENV !== "production") { -(function() { +if (process.env.NODE_ENV !== "production") { + (function() { 'use strict'; -var objectAssign$1 = require('object-assign'); -var require$$0 = require('fbjs/lib/warning'); +var _assign = require('object-assign'); var emptyObject = require('fbjs/lib/emptyObject'); var invariant = require('fbjs/lib/invariant'); +var warning = require('fbjs/lib/warning'); var emptyFunction = require('fbjs/lib/emptyFunction'); var checkPropTypes = require('prop-types/checkPropTypes'); +// TODO: this is special because it gets imported during build. + +var ReactVersion = '16.2.0'; + +// The Symbol used to tag the ReactElement-like types. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. +var hasSymbol = typeof Symbol === 'function' && Symbol['for']; + +var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7; +var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8; +var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9; +var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca; +var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb; + +var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; + +function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable === 'undefined') { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + return null; +} + /** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +/** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js * - * @providesModule reactProdInvariant - * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. */ +var lowPriorityWarning = function () {}; + { - var warning = require$$0; + var printWarning = function (format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.warn(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarning = function (condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; } +var lowPriorityWarning$1 = lowPriorityWarning; + +var didWarnStateUpdateForUnmountedComponent = {}; + function warnNoop(publicInstance, callerName) { { var constructor = publicInstance.constructor; - warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass'); + var componentName = constructor && (constructor.displayName || constructor.name) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; } } @@ -110,83 +193,19 @@ var ReactNoopUpdateQueue = { } }; -var ReactNoopUpdateQueue_1 = ReactNoopUpdateQueue; - -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @providesModule lowPriorityWarning - */ - -/** - * Forked from fbjs/warning: - * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js - * - * Only change is we use console.warn instead of console.error, - * and do nothing when 'console' is not supported. - * This really simplifies the code. - * --- - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - -var lowPriorityWarning = function () {}; - -{ - var printWarning = function (format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.warn(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; - - lowPriorityWarning = function (condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; -} - -var lowPriorityWarning_1 = lowPriorityWarning; - /** * Base class helpers for the updating state of a component. */ -function ReactComponent(props, context, updater) { +function Component(props, context, updater) { this.props = props; this.context = context; this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. - this.updater = updater || ReactNoopUpdateQueue_1; + this.updater = updater || ReactNoopUpdateQueue; } -ReactComponent.prototype.isReactComponent = {}; +Component.prototype.isReactComponent = {}; /** * Sets a subset of the state. Always use this to mutate @@ -213,7 +232,7 @@ ReactComponent.prototype.isReactComponent = {}; * @final * @protected */ -ReactComponent.prototype.setState = function (partialState, callback) { +Component.prototype.setState = function (partialState, callback) { !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0; this.updater.enqueueSetState(this, partialState, callback, 'setState'); }; @@ -232,7 +251,7 @@ ReactComponent.prototype.setState = function (partialState, callback) { * @final * @protected */ -ReactComponent.prototype.forceUpdate = function (callback) { +Component.prototype.forceUpdate = function (callback) { this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); }; @@ -247,9 +266,9 @@ ReactComponent.prototype.forceUpdate = function (callback) { replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] }; var defineDeprecationWarning = function (methodName, info) { - Object.defineProperty(ReactComponent.prototype, methodName, { + Object.defineProperty(Component.prototype, methodName, { get: function () { - lowPriorityWarning_1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); + lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); return undefined; } }); @@ -264,59 +283,43 @@ ReactComponent.prototype.forceUpdate = function (callback) { /** * Base class helpers for the updating state of a component. */ -function ReactPureComponent(props, context, updater) { - // Duplicated from ReactComponent. +function PureComponent(props, context, updater) { + // Duplicated from Component. this.props = props; this.context = context; this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. - this.updater = updater || ReactNoopUpdateQueue_1; + this.updater = updater || ReactNoopUpdateQueue; } function ComponentDummy() {} -ComponentDummy.prototype = ReactComponent.prototype; -var pureComponentPrototype = ReactPureComponent.prototype = new ComponentDummy(); -pureComponentPrototype.constructor = ReactPureComponent; +ComponentDummy.prototype = Component.prototype; +var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); +pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. -objectAssign$1(pureComponentPrototype, ReactComponent.prototype); +_assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = true; -function ReactAsyncComponent(props, context, updater) { - // Duplicated from ReactComponent. +function AsyncComponent(props, context, updater) { + // Duplicated from Component. this.props = props; this.context = context; this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. - this.updater = updater || ReactNoopUpdateQueue_1; + this.updater = updater || ReactNoopUpdateQueue; } -var asyncComponentPrototype = ReactAsyncComponent.prototype = new ComponentDummy(); -asyncComponentPrototype.constructor = ReactAsyncComponent; +var asyncComponentPrototype = AsyncComponent.prototype = new ComponentDummy(); +asyncComponentPrototype.constructor = AsyncComponent; // Avoid an extra prototype jump for these methods. -objectAssign$1(asyncComponentPrototype, ReactComponent.prototype); +_assign(asyncComponentPrototype, Component.prototype); asyncComponentPrototype.unstable_isAsyncReactComponent = true; asyncComponentPrototype.render = function () { return this.props.children; }; -var ReactBaseClasses = { - Component: ReactComponent, - PureComponent: ReactPureComponent, - AsyncComponent: ReactAsyncComponent -}; - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @providesModule ReactCurrentOwner - * - */ - /** * Keeps track of the current owner. * @@ -331,18 +334,8 @@ var ReactCurrentOwner = { current: null }; -var ReactCurrentOwner_1 = ReactCurrentOwner; - var hasOwnProperty = Object.prototype.hasOwnProperty; -{ - var warning$2 = require$$0; -} - -// The Symbol used to tag the ReactElement type. If there is no native Symbol -// nor polyfill, then a plain number is used for performance. -var REACT_ELEMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; - var RESERVED_PROPS = { key: true, ref: true, @@ -381,7 +374,7 @@ function defineKeyPropWarningGetter(props, displayName) { var warnAboutAccessingKey = function () { if (!specialPropKeyWarningShown) { specialPropKeyWarningShown = true; - warning$2(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); + warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); } }; warnAboutAccessingKey.isReactWarning = true; @@ -395,7 +388,7 @@ function defineRefPropWarningGetter(props, displayName) { var warnAboutAccessingRef = function () { if (!specialPropRefWarningShown) { specialPropRefWarningShown = true; - warning$2(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); + warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); } }; warnAboutAccessingRef.isReactWarning = true; @@ -428,7 +421,7 @@ function defineRefPropWarningGetter(props, displayName) { var ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allow us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE$1, + $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, @@ -483,9 +476,9 @@ var ReactElement = function (type, key, ref, self, source, owner, props) { /** * Create and return a new ReactElement of the given type. - * See https://facebook.github.io/react/docs/react-api.html#createelement + * See https://reactjs.org/docs/react-api.html#createelement */ -ReactElement.createElement = function (type, config, children) { +function createElement(type, config, children) { var propName; // Reserved names are extracted @@ -543,7 +536,7 @@ ReactElement.createElement = function (type, config, children) { } { if (key || ref) { - if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) { + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; if (key) { defineKeyPropWarningGetter(props, displayName); @@ -554,39 +547,30 @@ ReactElement.createElement = function (type, config, children) { } } } - return ReactElement(type, key, ref, self, source, ReactCurrentOwner_1.current, props); -}; + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); +} /** * Return a function that produces ReactElements of a given type. - * See https://facebook.github.io/react/docs/react-api.html#createfactory + * See https://reactjs.org/docs/react-api.html#createfactory */ -ReactElement.createFactory = function (type) { - var factory = ReactElement.createElement.bind(null, type); - // Expose the type on the factory and the prototype so that it can be - // easily accessed on elements. E.g. `<Foo />.type === Foo`. - // This should not be named `constructor` since this may not be the function - // that created the element, and it may not even be a constructor. - // Legacy hook TODO: Warn if this is accessed - factory.type = type; - return factory; -}; -ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { + +function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; -}; +} /** * Clone and return a new ReactElement using element as the starting point. - * See https://facebook.github.io/react/docs/react-api.html#cloneelement + * See https://reactjs.org/docs/react-api.html#cloneelement */ -ReactElement.cloneElement = function (element, config, children) { +function cloneElement(element, config, children) { var propName; // Original props are copied - var props = objectAssign$1({}, element.props); + var props = _assign({}, element.props); // Reserved names are extracted var key = element.key; @@ -605,7 +589,7 @@ ReactElement.cloneElement = function (element, config, children) { if (hasValidRef(config)) { // Silently steal the ref from the parent. ref = config.ref; - owner = ReactCurrentOwner_1.current; + owner = ReactCurrentOwner.current; } if (hasValidKey(config)) { key = '' + config.key; @@ -642,30 +626,18 @@ ReactElement.cloneElement = function (element, config, children) { } return ReactElement(element.type, key, ref, self, source, owner, props); -}; +} /** * Verifies the object is a ReactElement. - * See https://facebook.github.io/react/docs/react-api.html#isvalidelement + * See https://reactjs.org/docs/react-api.html#isvalidelement * @param {?object} object * @return {boolean} True if `object` is a valid component. * @final */ -ReactElement.isValidElement = function (object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE$1; -}; - -var ReactElement_1 = ReactElement; - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @providesModule ReactDebugCurrentFrame - * - */ +function isValidElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; +} var ReactDebugCurrentFrame = {}; @@ -682,21 +654,6 @@ var ReactDebugCurrentFrame = {}; }; } -var ReactDebugCurrentFrame_1 = ReactDebugCurrentFrame; - -{ - var warning$1 = require$$0; - - var _require = ReactDebugCurrentFrame_1, - getStackAddendum = _require.getStackAddendum; -} - -var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. -// The Symbol used to tag the ReactElement type. If there is no native Symbol -// nor polyfill, then a plain number is used for performance. -var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; - var SEPARATOR = '.'; var SUBSEPARATOR = ':'; @@ -780,10 +737,28 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) children = null; } - if (children === null || type === 'string' || type === 'number' || - // The following is inlined from ReactElement. This means we can optimize - // some checks. React Fiber also inlines this logic for similar purposes. - type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + var invokeCallback = false; + + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case 'string': + case 'number': + invokeCallback = true; + break; + case 'object': + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_CALL_TYPE: + case REACT_RETURN_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + + if (invokeCallback) { callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array // so that it's consistent if the number of children grows. @@ -803,12 +778,12 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } } else { - var iteratorFn = ITERATOR_SYMBOL && children[ITERATOR_SYMBOL] || children[FAUX_ITERATOR_SYMBOL]; + var iteratorFn = getIteratorFn(children); if (typeof iteratorFn === 'function') { { // Warn about using Maps as children if (iteratorFn === children.entries) { - warning$1(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getStackAddendum()); + warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum()); didWarnAboutMaps = true; } } @@ -824,7 +799,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) } else if (type === 'object') { var addendum = ''; { - addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getStackAddendum(); + addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum(); } var childrenString = '' + children; invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum); @@ -886,7 +861,7 @@ function forEachSingleChild(bookKeeping, child, name) { /** * Iterates through children that are typically specified as `props.children`. * - * See https://facebook.github.io/react/docs/react-api.html#react.children.foreach + * See https://reactjs.org/docs/react-api.html#react.children.foreach * * The provided forEachFunc(child, index) will be called for each * leaf child. @@ -915,8 +890,8 @@ function mapSingleChildIntoContext(bookKeeping, child, childKey) { if (Array.isArray(mappedChild)) { mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); } else if (mappedChild != null) { - if (ReactElement_1.isValidElement(mappedChild)) { - mappedChild = ReactElement_1.cloneAndReplaceKey(mappedChild, + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as // traverseAllChildren used to do for objects as children keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); @@ -938,7 +913,7 @@ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { /** * Maps children that are typically specified as `props.children`. * - * See https://facebook.github.io/react/docs/react-api.html#react.children.map + * See https://reactjs.org/docs/react-api.html#react.children.map * * The provided mapFunction(child, key, index) will be called for each * leaf child. @@ -961,7 +936,7 @@ function mapChildren(children, func, context) { * Count the number of children that are typically specified as * `props.children`. * - * See https://facebook.github.io/react/docs/react-api.html#react.children.count + * See https://reactjs.org/docs/react-api.html#react.children.count * * @param {?*} children Children tree container. * @return {number} The number of children. @@ -974,7 +949,7 @@ function countChildren(children, context) { * Flatten a children object (typically specified as `props.children`) and * return an array with appropriately re-keyed children. * - * See https://facebook.github.io/react/docs/react-api.html#react.children.toarray + * See https://reactjs.org/docs/react-api.html#react.children.toarray */ function toArray(children) { var result = []; @@ -982,31 +957,11 @@ function toArray(children) { return result; } -var ReactChildren = { - forEach: forEachChildren, - map: mapChildren, - count: countChildren, - toArray: toArray -}; - -var ReactChildren_1 = ReactChildren; - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @providesModule ReactVersion - */ - -var ReactVersion = '16.0.0'; - /** * Returns the first child in a collection of children and verifies that there * is only one child in the collection. * - * See https://facebook.github.io/react/docs/react-api.html#react.children.only + * See https://reactjs.org/docs/react-api.html#react.children.only * * The current implementation of this function assumes that a single child gets * passed without a wrapper, but the purpose of this helper function is to @@ -1017,69 +972,38 @@ var ReactVersion = '16.0.0'; * structure. */ function onlyChild(children) { - !ReactElement_1.isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0; + !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0; return children; } -var onlyChild_1 = onlyChild; - -/** - * Copyright (c) 2016-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @providesModule describeComponentFrame - */ - -var describeComponentFrame$1 = function (name, source, ownerName) { +var describeComponentFrame = function (name, source, ownerName) { return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); }; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @providesModule getComponentName - * - */ +function getComponentName(fiber) { + var type = fiber.type; -function getComponentName$1(instanceOrFiber) { - if (typeof instanceOrFiber.getName === 'function') { - // Stack reconciler - var instance = instanceOrFiber; - return instance.getName(); + if (typeof type === 'string') { + return type; } - if (typeof instanceOrFiber.tag === 'number') { - // Fiber reconciler - var fiber = instanceOrFiber; - var type = fiber.type; - - if (typeof type === 'string') { - return type; - } - if (typeof type === 'function') { - return type.displayName || type.name; - } + if (typeof type === 'function') { + return type.displayName || type.name; } return null; } -var getComponentName_1 = getComponentName$1; +/** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ { - var checkPropTypes$1 = checkPropTypes; - var lowPriorityWarning$1 = lowPriorityWarning_1; - var ReactDebugCurrentFrame$1 = ReactDebugCurrentFrame_1; - var warning$3 = require$$0; - var describeComponentFrame = describeComponentFrame$1; - var getComponentName = getComponentName_1; - var currentlyValidatingElement = null; + var propTypesMisspellWarningShown = false; + var getDisplayName = function (element) { if (element == null) { return '#empty'; @@ -1087,29 +1011,30 @@ var getComponentName_1 = getComponentName$1; return '#text'; } else if (typeof element.type === 'string') { return element.type; + } else if (element.type === REACT_FRAGMENT_TYPE) { + return 'React.Fragment'; } else { return element.type.displayName || element.type.name || 'Unknown'; } }; - var getStackAddendum$1 = function () { + var getStackAddendum = function () { var stack = ''; if (currentlyValidatingElement) { var name = getDisplayName(currentlyValidatingElement); var owner = currentlyValidatingElement._owner; stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner)); } - stack += ReactDebugCurrentFrame$1.getStackAddendum() || ''; + stack += ReactDebugCurrentFrame.getStackAddendum() || ''; return stack; }; -} -var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec. + var VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]); +} function getDeclarationErrorAddendum() { - if (ReactCurrentOwner_1.current) { - var name = getComponentName(ReactCurrentOwner_1.current); + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } @@ -1173,14 +1098,14 @@ function validateExplicitKey(element, parentType) { // property, it may be the creator of the child that's responsible for // assigning it a key. var childOwner = ''; - if (element && element._owner && element._owner !== ReactCurrentOwner_1.current) { + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { // Give the component that originally created this child. childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.'; } currentlyValidatingElement = element; { - warning$3(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getStackAddendum$1()); + warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getStackAddendum()); } currentlyValidatingElement = null; } @@ -1201,17 +1126,17 @@ function validateChildKeys(node, parentType) { if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; - if (ReactElement_1.isValidElement(child)) { + if (isValidElement(child)) { validateExplicitKey(child, parentType); } } - } else if (ReactElement_1.isValidElement(node)) { + } else if (isValidElement(node)) { // This element was passed in a valid location. if (node._store) { node._store.validated = true; } } else if (node) { - var iteratorFn = ITERATOR_SYMBOL$1 && node[ITERATOR_SYMBOL$1] || node[FAUX_ITERATOR_SYMBOL$1]; + var iteratorFn = getIteratorFn(node); if (typeof iteratorFn === 'function') { // Entry iterators used to provide implicit keys, // but now we print a separate warning for them later. @@ -1219,7 +1144,7 @@ function validateChildKeys(node, parentType) { var iterator = iteratorFn.call(node); var step; while (!(step = iterator.next()).done) { - if (ReactElement_1.isValidElement(step.value)) { + if (isValidElement(step.value)) { validateExplicitKey(step.value, parentType); } } @@ -1241,458 +1166,192 @@ function validatePropTypes(element) { } var name = componentClass.displayName || componentClass.name; var propTypes = componentClass.propTypes; - if (propTypes) { currentlyValidatingElement = element; - checkPropTypes$1(propTypes, element.props, 'prop', name, getStackAddendum$1); + checkPropTypes(propTypes, element.props, 'prop', name, getStackAddendum); currentlyValidatingElement = null; + } else if (componentClass.PropTypes !== undefined && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + warning(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown'); } if (typeof componentClass.getDefaultProps === 'function') { - warning$3(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); + warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); } } -var ReactElementValidator$1 = { - createElement: function (type, props, children) { - var validType = typeof type === 'string' || typeof type === 'function'; - // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. - if (!validType) { - var info = ''; - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in."; - } - - var sourceInfo = getSourceInfoErrorAddendum(props); - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - - info += ReactDebugCurrentFrame$1.getStackAddendum() || ''; +/** + * Given a fragment, validate that it can only be provided with fragment props + * @param {ReactElement} fragment + */ +function validateFragmentProps(fragment) { + currentlyValidatingElement = fragment; - warning$3(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info); - } + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; - var element = ReactElement_1.createElement.apply(this, arguments); + try { + for (var _iterator = Object.keys(fragment.props)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var key = _step.value; - // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. - if (element == null) { - return element; + if (!VALID_FRAGMENT_PROPS.has(key)) { + warning(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum()); + break; + } } - - // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) - if (validType) { - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator['return']) { + _iterator['return'](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; } } + } - validatePropTypes(element); - - return element; - }, + if (fragment.ref !== null) { + warning(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum()); + } - createFactory: function (type) { - var validatedFactory = ReactElementValidator$1.createElement.bind(null, type); - // Legacy hook TODO: Warn if this is accessed - validatedFactory.type = type; + currentlyValidatingElement = null; +} - { - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function () { - lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); - Object.defineProperty(this, 'type', { - value: type - }); - return type; - } - }); +function createElementWithValidation(type, props, children) { + var validType = typeof type === 'string' || typeof type === 'function' || typeof type === 'symbol' || typeof type === 'number'; + // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + if (!validType) { + var info = ''; + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; } - return validatedFactory; - }, - - cloneElement: function (element, props, children) { - var newElement = ReactElement_1.cloneElement.apply(this, arguments); - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], newElement.type); + var sourceInfo = getSourceInfoErrorAddendum(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); } - validatePropTypes(newElement); - return newElement; - } -}; -var ReactElementValidator_1 = ReactElementValidator$1; + info += getStackAddendum() || ''; -{ - var warning$4 = require$$0; -} - -function isNative(fn) { - // Based on isNative() from Lodash - var funcToString = Function.prototype.toString; - var reIsNative = RegExp('^' + funcToString - // Take an example native function source for comparison - .call(Object.prototype.hasOwnProperty) - // Strip regex characters so we can use it for regex - .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - // Remove hasOwnProperty from the template to make it generic - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); - try { - var source = funcToString.call(fn); - return reIsNative.test(source); - } catch (err) { - return false; + warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info); } -} -var canUseCollections = -// Array.from -typeof Array.from === 'function' && -// Map -typeof Map === 'function' && isNative(Map) && -// Map.prototype.keys -Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && -// Set -typeof Set === 'function' && isNative(Set) && -// Set.prototype.keys -Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); - -var setItem; -var getItem; -var removeItem; -var getItemIDs; -var addRoot; -var removeRoot; -var getRootIDs; - -if (canUseCollections) { - var itemMap = new Map(); - var rootIDSet = new Set(); - - setItem = function (id, item) { - itemMap.set(id, item); - }; - getItem = function (id) { - return itemMap.get(id); - }; - removeItem = function (id) { - itemMap['delete'](id); - }; - getItemIDs = function () { - return Array.from(itemMap.keys()); - }; + var element = createElement.apply(this, arguments); - addRoot = function (id) { - rootIDSet.add(id); - }; - removeRoot = function (id) { - rootIDSet['delete'](id); - }; - getRootIDs = function () { - return Array.from(rootIDSet.keys()); - }; -} else { - var itemByKey = {}; - var rootByKey = {}; - - // Use non-numeric keys to prevent V8 performance issues: - // https://github.com/facebook/react/pull/7232 - var getKeyFromID = function (id) { - return '.' + id; - }; - var getIDFromKey = function (key) { - return parseInt(key.substr(1), 10); - }; - - setItem = function (id, item) { - var key = getKeyFromID(id); - itemByKey[key] = item; - }; - getItem = function (id) { - var key = getKeyFromID(id); - return itemByKey[key]; - }; - removeItem = function (id) { - var key = getKeyFromID(id); - delete itemByKey[key]; - }; - getItemIDs = function () { - return Object.keys(itemByKey).map(getIDFromKey); - }; - - addRoot = function (id) { - var key = getKeyFromID(id); - rootByKey[key] = true; - }; - removeRoot = function (id) { - var key = getKeyFromID(id); - delete rootByKey[key]; - }; - getRootIDs = function () { - return Object.keys(rootByKey).map(getIDFromKey); - }; -} - -var unmountedIDs = []; - -function purgeDeep(id) { - var item = getItem(id); - if (item) { - var childIDs = item.childIDs; + // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; + } - removeItem(id); - childIDs.forEach(purgeDeep); + // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } } -} -function getDisplayName$1(element) { - if (element == null) { - return '#empty'; - } else if (typeof element === 'string' || typeof element === 'number') { - return '#text'; - } else if (typeof element.type === 'string') { - return element.type; + if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); } else { - return element.type.displayName || element.type.name || 'Unknown'; + validatePropTypes(element); } -} - -function describeID(id) { - var name = ReactComponentTreeHook.getDisplayName(id); - var element = ReactComponentTreeHook.getElement(id); - var ownerID = ReactComponentTreeHook.getOwnerID(id); - var ownerName = void 0; - if (ownerID) { - ownerName = ReactComponentTreeHook.getDisplayName(ownerID); - } - warning$4(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id); - return describeComponentFrame$1(name || '', element && element._source, ownerName || ''); + return element; } -var ReactComponentTreeHook = { - onSetChildren: function (id, nextChildIDs) { - var item = getItem(id); - !item ? invariant(false, 'Item must have been set') : void 0; - item.childIDs = nextChildIDs; - - for (var i = 0; i < nextChildIDs.length; i++) { - var nextChildID = nextChildIDs[i]; - var nextChild = getItem(nextChildID); - !nextChild ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : void 0; - !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : void 0; - !nextChild.isMounted ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : void 0; - if (nextChild.parentID == null) { - nextChild.parentID = id; - // TODO: This shouldn't be necessary but mounting a new root during in - // componentWillMount currently causes not-yet-mounted components to - // be purged from our tree data so their parent id is missing. - } - !(nextChild.parentID === id) ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : void 0; - } - }, - onBeforeMountComponent: function (id, element, parentID) { - var item = { - element: element, - parentID: parentID, - text: null, - childIDs: [], - isMounted: false, - updateCount: 0 - }; - setItem(id, item); - }, - onBeforeUpdateComponent: function (id, element) { - var item = getItem(id); - if (!item || !item.isMounted) { - // We may end up here as a result of setState() in componentWillUnmount(). - // In this case, ignore the element. - return; - } - item.element = element; - }, - onMountComponent: function (id) { - var item = getItem(id); - !item ? invariant(false, 'Item must have been set') : void 0; - item.isMounted = true; - var isRoot = item.parentID === 0; - if (isRoot) { - addRoot(id); - } - }, - onUpdateComponent: function (id) { - var item = getItem(id); - if (!item || !item.isMounted) { - // We may end up here as a result of setState() in componentWillUnmount(). - // In this case, ignore the element. - return; - } - item.updateCount++; - }, - onUnmountComponent: function (id) { - var item = getItem(id); - if (item) { - // We need to check if it exists. - // `item` might not exist if it is inside an error boundary, and a sibling - // error boundary child threw while mounting. Then this instance never - // got a chance to mount, but it still gets an unmounting event during - // the error boundary cleanup. - item.isMounted = false; - var isRoot = item.parentID === 0; - if (isRoot) { - removeRoot(id); - } - } - unmountedIDs.push(id); - }, - purgeUnmountedComponents: function () { - if (ReactComponentTreeHook._preventPurging) { - // Should only be used for testing. - return; - } +function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + // Legacy hook TODO: Warn if this is accessed + validatedFactory.type = type; - for (var i = 0; i < unmountedIDs.length; i++) { - var id = unmountedIDs[i]; - purgeDeep(id); - } - unmountedIDs.length = 0; - }, - isMounted: function (id) { - var item = getItem(id); - return item ? item.isMounted : false; - }, - getCurrentStackAddendum: function () { - var info = ''; - var currentOwner = ReactCurrentOwner_1.current; - if (currentOwner) { - !(typeof currentOwner.tag !== 'number') ? invariant(false, 'Fiber owners should not show up in Stack stack traces.') : void 0; - if (typeof currentOwner._debugID === 'number') { - info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID); + { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); + Object.defineProperty(this, 'type', { + value: type + }); + return type; } - } - return info; - }, - getStackAddendumByID: function (id) { - var info = ''; - while (id) { - info += describeID(id); - id = ReactComponentTreeHook.getParentID(id); - } - return info; - }, - getChildIDs: function (id) { - var item = getItem(id); - return item ? item.childIDs : []; - }, - getDisplayName: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (!element) { - return null; - } - return getDisplayName$1(element); - }, - getElement: function (id) { - var item = getItem(id); - return item ? item.element : null; - }, - getOwnerID: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (!element || !element._owner) { - return null; - } - return element._owner._debugID; - }, - getParentID: function (id) { - var item = getItem(id); - return item ? item.parentID : null; - }, - getSource: function (id) { - var item = getItem(id); - var element = item ? item.element : null; - var source = element != null ? element._source : null; - return source; - }, - getText: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (typeof element === 'string') { - return element; - } else if (typeof element === 'number') { - return '' + element; - } else { - return null; - } - }, - getUpdateCount: function (id) { - var item = getItem(id); - return item ? item.updateCount : 0; - }, - - - getRootIDs: getRootIDs, - getRegisteredIDs: getItemIDs -}; - -var ReactComponentTreeHook_1 = ReactComponentTreeHook; + }); + } -var createElement = ReactElement_1.createElement; -var createFactory = ReactElement_1.createFactory; -var cloneElement = ReactElement_1.cloneElement; + return validatedFactory; +} -{ - var ReactElementValidator = ReactElementValidator_1; - createElement = ReactElementValidator.createElement; - createFactory = ReactElementValidator.createFactory; - cloneElement = ReactElementValidator.cloneElement; +function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; } var React = { Children: { - map: ReactChildren_1.map, - forEach: ReactChildren_1.forEach, - count: ReactChildren_1.count, - toArray: ReactChildren_1.toArray, - only: onlyChild_1 + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray: toArray, + only: onlyChild }, - Component: ReactBaseClasses.Component, - PureComponent: ReactBaseClasses.PureComponent, - unstable_AsyncComponent: ReactBaseClasses.AsyncComponent, + Component: Component, + PureComponent: PureComponent, + unstable_AsyncComponent: AsyncComponent, - createElement: createElement, - cloneElement: cloneElement, - isValidElement: ReactElement_1.isValidElement, + Fragment: REACT_FRAGMENT_TYPE, - createFactory: createFactory, + createElement: createElementWithValidation, + cloneElement: cloneElementWithValidation, + createFactory: createFactoryWithValidation, + isValidElement: isValidElement, version: ReactVersion, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { - ReactCurrentOwner: ReactCurrentOwner_1, + ReactCurrentOwner: ReactCurrentOwner, // Used by renderers to avoid bundling object-assign twice in UMD bundles: - assign: objectAssign$1 + assign: _assign } }; { - objectAssign$1(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, { + _assign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, { // These should not be included in production. - ReactComponentTreeHook: ReactComponentTreeHook_1, - ReactDebugCurrentFrame: ReactDebugCurrentFrame_1 + ReactDebugCurrentFrame: ReactDebugCurrentFrame, + // Shim for React DOM 16.0.0 which still destructured (but not used) this. + // TODO: remove in React 17.0. + ReactComponentTreeHook: {} }); } -var ReactEntry = React; -module.exports = ReactEntry; -})(); +var React$2 = Object.freeze({ + default: React +}); + +var React$3 = ( React$2 && React ) || React$2; + +// TODO: decide on the top-level export form. +// This is hacky but makes it work with both Rollup and Jest. +var react = React$3['default'] ? React$3['default'] : React$3; + +module.exports = react; + })(); } |