react 16.0.0 → 16.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,22 @@
1
- /*
2
- React v16.0.0
3
- react.production.min.js
4
-
5
- Copyright (c) 2013-present, Facebook, Inc.
6
-
7
- This source code is licensed under the MIT license found in the
8
- LICENSE file in the root directory of this source tree.
9
- */
10
- 'use strict';var f=require("object-assign"),p=require("fbjs/lib/emptyObject");require("fbjs/lib/invariant");var r=require("fbjs/lib/emptyFunction");
11
- function t(a){for(var b=arguments.length-1,d="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,e=0;e<b;e++)d+="\x26args[]\x3d"+encodeURIComponent(arguments[e+1]);b=Error(d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}
12
- var u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function v(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}v.prototype.isReactComponent={};v.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?t("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};v.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
13
- function w(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}function x(){}x.prototype=v.prototype;var y=w.prototype=new x;y.constructor=w;f(y,v.prototype);y.isPureReactComponent=!0;function z(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}var A=z.prototype=new x;A.constructor=z;f(A,v.prototype);A.unstable_isAsyncReactComponent=!0;A.render=function(){return this.props.children};
14
- var B={Component:v,PureComponent:w,AsyncComponent:z},C={current:null},D=Object.prototype.hasOwnProperty,E="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,F={key:!0,ref:!0,__self:!0,__source:!0};function G(a,b,d,e,c,g,k){return{$$typeof:E,type:a,key:b,ref:d,props:k,_owner:g}}
15
- G.createElement=function(a,b,d){var e,c={},g=null,k=null,m=null,q=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),m=void 0===b.__self?null:b.__self,q=void 0===b.__source?null:b.__source,b)D.call(b,e)&&!F.hasOwnProperty(e)&&(c[e]=b[e]);var l=arguments.length-2;if(1===l)c.children=d;else if(1<l){for(var h=Array(l),n=0;n<l;n++)h[n]=arguments[n+2];c.children=h}if(a&&a.defaultProps)for(e in l=a.defaultProps,l)void 0===c[e]&&(c[e]=l[e]);return G(a,g,k,m,q,C.current,c)};
16
- G.createFactory=function(a){var b=G.createElement.bind(null,a);b.type=a;return b};G.cloneAndReplaceKey=function(a,b){return G(a.type,b,a.ref,a._self,a._source,a._owner,a.props)};
17
- G.cloneElement=function(a,b,d){var e=f({},a.props),c=a.key,g=a.ref,k=a._self,m=a._source,q=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,q=C.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(h in b)D.call(b,h)&&!F.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==l?l[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=d;else if(1<h){l=Array(h);for(var n=0;n<h;n++)l[n]=arguments[n+2];e.children=l}return G(a.type,c,g,k,m,q,e)};
18
- G.isValidElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===E};var H="function"===typeof Symbol&&Symbol.iterator,I="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;function escape(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var J=/\/+/g,K=[];
19
- function L(a,b,d,e){if(K.length){var c=K.pop();c.result=a;c.keyPrefix=b;c.func=d;c.context=e;c.count=0;return c}return{result:a,keyPrefix:b,func:d,context:e,count:0}}function M(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>K.length&&K.push(a)}
20
- function N(a,b,d,e){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;if(null===a||"string"===c||"number"===c||"object"===c&&a.$$typeof===I)return d(e,a,""===b?"."+O(a,0):b),1;var g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){c=a[k];var m=b+O(c,k);g+=N(c,m,d,e)}else if(m=H&&a[H]||a["@@iterator"],"function"===typeof m)for(a=m.call(a),k=0;!(c=a.next()).done;)c=c.value,m=b+O(c,k++),g+=N(c,m,d,e);else"object"===c&&(d=""+a,t("31","[object Object]"===d?"object with keys {"+
21
- Object.keys(a).join(", ")+"}":d,""));return g}function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function P(a,b){a.func.call(a.context,b,a.count++)}function Q(a,b,d){var e=a.result,c=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?R(a,e,d,r.thatReturnsArgument):null!=a&&(G.isValidElement(a)&&(a=G.cloneAndReplaceKey(a,c+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(J,"$\x26/")+"/")+d)),e.push(a))}
22
- function R(a,b,d,e,c){var g="";null!=d&&(g=(""+d).replace(J,"$\x26/")+"/");b=L(b,g,e,c);null==a||N(a,"",Q,b);M(b)}var S={forEach:function(a,b,d){if(null==a)return a;b=L(null,null,b,d);null==a||N(a,"",P,b);M(b)},map:function(a,b,d){if(null==a)return a;var e=[];R(a,e,null,b,d);return e},count:function(a){return null==a?0:N(a,"",r.thatReturnsNull,null)},toArray:function(a){var b=[];R(a,b,null,r.thatReturnsArgument);return b}};
23
- module.exports={Children:{map:S.map,forEach:S.forEach,count:S.count,toArray:S.toArray,only:function(a){G.isValidElement(a)?void 0:t("143");return a}},Component:B.Component,PureComponent:B.PureComponent,unstable_AsyncComponent:B.AsyncComponent,createElement:G.createElement,cloneElement:G.cloneElement,isValidElement:G.isValidElement,createFactory:G.createFactory,version:"16.0.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:C,assign:f}};
1
+ /** @license React v16.1.0
2
+ * react.production.min.js
3
+ *
4
+ * Copyright (c) 2013-present, Facebook, Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ 'use strict';var m=require("object-assign"),n=require("fbjs/lib/emptyObject"),p=require("fbjs/lib/emptyFunction");
10
+ function q(a){for(var b=arguments.length-1,e="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)e+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}
11
+ var r={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function t(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||r}t.prototype.isReactComponent={};t.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?q("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};t.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
12
+ function u(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||r}function v(){}v.prototype=t.prototype;var w=u.prototype=new v;w.constructor=u;m(w,t.prototype);w.isPureReactComponent=!0;function x(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||r}var y=x.prototype=new v;y.constructor=x;m(y,t.prototype);y.unstable_isAsyncReactComponent=!0;y.render=function(){return this.props.children};
13
+ var z={current:null},A=Object.prototype.hasOwnProperty,B="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,C={key:!0,ref:!0,__self:!0,__source:!0};
14
+ function D(a,b,e){var d,c={},h=null,k=null;if(null!=b)for(d in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(h=""+b.key),b)A.call(b,d)&&!C.hasOwnProperty(d)&&(c[d]=b[d]);var f=arguments.length-2;if(1===f)c.children=e;else if(1<f){for(var g=Array(f),l=0;l<f;l++)g[l]=arguments[l+2];c.children=g}if(a&&a.defaultProps)for(d in f=a.defaultProps,f)void 0===c[d]&&(c[d]=f[d]);return{$$typeof:B,type:a,key:h,ref:k,props:c,_owner:z.current}}function E(a){return"object"===typeof a&&null!==a&&a.$$typeof===B}
15
+ var F="function"===typeof Symbol&&Symbol.iterator,G="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,H="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.portal")||60106;function escape(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var I=/\/+/g,J=[];
16
+ function K(a,b,e,d){if(J.length){var c=J.pop();c.result=a;c.keyPrefix=b;c.func=e;c.context=d;c.count=0;return c}return{result:a,keyPrefix:b,func:e,context:d,count:0}}function L(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>J.length&&J.push(a)}
17
+ function M(a,b,e,d){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;if(null===a||"string"===c||"number"===c||"object"===c&&a.$$typeof===G||"object"===c&&a.$$typeof===H)return e(d,a,""===b?"."+N(a,0):b),1;var h=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){c=a[k];var f=b+N(c,k);h+=M(c,f,e,d)}else if(f=F&&a[F]||a["@@iterator"],"function"===typeof f)for(a=f.call(a),k=0;!(c=a.next()).done;)c=c.value,f=b+N(c,k++),h+=M(c,f,e,d);else"object"===c&&(e=""+a,q("31","[object Object]"===
18
+ e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return h}function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function O(a,b){a.func.call(a.context,b,a.count++)}
19
+ function P(a,b,e){var d=a.result,c=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?Q(a,d,e,p.thatReturnsArgument):null!=a&&(E(a)&&(b=c+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(I,"$\x26/")+"/")+e,a={$$typeof:B,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),d.push(a))}function Q(a,b,e,d,c){var h="";null!=e&&(h=(""+e).replace(I,"$\x26/")+"/");b=K(b,h,d,c);null==a||M(a,"",P,b);L(b)}"function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.fragment");
20
+ var R={Children:{map:function(a,b,e){if(null==a)return a;var d=[];Q(a,d,null,b,e);return d},forEach:function(a,b,e){if(null==a)return a;b=K(null,null,b,e);null==a||M(a,"",O,b);L(b)},count:function(a){return null==a?0:M(a,"",p.thatReturnsNull,null)},toArray:function(a){var b=[];Q(a,b,null,p.thatReturnsArgument);return b},only:function(a){E(a)?void 0:q("143");return a}},Component:t,PureComponent:u,unstable_AsyncComponent:x,createElement:D,cloneElement:function(a,b,e){var d=m({},a.props),c=a.key,h=a.ref,
21
+ k=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,k=z.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(g in b)A.call(b,g)&&!C.hasOwnProperty(g)&&(d[g]=void 0===b[g]&&void 0!==f?f[g]:b[g])}var g=arguments.length-2;if(1===g)d.children=e;else if(1<g){f=Array(g);for(var l=0;l<g;l++)f[l]=arguments[l+2];d.children=f}return{$$typeof:B,type:a.type,key:c,ref:h,props:d,_owner:k}},createFactory:function(a){var b=D.bind(null,a);b.type=a;return b},isValidElement:E,
22
+ version:"16.1.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:z,assign:m}},S=Object.freeze({default:R}),T=S&&R||S;module.exports=T["default"]?T["default"]:T;
package/package.json CHANGED
@@ -4,8 +4,8 @@
4
4
  "keywords": [
5
5
  "react"
6
6
  ],
7
- "version": "16.0.0",
8
- "homepage": "https://facebook.github.io/react/",
7
+ "version": "16.1.0",
8
+ "homepage": "https://reactjs.org/",
9
9
  "bugs": "https://github.com/facebook/react/issues",
10
10
  "license": "MIT",
11
11
  "files": [
@@ -1,4 +1,4 @@
1
- /** @license React v16.0.0
1
+ /** @license React v16.1.0
2
2
  * react.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -7,6 +7,8 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
+ 'use strict';
11
+
10
12
  (function (global, factory) {
11
13
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
12
14
  typeof define === 'function' && define.amd ? define(factory) :
@@ -19,6 +21,7 @@ object-assign
19
21
  @license MIT
20
22
  */
21
23
 
24
+
22
25
  /* eslint-disable no-unused-vars */
23
26
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
24
27
  var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -76,7 +79,7 @@ function shouldUseNative() {
76
79
  }
77
80
  }
78
81
 
79
- var index = shouldUseNative() ? Object.assign : function (target, source) {
82
+ var objectAssign$1 = shouldUseNative() ? Object.assign : function (target, source) {
80
83
  var from;
81
84
  var to = toObject(target);
82
85
  var symbols;
@@ -103,16 +106,157 @@ var index = shouldUseNative() ? Object.assign : function (target, source) {
103
106
  return to;
104
107
  };
105
108
 
109
+ // TODO: this is special because it gets imported during build.
110
+
111
+ var ReactVersion = '16.1.0';
112
+
113
+ /**
114
+ * WARNING: DO NOT manually require this module.
115
+ * This is a replacement for `invariant(...)` used by the error code system
116
+ * and will _only_ be required by the corresponding babel pass.
117
+ * It always throws.
118
+ */
119
+
106
120
  /**
107
121
  * Copyright (c) 2013-present, Facebook, Inc.
108
122
  *
109
123
  * This source code is licensed under the MIT license found in the
110
124
  * LICENSE file in the root directory of this source tree.
111
125
  *
112
- * @providesModule reactProdInvariant
113
- *
114
126
  */
115
127
 
128
+
129
+
130
+ /**
131
+ * Use invariant() to assert state which your program assumes to be true.
132
+ *
133
+ * Provide sprintf-style format (only %s is supported) and arguments
134
+ * to provide information about what broke and what you were
135
+ * expecting.
136
+ *
137
+ * The invariant message will be stripped in production, but the invariant
138
+ * will remain to ensure logic does not differ in production.
139
+ */
140
+
141
+ var validateFormat = function validateFormat(format) {};
142
+
143
+ {
144
+ validateFormat = function validateFormat(format) {
145
+ if (format === undefined) {
146
+ throw new Error('invariant requires an error message argument');
147
+ }
148
+ };
149
+ }
150
+
151
+ function invariant(condition, format, a, b, c, d, e, f) {
152
+ validateFormat(format);
153
+
154
+ if (!condition) {
155
+ var error;
156
+ if (format === undefined) {
157
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
158
+ } else {
159
+ var args = [a, b, c, d, e, f];
160
+ var argIndex = 0;
161
+ error = new Error(format.replace(/%s/g, function () {
162
+ return args[argIndex++];
163
+ }));
164
+ error.name = 'Invariant Violation';
165
+ }
166
+
167
+ error.framesToPop = 1; // we don't care about invariant's own frame
168
+ throw error;
169
+ }
170
+ }
171
+
172
+ var invariant_1$1 = invariant;
173
+
174
+ // Exports React.Fragment
175
+ var enableReactFragment = false;
176
+ // Exports ReactDOM.createRoot
177
+
178
+
179
+
180
+ // Mutating mode (React DOM, React ART, React Native):
181
+
182
+ // Experimental noop mode (currently unused):
183
+
184
+ // Experimental persistent mode (CS):
185
+
186
+
187
+ // Only used in www builds.
188
+
189
+ /**
190
+ * Copyright (c) 2013-present, Facebook, Inc.
191
+ *
192
+ * This source code is licensed under the MIT license found in the
193
+ * LICENSE file in the root directory of this source tree.
194
+ *
195
+ */
196
+
197
+
198
+
199
+ var emptyObject = {};
200
+
201
+ {
202
+ Object.freeze(emptyObject);
203
+ }
204
+
205
+ var emptyObject_1 = emptyObject;
206
+
207
+ /**
208
+ * Forked from fbjs/warning:
209
+ * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
210
+ *
211
+ * Only change is we use console.warn instead of console.error,
212
+ * and do nothing when 'console' is not supported.
213
+ * This really simplifies the code.
214
+ * ---
215
+ * Similar to invariant but only logs a warning if the condition is not met.
216
+ * This can be used to log issues in development environments in critical
217
+ * paths. Removing the logging code for production environments will keep the
218
+ * same logic and follow the same code paths.
219
+ */
220
+
221
+ var lowPriorityWarning = function () {};
222
+
223
+ {
224
+ var printWarning = function (format) {
225
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
226
+ args[_key - 1] = arguments[_key];
227
+ }
228
+
229
+ var argIndex = 0;
230
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
231
+ return args[argIndex++];
232
+ });
233
+ if (typeof console !== 'undefined') {
234
+ console.warn(message);
235
+ }
236
+ try {
237
+ // --- Welcome to debugging React ---
238
+ // This error was thrown as a convenience so that you can use this stack
239
+ // to find the callsite that caused this warning to fire.
240
+ throw new Error(message);
241
+ } catch (x) {}
242
+ };
243
+
244
+ lowPriorityWarning = function (condition, format) {
245
+ if (format === undefined) {
246
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
247
+ }
248
+ if (!condition) {
249
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
250
+ args[_key2 - 2] = arguments[_key2];
251
+ }
252
+
253
+ printWarning.apply(undefined, [format].concat(args));
254
+ }
255
+ };
256
+ }
257
+
258
+ var lowPriorityWarning$1 = lowPriorityWarning;
259
+
116
260
  /**
117
261
  * Copyright (c) 2013-present, Facebook, Inc.
118
262
  *
@@ -148,6 +292,18 @@ emptyFunction.thatReturnsArgument = function (arg) {
148
292
 
149
293
  var emptyFunction_1 = emptyFunction;
150
294
 
295
+ /**
296
+ * Copyright (c) 2014-present, Facebook, Inc.
297
+ *
298
+ * This source code is licensed under the MIT license found in the
299
+ * LICENSE file in the root directory of this source tree.
300
+ *
301
+ */
302
+
303
+
304
+
305
+
306
+
151
307
  /**
152
308
  * Similar to invariant but only logs a warning if the condition is not met.
153
309
  * This can be used to log issues in development environments in critical
@@ -155,10 +311,10 @@ var emptyFunction_1 = emptyFunction;
155
311
  * same logic and follow the same code paths.
156
312
  */
157
313
 
158
- var warning$1 = emptyFunction_1;
314
+ var warning = emptyFunction_1;
159
315
 
160
316
  {
161
- var printWarning = function printWarning(format) {
317
+ var printWarning$1 = function printWarning(format) {
162
318
  for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
163
319
  args[_key - 1] = arguments[_key];
164
320
  }
@@ -178,7 +334,7 @@ var warning$1 = emptyFunction_1;
178
334
  } catch (x) {}
179
335
  };
180
336
 
181
- warning$1 = function warning(condition, format) {
337
+ warning = function warning(condition, format) {
182
338
  if (format === undefined) {
183
339
  throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
184
340
  }
@@ -192,21 +348,25 @@ var warning$1 = emptyFunction_1;
192
348
  args[_key2 - 2] = arguments[_key2];
193
349
  }
194
350
 
195
- printWarning.apply(undefined, [format].concat(args));
351
+ printWarning$1.apply(undefined, [format].concat(args));
196
352
  }
197
353
  };
198
354
  }
199
355
 
200
- var warning_1 = warning$1;
356
+ var warning_1$1 = warning;
201
357
 
202
- {
203
- var warning = warning_1;
204
- }
358
+ var didWarnStateUpdateForUnmountedComponent = {};
205
359
 
206
360
  function warnNoop(publicInstance, callerName) {
207
361
  {
208
362
  var constructor = publicInstance.constructor;
209
- 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');
363
+ var componentName = constructor && (constructor.displayName || constructor.name) || 'ReactClass';
364
+ var warningKey = componentName + '.' + callerName;
365
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
366
+ return;
367
+ }
368
+ warning_1$1(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);
369
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
210
370
  }
211
371
  }
212
372
 
@@ -278,151 +438,19 @@ var ReactNoopUpdateQueue = {
278
438
  }
279
439
  };
280
440
 
281
- var ReactNoopUpdateQueue_1 = ReactNoopUpdateQueue;
282
-
283
- /**
284
- * Copyright (c) 2013-present, Facebook, Inc.
285
- *
286
- * This source code is licensed under the MIT license found in the
287
- * LICENSE file in the root directory of this source tree.
288
- *
289
- */
290
-
291
- var emptyObject = {};
292
-
293
- {
294
- Object.freeze(emptyObject);
295
- }
296
-
297
- var emptyObject_1 = emptyObject;
298
-
299
- /**
300
- * Copyright (c) 2013-present, Facebook, Inc.
301
- *
302
- * This source code is licensed under the MIT license found in the
303
- * LICENSE file in the root directory of this source tree.
304
- *
305
- */
306
-
307
- /**
308
- * Use invariant() to assert state which your program assumes to be true.
309
- *
310
- * Provide sprintf-style format (only %s is supported) and arguments
311
- * to provide information about what broke and what you were
312
- * expecting.
313
- *
314
- * The invariant message will be stripped in production, but the invariant
315
- * will remain to ensure logic does not differ in production.
316
- */
317
-
318
- var validateFormat = function validateFormat(format) {};
319
-
320
- {
321
- validateFormat = function validateFormat(format) {
322
- if (format === undefined) {
323
- throw new Error('invariant requires an error message argument');
324
- }
325
- };
326
- }
327
-
328
- function invariant(condition, format, a, b, c, d, e, f) {
329
- validateFormat(format);
330
-
331
- if (!condition) {
332
- var error;
333
- if (format === undefined) {
334
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
335
- } else {
336
- var args = [a, b, c, d, e, f];
337
- var argIndex = 0;
338
- error = new Error(format.replace(/%s/g, function () {
339
- return args[argIndex++];
340
- }));
341
- error.name = 'Invariant Violation';
342
- }
343
-
344
- error.framesToPop = 1; // we don't care about invariant's own frame
345
- throw error;
346
- }
347
- }
348
-
349
- var invariant_1 = invariant;
350
-
351
- /**
352
- * Copyright (c) 2014-present, Facebook, Inc.
353
- *
354
- * This source code is licensed under the MIT license found in the
355
- * LICENSE file in the root directory of this source tree.
356
- *
357
- * @providesModule lowPriorityWarning
358
- */
359
-
360
- /**
361
- * Forked from fbjs/warning:
362
- * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
363
- *
364
- * Only change is we use console.warn instead of console.error,
365
- * and do nothing when 'console' is not supported.
366
- * This really simplifies the code.
367
- * ---
368
- * Similar to invariant but only logs a warning if the condition is not met.
369
- * This can be used to log issues in development environments in critical
370
- * paths. Removing the logging code for production environments will keep the
371
- * same logic and follow the same code paths.
372
- */
373
-
374
- var lowPriorityWarning = function () {};
375
-
376
- {
377
- var printWarning$1 = function (format) {
378
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
379
- args[_key - 1] = arguments[_key];
380
- }
381
-
382
- var argIndex = 0;
383
- var message = 'Warning: ' + format.replace(/%s/g, function () {
384
- return args[argIndex++];
385
- });
386
- if (typeof console !== 'undefined') {
387
- console.warn(message);
388
- }
389
- try {
390
- // --- Welcome to debugging React ---
391
- // This error was thrown as a convenience so that you can use this stack
392
- // to find the callsite that caused this warning to fire.
393
- throw new Error(message);
394
- } catch (x) {}
395
- };
396
-
397
- lowPriorityWarning = function (condition, format) {
398
- if (format === undefined) {
399
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
400
- }
401
- if (!condition) {
402
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
403
- args[_key2 - 2] = arguments[_key2];
404
- }
405
-
406
- printWarning$1.apply(undefined, [format].concat(args));
407
- }
408
- };
409
- }
410
-
411
- var lowPriorityWarning_1 = lowPriorityWarning;
412
-
413
441
  /**
414
442
  * Base class helpers for the updating state of a component.
415
443
  */
416
- function ReactComponent(props, context, updater) {
444
+ function Component(props, context, updater) {
417
445
  this.props = props;
418
446
  this.context = context;
419
447
  this.refs = emptyObject_1;
420
448
  // We initialize the default updater but the real one gets injected by the
421
449
  // renderer.
422
- this.updater = updater || ReactNoopUpdateQueue_1;
450
+ this.updater = updater || ReactNoopUpdateQueue;
423
451
  }
424
452
 
425
- ReactComponent.prototype.isReactComponent = {};
453
+ Component.prototype.isReactComponent = {};
426
454
 
427
455
  /**
428
456
  * Sets a subset of the state. Always use this to mutate
@@ -449,8 +477,8 @@ ReactComponent.prototype.isReactComponent = {};
449
477
  * @final
450
478
  * @protected
451
479
  */
452
- ReactComponent.prototype.setState = function (partialState, callback) {
453
- !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant_1(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
480
+ Component.prototype.setState = function (partialState, callback) {
481
+ !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant_1$1(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
454
482
  this.updater.enqueueSetState(this, partialState, callback, 'setState');
455
483
  };
456
484
 
@@ -468,7 +496,7 @@ ReactComponent.prototype.setState = function (partialState, callback) {
468
496
  * @final
469
497
  * @protected
470
498
  */
471
- ReactComponent.prototype.forceUpdate = function (callback) {
499
+ Component.prototype.forceUpdate = function (callback) {
472
500
  this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
473
501
  };
474
502
 
@@ -483,9 +511,9 @@ ReactComponent.prototype.forceUpdate = function (callback) {
483
511
  replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
484
512
  };
485
513
  var defineDeprecationWarning = function (methodName, info) {
486
- Object.defineProperty(ReactComponent.prototype, methodName, {
514
+ Object.defineProperty(Component.prototype, methodName, {
487
515
  get: function () {
488
- lowPriorityWarning_1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
516
+ lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
489
517
  return undefined;
490
518
  }
491
519
  });
@@ -500,59 +528,43 @@ ReactComponent.prototype.forceUpdate = function (callback) {
500
528
  /**
501
529
  * Base class helpers for the updating state of a component.
502
530
  */
503
- function ReactPureComponent(props, context, updater) {
504
- // Duplicated from ReactComponent.
531
+ function PureComponent(props, context, updater) {
532
+ // Duplicated from Component.
505
533
  this.props = props;
506
534
  this.context = context;
507
535
  this.refs = emptyObject_1;
508
536
  // We initialize the default updater but the real one gets injected by the
509
537
  // renderer.
510
- this.updater = updater || ReactNoopUpdateQueue_1;
538
+ this.updater = updater || ReactNoopUpdateQueue;
511
539
  }
512
540
 
513
541
  function ComponentDummy() {}
514
- ComponentDummy.prototype = ReactComponent.prototype;
515
- var pureComponentPrototype = ReactPureComponent.prototype = new ComponentDummy();
516
- pureComponentPrototype.constructor = ReactPureComponent;
542
+ ComponentDummy.prototype = Component.prototype;
543
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
544
+ pureComponentPrototype.constructor = PureComponent;
517
545
  // Avoid an extra prototype jump for these methods.
518
- index(pureComponentPrototype, ReactComponent.prototype);
546
+ objectAssign$1(pureComponentPrototype, Component.prototype);
519
547
  pureComponentPrototype.isPureReactComponent = true;
520
548
 
521
- function ReactAsyncComponent(props, context, updater) {
522
- // Duplicated from ReactComponent.
549
+ function AsyncComponent(props, context, updater) {
550
+ // Duplicated from Component.
523
551
  this.props = props;
524
552
  this.context = context;
525
553
  this.refs = emptyObject_1;
526
554
  // We initialize the default updater but the real one gets injected by the
527
555
  // renderer.
528
- this.updater = updater || ReactNoopUpdateQueue_1;
556
+ this.updater = updater || ReactNoopUpdateQueue;
529
557
  }
530
558
 
531
- var asyncComponentPrototype = ReactAsyncComponent.prototype = new ComponentDummy();
532
- asyncComponentPrototype.constructor = ReactAsyncComponent;
559
+ var asyncComponentPrototype = AsyncComponent.prototype = new ComponentDummy();
560
+ asyncComponentPrototype.constructor = AsyncComponent;
533
561
  // Avoid an extra prototype jump for these methods.
534
- index(asyncComponentPrototype, ReactComponent.prototype);
562
+ objectAssign$1(asyncComponentPrototype, Component.prototype);
535
563
  asyncComponentPrototype.unstable_isAsyncReactComponent = true;
536
564
  asyncComponentPrototype.render = function () {
537
565
  return this.props.children;
538
566
  };
539
567
 
540
- var ReactBaseClasses = {
541
- Component: ReactComponent,
542
- PureComponent: ReactPureComponent,
543
- AsyncComponent: ReactAsyncComponent
544
- };
545
-
546
- /**
547
- * Copyright (c) 2013-present, Facebook, Inc.
548
- *
549
- * This source code is licensed under the MIT license found in the
550
- * LICENSE file in the root directory of this source tree.
551
- *
552
- * @providesModule ReactCurrentOwner
553
- *
554
- */
555
-
556
568
  /**
557
569
  * Keeps track of the current owner.
558
570
  *
@@ -567,14 +579,8 @@ var ReactCurrentOwner = {
567
579
  current: null
568
580
  };
569
581
 
570
- var ReactCurrentOwner_1 = ReactCurrentOwner;
571
-
572
582
  var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
573
583
 
574
- {
575
- var warning$3 = warning_1;
576
- }
577
-
578
584
  // The Symbol used to tag the ReactElement type. If there is no native Symbol
579
585
  // nor polyfill, then a plain number is used for performance.
580
586
  var REACT_ELEMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
@@ -617,7 +623,7 @@ function defineKeyPropWarningGetter(props, displayName) {
617
623
  var warnAboutAccessingKey = function () {
618
624
  if (!specialPropKeyWarningShown) {
619
625
  specialPropKeyWarningShown = true;
620
- warning$3(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);
626
+ warning_1$1(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);
621
627
  }
622
628
  };
623
629
  warnAboutAccessingKey.isReactWarning = true;
@@ -631,7 +637,7 @@ function defineRefPropWarningGetter(props, displayName) {
631
637
  var warnAboutAccessingRef = function () {
632
638
  if (!specialPropRefWarningShown) {
633
639
  specialPropRefWarningShown = true;
634
- warning$3(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);
640
+ warning_1$1(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);
635
641
  }
636
642
  };
637
643
  warnAboutAccessingRef.isReactWarning = true;
@@ -719,9 +725,9 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
719
725
 
720
726
  /**
721
727
  * Create and return a new ReactElement of the given type.
722
- * See https://facebook.github.io/react/docs/react-api.html#createelement
728
+ * See https://reactjs.org/docs/react-api.html#createelement
723
729
  */
724
- ReactElement.createElement = function (type, config, children) {
730
+ function createElement(type, config, children) {
725
731
  var propName;
726
732
 
727
733
  // Reserved names are extracted
@@ -790,39 +796,30 @@ ReactElement.createElement = function (type, config, children) {
790
796
  }
791
797
  }
792
798
  }
793
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner_1.current, props);
794
- };
799
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
800
+ }
795
801
 
796
802
  /**
797
803
  * Return a function that produces ReactElements of a given type.
798
- * See https://facebook.github.io/react/docs/react-api.html#createfactory
804
+ * See https://reactjs.org/docs/react-api.html#createfactory
799
805
  */
800
- ReactElement.createFactory = function (type) {
801
- var factory = ReactElement.createElement.bind(null, type);
802
- // Expose the type on the factory and the prototype so that it can be
803
- // easily accessed on elements. E.g. `<Foo />.type === Foo`.
804
- // This should not be named `constructor` since this may not be the function
805
- // that created the element, and it may not even be a constructor.
806
- // Legacy hook TODO: Warn if this is accessed
807
- factory.type = type;
808
- return factory;
809
- };
810
806
 
811
- ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
807
+
808
+ function cloneAndReplaceKey(oldElement, newKey) {
812
809
  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
813
810
 
814
811
  return newElement;
815
- };
812
+ }
816
813
 
817
814
  /**
818
815
  * Clone and return a new ReactElement using element as the starting point.
819
- * See https://facebook.github.io/react/docs/react-api.html#cloneelement
816
+ * See https://reactjs.org/docs/react-api.html#cloneelement
820
817
  */
821
- ReactElement.cloneElement = function (element, config, children) {
818
+ function cloneElement(element, config, children) {
822
819
  var propName;
823
820
 
824
821
  // Original props are copied
825
- var props = index({}, element.props);
822
+ var props = objectAssign$1({}, element.props);
826
823
 
827
824
  // Reserved names are extracted
828
825
  var key = element.key;
@@ -841,7 +838,7 @@ ReactElement.cloneElement = function (element, config, children) {
841
838
  if (hasValidRef(config)) {
842
839
  // Silently steal the ref from the parent.
843
840
  ref = config.ref;
844
- owner = ReactCurrentOwner_1.current;
841
+ owner = ReactCurrentOwner.current;
845
842
  }
846
843
  if (hasValidKey(config)) {
847
844
  key = '' + config.key;
@@ -878,30 +875,18 @@ ReactElement.cloneElement = function (element, config, children) {
878
875
  }
879
876
 
880
877
  return ReactElement(element.type, key, ref, self, source, owner, props);
881
- };
878
+ }
882
879
 
883
880
  /**
884
881
  * Verifies the object is a ReactElement.
885
- * See https://facebook.github.io/react/docs/react-api.html#isvalidelement
882
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
886
883
  * @param {?object} object
887
884
  * @return {boolean} True if `object` is a valid component.
888
885
  * @final
889
886
  */
890
- ReactElement.isValidElement = function (object) {
887
+ function isValidElement(object) {
891
888
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE$1;
892
- };
893
-
894
- var ReactElement_1 = ReactElement;
895
-
896
- /**
897
- * Copyright (c) 2013-present, Facebook, Inc.
898
- *
899
- * This source code is licensed under the MIT license found in the
900
- * LICENSE file in the root directory of this source tree.
901
- *
902
- * @providesModule ReactDebugCurrentFrame
903
- *
904
- */
889
+ }
905
890
 
906
891
  var ReactDebugCurrentFrame = {};
907
892
 
@@ -918,21 +903,12 @@ var ReactDebugCurrentFrame = {};
918
903
  };
919
904
  }
920
905
 
921
- var ReactDebugCurrentFrame_1 = ReactDebugCurrentFrame;
922
-
923
- {
924
- var warning$2 = warning_1;
925
-
926
- var _require = ReactDebugCurrentFrame_1,
927
- getStackAddendum = _require.getStackAddendum;
928
- }
929
-
930
906
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
931
907
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
932
908
  // The Symbol used to tag the ReactElement type. If there is no native Symbol
933
909
  // nor polyfill, then a plain number is used for performance.
934
910
  var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
935
-
911
+ var REACT_PORTAL_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.portal') || 0xeaca;
936
912
  var SEPARATOR = '.';
937
913
  var SUBSEPARATOR = ':';
938
914
 
@@ -1019,7 +995,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
1019
995
  if (children === null || type === 'string' || type === 'number' ||
1020
996
  // The following is inlined from ReactElement. This means we can optimize
1021
997
  // some checks. React Fiber also inlines this logic for similar purposes.
1022
- type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
998
+ type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE || type === 'object' && children.$$typeof === REACT_PORTAL_TYPE) {
1023
999
  callback(traverseContext, children,
1024
1000
  // If it's the only child, treat the name as if it was wrapped in an array
1025
1001
  // so that it's consistent if the number of children grows.
@@ -1044,7 +1020,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
1044
1020
  {
1045
1021
  // Warn about using Maps as children
1046
1022
  if (iteratorFn === children.entries) {
1047
- warning$2(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());
1023
+ warning_1$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', ReactDebugCurrentFrame.getStackAddendum());
1048
1024
  didWarnAboutMaps = true;
1049
1025
  }
1050
1026
  }
@@ -1060,10 +1036,10 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
1060
1036
  } else if (type === 'object') {
1061
1037
  var addendum = '';
1062
1038
  {
1063
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getStackAddendum();
1039
+ addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
1064
1040
  }
1065
1041
  var childrenString = '' + children;
1066
- invariant_1(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
1042
+ invariant_1$1(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
1067
1043
  }
1068
1044
  }
1069
1045
 
@@ -1122,7 +1098,7 @@ function forEachSingleChild(bookKeeping, child, name) {
1122
1098
  /**
1123
1099
  * Iterates through children that are typically specified as `props.children`.
1124
1100
  *
1125
- * See https://facebook.github.io/react/docs/react-api.html#react.children.foreach
1101
+ * See https://reactjs.org/docs/react-api.html#react.children.foreach
1126
1102
  *
1127
1103
  * The provided forEachFunc(child, index) will be called for each
1128
1104
  * leaf child.
@@ -1151,8 +1127,8 @@ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
1151
1127
  if (Array.isArray(mappedChild)) {
1152
1128
  mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction_1.thatReturnsArgument);
1153
1129
  } else if (mappedChild != null) {
1154
- if (ReactElement_1.isValidElement(mappedChild)) {
1155
- mappedChild = ReactElement_1.cloneAndReplaceKey(mappedChild,
1130
+ if (isValidElement(mappedChild)) {
1131
+ mappedChild = cloneAndReplaceKey(mappedChild,
1156
1132
  // Keep both the (mapped) and old keys if they differ, just as
1157
1133
  // traverseAllChildren used to do for objects as children
1158
1134
  keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
@@ -1174,7 +1150,7 @@ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
1174
1150
  /**
1175
1151
  * Maps children that are typically specified as `props.children`.
1176
1152
  *
1177
- * See https://facebook.github.io/react/docs/react-api.html#react.children.map
1153
+ * See https://reactjs.org/docs/react-api.html#react.children.map
1178
1154
  *
1179
1155
  * The provided mapFunction(child, key, index) will be called for each
1180
1156
  * leaf child.
@@ -1197,7 +1173,7 @@ function mapChildren(children, func, context) {
1197
1173
  * Count the number of children that are typically specified as
1198
1174
  * `props.children`.
1199
1175
  *
1200
- * See https://facebook.github.io/react/docs/react-api.html#react.children.count
1176
+ * See https://reactjs.org/docs/react-api.html#react.children.count
1201
1177
  *
1202
1178
  * @param {?*} children Children tree container.
1203
1179
  * @return {number} The number of children.
@@ -1210,7 +1186,7 @@ function countChildren(children, context) {
1210
1186
  * Flatten a children object (typically specified as `props.children`) and
1211
1187
  * return an array with appropriately re-keyed children.
1212
1188
  *
1213
- * See https://facebook.github.io/react/docs/react-api.html#react.children.toarray
1189
+ * See https://reactjs.org/docs/react-api.html#react.children.toarray
1214
1190
  */
1215
1191
  function toArray(children) {
1216
1192
  var result = [];
@@ -1218,31 +1194,11 @@ function toArray(children) {
1218
1194
  return result;
1219
1195
  }
1220
1196
 
1221
- var ReactChildren = {
1222
- forEach: forEachChildren,
1223
- map: mapChildren,
1224
- count: countChildren,
1225
- toArray: toArray
1226
- };
1227
-
1228
- var ReactChildren_1 = ReactChildren;
1229
-
1230
- /**
1231
- * Copyright (c) 2013-present, Facebook, Inc.
1232
- *
1233
- * This source code is licensed under the MIT license found in the
1234
- * LICENSE file in the root directory of this source tree.
1235
- *
1236
- * @providesModule ReactVersion
1237
- */
1238
-
1239
- var ReactVersion = '16.0.0';
1240
-
1241
1197
  /**
1242
1198
  * Returns the first child in a collection of children and verifies that there
1243
1199
  * is only one child in the collection.
1244
1200
  *
1245
- * See https://facebook.github.io/react/docs/react-api.html#react.children.only
1201
+ * See https://reactjs.org/docs/react-api.html#react.children.only
1246
1202
  *
1247
1203
  * The current implementation of this function assumes that a single child gets
1248
1204
  * passed without a wrapper, but the purpose of this helper function is to
@@ -1253,11 +1209,25 @@ var ReactVersion = '16.0.0';
1253
1209
  * structure.
1254
1210
  */
1255
1211
  function onlyChild(children) {
1256
- !ReactElement_1.isValidElement(children) ? invariant_1(false, 'React.Children.only expected to receive a single React element child.') : void 0;
1212
+ !isValidElement(children) ? invariant_1$1(false, 'React.Children.only expected to receive a single React element child.') : void 0;
1257
1213
  return children;
1258
1214
  }
1259
1215
 
1260
- var onlyChild_1 = onlyChild;
1216
+ var describeComponentFrame = function (name, source, ownerName) {
1217
+ return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
1218
+ };
1219
+
1220
+ function getComponentName(fiber) {
1221
+ var type = fiber.type;
1222
+
1223
+ if (typeof type === 'string') {
1224
+ return type;
1225
+ }
1226
+ if (typeof type === 'function') {
1227
+ return type.displayName || type.name;
1228
+ }
1229
+ return null;
1230
+ }
1261
1231
 
1262
1232
  /**
1263
1233
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -1266,13 +1236,24 @@ var onlyChild_1 = onlyChild;
1266
1236
  * LICENSE file in the root directory of this source tree.
1267
1237
  */
1268
1238
 
1239
+
1240
+
1269
1241
  var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1270
1242
 
1271
1243
  var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
1272
1244
 
1245
+ /**
1246
+ * Copyright (c) 2013-present, Facebook, Inc.
1247
+ *
1248
+ * This source code is licensed under the MIT license found in the
1249
+ * LICENSE file in the root directory of this source tree.
1250
+ */
1251
+
1252
+
1253
+
1273
1254
  {
1274
- var invariant$2 = invariant_1;
1275
- var warning$5 = warning_1;
1255
+ var invariant$2 = invariant_1$1;
1256
+ var warning$2 = warning_1$1;
1276
1257
  var ReactPropTypesSecret = ReactPropTypesSecret_1;
1277
1258
  var loggedTypeFailures = {};
1278
1259
  }
@@ -1288,7 +1269,7 @@ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
1288
1269
  * @param {?Function} getStack Returns the component stack.
1289
1270
  * @private
1290
1271
  */
1291
- function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
1272
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1292
1273
  {
1293
1274
  for (var typeSpecName in typeSpecs) {
1294
1275
  if (typeSpecs.hasOwnProperty(typeSpecName)) {
@@ -1304,7 +1285,7 @@ function checkPropTypes$1(typeSpecs, values, location, componentName, getStack)
1304
1285
  } catch (ex) {
1305
1286
  error = ex;
1306
1287
  }
1307
- warning$5(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
1288
+ warning$2(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
1308
1289
  if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1309
1290
  // Only monitor this failure once because there tends to be a lot of the
1310
1291
  // same error.
@@ -1312,70 +1293,23 @@ function checkPropTypes$1(typeSpecs, values, location, componentName, getStack)
1312
1293
 
1313
1294
  var stack = getStack ? getStack() : '';
1314
1295
 
1315
- warning$5(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
1296
+ warning$2(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
1316
1297
  }
1317
1298
  }
1318
1299
  }
1319
1300
  }
1320
1301
  }
1321
1302
 
1322
- var checkPropTypes_1 = checkPropTypes$1;
1303
+ var checkPropTypes_1$1 = checkPropTypes;
1323
1304
 
1324
1305
  /**
1325
- * Copyright (c) 2016-present, Facebook, Inc.
1326
- *
1327
- * This source code is licensed under the MIT license found in the
1328
- * LICENSE file in the root directory of this source tree.
1329
- *
1330
- *
1331
- * @providesModule describeComponentFrame
1332
- */
1333
-
1334
- var describeComponentFrame$1 = function (name, source, ownerName) {
1335
- return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
1336
- };
1337
-
1338
- /**
1339
- * Copyright (c) 2013-present, Facebook, Inc.
1340
- *
1341
- * This source code is licensed under the MIT license found in the
1342
- * LICENSE file in the root directory of this source tree.
1343
- *
1344
- * @providesModule getComponentName
1345
- *
1306
+ * ReactElementValidator provides a wrapper around a element factory
1307
+ * which validates the props passed to the element. This is intended to be
1308
+ * used only in DEV and could be replaced by a static type checker for languages
1309
+ * that support it.
1346
1310
  */
1347
1311
 
1348
- function getComponentName$1(instanceOrFiber) {
1349
- if (typeof instanceOrFiber.getName === 'function') {
1350
- // Stack reconciler
1351
- var instance = instanceOrFiber;
1352
- return instance.getName();
1353
- }
1354
- if (typeof instanceOrFiber.tag === 'number') {
1355
- // Fiber reconciler
1356
- var fiber = instanceOrFiber;
1357
- var type = fiber.type;
1358
-
1359
- if (typeof type === 'string') {
1360
- return type;
1361
- }
1362
- if (typeof type === 'function') {
1363
- return type.displayName || type.name;
1364
- }
1365
- }
1366
- return null;
1367
- }
1368
-
1369
- var getComponentName_1 = getComponentName$1;
1370
-
1371
1312
  {
1372
- var checkPropTypes = checkPropTypes_1;
1373
- var lowPriorityWarning$1 = lowPriorityWarning_1;
1374
- var ReactDebugCurrentFrame$1 = ReactDebugCurrentFrame_1;
1375
- var warning$4 = warning_1;
1376
- var describeComponentFrame = describeComponentFrame$1;
1377
- var getComponentName = getComponentName_1;
1378
-
1379
1313
  var currentlyValidatingElement = null;
1380
1314
 
1381
1315
  var getDisplayName = function (element) {
@@ -1385,29 +1319,35 @@ var getComponentName_1 = getComponentName$1;
1385
1319
  return '#text';
1386
1320
  } else if (typeof element.type === 'string') {
1387
1321
  return element.type;
1322
+ } else if (element.type === REACT_FRAGMENT_TYPE$1) {
1323
+ return 'React.Fragment';
1388
1324
  } else {
1389
1325
  return element.type.displayName || element.type.name || 'Unknown';
1390
1326
  }
1391
1327
  };
1392
1328
 
1393
- var getStackAddendum$1 = function () {
1329
+ var getStackAddendum = function () {
1394
1330
  var stack = '';
1395
1331
  if (currentlyValidatingElement) {
1396
1332
  var name = getDisplayName(currentlyValidatingElement);
1397
1333
  var owner = currentlyValidatingElement._owner;
1398
1334
  stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner));
1399
1335
  }
1400
- stack += ReactDebugCurrentFrame$1.getStackAddendum() || '';
1336
+ stack += ReactDebugCurrentFrame.getStackAddendum() || '';
1401
1337
  return stack;
1402
1338
  };
1339
+
1340
+ var REACT_FRAGMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
1341
+
1342
+ var VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
1403
1343
  }
1404
1344
 
1405
1345
  var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator;
1406
1346
  var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec.
1407
1347
 
1408
1348
  function getDeclarationErrorAddendum() {
1409
- if (ReactCurrentOwner_1.current) {
1410
- var name = getComponentName(ReactCurrentOwner_1.current);
1349
+ if (ReactCurrentOwner.current) {
1350
+ var name = getComponentName(ReactCurrentOwner.current);
1411
1351
  if (name) {
1412
1352
  return '\n\nCheck the render method of `' + name + '`.';
1413
1353
  }
@@ -1471,14 +1411,14 @@ function validateExplicitKey(element, parentType) {
1471
1411
  // property, it may be the creator of the child that's responsible for
1472
1412
  // assigning it a key.
1473
1413
  var childOwner = '';
1474
- if (element && element._owner && element._owner !== ReactCurrentOwner_1.current) {
1414
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1475
1415
  // Give the component that originally created this child.
1476
1416
  childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.';
1477
1417
  }
1478
1418
 
1479
1419
  currentlyValidatingElement = element;
1480
1420
  {
1481
- warning$4(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());
1421
+ warning_1$1(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());
1482
1422
  }
1483
1423
  currentlyValidatingElement = null;
1484
1424
  }
@@ -1499,11 +1439,11 @@ function validateChildKeys(node, parentType) {
1499
1439
  if (Array.isArray(node)) {
1500
1440
  for (var i = 0; i < node.length; i++) {
1501
1441
  var child = node[i];
1502
- if (ReactElement_1.isValidElement(child)) {
1442
+ if (isValidElement(child)) {
1503
1443
  validateExplicitKey(child, parentType);
1504
1444
  }
1505
1445
  }
1506
- } else if (ReactElement_1.isValidElement(node)) {
1446
+ } else if (isValidElement(node)) {
1507
1447
  // This element was passed in a valid location.
1508
1448
  if (node._store) {
1509
1449
  node._store.validated = true;
@@ -1517,7 +1457,7 @@ function validateChildKeys(node, parentType) {
1517
1457
  var iterator = iteratorFn.call(node);
1518
1458
  var step;
1519
1459
  while (!(step = iterator.next()).done) {
1520
- if (ReactElement_1.isValidElement(step.value)) {
1460
+ if (isValidElement(step.value)) {
1521
1461
  validateExplicitKey(step.value, parentType);
1522
1462
  }
1523
1463
  }
@@ -1542,454 +1482,191 @@ function validatePropTypes(element) {
1542
1482
 
1543
1483
  if (propTypes) {
1544
1484
  currentlyValidatingElement = element;
1545
- checkPropTypes(propTypes, element.props, 'prop', name, getStackAddendum$1);
1485
+ checkPropTypes_1$1(propTypes, element.props, 'prop', name, getStackAddendum);
1546
1486
  currentlyValidatingElement = null;
1547
1487
  }
1548
1488
  if (typeof componentClass.getDefaultProps === 'function') {
1549
- warning$4(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1489
+ warning_1$1(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1550
1490
  }
1551
1491
  }
1552
1492
 
1553
- var ReactElementValidator$1 = {
1554
- createElement: function (type, props, children) {
1555
- var validType = typeof type === 'string' || typeof type === 'function';
1556
- // We warn in this case but don't throw. We expect the element creation to
1557
- // succeed and there will likely be errors in render.
1558
- if (!validType) {
1559
- var info = '';
1560
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1561
- info += ' You likely forgot to export your component from the file ' + "it's defined in.";
1562
- }
1563
-
1564
- var sourceInfo = getSourceInfoErrorAddendum(props);
1565
- if (sourceInfo) {
1566
- info += sourceInfo;
1567
- } else {
1568
- info += getDeclarationErrorAddendum();
1569
- }
1570
-
1571
- info += ReactDebugCurrentFrame$1.getStackAddendum() || '';
1493
+ /**
1494
+ * Given a fragment, validate that it can only be provided with fragment props
1495
+ * @param {ReactElement} fragment
1496
+ */
1497
+ function validateFragmentProps(fragment) {
1498
+ currentlyValidatingElement = fragment;
1572
1499
 
1573
- warning$4(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);
1574
- }
1500
+ var _iteratorNormalCompletion = true;
1501
+ var _didIteratorError = false;
1502
+ var _iteratorError = undefined;
1575
1503
 
1576
- var element = ReactElement_1.createElement.apply(this, arguments);
1504
+ try {
1505
+ for (var _iterator = Object.keys(fragment.props)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
1506
+ var key = _step.value;
1577
1507
 
1578
- // The result can be nullish if a mock or a custom function is used.
1579
- // TODO: Drop this when these are no longer allowed as the type argument.
1580
- if (element == null) {
1581
- return element;
1508
+ if (!VALID_FRAGMENT_PROPS.has(key)) {
1509
+ warning_1$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
1510
+ break;
1511
+ }
1582
1512
  }
1583
-
1584
- // Skip key warning if the type isn't valid since our key validation logic
1585
- // doesn't expect a non-string/function type and can throw confusing errors.
1586
- // We don't want exception behavior to differ between dev and prod.
1587
- // (Rendering will throw with a helpful message and as soon as the type is
1588
- // fixed, the key warnings will appear.)
1589
- if (validType) {
1590
- for (var i = 2; i < arguments.length; i++) {
1591
- validateChildKeys(arguments[i], type);
1513
+ } catch (err) {
1514
+ _didIteratorError = true;
1515
+ _iteratorError = err;
1516
+ } finally {
1517
+ try {
1518
+ if (!_iteratorNormalCompletion && _iterator['return']) {
1519
+ _iterator['return']();
1520
+ }
1521
+ } finally {
1522
+ if (_didIteratorError) {
1523
+ throw _iteratorError;
1592
1524
  }
1593
1525
  }
1526
+ }
1594
1527
 
1595
- validatePropTypes(element);
1596
-
1597
- return element;
1598
- },
1528
+ if (fragment.ref !== null) {
1529
+ warning_1$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum());
1530
+ }
1599
1531
 
1600
- createFactory: function (type) {
1601
- var validatedFactory = ReactElementValidator$1.createElement.bind(null, type);
1602
- // Legacy hook TODO: Warn if this is accessed
1603
- validatedFactory.type = type;
1532
+ currentlyValidatingElement = null;
1533
+ }
1604
1534
 
1605
- {
1606
- Object.defineProperty(validatedFactory, 'type', {
1607
- enumerable: false,
1608
- get: function () {
1609
- lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
1610
- Object.defineProperty(this, 'type', {
1611
- value: type
1612
- });
1613
- return type;
1614
- }
1615
- });
1535
+ function createElementWithValidation(type, props, children) {
1536
+ var validType = typeof type === 'string' || typeof type === 'function' || typeof type === 'symbol' || typeof type === 'number';
1537
+ // We warn in this case but don't throw. We expect the element creation to
1538
+ // succeed and there will likely be errors in render.
1539
+ if (!validType) {
1540
+ var info = '';
1541
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1542
+ info += ' You likely forgot to export your component from the file ' + "it's defined in.";
1616
1543
  }
1617
1544
 
1618
- return validatedFactory;
1619
- },
1620
-
1621
- cloneElement: function (element, props, children) {
1622
- var newElement = ReactElement_1.cloneElement.apply(this, arguments);
1623
- for (var i = 2; i < arguments.length; i++) {
1624
- validateChildKeys(arguments[i], newElement.type);
1545
+ var sourceInfo = getSourceInfoErrorAddendum(props);
1546
+ if (sourceInfo) {
1547
+ info += sourceInfo;
1548
+ } else {
1549
+ info += getDeclarationErrorAddendum();
1625
1550
  }
1626
- validatePropTypes(newElement);
1627
- return newElement;
1628
- }
1629
- };
1630
1551
 
1631
- var ReactElementValidator_1 = ReactElementValidator$1;
1632
-
1633
- {
1634
- var warning$6 = warning_1;
1635
- }
1552
+ info += getStackAddendum() || '';
1636
1553
 
1637
- function isNative(fn) {
1638
- // Based on isNative() from Lodash
1639
- var funcToString = Function.prototype.toString;
1640
- var reIsNative = RegExp('^' + funcToString
1641
- // Take an example native function source for comparison
1642
- .call(Object.prototype.hasOwnProperty)
1643
- // Strip regex characters so we can use it for regex
1644
- .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
1645
- // Remove hasOwnProperty from the template to make it generic
1646
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
1647
- try {
1648
- var source = funcToString.call(fn);
1649
- return reIsNative.test(source);
1650
- } catch (err) {
1651
- return false;
1554
+ warning_1$1(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);
1652
1555
  }
1653
- }
1654
-
1655
- var canUseCollections =
1656
- // Array.from
1657
- typeof Array.from === 'function' &&
1658
- // Map
1659
- typeof Map === 'function' && isNative(Map) &&
1660
- // Map.prototype.keys
1661
- Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
1662
- // Set
1663
- typeof Set === 'function' && isNative(Set) &&
1664
- // Set.prototype.keys
1665
- Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
1666
-
1667
- var setItem;
1668
- var getItem;
1669
- var removeItem;
1670
- var getItemIDs;
1671
- var addRoot;
1672
- var removeRoot;
1673
- var getRootIDs;
1674
-
1675
- if (canUseCollections) {
1676
- var itemMap = new Map();
1677
- var rootIDSet = new Set();
1678
-
1679
- setItem = function (id, item) {
1680
- itemMap.set(id, item);
1681
- };
1682
- getItem = function (id) {
1683
- return itemMap.get(id);
1684
- };
1685
- removeItem = function (id) {
1686
- itemMap['delete'](id);
1687
- };
1688
- getItemIDs = function () {
1689
- return Array.from(itemMap.keys());
1690
- };
1691
-
1692
- addRoot = function (id) {
1693
- rootIDSet.add(id);
1694
- };
1695
- removeRoot = function (id) {
1696
- rootIDSet['delete'](id);
1697
- };
1698
- getRootIDs = function () {
1699
- return Array.from(rootIDSet.keys());
1700
- };
1701
- } else {
1702
- var itemByKey = {};
1703
- var rootByKey = {};
1704
-
1705
- // Use non-numeric keys to prevent V8 performance issues:
1706
- // https://github.com/facebook/react/pull/7232
1707
- var getKeyFromID = function (id) {
1708
- return '.' + id;
1709
- };
1710
- var getIDFromKey = function (key) {
1711
- return parseInt(key.substr(1), 10);
1712
- };
1713
-
1714
- setItem = function (id, item) {
1715
- var key = getKeyFromID(id);
1716
- itemByKey[key] = item;
1717
- };
1718
- getItem = function (id) {
1719
- var key = getKeyFromID(id);
1720
- return itemByKey[key];
1721
- };
1722
- removeItem = function (id) {
1723
- var key = getKeyFromID(id);
1724
- delete itemByKey[key];
1725
- };
1726
- getItemIDs = function () {
1727
- return Object.keys(itemByKey).map(getIDFromKey);
1728
- };
1729
-
1730
- addRoot = function (id) {
1731
- var key = getKeyFromID(id);
1732
- rootByKey[key] = true;
1733
- };
1734
- removeRoot = function (id) {
1735
- var key = getKeyFromID(id);
1736
- delete rootByKey[key];
1737
- };
1738
- getRootIDs = function () {
1739
- return Object.keys(rootByKey).map(getIDFromKey);
1740
- };
1741
- }
1742
1556
 
1743
- var unmountedIDs = [];
1557
+ var element = createElement.apply(this, arguments);
1744
1558
 
1745
- function purgeDeep(id) {
1746
- var item = getItem(id);
1747
- if (item) {
1748
- var childIDs = item.childIDs;
1559
+ // The result can be nullish if a mock or a custom function is used.
1560
+ // TODO: Drop this when these are no longer allowed as the type argument.
1561
+ if (element == null) {
1562
+ return element;
1563
+ }
1749
1564
 
1750
- removeItem(id);
1751
- childIDs.forEach(purgeDeep);
1565
+ // Skip key warning if the type isn't valid since our key validation logic
1566
+ // doesn't expect a non-string/function type and can throw confusing errors.
1567
+ // We don't want exception behavior to differ between dev and prod.
1568
+ // (Rendering will throw with a helpful message and as soon as the type is
1569
+ // fixed, the key warnings will appear.)
1570
+ if (validType) {
1571
+ for (var i = 2; i < arguments.length; i++) {
1572
+ validateChildKeys(arguments[i], type);
1573
+ }
1752
1574
  }
1753
- }
1754
1575
 
1755
- function getDisplayName$1(element) {
1756
- if (element == null) {
1757
- return '#empty';
1758
- } else if (typeof element === 'string' || typeof element === 'number') {
1759
- return '#text';
1760
- } else if (typeof element.type === 'string') {
1761
- return element.type;
1576
+ if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE$1) {
1577
+ validateFragmentProps(element);
1762
1578
  } else {
1763
- return element.type.displayName || element.type.name || 'Unknown';
1579
+ validatePropTypes(element);
1764
1580
  }
1765
- }
1766
-
1767
- function describeID(id) {
1768
- var name = ReactComponentTreeHook.getDisplayName(id);
1769
- var element = ReactComponentTreeHook.getElement(id);
1770
- var ownerID = ReactComponentTreeHook.getOwnerID(id);
1771
- var ownerName = void 0;
1772
1581
 
1773
- if (ownerID) {
1774
- ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
1775
- }
1776
- warning$6(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id);
1777
- return describeComponentFrame$1(name || '', element && element._source, ownerName || '');
1582
+ return element;
1778
1583
  }
1779
1584
 
1780
- var ReactComponentTreeHook = {
1781
- onSetChildren: function (id, nextChildIDs) {
1782
- var item = getItem(id);
1783
- !item ? invariant_1(false, 'Item must have been set') : void 0;
1784
- item.childIDs = nextChildIDs;
1785
-
1786
- for (var i = 0; i < nextChildIDs.length; i++) {
1787
- var nextChildID = nextChildIDs[i];
1788
- var nextChild = getItem(nextChildID);
1789
- !nextChild ? invariant_1(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : void 0;
1790
- !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? invariant_1(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : void 0;
1791
- !nextChild.isMounted ? invariant_1(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : void 0;
1792
- if (nextChild.parentID == null) {
1793
- nextChild.parentID = id;
1794
- // TODO: This shouldn't be necessary but mounting a new root during in
1795
- // componentWillMount currently causes not-yet-mounted components to
1796
- // be purged from our tree data so their parent id is missing.
1797
- }
1798
- !(nextChild.parentID === id) ? invariant_1(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : void 0;
1799
- }
1800
- },
1801
- onBeforeMountComponent: function (id, element, parentID) {
1802
- var item = {
1803
- element: element,
1804
- parentID: parentID,
1805
- text: null,
1806
- childIDs: [],
1807
- isMounted: false,
1808
- updateCount: 0
1809
- };
1810
- setItem(id, item);
1811
- },
1812
- onBeforeUpdateComponent: function (id, element) {
1813
- var item = getItem(id);
1814
- if (!item || !item.isMounted) {
1815
- // We may end up here as a result of setState() in componentWillUnmount().
1816
- // In this case, ignore the element.
1817
- return;
1818
- }
1819
- item.element = element;
1820
- },
1821
- onMountComponent: function (id) {
1822
- var item = getItem(id);
1823
- !item ? invariant_1(false, 'Item must have been set') : void 0;
1824
- item.isMounted = true;
1825
- var isRoot = item.parentID === 0;
1826
- if (isRoot) {
1827
- addRoot(id);
1828
- }
1829
- },
1830
- onUpdateComponent: function (id) {
1831
- var item = getItem(id);
1832
- if (!item || !item.isMounted) {
1833
- // We may end up here as a result of setState() in componentWillUnmount().
1834
- // In this case, ignore the element.
1835
- return;
1836
- }
1837
- item.updateCount++;
1838
- },
1839
- onUnmountComponent: function (id) {
1840
- var item = getItem(id);
1841
- if (item) {
1842
- // We need to check if it exists.
1843
- // `item` might not exist if it is inside an error boundary, and a sibling
1844
- // error boundary child threw while mounting. Then this instance never
1845
- // got a chance to mount, but it still gets an unmounting event during
1846
- // the error boundary cleanup.
1847
- item.isMounted = false;
1848
- var isRoot = item.parentID === 0;
1849
- if (isRoot) {
1850
- removeRoot(id);
1851
- }
1852
- }
1853
- unmountedIDs.push(id);
1854
- },
1855
- purgeUnmountedComponents: function () {
1856
- if (ReactComponentTreeHook._preventPurging) {
1857
- // Should only be used for testing.
1858
- return;
1859
- }
1585
+ function createFactoryWithValidation(type) {
1586
+ var validatedFactory = createElementWithValidation.bind(null, type);
1587
+ // Legacy hook TODO: Warn if this is accessed
1588
+ validatedFactory.type = type;
1860
1589
 
1861
- for (var i = 0; i < unmountedIDs.length; i++) {
1862
- var id = unmountedIDs[i];
1863
- purgeDeep(id);
1864
- }
1865
- unmountedIDs.length = 0;
1866
- },
1867
- isMounted: function (id) {
1868
- var item = getItem(id);
1869
- return item ? item.isMounted : false;
1870
- },
1871
- getCurrentStackAddendum: function () {
1872
- var info = '';
1873
- var currentOwner = ReactCurrentOwner_1.current;
1874
- if (currentOwner) {
1875
- !(typeof currentOwner.tag !== 'number') ? invariant_1(false, 'Fiber owners should not show up in Stack stack traces.') : void 0;
1876
- if (typeof currentOwner._debugID === 'number') {
1877
- info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID);
1590
+ {
1591
+ Object.defineProperty(validatedFactory, 'type', {
1592
+ enumerable: false,
1593
+ get: function () {
1594
+ lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
1595
+ Object.defineProperty(this, 'type', {
1596
+ value: type
1597
+ });
1598
+ return type;
1878
1599
  }
1879
- }
1880
- return info;
1881
- },
1882
- getStackAddendumByID: function (id) {
1883
- var info = '';
1884
- while (id) {
1885
- info += describeID(id);
1886
- id = ReactComponentTreeHook.getParentID(id);
1887
- }
1888
- return info;
1889
- },
1890
- getChildIDs: function (id) {
1891
- var item = getItem(id);
1892
- return item ? item.childIDs : [];
1893
- },
1894
- getDisplayName: function (id) {
1895
- var element = ReactComponentTreeHook.getElement(id);
1896
- if (!element) {
1897
- return null;
1898
- }
1899
- return getDisplayName$1(element);
1900
- },
1901
- getElement: function (id) {
1902
- var item = getItem(id);
1903
- return item ? item.element : null;
1904
- },
1905
- getOwnerID: function (id) {
1906
- var element = ReactComponentTreeHook.getElement(id);
1907
- if (!element || !element._owner) {
1908
- return null;
1909
- }
1910
- return element._owner._debugID;
1911
- },
1912
- getParentID: function (id) {
1913
- var item = getItem(id);
1914
- return item ? item.parentID : null;
1915
- },
1916
- getSource: function (id) {
1917
- var item = getItem(id);
1918
- var element = item ? item.element : null;
1919
- var source = element != null ? element._source : null;
1920
- return source;
1921
- },
1922
- getText: function (id) {
1923
- var element = ReactComponentTreeHook.getElement(id);
1924
- if (typeof element === 'string') {
1925
- return element;
1926
- } else if (typeof element === 'number') {
1927
- return '' + element;
1928
- } else {
1929
- return null;
1930
- }
1931
- },
1932
- getUpdateCount: function (id) {
1933
- var item = getItem(id);
1934
- return item ? item.updateCount : 0;
1935
- },
1936
-
1937
-
1938
- getRootIDs: getRootIDs,
1939
- getRegisteredIDs: getItemIDs
1940
- };
1941
-
1942
- var ReactComponentTreeHook_1 = ReactComponentTreeHook;
1600
+ });
1601
+ }
1943
1602
 
1944
- var createElement = ReactElement_1.createElement;
1945
- var createFactory = ReactElement_1.createFactory;
1946
- var cloneElement = ReactElement_1.cloneElement;
1603
+ return validatedFactory;
1604
+ }
1947
1605
 
1948
- {
1949
- var ReactElementValidator = ReactElementValidator_1;
1950
- createElement = ReactElementValidator.createElement;
1951
- createFactory = ReactElementValidator.createFactory;
1952
- cloneElement = ReactElementValidator.cloneElement;
1606
+ function cloneElementWithValidation(element, props, children) {
1607
+ var newElement = cloneElement.apply(this, arguments);
1608
+ for (var i = 2; i < arguments.length; i++) {
1609
+ validateChildKeys(arguments[i], newElement.type);
1610
+ }
1611
+ validatePropTypes(newElement);
1612
+ return newElement;
1953
1613
  }
1954
1614
 
1615
+ var REACT_FRAGMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
1616
+
1955
1617
  var React = {
1956
1618
  Children: {
1957
- map: ReactChildren_1.map,
1958
- forEach: ReactChildren_1.forEach,
1959
- count: ReactChildren_1.count,
1960
- toArray: ReactChildren_1.toArray,
1961
- only: onlyChild_1
1619
+ map: mapChildren,
1620
+ forEach: forEachChildren,
1621
+ count: countChildren,
1622
+ toArray: toArray,
1623
+ only: onlyChild
1962
1624
  },
1963
1625
 
1964
- Component: ReactBaseClasses.Component,
1965
- PureComponent: ReactBaseClasses.PureComponent,
1966
- unstable_AsyncComponent: ReactBaseClasses.AsyncComponent,
1626
+ Component: Component,
1627
+ PureComponent: PureComponent,
1628
+ unstable_AsyncComponent: AsyncComponent,
1967
1629
 
1968
- createElement: createElement,
1969
- cloneElement: cloneElement,
1970
- isValidElement: ReactElement_1.isValidElement,
1971
-
1972
- createFactory: createFactory,
1630
+ createElement: createElementWithValidation,
1631
+ cloneElement: cloneElementWithValidation,
1632
+ createFactory: createFactoryWithValidation,
1633
+ isValidElement: isValidElement,
1973
1634
 
1974
1635
  version: ReactVersion,
1975
1636
 
1976
1637
  __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
1977
- ReactCurrentOwner: ReactCurrentOwner_1,
1638
+ ReactCurrentOwner: ReactCurrentOwner,
1978
1639
  // Used by renderers to avoid bundling object-assign twice in UMD bundles:
1979
- assign: index
1640
+ assign: objectAssign$1
1980
1641
  }
1981
1642
  };
1982
1643
 
1644
+ if (enableReactFragment) {
1645
+ React.Fragment = REACT_FRAGMENT_TYPE;
1646
+ }
1647
+
1983
1648
  {
1984
- index(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
1649
+ objectAssign$1(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
1985
1650
  // These should not be included in production.
1986
- ReactComponentTreeHook: ReactComponentTreeHook_1,
1987
- ReactDebugCurrentFrame: ReactDebugCurrentFrame_1
1651
+ ReactDebugCurrentFrame: ReactDebugCurrentFrame,
1652
+ // Shim for React DOM 16.0.0 which still destructured (but not used) this.
1653
+ // TODO: remove in React 17.0.
1654
+ ReactComponentTreeHook: {}
1988
1655
  });
1989
1656
  }
1990
1657
 
1991
- var ReactEntry = React;
1992
1658
 
1993
- return ReactEntry;
1659
+
1660
+ var React$2 = Object.freeze({
1661
+ default: React
1662
+ });
1663
+
1664
+ var React$3 = ( React$2 && React ) || React$2;
1665
+
1666
+ // TODO: decide on the top-level export form.
1667
+ // This is hacky but makes it work with both Rollup and Jest.
1668
+ var react = React$3['default'] ? React$3['default'] : React$3;
1669
+
1670
+ return react;
1994
1671
 
1995
1672
  })));