react-rails 2.6.2 → 2.7.0.rc.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -1
- data/README.md +144 -45
- data/lib/assets/javascripts/react_ujs.js +65 -58
- data/lib/assets/react-source/development/react-server.js +1847 -1132
- data/lib/assets/react-source/development/react.js +17890 -16432
- data/lib/assets/react-source/production/react-server.js +3 -3
- data/lib/assets/react-source/production/react.js +8 -8
- data/lib/generators/react/install_generator.rb +18 -0
- data/lib/react/rails/version.rb +1 -1
- data/lib/react.rb +6 -8
- metadata +22 -8
@@ -46,8 +46,8 @@
|
|
46
46
|
|
47
47
|
/* WEBPACK VAR INJECTION */(function(global) {var React = __webpack_require__(1);
|
48
48
|
var ReactDOMServer = __webpack_require__(26);
|
49
|
-
var createReactClass = __webpack_require__(
|
50
|
-
var PropTypes = __webpack_require__(
|
49
|
+
var createReactClass = __webpack_require__(15);
|
50
|
+
var PropTypes = __webpack_require__(17);
|
51
51
|
|
52
52
|
global.React = React;
|
53
53
|
global.ReactDOMServer = ReactDOMServer;
|
@@ -264,7 +264,7 @@
|
|
264
264
|
/* 3 */
|
265
265
|
/***/ (function(module, exports, __webpack_require__) {
|
266
266
|
|
267
|
-
/** @license React
|
267
|
+
/** @license React v17.0.2
|
268
268
|
* react.production.min.js
|
269
269
|
*
|
270
270
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -272,23 +272,21 @@
|
|
272
272
|
* This source code is licensed under the MIT license found in the
|
273
273
|
* LICENSE file in the root directory of this source tree.
|
274
274
|
*/
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
var
|
279
|
-
function
|
280
|
-
function
|
281
|
-
function
|
282
|
-
function
|
283
|
-
|
284
|
-
|
285
|
-
function
|
286
|
-
|
287
|
-
exports.
|
288
|
-
exports.
|
289
|
-
|
290
|
-
exports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};
|
291
|
-
exports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version="16.14.0";
|
275
|
+
'use strict';var l=__webpack_require__(4),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;
|
276
|
+
if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element");p=w("react.portal");exports.Fragment=w("react.fragment");exports.StrictMode=w("react.strict_mode");exports.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");exports.Suspense=w("react.suspense");u=w("react.memo");v=w("react.lazy")}var x="function"===typeof Symbol&&Symbol.iterator;
|
277
|
+
function y(a){if(null===a||"object"!==typeof a)return null;a=x&&a[x]||a["@@iterator"];return"function"===typeof a?a:null}function z(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
278
|
+
var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};function C(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(z(85));this.updater.enqueueSetState(this,a,b,"setState")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
|
279
|
+
function D(){}D.prototype=C.prototype;function E(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}var F=E.prototype=new D;F.constructor=E;l(F,C.prototype);F.isPureReactComponent=!0;var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};
|
280
|
+
function J(a,b,c){var e,d={},k=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)H.call(b,e)&&!I.hasOwnProperty(e)&&(d[e]=b[e]);var g=arguments.length-2;if(1===g)d.children=c;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];d.children=f}if(a&&a.defaultProps)for(e in g=a.defaultProps,g)void 0===d[e]&&(d[e]=g[e]);return{$$typeof:n,type:a,key:k,ref:h,props:d,_owner:G.current}}
|
281
|
+
function K(a,b){return{$$typeof:n,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function L(a){return"object"===typeof a&&null!==a&&a.$$typeof===n}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var M=/\/+/g;function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
|
282
|
+
function O(a,b,c,e,d){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case n:case p:h=!0}}if(h)return h=a,d=d(h),a=""===e?"."+N(h,0):e,Array.isArray(d)?(c="",null!=a&&(c=a.replace(M,"$&/")+"/"),O(d,b,c,"",function(a){return a})):null!=d&&(L(d)&&(d=K(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(M,"$&/")+"/")+a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(Array.isArray(a))for(var g=
|
283
|
+
0;g<a.length;g++){k=a[g];var f=e+N(k,g);h+=O(k,b,c,f,d)}else if(f=y(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=e+N(k,g++),h+=O(k,b,c,f,d);else if("object"===k)throw b=""+a,Error(z(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function P(a,b,c){if(null==a)return a;var e=[],d=0;O(a,e,"","",function(a){return b.call(c,a,d++)});return e}
|
284
|
+
function Q(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}var R={current:null};function S(){var a=R.current;if(null===a)throw Error(z(321));return a}var T={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:G,IsSomeRendererActing:{current:!1},assign:l};
|
285
|
+
exports.Children={map:P,forEach:function(a,b,c){P(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;P(a,function(){b++});return b},toArray:function(a){return P(a,function(a){return a})||[]},only:function(a){if(!L(a))throw Error(z(143));return a}};exports.Component=C;exports.PureComponent=E;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T;
|
286
|
+
exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(z(267,a));var e=l({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=G.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)H.call(b,f)&&!I.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){g=Array(f);for(var m=0;m<f;m++)g[m]=arguments[m+2];e.children=g}return{$$typeof:n,type:a.type,
|
287
|
+
key:d,ref:k,props:e,_owner:h}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:r,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:q,_context:a};return a.Consumer=a};exports.createElement=J;exports.createFactory=function(a){var b=J.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:t,render:a}};exports.isValidElement=L;
|
288
|
+
exports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:Q}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return S().useCallback(a,b)};exports.useContext=function(a,b){return S().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return S().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return S().useImperativeHandle(a,b,c)};
|
289
|
+
exports.useLayoutEffect=function(a,b){return S().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return S().useMemo(a,b)};exports.useReducer=function(a,b,c){return S().useReducer(a,b,c)};exports.useRef=function(a){return S().useRef(a)};exports.useState=function(a){return S().useState(a)};exports.version="17.0.2";
|
292
290
|
|
293
291
|
|
294
292
|
/***/ }),
|
@@ -391,7 +389,7 @@
|
|
391
389
|
/* 5 */
|
392
390
|
/***/ (function(module, exports, __webpack_require__) {
|
393
391
|
|
394
|
-
/* WEBPACK VAR INJECTION */(function(process) {/** @license React
|
392
|
+
/* WEBPACK VAR INJECTION */(function(process) {/** @license React v17.0.2
|
395
393
|
* react.development.js
|
396
394
|
*
|
397
395
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -402,37 +400,65 @@
|
|
402
400
|
|
403
401
|
'use strict';
|
404
402
|
|
405
|
-
|
406
|
-
|
407
403
|
if (process.env.NODE_ENV !== "production") {
|
408
404
|
(function() {
|
409
405
|
'use strict';
|
410
406
|
|
411
407
|
var _assign = __webpack_require__(4);
|
412
|
-
var checkPropTypes = __webpack_require__(6);
|
413
408
|
|
414
|
-
|
409
|
+
// TODO: this is special because it gets imported during build.
|
410
|
+
var ReactVersion = '17.0.2';
|
415
411
|
|
412
|
+
// ATTENTION
|
413
|
+
// When adding new symbols to this file,
|
414
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
416
415
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
417
416
|
// nor polyfill, then a plain number is used for performance.
|
418
|
-
var
|
419
|
-
var
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
var
|
424
|
-
var
|
425
|
-
var
|
426
|
-
|
427
|
-
var
|
428
|
-
var
|
429
|
-
var
|
430
|
-
var
|
431
|
-
var
|
432
|
-
var
|
433
|
-
var
|
434
|
-
var
|
435
|
-
var
|
417
|
+
var REACT_ELEMENT_TYPE = 0xeac7;
|
418
|
+
var REACT_PORTAL_TYPE = 0xeaca;
|
419
|
+
exports.Fragment = 0xeacb;
|
420
|
+
exports.StrictMode = 0xeacc;
|
421
|
+
exports.Profiler = 0xead2;
|
422
|
+
var REACT_PROVIDER_TYPE = 0xeacd;
|
423
|
+
var REACT_CONTEXT_TYPE = 0xeace;
|
424
|
+
var REACT_FORWARD_REF_TYPE = 0xead0;
|
425
|
+
exports.Suspense = 0xead1;
|
426
|
+
var REACT_SUSPENSE_LIST_TYPE = 0xead8;
|
427
|
+
var REACT_MEMO_TYPE = 0xead3;
|
428
|
+
var REACT_LAZY_TYPE = 0xead4;
|
429
|
+
var REACT_BLOCK_TYPE = 0xead9;
|
430
|
+
var REACT_SERVER_BLOCK_TYPE = 0xeada;
|
431
|
+
var REACT_FUNDAMENTAL_TYPE = 0xead5;
|
432
|
+
var REACT_SCOPE_TYPE = 0xead7;
|
433
|
+
var REACT_OPAQUE_ID_TYPE = 0xeae0;
|
434
|
+
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
|
435
|
+
var REACT_OFFSCREEN_TYPE = 0xeae2;
|
436
|
+
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
|
437
|
+
|
438
|
+
if (typeof Symbol === 'function' && Symbol.for) {
|
439
|
+
var symbolFor = Symbol.for;
|
440
|
+
REACT_ELEMENT_TYPE = symbolFor('react.element');
|
441
|
+
REACT_PORTAL_TYPE = symbolFor('react.portal');
|
442
|
+
exports.Fragment = symbolFor('react.fragment');
|
443
|
+
exports.StrictMode = symbolFor('react.strict_mode');
|
444
|
+
exports.Profiler = symbolFor('react.profiler');
|
445
|
+
REACT_PROVIDER_TYPE = symbolFor('react.provider');
|
446
|
+
REACT_CONTEXT_TYPE = symbolFor('react.context');
|
447
|
+
REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
|
448
|
+
exports.Suspense = symbolFor('react.suspense');
|
449
|
+
REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
|
450
|
+
REACT_MEMO_TYPE = symbolFor('react.memo');
|
451
|
+
REACT_LAZY_TYPE = symbolFor('react.lazy');
|
452
|
+
REACT_BLOCK_TYPE = symbolFor('react.block');
|
453
|
+
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
|
454
|
+
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
|
455
|
+
REACT_SCOPE_TYPE = symbolFor('react.scope');
|
456
|
+
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
|
457
|
+
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
|
458
|
+
REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
|
459
|
+
REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
|
460
|
+
}
|
461
|
+
|
436
462
|
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
437
463
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
438
464
|
function getIteratorFn(maybeIterable) {
|
@@ -465,7 +491,7 @@
|
|
465
491
|
* should suspend for if it needs to.
|
466
492
|
*/
|
467
493
|
var ReactCurrentBatchConfig = {
|
468
|
-
|
494
|
+
transition: 0
|
469
495
|
};
|
470
496
|
|
471
497
|
/**
|
@@ -482,142 +508,29 @@
|
|
482
508
|
current: null
|
483
509
|
};
|
484
510
|
|
485
|
-
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
486
|
-
function describeComponentFrame (name, source, ownerName) {
|
487
|
-
var sourceInfo = '';
|
488
|
-
|
489
|
-
if (source) {
|
490
|
-
var path = source.fileName;
|
491
|
-
var fileName = path.replace(BEFORE_SLASH_RE, '');
|
492
|
-
|
493
|
-
{
|
494
|
-
// In DEV, include code for a common special case:
|
495
|
-
// prefer "folder/index.js" instead of just "index.js".
|
496
|
-
if (/^index\./.test(fileName)) {
|
497
|
-
var match = path.match(BEFORE_SLASH_RE);
|
498
|
-
|
499
|
-
if (match) {
|
500
|
-
var pathBeforeSlash = match[1];
|
501
|
-
|
502
|
-
if (pathBeforeSlash) {
|
503
|
-
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
|
504
|
-
fileName = folderName + '/' + fileName;
|
505
|
-
}
|
506
|
-
}
|
507
|
-
}
|
508
|
-
}
|
509
|
-
|
510
|
-
sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
|
511
|
-
} else if (ownerName) {
|
512
|
-
sourceInfo = ' (created by ' + ownerName + ')';
|
513
|
-
}
|
514
|
-
|
515
|
-
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
516
|
-
}
|
517
|
-
|
518
|
-
var Resolved = 1;
|
519
|
-
function refineResolvedLazyComponent(lazyComponent) {
|
520
|
-
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
521
|
-
}
|
522
|
-
|
523
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
524
|
-
var functionName = innerType.displayName || innerType.name || '';
|
525
|
-
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
|
526
|
-
}
|
527
|
-
|
528
|
-
function getComponentName(type) {
|
529
|
-
if (type == null) {
|
530
|
-
// Host root, text node or just invalid type.
|
531
|
-
return null;
|
532
|
-
}
|
533
|
-
|
534
|
-
{
|
535
|
-
if (typeof type.tag === 'number') {
|
536
|
-
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
537
|
-
}
|
538
|
-
}
|
539
|
-
|
540
|
-
if (typeof type === 'function') {
|
541
|
-
return type.displayName || type.name || null;
|
542
|
-
}
|
543
|
-
|
544
|
-
if (typeof type === 'string') {
|
545
|
-
return type;
|
546
|
-
}
|
547
|
-
|
548
|
-
switch (type) {
|
549
|
-
case REACT_FRAGMENT_TYPE:
|
550
|
-
return 'Fragment';
|
551
|
-
|
552
|
-
case REACT_PORTAL_TYPE:
|
553
|
-
return 'Portal';
|
554
|
-
|
555
|
-
case REACT_PROFILER_TYPE:
|
556
|
-
return "Profiler";
|
557
|
-
|
558
|
-
case REACT_STRICT_MODE_TYPE:
|
559
|
-
return 'StrictMode';
|
560
|
-
|
561
|
-
case REACT_SUSPENSE_TYPE:
|
562
|
-
return 'Suspense';
|
563
|
-
|
564
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
565
|
-
return 'SuspenseList';
|
566
|
-
}
|
567
|
-
|
568
|
-
if (typeof type === 'object') {
|
569
|
-
switch (type.$$typeof) {
|
570
|
-
case REACT_CONTEXT_TYPE:
|
571
|
-
return 'Context.Consumer';
|
572
|
-
|
573
|
-
case REACT_PROVIDER_TYPE:
|
574
|
-
return 'Context.Provider';
|
575
|
-
|
576
|
-
case REACT_FORWARD_REF_TYPE:
|
577
|
-
return getWrappedName(type, type.render, 'ForwardRef');
|
578
|
-
|
579
|
-
case REACT_MEMO_TYPE:
|
580
|
-
return getComponentName(type.type);
|
581
|
-
|
582
|
-
case REACT_BLOCK_TYPE:
|
583
|
-
return getComponentName(type.render);
|
584
|
-
|
585
|
-
case REACT_LAZY_TYPE:
|
586
|
-
{
|
587
|
-
var thenable = type;
|
588
|
-
var resolvedThenable = refineResolvedLazyComponent(thenable);
|
589
|
-
|
590
|
-
if (resolvedThenable) {
|
591
|
-
return getComponentName(resolvedThenable);
|
592
|
-
}
|
593
|
-
|
594
|
-
break;
|
595
|
-
}
|
596
|
-
}
|
597
|
-
}
|
598
|
-
|
599
|
-
return null;
|
600
|
-
}
|
601
|
-
|
602
511
|
var ReactDebugCurrentFrame = {};
|
603
|
-
var
|
604
|
-
function
|
512
|
+
var currentExtraStackFrame = null;
|
513
|
+
function setExtraStackFrame(stack) {
|
605
514
|
{
|
606
|
-
|
515
|
+
currentExtraStackFrame = stack;
|
607
516
|
}
|
608
517
|
}
|
609
518
|
|
610
519
|
{
|
611
|
-
|
520
|
+
ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
|
521
|
+
{
|
522
|
+
currentExtraStackFrame = stack;
|
523
|
+
}
|
524
|
+
}; // Stack implementation injected by the current renderer.
|
525
|
+
|
526
|
+
|
612
527
|
ReactDebugCurrentFrame.getCurrentStack = null;
|
613
528
|
|
614
529
|
ReactDebugCurrentFrame.getStackAddendum = function () {
|
615
530
|
var stack = ''; // Add an extra top frame while an element is being validated
|
616
531
|
|
617
|
-
if (
|
618
|
-
|
619
|
-
var owner = currentlyValidatingElement._owner;
|
620
|
-
stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
|
532
|
+
if (currentExtraStackFrame) {
|
533
|
+
stack += currentExtraStackFrame;
|
621
534
|
} // Delegate to the injected renderer-specific implementation
|
622
535
|
|
623
536
|
|
@@ -648,13 +561,7 @@
|
|
648
561
|
};
|
649
562
|
|
650
563
|
{
|
651
|
-
|
652
|
-
// These should not be included in production.
|
653
|
-
ReactDebugCurrentFrame: ReactDebugCurrentFrame,
|
654
|
-
// Shim for React DOM 16.0.0 which still destructured (but not used) this.
|
655
|
-
// TODO: remove in React 17.0.
|
656
|
-
ReactComponentTreeHook: {}
|
657
|
-
});
|
564
|
+
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
|
658
565
|
}
|
659
566
|
|
660
567
|
// by calls to these methods by a Babel plugin.
|
@@ -685,16 +592,12 @@
|
|
685
592
|
// When changing this logic, you might want to also
|
686
593
|
// update consoleWithStackDev.www.js as well.
|
687
594
|
{
|
688
|
-
var
|
689
|
-
|
690
|
-
if (!hasExistingStack) {
|
691
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
692
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
595
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
596
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
693
597
|
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
}
|
598
|
+
if (stack !== '') {
|
599
|
+
format += '%s';
|
600
|
+
args = args.concat([stack]);
|
698
601
|
}
|
699
602
|
|
700
603
|
var argsWithFormat = args.map(function (item) {
|
@@ -706,17 +609,6 @@
|
|
706
609
|
// eslint-disable-next-line react-internal/no-production-logging
|
707
610
|
|
708
611
|
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
709
|
-
|
710
|
-
try {
|
711
|
-
// --- Welcome to debugging React ---
|
712
|
-
// This error was thrown as a convenience so that you can use this stack
|
713
|
-
// to find the callsite that caused this warning to fire.
|
714
|
-
var argIndex = 0;
|
715
|
-
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
716
|
-
return args[argIndex++];
|
717
|
-
});
|
718
|
-
throw new Error(message);
|
719
|
-
} catch (x) {}
|
720
612
|
}
|
721
613
|
}
|
722
614
|
|
@@ -947,6 +839,92 @@
|
|
947
839
|
return refObject;
|
948
840
|
}
|
949
841
|
|
842
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
843
|
+
var functionName = innerType.displayName || innerType.name || '';
|
844
|
+
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
|
845
|
+
}
|
846
|
+
|
847
|
+
function getContextName(type) {
|
848
|
+
return type.displayName || 'Context';
|
849
|
+
}
|
850
|
+
|
851
|
+
function getComponentName(type) {
|
852
|
+
if (type == null) {
|
853
|
+
// Host root, text node or just invalid type.
|
854
|
+
return null;
|
855
|
+
}
|
856
|
+
|
857
|
+
{
|
858
|
+
if (typeof type.tag === 'number') {
|
859
|
+
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
860
|
+
}
|
861
|
+
}
|
862
|
+
|
863
|
+
if (typeof type === 'function') {
|
864
|
+
return type.displayName || type.name || null;
|
865
|
+
}
|
866
|
+
|
867
|
+
if (typeof type === 'string') {
|
868
|
+
return type;
|
869
|
+
}
|
870
|
+
|
871
|
+
switch (type) {
|
872
|
+
case exports.Fragment:
|
873
|
+
return 'Fragment';
|
874
|
+
|
875
|
+
case REACT_PORTAL_TYPE:
|
876
|
+
return 'Portal';
|
877
|
+
|
878
|
+
case exports.Profiler:
|
879
|
+
return 'Profiler';
|
880
|
+
|
881
|
+
case exports.StrictMode:
|
882
|
+
return 'StrictMode';
|
883
|
+
|
884
|
+
case exports.Suspense:
|
885
|
+
return 'Suspense';
|
886
|
+
|
887
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
888
|
+
return 'SuspenseList';
|
889
|
+
}
|
890
|
+
|
891
|
+
if (typeof type === 'object') {
|
892
|
+
switch (type.$$typeof) {
|
893
|
+
case REACT_CONTEXT_TYPE:
|
894
|
+
var context = type;
|
895
|
+
return getContextName(context) + '.Consumer';
|
896
|
+
|
897
|
+
case REACT_PROVIDER_TYPE:
|
898
|
+
var provider = type;
|
899
|
+
return getContextName(provider._context) + '.Provider';
|
900
|
+
|
901
|
+
case REACT_FORWARD_REF_TYPE:
|
902
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
903
|
+
|
904
|
+
case REACT_MEMO_TYPE:
|
905
|
+
return getComponentName(type.type);
|
906
|
+
|
907
|
+
case REACT_BLOCK_TYPE:
|
908
|
+
return getComponentName(type._render);
|
909
|
+
|
910
|
+
case REACT_LAZY_TYPE:
|
911
|
+
{
|
912
|
+
var lazyComponent = type;
|
913
|
+
var payload = lazyComponent._payload;
|
914
|
+
var init = lazyComponent._init;
|
915
|
+
|
916
|
+
try {
|
917
|
+
return getComponentName(init(payload));
|
918
|
+
} catch (x) {
|
919
|
+
return null;
|
920
|
+
}
|
921
|
+
}
|
922
|
+
}
|
923
|
+
}
|
924
|
+
|
925
|
+
return null;
|
926
|
+
}
|
927
|
+
|
950
928
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
951
929
|
var RESERVED_PROPS = {
|
952
930
|
key: true,
|
@@ -994,7 +972,7 @@
|
|
994
972
|
if (!specialPropKeyWarningShown) {
|
995
973
|
specialPropKeyWarningShown = true;
|
996
974
|
|
997
|
-
error('%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://
|
975
|
+
error('%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://reactjs.org/link/special-props)', displayName);
|
998
976
|
}
|
999
977
|
}
|
1000
978
|
};
|
@@ -1012,7 +990,7 @@
|
|
1012
990
|
if (!specialPropRefWarningShown) {
|
1013
991
|
specialPropRefWarningShown = true;
|
1014
992
|
|
1015
|
-
error('%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://
|
993
|
+
error('%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://reactjs.org/link/special-props)', displayName);
|
1016
994
|
}
|
1017
995
|
}
|
1018
996
|
};
|
@@ -1030,7 +1008,7 @@
|
|
1030
1008
|
var componentName = getComponentName(ReactCurrentOwner.current.type);
|
1031
1009
|
|
1032
1010
|
if (!didWarnAboutStringRefs[componentName]) {
|
1033
|
-
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://
|
1011
|
+
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
|
1034
1012
|
|
1035
1013
|
didWarnAboutStringRefs[componentName] = true;
|
1036
1014
|
}
|
@@ -1305,7 +1283,7 @@
|
|
1305
1283
|
'=': '=0',
|
1306
1284
|
':': '=2'
|
1307
1285
|
};
|
1308
|
-
var escapedString =
|
1286
|
+
var escapedString = key.replace(escapeRegex, function (match) {
|
1309
1287
|
return escaperLookup[match];
|
1310
1288
|
});
|
1311
1289
|
return '$' + escapedString;
|
@@ -1320,54 +1298,30 @@
|
|
1320
1298
|
var userProvidedKeyEscapeRegex = /\/+/g;
|
1321
1299
|
|
1322
1300
|
function escapeUserProvidedKey(text) {
|
1323
|
-
return
|
1301
|
+
return text.replace(userProvidedKeyEscapeRegex, '$&/');
|
1324
1302
|
}
|
1303
|
+
/**
|
1304
|
+
* Generate a key string that identifies a element within a set.
|
1305
|
+
*
|
1306
|
+
* @param {*} element A element that could contain a manual key.
|
1307
|
+
* @param {number} index Index that is used if a manual key is not provided.
|
1308
|
+
* @return {string}
|
1309
|
+
*/
|
1325
1310
|
|
1326
|
-
var POOL_SIZE = 10;
|
1327
|
-
var traverseContextPool = [];
|
1328
1311
|
|
1329
|
-
function
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
traverseContext.count = 0;
|
1337
|
-
return traverseContext;
|
1338
|
-
} else {
|
1339
|
-
return {
|
1340
|
-
result: mapResult,
|
1341
|
-
keyPrefix: keyPrefix,
|
1342
|
-
func: mapFunction,
|
1343
|
-
context: mapContext,
|
1344
|
-
count: 0
|
1345
|
-
};
|
1346
|
-
}
|
1347
|
-
}
|
1312
|
+
function getElementKey(element, index) {
|
1313
|
+
// Do some typechecking here since we call this blindly. We want to ensure
|
1314
|
+
// that we don't block potential future ES APIs.
|
1315
|
+
if (typeof element === 'object' && element !== null && element.key != null) {
|
1316
|
+
// Explicit key
|
1317
|
+
return escape('' + element.key);
|
1318
|
+
} // Implicit key determined by the index in the set
|
1348
1319
|
|
1349
|
-
function releaseTraverseContext(traverseContext) {
|
1350
|
-
traverseContext.result = null;
|
1351
|
-
traverseContext.keyPrefix = null;
|
1352
|
-
traverseContext.func = null;
|
1353
|
-
traverseContext.context = null;
|
1354
|
-
traverseContext.count = 0;
|
1355
1320
|
|
1356
|
-
|
1357
|
-
traverseContextPool.push(traverseContext);
|
1358
|
-
}
|
1321
|
+
return index.toString(36);
|
1359
1322
|
}
|
1360
|
-
/**
|
1361
|
-
* @param {?*} children Children tree container.
|
1362
|
-
* @param {!string} nameSoFar Name of the key path so far.
|
1363
|
-
* @param {!function} callback Callback to invoke with each child found.
|
1364
|
-
* @param {?*} traverseContext Used to pass information throughout the traversal
|
1365
|
-
* process.
|
1366
|
-
* @return {!number} The number of children in this subtree.
|
1367
|
-
*/
|
1368
|
-
|
1369
1323
|
|
1370
|
-
function
|
1324
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
1371
1325
|
var type = typeof children;
|
1372
1326
|
|
1373
1327
|
if (type === 'undefined' || type === 'boolean') {
|
@@ -1397,9 +1351,34 @@
|
|
1397
1351
|
}
|
1398
1352
|
|
1399
1353
|
if (invokeCallback) {
|
1400
|
-
|
1401
|
-
//
|
1402
|
-
|
1354
|
+
var _child = children;
|
1355
|
+
var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
|
1356
|
+
// so that it's consistent if the number of children grows:
|
1357
|
+
|
1358
|
+
var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
|
1359
|
+
|
1360
|
+
if (Array.isArray(mappedChild)) {
|
1361
|
+
var escapedChildKey = '';
|
1362
|
+
|
1363
|
+
if (childKey != null) {
|
1364
|
+
escapedChildKey = escapeUserProvidedKey(childKey) + '/';
|
1365
|
+
}
|
1366
|
+
|
1367
|
+
mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
|
1368
|
+
return c;
|
1369
|
+
});
|
1370
|
+
} else if (mappedChild != null) {
|
1371
|
+
if (isValidElement(mappedChild)) {
|
1372
|
+
mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
|
1373
|
+
// traverseAllChildren used to do for objects as children
|
1374
|
+
escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
1375
|
+
mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
1376
|
+
escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
|
1377
|
+
}
|
1378
|
+
|
1379
|
+
array.push(mappedChild);
|
1380
|
+
}
|
1381
|
+
|
1403
1382
|
return 1;
|
1404
1383
|
}
|
1405
1384
|
|
@@ -1412,46 +1391,41 @@
|
|
1412
1391
|
if (Array.isArray(children)) {
|
1413
1392
|
for (var i = 0; i < children.length; i++) {
|
1414
1393
|
child = children[i];
|
1415
|
-
nextName = nextNamePrefix +
|
1416
|
-
subtreeCount +=
|
1394
|
+
nextName = nextNamePrefix + getElementKey(child, i);
|
1395
|
+
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
1417
1396
|
}
|
1418
1397
|
} else {
|
1419
1398
|
var iteratorFn = getIteratorFn(children);
|
1420
1399
|
|
1421
1400
|
if (typeof iteratorFn === 'function') {
|
1401
|
+
var iterableChildren = children;
|
1422
1402
|
|
1423
1403
|
{
|
1424
1404
|
// Warn about using Maps as children
|
1425
|
-
if (iteratorFn ===
|
1405
|
+
if (iteratorFn === iterableChildren.entries) {
|
1426
1406
|
if (!didWarnAboutMaps) {
|
1427
|
-
warn('Using Maps as children is
|
1407
|
+
warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
|
1428
1408
|
}
|
1429
1409
|
|
1430
1410
|
didWarnAboutMaps = true;
|
1431
1411
|
}
|
1432
1412
|
}
|
1433
1413
|
|
1434
|
-
var iterator = iteratorFn.call(
|
1414
|
+
var iterator = iteratorFn.call(iterableChildren);
|
1435
1415
|
var step;
|
1436
1416
|
var ii = 0;
|
1437
1417
|
|
1438
1418
|
while (!(step = iterator.next()).done) {
|
1439
1419
|
child = step.value;
|
1440
|
-
nextName = nextNamePrefix +
|
1441
|
-
subtreeCount +=
|
1420
|
+
nextName = nextNamePrefix + getElementKey(child, ii++);
|
1421
|
+
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
1442
1422
|
}
|
1443
1423
|
} else if (type === 'object') {
|
1444
|
-
var addendum = '';
|
1445
|
-
|
1446
|
-
{
|
1447
|
-
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
|
1448
|
-
}
|
1449
|
-
|
1450
1424
|
var childrenString = '' + children;
|
1451
1425
|
|
1452
1426
|
{
|
1453
1427
|
{
|
1454
|
-
throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ").
|
1428
|
+
throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). If you meant to render a collection of children, use an array instead." );
|
1455
1429
|
}
|
1456
1430
|
}
|
1457
1431
|
}
|
@@ -1459,57 +1433,51 @@
|
|
1459
1433
|
|
1460
1434
|
return subtreeCount;
|
1461
1435
|
}
|
1436
|
+
|
1462
1437
|
/**
|
1463
|
-
*
|
1464
|
-
* might also be specified through attributes:
|
1438
|
+
* Maps children that are typically specified as `props.children`.
|
1465
1439
|
*
|
1466
|
-
*
|
1467
|
-
* - `traverseAllChildren(this.props.leftPanelChildren, ...)`
|
1440
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenmap
|
1468
1441
|
*
|
1469
|
-
* The
|
1470
|
-
*
|
1471
|
-
* the callback might find relevant.
|
1442
|
+
* The provided mapFunction(child, index) will be called for each
|
1443
|
+
* leaf child.
|
1472
1444
|
*
|
1473
|
-
* @param {?*} children Children tree
|
1474
|
-
* @param {
|
1475
|
-
* @param {
|
1476
|
-
* @return {
|
1445
|
+
* @param {?*} children Children tree container.
|
1446
|
+
* @param {function(*, int)} func The map function.
|
1447
|
+
* @param {*} context Context for mapFunction.
|
1448
|
+
* @return {object} Object containing the ordered map of results.
|
1477
1449
|
*/
|
1478
|
-
|
1479
|
-
|
1480
|
-
function traverseAllChildren(children, callback, traverseContext) {
|
1450
|
+
function mapChildren(children, func, context) {
|
1481
1451
|
if (children == null) {
|
1482
|
-
return
|
1452
|
+
return children;
|
1483
1453
|
}
|
1484
1454
|
|
1485
|
-
|
1455
|
+
var result = [];
|
1456
|
+
var count = 0;
|
1457
|
+
mapIntoArray(children, result, '', '', function (child) {
|
1458
|
+
return func.call(context, child, count++);
|
1459
|
+
});
|
1460
|
+
return result;
|
1486
1461
|
}
|
1487
1462
|
/**
|
1488
|
-
*
|
1463
|
+
* Count the number of children that are typically specified as
|
1464
|
+
* `props.children`.
|
1489
1465
|
*
|
1490
|
-
*
|
1491
|
-
*
|
1492
|
-
* @
|
1466
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrencount
|
1467
|
+
*
|
1468
|
+
* @param {?*} children Children tree container.
|
1469
|
+
* @return {number} The number of children.
|
1493
1470
|
*/
|
1494
1471
|
|
1495
1472
|
|
1496
|
-
function
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
} // Implicit key determined by the index in the set
|
1503
|
-
|
1504
|
-
|
1505
|
-
return index.toString(36);
|
1473
|
+
function countChildren(children) {
|
1474
|
+
var n = 0;
|
1475
|
+
mapChildren(children, function () {
|
1476
|
+
n++; // Don't return anything
|
1477
|
+
});
|
1478
|
+
return n;
|
1506
1479
|
}
|
1507
1480
|
|
1508
|
-
function forEachSingleChild(bookKeeping, child, name) {
|
1509
|
-
var func = bookKeeping.func,
|
1510
|
-
context = bookKeeping.context;
|
1511
|
-
func.call(context, child, bookKeeping.count++);
|
1512
|
-
}
|
1513
1481
|
/**
|
1514
1482
|
* Iterates through children that are typically specified as `props.children`.
|
1515
1483
|
*
|
@@ -1522,90 +1490,10 @@
|
|
1522
1490
|
* @param {function(*, int)} forEachFunc
|
1523
1491
|
* @param {*} forEachContext Context for forEachContext.
|
1524
1492
|
*/
|
1525
|
-
|
1526
|
-
|
1527
1493
|
function forEachChildren(children, forEachFunc, forEachContext) {
|
1528
|
-
|
1529
|
-
return
|
1530
|
-
}
|
1531
|
-
|
1532
|
-
var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
|
1533
|
-
traverseAllChildren(children, forEachSingleChild, traverseContext);
|
1534
|
-
releaseTraverseContext(traverseContext);
|
1535
|
-
}
|
1536
|
-
|
1537
|
-
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
1538
|
-
var result = bookKeeping.result,
|
1539
|
-
keyPrefix = bookKeeping.keyPrefix,
|
1540
|
-
func = bookKeeping.func,
|
1541
|
-
context = bookKeeping.context;
|
1542
|
-
var mappedChild = func.call(context, child, bookKeeping.count++);
|
1543
|
-
|
1544
|
-
if (Array.isArray(mappedChild)) {
|
1545
|
-
mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
|
1546
|
-
return c;
|
1547
|
-
});
|
1548
|
-
} else if (mappedChild != null) {
|
1549
|
-
if (isValidElement(mappedChild)) {
|
1550
|
-
mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
|
1551
|
-
// traverseAllChildren used to do for objects as children
|
1552
|
-
keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
1553
|
-
}
|
1554
|
-
|
1555
|
-
result.push(mappedChild);
|
1556
|
-
}
|
1557
|
-
}
|
1558
|
-
|
1559
|
-
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
1560
|
-
var escapedPrefix = '';
|
1561
|
-
|
1562
|
-
if (prefix != null) {
|
1563
|
-
escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
1564
|
-
}
|
1565
|
-
|
1566
|
-
var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
|
1567
|
-
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
1568
|
-
releaseTraverseContext(traverseContext);
|
1569
|
-
}
|
1570
|
-
/**
|
1571
|
-
* Maps children that are typically specified as `props.children`.
|
1572
|
-
*
|
1573
|
-
* See https://reactjs.org/docs/react-api.html#reactchildrenmap
|
1574
|
-
*
|
1575
|
-
* The provided mapFunction(child, key, index) will be called for each
|
1576
|
-
* leaf child.
|
1577
|
-
*
|
1578
|
-
* @param {?*} children Children tree container.
|
1579
|
-
* @param {function(*, int)} func The map function.
|
1580
|
-
* @param {*} context Context for mapFunction.
|
1581
|
-
* @return {object} Object containing the ordered map of results.
|
1582
|
-
*/
|
1583
|
-
|
1584
|
-
|
1585
|
-
function mapChildren(children, func, context) {
|
1586
|
-
if (children == null) {
|
1587
|
-
return children;
|
1588
|
-
}
|
1589
|
-
|
1590
|
-
var result = [];
|
1591
|
-
mapIntoWithKeyPrefixInternal(children, result, null, func, context);
|
1592
|
-
return result;
|
1593
|
-
}
|
1594
|
-
/**
|
1595
|
-
* Count the number of children that are typically specified as
|
1596
|
-
* `props.children`.
|
1597
|
-
*
|
1598
|
-
* See https://reactjs.org/docs/react-api.html#reactchildrencount
|
1599
|
-
*
|
1600
|
-
* @param {?*} children Children tree container.
|
1601
|
-
* @return {number} The number of children.
|
1602
|
-
*/
|
1603
|
-
|
1604
|
-
|
1605
|
-
function countChildren(children) {
|
1606
|
-
return traverseAllChildren(children, function () {
|
1607
|
-
return null;
|
1608
|
-
}, null);
|
1494
|
+
mapChildren(children, function () {
|
1495
|
+
forEachFunc.apply(this, arguments); // Don't return anything.
|
1496
|
+
}, forEachContext);
|
1609
1497
|
}
|
1610
1498
|
/**
|
1611
1499
|
* Flatten a children object (typically specified as `props.children`) and
|
@@ -1616,11 +1504,9 @@
|
|
1616
1504
|
|
1617
1505
|
|
1618
1506
|
function toArray(children) {
|
1619
|
-
|
1620
|
-
mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
|
1507
|
+
return mapChildren(children, function (child) {
|
1621
1508
|
return child;
|
1622
|
-
});
|
1623
|
-
return result;
|
1509
|
+
}) || [];
|
1624
1510
|
}
|
1625
1511
|
/**
|
1626
1512
|
* Returns the first child in a collection of children and verifies that there
|
@@ -1682,6 +1568,7 @@
|
|
1682
1568
|
};
|
1683
1569
|
var hasWarnedAboutUsingNestedContextConsumers = false;
|
1684
1570
|
var hasWarnedAboutUsingConsumerProvider = false;
|
1571
|
+
var hasWarnedAboutDisplayNameOnConsumer = false;
|
1685
1572
|
|
1686
1573
|
{
|
1687
1574
|
// A separate object, but proxies back to the original context object for
|
@@ -1742,6 +1629,18 @@
|
|
1742
1629
|
|
1743
1630
|
return context.Consumer;
|
1744
1631
|
}
|
1632
|
+
},
|
1633
|
+
displayName: {
|
1634
|
+
get: function () {
|
1635
|
+
return context.displayName;
|
1636
|
+
},
|
1637
|
+
set: function (displayName) {
|
1638
|
+
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
1639
|
+
warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
|
1640
|
+
|
1641
|
+
hasWarnedAboutDisplayNameOnConsumer = true;
|
1642
|
+
}
|
1643
|
+
}
|
1745
1644
|
}
|
1746
1645
|
}); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
|
1747
1646
|
|
@@ -1756,19 +1655,69 @@
|
|
1756
1655
|
return context;
|
1757
1656
|
}
|
1758
1657
|
|
1658
|
+
var Uninitialized = -1;
|
1659
|
+
var Pending = 0;
|
1660
|
+
var Resolved = 1;
|
1661
|
+
var Rejected = 2;
|
1662
|
+
|
1663
|
+
function lazyInitializer(payload) {
|
1664
|
+
if (payload._status === Uninitialized) {
|
1665
|
+
var ctor = payload._result;
|
1666
|
+
var thenable = ctor(); // Transition to the next state.
|
1667
|
+
|
1668
|
+
var pending = payload;
|
1669
|
+
pending._status = Pending;
|
1670
|
+
pending._result = thenable;
|
1671
|
+
thenable.then(function (moduleObject) {
|
1672
|
+
if (payload._status === Pending) {
|
1673
|
+
var defaultExport = moduleObject.default;
|
1674
|
+
|
1675
|
+
{
|
1676
|
+
if (defaultExport === undefined) {
|
1677
|
+
error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
|
1678
|
+
'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
|
1679
|
+
}
|
1680
|
+
} // Transition to the next state.
|
1681
|
+
|
1682
|
+
|
1683
|
+
var resolved = payload;
|
1684
|
+
resolved._status = Resolved;
|
1685
|
+
resolved._result = defaultExport;
|
1686
|
+
}
|
1687
|
+
}, function (error) {
|
1688
|
+
if (payload._status === Pending) {
|
1689
|
+
// Transition to the next state.
|
1690
|
+
var rejected = payload;
|
1691
|
+
rejected._status = Rejected;
|
1692
|
+
rejected._result = error;
|
1693
|
+
}
|
1694
|
+
});
|
1695
|
+
}
|
1696
|
+
|
1697
|
+
if (payload._status === Resolved) {
|
1698
|
+
return payload._result;
|
1699
|
+
} else {
|
1700
|
+
throw payload._result;
|
1701
|
+
}
|
1702
|
+
}
|
1703
|
+
|
1759
1704
|
function lazy(ctor) {
|
1705
|
+
var payload = {
|
1706
|
+
// We use these fields to store the result.
|
1707
|
+
_status: -1,
|
1708
|
+
_result: ctor
|
1709
|
+
};
|
1760
1710
|
var lazyType = {
|
1761
1711
|
$$typeof: REACT_LAZY_TYPE,
|
1762
|
-
|
1763
|
-
|
1764
|
-
_status: -1,
|
1765
|
-
_result: null
|
1712
|
+
_payload: payload,
|
1713
|
+
_init: lazyInitializer
|
1766
1714
|
};
|
1767
1715
|
|
1768
1716
|
{
|
1769
1717
|
// In production, this would just set it on the object.
|
1770
1718
|
var defaultProps;
|
1771
|
-
var propTypes;
|
1719
|
+
var propTypes; // $FlowFixMe
|
1720
|
+
|
1772
1721
|
Object.defineProperties(lazyType, {
|
1773
1722
|
defaultProps: {
|
1774
1723
|
configurable: true,
|
@@ -1779,6 +1728,7 @@
|
|
1779
1728
|
error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
1780
1729
|
|
1781
1730
|
defaultProps = newDefaultProps; // Match production behavior more closely:
|
1731
|
+
// $FlowFixMe
|
1782
1732
|
|
1783
1733
|
Object.defineProperty(lazyType, 'defaultProps', {
|
1784
1734
|
enumerable: true
|
@@ -1794,6 +1744,7 @@
|
|
1794
1744
|
error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
1795
1745
|
|
1796
1746
|
propTypes = newPropTypes; // Match production behavior more closely:
|
1747
|
+
// $FlowFixMe
|
1797
1748
|
|
1798
1749
|
Object.defineProperty(lazyType, 'propTypes', {
|
1799
1750
|
enumerable: true
|
@@ -1825,15 +1776,53 @@
|
|
1825
1776
|
}
|
1826
1777
|
}
|
1827
1778
|
|
1828
|
-
|
1779
|
+
var elementType = {
|
1829
1780
|
$$typeof: REACT_FORWARD_REF_TYPE,
|
1830
1781
|
render: render
|
1831
1782
|
};
|
1783
|
+
|
1784
|
+
{
|
1785
|
+
var ownName;
|
1786
|
+
Object.defineProperty(elementType, 'displayName', {
|
1787
|
+
enumerable: false,
|
1788
|
+
configurable: true,
|
1789
|
+
get: function () {
|
1790
|
+
return ownName;
|
1791
|
+
},
|
1792
|
+
set: function (name) {
|
1793
|
+
ownName = name;
|
1794
|
+
|
1795
|
+
if (render.displayName == null) {
|
1796
|
+
render.displayName = name;
|
1797
|
+
}
|
1798
|
+
}
|
1799
|
+
});
|
1800
|
+
}
|
1801
|
+
|
1802
|
+
return elementType;
|
1832
1803
|
}
|
1833
1804
|
|
1805
|
+
// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
|
1806
|
+
|
1807
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
1808
|
+
|
1834
1809
|
function isValidElementType(type) {
|
1835
|
-
|
1836
|
-
|
1810
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
1811
|
+
return true;
|
1812
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
1813
|
+
|
1814
|
+
|
1815
|
+
if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
|
1816
|
+
return true;
|
1817
|
+
}
|
1818
|
+
|
1819
|
+
if (typeof type === 'object' && type !== null) {
|
1820
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
|
1821
|
+
return true;
|
1822
|
+
}
|
1823
|
+
}
|
1824
|
+
|
1825
|
+
return false;
|
1837
1826
|
}
|
1838
1827
|
|
1839
1828
|
function memo(type, compare) {
|
@@ -1843,11 +1832,31 @@
|
|
1843
1832
|
}
|
1844
1833
|
}
|
1845
1834
|
|
1846
|
-
|
1835
|
+
var elementType = {
|
1847
1836
|
$$typeof: REACT_MEMO_TYPE,
|
1848
1837
|
type: type,
|
1849
1838
|
compare: compare === undefined ? null : compare
|
1850
1839
|
};
|
1840
|
+
|
1841
|
+
{
|
1842
|
+
var ownName;
|
1843
|
+
Object.defineProperty(elementType, 'displayName', {
|
1844
|
+
enumerable: false,
|
1845
|
+
configurable: true,
|
1846
|
+
get: function () {
|
1847
|
+
return ownName;
|
1848
|
+
},
|
1849
|
+
set: function (name) {
|
1850
|
+
ownName = name;
|
1851
|
+
|
1852
|
+
if (type.displayName == null) {
|
1853
|
+
type.displayName = name;
|
1854
|
+
}
|
1855
|
+
}
|
1856
|
+
});
|
1857
|
+
}
|
1858
|
+
|
1859
|
+
return elementType;
|
1851
1860
|
}
|
1852
1861
|
|
1853
1862
|
function resolveDispatcher() {
|
@@ -1855,7 +1864,7 @@
|
|
1855
1864
|
|
1856
1865
|
if (!(dispatcher !== null)) {
|
1857
1866
|
{
|
1858
|
-
throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://
|
1867
|
+
throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
|
1859
1868
|
}
|
1860
1869
|
}
|
1861
1870
|
|
@@ -1867,7 +1876,7 @@
|
|
1867
1876
|
|
1868
1877
|
{
|
1869
1878
|
if (unstable_observedBits !== undefined) {
|
1870
|
-
error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://
|
1879
|
+
error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://reactjs.org/link/rules-of-hooks' : '');
|
1871
1880
|
} // TODO: add a more generic warning for invalid values.
|
1872
1881
|
|
1873
1882
|
|
@@ -1924,115 +1933,526 @@
|
|
1924
1933
|
}
|
1925
1934
|
}
|
1926
1935
|
|
1927
|
-
|
1936
|
+
// Helpers to patch console.logs to avoid logging during side-effect free
|
1937
|
+
// replaying on render function. This currently only patches the object
|
1938
|
+
// lazily which won't cover if the log function was extracted eagerly.
|
1939
|
+
// We could also eagerly patch the method.
|
1940
|
+
var disabledDepth = 0;
|
1941
|
+
var prevLog;
|
1942
|
+
var prevInfo;
|
1943
|
+
var prevWarn;
|
1944
|
+
var prevError;
|
1945
|
+
var prevGroup;
|
1946
|
+
var prevGroupCollapsed;
|
1947
|
+
var prevGroupEnd;
|
1928
1948
|
|
1929
|
-
{
|
1930
|
-
|
1949
|
+
function disabledLog() {}
|
1950
|
+
|
1951
|
+
disabledLog.__reactDisabledLog = true;
|
1952
|
+
function disableLogs() {
|
1953
|
+
{
|
1954
|
+
if (disabledDepth === 0) {
|
1955
|
+
/* eslint-disable react-internal/no-production-logging */
|
1956
|
+
prevLog = console.log;
|
1957
|
+
prevInfo = console.info;
|
1958
|
+
prevWarn = console.warn;
|
1959
|
+
prevError = console.error;
|
1960
|
+
prevGroup = console.group;
|
1961
|
+
prevGroupCollapsed = console.groupCollapsed;
|
1962
|
+
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
1963
|
+
|
1964
|
+
var props = {
|
1965
|
+
configurable: true,
|
1966
|
+
enumerable: true,
|
1967
|
+
value: disabledLog,
|
1968
|
+
writable: true
|
1969
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
1970
|
+
|
1971
|
+
Object.defineProperties(console, {
|
1972
|
+
info: props,
|
1973
|
+
log: props,
|
1974
|
+
warn: props,
|
1975
|
+
error: props,
|
1976
|
+
group: props,
|
1977
|
+
groupCollapsed: props,
|
1978
|
+
groupEnd: props
|
1979
|
+
});
|
1980
|
+
/* eslint-enable react-internal/no-production-logging */
|
1981
|
+
}
|
1982
|
+
|
1983
|
+
disabledDepth++;
|
1984
|
+
}
|
1931
1985
|
}
|
1986
|
+
function reenableLogs() {
|
1987
|
+
{
|
1988
|
+
disabledDepth--;
|
1932
1989
|
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1990
|
+
if (disabledDepth === 0) {
|
1991
|
+
/* eslint-disable react-internal/no-production-logging */
|
1992
|
+
var props = {
|
1993
|
+
configurable: true,
|
1994
|
+
enumerable: true,
|
1995
|
+
writable: true
|
1996
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
1997
|
+
|
1998
|
+
Object.defineProperties(console, {
|
1999
|
+
log: _assign({}, props, {
|
2000
|
+
value: prevLog
|
2001
|
+
}),
|
2002
|
+
info: _assign({}, props, {
|
2003
|
+
value: prevInfo
|
2004
|
+
}),
|
2005
|
+
warn: _assign({}, props, {
|
2006
|
+
value: prevWarn
|
2007
|
+
}),
|
2008
|
+
error: _assign({}, props, {
|
2009
|
+
value: prevError
|
2010
|
+
}),
|
2011
|
+
group: _assign({}, props, {
|
2012
|
+
value: prevGroup
|
2013
|
+
}),
|
2014
|
+
groupCollapsed: _assign({}, props, {
|
2015
|
+
value: prevGroupCollapsed
|
2016
|
+
}),
|
2017
|
+
groupEnd: _assign({}, props, {
|
2018
|
+
value: prevGroupEnd
|
2019
|
+
})
|
2020
|
+
});
|
2021
|
+
/* eslint-enable react-internal/no-production-logging */
|
2022
|
+
}
|
1936
2023
|
|
1937
|
-
if (
|
1938
|
-
|
2024
|
+
if (disabledDepth < 0) {
|
2025
|
+
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
1939
2026
|
}
|
1940
2027
|
}
|
1941
|
-
|
1942
|
-
return '';
|
1943
2028
|
}
|
1944
2029
|
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
2030
|
+
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
|
2031
|
+
var prefix;
|
2032
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
2033
|
+
{
|
2034
|
+
if (prefix === undefined) {
|
2035
|
+
// Extract the VM specific prefix used by each line.
|
2036
|
+
try {
|
2037
|
+
throw Error();
|
2038
|
+
} catch (x) {
|
2039
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
2040
|
+
prefix = match && match[1] || '';
|
2041
|
+
}
|
2042
|
+
} // We use the prefix to ensure our stacks line up with native stack frames.
|
2043
|
+
|
2044
|
+
|
2045
|
+
return '\n' + prefix + name;
|
1950
2046
|
}
|
2047
|
+
}
|
2048
|
+
var reentry = false;
|
2049
|
+
var componentFrameCache;
|
1951
2050
|
|
1952
|
-
|
2051
|
+
{
|
2052
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
2053
|
+
componentFrameCache = new PossiblyWeakMap();
|
1953
2054
|
}
|
1954
2055
|
|
1955
|
-
function
|
1956
|
-
|
1957
|
-
|
2056
|
+
function describeNativeComponentFrame(fn, construct) {
|
2057
|
+
// If something asked for a stack inside a fake render, it should get ignored.
|
2058
|
+
if (!fn || reentry) {
|
2059
|
+
return '';
|
1958
2060
|
}
|
1959
2061
|
|
1960
|
-
|
1961
|
-
|
1962
|
-
/**
|
1963
|
-
* Warn if there's no key explicitly set on dynamic arrays of children or
|
1964
|
-
* object keys are not valid. This allows us to keep track of children between
|
1965
|
-
* updates.
|
1966
|
-
*/
|
2062
|
+
{
|
2063
|
+
var frame = componentFrameCache.get(fn);
|
1967
2064
|
|
2065
|
+
if (frame !== undefined) {
|
2066
|
+
return frame;
|
2067
|
+
}
|
2068
|
+
}
|
1968
2069
|
|
1969
|
-
|
2070
|
+
var control;
|
2071
|
+
reentry = true;
|
2072
|
+
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
1970
2073
|
|
1971
|
-
|
1972
|
-
var
|
2074
|
+
Error.prepareStackTrace = undefined;
|
2075
|
+
var previousDispatcher;
|
1973
2076
|
|
1974
|
-
|
1975
|
-
|
2077
|
+
{
|
2078
|
+
previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
|
2079
|
+
// for warnings.
|
1976
2080
|
|
1977
|
-
|
1978
|
-
|
1979
|
-
}
|
2081
|
+
ReactCurrentDispatcher$1.current = null;
|
2082
|
+
disableLogs();
|
1980
2083
|
}
|
1981
2084
|
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
|
2085
|
+
try {
|
2086
|
+
// This should throw.
|
2087
|
+
if (construct) {
|
2088
|
+
// Something should be setting the props in the constructor.
|
2089
|
+
var Fake = function () {
|
2090
|
+
throw Error();
|
2091
|
+
}; // $FlowFixMe
|
2092
|
+
|
2093
|
+
|
2094
|
+
Object.defineProperty(Fake.prototype, 'props', {
|
2095
|
+
set: function () {
|
2096
|
+
// We use a throwing setter instead of frozen or non-writable props
|
2097
|
+
// because that won't throw in a non-strict mode function.
|
2098
|
+
throw Error();
|
2099
|
+
}
|
2100
|
+
});
|
1995
2101
|
|
2102
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
2103
|
+
// We construct a different control for this case to include any extra
|
2104
|
+
// frames added by the construct call.
|
2105
|
+
try {
|
2106
|
+
Reflect.construct(Fake, []);
|
2107
|
+
} catch (x) {
|
2108
|
+
control = x;
|
2109
|
+
}
|
1996
2110
|
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2111
|
+
Reflect.construct(fn, [], Fake);
|
2112
|
+
} else {
|
2113
|
+
try {
|
2114
|
+
Fake.call();
|
2115
|
+
} catch (x) {
|
2116
|
+
control = x;
|
2117
|
+
}
|
2001
2118
|
|
2002
|
-
|
2003
|
-
|
2119
|
+
fn.call(Fake.prototype);
|
2120
|
+
}
|
2121
|
+
} else {
|
2122
|
+
try {
|
2123
|
+
throw Error();
|
2124
|
+
} catch (x) {
|
2125
|
+
control = x;
|
2126
|
+
}
|
2127
|
+
|
2128
|
+
fn();
|
2129
|
+
}
|
2130
|
+
} catch (sample) {
|
2131
|
+
// This is inlined manually because closure doesn't do it for us.
|
2132
|
+
if (sample && control && typeof sample.stack === 'string') {
|
2133
|
+
// This extracts the first frame from the sample that isn't also in the control.
|
2134
|
+
// Skipping one frame that we assume is the frame that calls the two.
|
2135
|
+
var sampleLines = sample.stack.split('\n');
|
2136
|
+
var controlLines = control.stack.split('\n');
|
2137
|
+
var s = sampleLines.length - 1;
|
2138
|
+
var c = controlLines.length - 1;
|
2139
|
+
|
2140
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
2141
|
+
// We expect at least one stack frame to be shared.
|
2142
|
+
// Typically this will be the root most one. However, stack frames may be
|
2143
|
+
// cut off due to maximum stack limits. In this case, one maybe cut off
|
2144
|
+
// earlier than the other. We assume that the sample is longer or the same
|
2145
|
+
// and there for cut off earlier. So we should find the root most frame in
|
2146
|
+
// the sample somewhere in the control.
|
2147
|
+
c--;
|
2148
|
+
}
|
2149
|
+
|
2150
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
2151
|
+
// Next we find the first one that isn't the same which should be the
|
2152
|
+
// frame that called our sample function and the control.
|
2153
|
+
if (sampleLines[s] !== controlLines[c]) {
|
2154
|
+
// In V8, the first line is describing the message but other VMs don't.
|
2155
|
+
// If we're about to return the first line, and the control is also on the same
|
2156
|
+
// line, that's a pretty good indicator that our sample threw at same line as
|
2157
|
+
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
2158
|
+
// This can happen if you passed a class to function component, or non-function.
|
2159
|
+
if (s !== 1 || c !== 1) {
|
2160
|
+
do {
|
2161
|
+
s--;
|
2162
|
+
c--; // We may still have similar intermediate frames from the construct call.
|
2163
|
+
// The next one that isn't the same should be our match though.
|
2164
|
+
|
2165
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
2166
|
+
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
2167
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
|
2004
2168
|
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2169
|
+
{
|
2170
|
+
if (typeof fn === 'function') {
|
2171
|
+
componentFrameCache.set(fn, _frame);
|
2172
|
+
}
|
2173
|
+
} // Return the line we found.
|
2008
2174
|
|
2009
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
2010
|
-
// property, it may be the creator of the child that's responsible for
|
2011
|
-
// assigning it a key.
|
2012
2175
|
|
2013
|
-
|
2176
|
+
return _frame;
|
2177
|
+
}
|
2178
|
+
} while (s >= 1 && c >= 0);
|
2179
|
+
}
|
2014
2180
|
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2181
|
+
break;
|
2182
|
+
}
|
2183
|
+
}
|
2184
|
+
}
|
2185
|
+
} finally {
|
2186
|
+
reentry = false;
|
2187
|
+
|
2188
|
+
{
|
2189
|
+
ReactCurrentDispatcher$1.current = previousDispatcher;
|
2190
|
+
reenableLogs();
|
2191
|
+
}
|
2192
|
+
|
2193
|
+
Error.prepareStackTrace = previousPrepareStackTrace;
|
2194
|
+
} // Fallback to just using the name if we couldn't make it throw.
|
2019
2195
|
|
2020
|
-
|
2196
|
+
|
2197
|
+
var name = fn ? fn.displayName || fn.name : '';
|
2198
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
2021
2199
|
|
2022
2200
|
{
|
2023
|
-
|
2201
|
+
if (typeof fn === 'function') {
|
2202
|
+
componentFrameCache.set(fn, syntheticFrame);
|
2203
|
+
}
|
2024
2204
|
}
|
2025
2205
|
|
2026
|
-
|
2206
|
+
return syntheticFrame;
|
2027
2207
|
}
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2208
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
2209
|
+
{
|
2210
|
+
return describeNativeComponentFrame(fn, false);
|
2211
|
+
}
|
2212
|
+
}
|
2213
|
+
|
2214
|
+
function shouldConstruct(Component) {
|
2215
|
+
var prototype = Component.prototype;
|
2216
|
+
return !!(prototype && prototype.isReactComponent);
|
2217
|
+
}
|
2218
|
+
|
2219
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
2220
|
+
|
2221
|
+
if (type == null) {
|
2222
|
+
return '';
|
2223
|
+
}
|
2224
|
+
|
2225
|
+
if (typeof type === 'function') {
|
2226
|
+
{
|
2227
|
+
return describeNativeComponentFrame(type, shouldConstruct(type));
|
2228
|
+
}
|
2229
|
+
}
|
2230
|
+
|
2231
|
+
if (typeof type === 'string') {
|
2232
|
+
return describeBuiltInComponentFrame(type);
|
2233
|
+
}
|
2234
|
+
|
2235
|
+
switch (type) {
|
2236
|
+
case exports.Suspense:
|
2237
|
+
return describeBuiltInComponentFrame('Suspense');
|
2238
|
+
|
2239
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
2240
|
+
return describeBuiltInComponentFrame('SuspenseList');
|
2241
|
+
}
|
2242
|
+
|
2243
|
+
if (typeof type === 'object') {
|
2244
|
+
switch (type.$$typeof) {
|
2245
|
+
case REACT_FORWARD_REF_TYPE:
|
2246
|
+
return describeFunctionComponentFrame(type.render);
|
2247
|
+
|
2248
|
+
case REACT_MEMO_TYPE:
|
2249
|
+
// Memo may contain any component type so we recursively resolve it.
|
2250
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
2251
|
+
|
2252
|
+
case REACT_BLOCK_TYPE:
|
2253
|
+
return describeFunctionComponentFrame(type._render);
|
2254
|
+
|
2255
|
+
case REACT_LAZY_TYPE:
|
2256
|
+
{
|
2257
|
+
var lazyComponent = type;
|
2258
|
+
var payload = lazyComponent._payload;
|
2259
|
+
var init = lazyComponent._init;
|
2260
|
+
|
2261
|
+
try {
|
2262
|
+
// Lazy may contain any component type so we recursively resolve it.
|
2263
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
2264
|
+
} catch (x) {}
|
2265
|
+
}
|
2266
|
+
}
|
2267
|
+
}
|
2268
|
+
|
2269
|
+
return '';
|
2270
|
+
}
|
2271
|
+
|
2272
|
+
var loggedTypeFailures = {};
|
2273
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
2274
|
+
|
2275
|
+
function setCurrentlyValidatingElement(element) {
|
2276
|
+
{
|
2277
|
+
if (element) {
|
2278
|
+
var owner = element._owner;
|
2279
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
2280
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
2281
|
+
} else {
|
2282
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
2283
|
+
}
|
2284
|
+
}
|
2285
|
+
}
|
2286
|
+
|
2287
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
2288
|
+
{
|
2289
|
+
// $FlowFixMe This is okay but Flow doesn't know it.
|
2290
|
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
2291
|
+
|
2292
|
+
for (var typeSpecName in typeSpecs) {
|
2293
|
+
if (has(typeSpecs, typeSpecName)) {
|
2294
|
+
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
2295
|
+
// fail the render phase where it didn't fail before. So we log it.
|
2296
|
+
// After these have been cleaned up, we'll let them throw.
|
2297
|
+
|
2298
|
+
try {
|
2299
|
+
// This is intentionally an invariant that gets caught. It's the same
|
2300
|
+
// behavior as without this statement except with a better message.
|
2301
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
2302
|
+
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
2303
|
+
err.name = 'Invariant Violation';
|
2304
|
+
throw err;
|
2305
|
+
}
|
2306
|
+
|
2307
|
+
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
2308
|
+
} catch (ex) {
|
2309
|
+
error$1 = ex;
|
2310
|
+
}
|
2311
|
+
|
2312
|
+
if (error$1 && !(error$1 instanceof Error)) {
|
2313
|
+
setCurrentlyValidatingElement(element);
|
2314
|
+
|
2315
|
+
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$1);
|
2316
|
+
|
2317
|
+
setCurrentlyValidatingElement(null);
|
2318
|
+
}
|
2319
|
+
|
2320
|
+
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
2321
|
+
// Only monitor this failure once because there tends to be a lot of the
|
2322
|
+
// same error.
|
2323
|
+
loggedTypeFailures[error$1.message] = true;
|
2324
|
+
setCurrentlyValidatingElement(element);
|
2325
|
+
|
2326
|
+
error('Failed %s type: %s', location, error$1.message);
|
2327
|
+
|
2328
|
+
setCurrentlyValidatingElement(null);
|
2329
|
+
}
|
2330
|
+
}
|
2331
|
+
}
|
2332
|
+
}
|
2333
|
+
}
|
2334
|
+
|
2335
|
+
function setCurrentlyValidatingElement$1(element) {
|
2336
|
+
{
|
2337
|
+
if (element) {
|
2338
|
+
var owner = element._owner;
|
2339
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
2340
|
+
setExtraStackFrame(stack);
|
2341
|
+
} else {
|
2342
|
+
setExtraStackFrame(null);
|
2343
|
+
}
|
2344
|
+
}
|
2345
|
+
}
|
2346
|
+
|
2347
|
+
var propTypesMisspellWarningShown;
|
2348
|
+
|
2349
|
+
{
|
2350
|
+
propTypesMisspellWarningShown = false;
|
2351
|
+
}
|
2352
|
+
|
2353
|
+
function getDeclarationErrorAddendum() {
|
2354
|
+
if (ReactCurrentOwner.current) {
|
2355
|
+
var name = getComponentName(ReactCurrentOwner.current.type);
|
2356
|
+
|
2357
|
+
if (name) {
|
2358
|
+
return '\n\nCheck the render method of `' + name + '`.';
|
2359
|
+
}
|
2360
|
+
}
|
2361
|
+
|
2362
|
+
return '';
|
2363
|
+
}
|
2364
|
+
|
2365
|
+
function getSourceInfoErrorAddendum(source) {
|
2366
|
+
if (source !== undefined) {
|
2367
|
+
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
2368
|
+
var lineNumber = source.lineNumber;
|
2369
|
+
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
2370
|
+
}
|
2371
|
+
|
2372
|
+
return '';
|
2373
|
+
}
|
2374
|
+
|
2375
|
+
function getSourceInfoErrorAddendumForProps(elementProps) {
|
2376
|
+
if (elementProps !== null && elementProps !== undefined) {
|
2377
|
+
return getSourceInfoErrorAddendum(elementProps.__source);
|
2378
|
+
}
|
2379
|
+
|
2380
|
+
return '';
|
2381
|
+
}
|
2382
|
+
/**
|
2383
|
+
* Warn if there's no key explicitly set on dynamic arrays of children or
|
2384
|
+
* object keys are not valid. This allows us to keep track of children between
|
2385
|
+
* updates.
|
2386
|
+
*/
|
2387
|
+
|
2388
|
+
|
2389
|
+
var ownerHasKeyUseWarning = {};
|
2390
|
+
|
2391
|
+
function getCurrentComponentErrorInfo(parentType) {
|
2392
|
+
var info = getDeclarationErrorAddendum();
|
2393
|
+
|
2394
|
+
if (!info) {
|
2395
|
+
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
2396
|
+
|
2397
|
+
if (parentName) {
|
2398
|
+
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
2399
|
+
}
|
2400
|
+
}
|
2401
|
+
|
2402
|
+
return info;
|
2403
|
+
}
|
2404
|
+
/**
|
2405
|
+
* Warn if the element doesn't have an explicit key assigned to it.
|
2406
|
+
* This element is in an array. The array could grow and shrink or be
|
2407
|
+
* reordered. All children that haven't already been validated are required to
|
2408
|
+
* have a "key" property assigned to it. Error statuses are cached so a warning
|
2409
|
+
* will only be shown once.
|
2410
|
+
*
|
2411
|
+
* @internal
|
2412
|
+
* @param {ReactElement} element Element that requires a key.
|
2413
|
+
* @param {*} parentType element's parent's type.
|
2414
|
+
*/
|
2415
|
+
|
2416
|
+
|
2417
|
+
function validateExplicitKey(element, parentType) {
|
2418
|
+
if (!element._store || element._store.validated || element.key != null) {
|
2419
|
+
return;
|
2420
|
+
}
|
2421
|
+
|
2422
|
+
element._store.validated = true;
|
2423
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
2424
|
+
|
2425
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
2426
|
+
return;
|
2427
|
+
}
|
2428
|
+
|
2429
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
2430
|
+
// property, it may be the creator of the child that's responsible for
|
2431
|
+
// assigning it a key.
|
2432
|
+
|
2433
|
+
var childOwner = '';
|
2434
|
+
|
2435
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
2436
|
+
// Give the component that originally created this child.
|
2437
|
+
childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
|
2438
|
+
}
|
2439
|
+
|
2440
|
+
{
|
2441
|
+
setCurrentlyValidatingElement$1(element);
|
2442
|
+
|
2443
|
+
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
2444
|
+
|
2445
|
+
setCurrentlyValidatingElement$1(null);
|
2446
|
+
}
|
2447
|
+
}
|
2448
|
+
/**
|
2449
|
+
* Ensure that every element either is passed in a static location, in an
|
2450
|
+
* array with an explicit keys property defined, or in an object literal
|
2451
|
+
* with valid key property.
|
2452
|
+
*
|
2453
|
+
* @internal
|
2454
|
+
* @param {ReactNode} node Statically passed child of any type.
|
2455
|
+
* @param {*} parentType node's parent's type.
|
2036
2456
|
*/
|
2037
2457
|
|
2038
2458
|
|
@@ -2089,7 +2509,6 @@
|
|
2089
2509
|
return;
|
2090
2510
|
}
|
2091
2511
|
|
2092
|
-
var name = getComponentName(type);
|
2093
2512
|
var propTypes;
|
2094
2513
|
|
2095
2514
|
if (typeof type === 'function') {
|
@@ -2103,13 +2522,15 @@
|
|
2103
2522
|
}
|
2104
2523
|
|
2105
2524
|
if (propTypes) {
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2525
|
+
// Intentionally inside to avoid triggering lazy initializers:
|
2526
|
+
var name = getComponentName(type);
|
2527
|
+
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
2109
2528
|
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
2110
|
-
propTypesMisspellWarningShown = true;
|
2529
|
+
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
2111
2530
|
|
2112
|
-
|
2531
|
+
var _name = getComponentName(type);
|
2532
|
+
|
2533
|
+
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
2113
2534
|
}
|
2114
2535
|
|
2115
2536
|
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
@@ -2125,24 +2546,28 @@
|
|
2125
2546
|
|
2126
2547
|
function validateFragmentProps(fragment) {
|
2127
2548
|
{
|
2128
|
-
setCurrentlyValidatingElement(fragment);
|
2129
2549
|
var keys = Object.keys(fragment.props);
|
2130
2550
|
|
2131
2551
|
for (var i = 0; i < keys.length; i++) {
|
2132
2552
|
var key = keys[i];
|
2133
2553
|
|
2134
2554
|
if (key !== 'children' && key !== 'key') {
|
2555
|
+
setCurrentlyValidatingElement$1(fragment);
|
2556
|
+
|
2135
2557
|
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
2136
2558
|
|
2559
|
+
setCurrentlyValidatingElement$1(null);
|
2137
2560
|
break;
|
2138
2561
|
}
|
2139
2562
|
}
|
2140
2563
|
|
2141
2564
|
if (fragment.ref !== null) {
|
2565
|
+
setCurrentlyValidatingElement$1(fragment);
|
2566
|
+
|
2142
2567
|
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
2143
|
-
}
|
2144
2568
|
|
2145
|
-
|
2569
|
+
setCurrentlyValidatingElement$1(null);
|
2570
|
+
}
|
2146
2571
|
}
|
2147
2572
|
}
|
2148
2573
|
function createElementWithValidation(type, props, children) {
|
@@ -2200,7 +2625,7 @@
|
|
2200
2625
|
}
|
2201
2626
|
}
|
2202
2627
|
|
2203
|
-
if (type ===
|
2628
|
+
if (type === exports.Fragment) {
|
2204
2629
|
validateFragmentProps(element);
|
2205
2630
|
} else {
|
2206
2631
|
validatePropTypes(element);
|
@@ -2251,13 +2676,11 @@
|
|
2251
2676
|
|
2252
2677
|
try {
|
2253
2678
|
var frozenObject = Object.freeze({});
|
2254
|
-
|
2255
|
-
var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
|
2256
|
-
// https://github.com/rollup/rollup/issues/1771
|
2257
|
-
// TODO: we can remove these if Rollup fixes the bug.
|
2679
|
+
/* eslint-disable no-new */
|
2258
2680
|
|
2259
|
-
|
2260
|
-
|
2681
|
+
new Map([[frozenObject, null]]);
|
2682
|
+
new Set([frozenObject]);
|
2683
|
+
/* eslint-enable no-new */
|
2261
2684
|
} catch (e) {
|
2262
2685
|
}
|
2263
2686
|
}
|
@@ -2275,11 +2698,7 @@
|
|
2275
2698
|
|
2276
2699
|
exports.Children = Children;
|
2277
2700
|
exports.Component = Component;
|
2278
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
2279
|
-
exports.Profiler = REACT_PROFILER_TYPE;
|
2280
2701
|
exports.PureComponent = PureComponent;
|
2281
|
-
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
2282
|
-
exports.Suspense = REACT_SUSPENSE_TYPE;
|
2283
2702
|
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
2284
2703
|
exports.cloneElement = cloneElement$1;
|
2285
2704
|
exports.createContext = createContext;
|
@@ -2307,189 +2726,54 @@
|
|
2307
2726
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
|
2308
2727
|
|
2309
2728
|
/***/ }),
|
2310
|
-
/* 6
|
2729
|
+
/* 6 */,
|
2730
|
+
/* 7 */,
|
2731
|
+
/* 8 */,
|
2732
|
+
/* 9 */,
|
2733
|
+
/* 10 */,
|
2734
|
+
/* 11 */,
|
2735
|
+
/* 12 */,
|
2736
|
+
/* 13 */,
|
2737
|
+
/* 14 */,
|
2738
|
+
/* 15 */
|
2311
2739
|
/***/ (function(module, exports, __webpack_require__) {
|
2312
2740
|
|
2313
|
-
|
2741
|
+
/**
|
2314
2742
|
* Copyright (c) 2013-present, Facebook, Inc.
|
2315
2743
|
*
|
2316
2744
|
* This source code is licensed under the MIT license found in the
|
2317
2745
|
* LICENSE file in the root directory of this source tree.
|
2746
|
+
*
|
2318
2747
|
*/
|
2319
2748
|
|
2320
2749
|
'use strict';
|
2321
2750
|
|
2322
|
-
var
|
2323
|
-
|
2324
|
-
if (process.env.NODE_ENV !== 'production') {
|
2325
|
-
var ReactPropTypesSecret = __webpack_require__(7);
|
2326
|
-
var loggedTypeFailures = {};
|
2327
|
-
var has = __webpack_require__(8);
|
2751
|
+
var React = __webpack_require__(1);
|
2752
|
+
var factory = __webpack_require__(16);
|
2328
2753
|
|
2329
|
-
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2333
|
-
|
2334
|
-
try {
|
2335
|
-
// --- Welcome to debugging React ---
|
2336
|
-
// This error was thrown as a convenience so that you can use this stack
|
2337
|
-
// to find the callsite that caused this warning to fire.
|
2338
|
-
throw new Error(message);
|
2339
|
-
} catch (x) { /**/ }
|
2340
|
-
};
|
2754
|
+
if (typeof React === 'undefined') {
|
2755
|
+
throw Error(
|
2756
|
+
'create-react-class could not find the React object. If you are using script tags, ' +
|
2757
|
+
'make sure that React is being loaded before create-react-class.'
|
2758
|
+
);
|
2341
2759
|
}
|
2342
2760
|
|
2343
|
-
|
2344
|
-
|
2345
|
-
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2353
|
-
|
2354
|
-
|
2355
|
-
|
2356
|
-
|
2357
|
-
|
2358
|
-
|
2359
|
-
// Prop type validation may throw. In case they do, we don't want to
|
2360
|
-
// fail the render phase where it didn't fail before. So we log it.
|
2361
|
-
// After these have been cleaned up, we'll let them throw.
|
2362
|
-
try {
|
2363
|
-
// This is intentionally an invariant that gets caught. It's the same
|
2364
|
-
// behavior as without this statement except with a better message.
|
2365
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
2366
|
-
var err = Error(
|
2367
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
2368
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
2369
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
2370
|
-
);
|
2371
|
-
err.name = 'Invariant Violation';
|
2372
|
-
throw err;
|
2373
|
-
}
|
2374
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
2375
|
-
} catch (ex) {
|
2376
|
-
error = ex;
|
2377
|
-
}
|
2378
|
-
if (error && !(error instanceof Error)) {
|
2379
|
-
printWarning(
|
2380
|
-
(componentName || 'React class') + ': type specification of ' +
|
2381
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
2382
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
2383
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
2384
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
2385
|
-
'shape all require an argument).'
|
2386
|
-
);
|
2387
|
-
}
|
2388
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
2389
|
-
// Only monitor this failure once because there tends to be a lot of the
|
2390
|
-
// same error.
|
2391
|
-
loggedTypeFailures[error.message] = true;
|
2392
|
-
|
2393
|
-
var stack = getStack ? getStack() : '';
|
2394
|
-
|
2395
|
-
printWarning(
|
2396
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
2397
|
-
);
|
2398
|
-
}
|
2399
|
-
}
|
2400
|
-
}
|
2401
|
-
}
|
2402
|
-
}
|
2403
|
-
|
2404
|
-
/**
|
2405
|
-
* Resets warning cache when testing.
|
2406
|
-
*
|
2407
|
-
* @private
|
2408
|
-
*/
|
2409
|
-
checkPropTypes.resetWarningCache = function() {
|
2410
|
-
if (process.env.NODE_ENV !== 'production') {
|
2411
|
-
loggedTypeFailures = {};
|
2412
|
-
}
|
2413
|
-
}
|
2414
|
-
|
2415
|
-
module.exports = checkPropTypes;
|
2416
|
-
|
2417
|
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
|
2418
|
-
|
2419
|
-
/***/ }),
|
2420
|
-
/* 7 */
|
2421
|
-
/***/ (function(module, exports) {
|
2422
|
-
|
2423
|
-
/**
|
2424
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
2425
|
-
*
|
2426
|
-
* This source code is licensed under the MIT license found in the
|
2427
|
-
* LICENSE file in the root directory of this source tree.
|
2428
|
-
*/
|
2429
|
-
|
2430
|
-
'use strict';
|
2431
|
-
|
2432
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
2433
|
-
|
2434
|
-
module.exports = ReactPropTypesSecret;
|
2435
|
-
|
2436
|
-
|
2437
|
-
/***/ }),
|
2438
|
-
/* 8 */
|
2439
|
-
/***/ (function(module, exports) {
|
2440
|
-
|
2441
|
-
module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
2442
|
-
|
2443
|
-
|
2444
|
-
/***/ }),
|
2445
|
-
/* 9 */,
|
2446
|
-
/* 10 */,
|
2447
|
-
/* 11 */,
|
2448
|
-
/* 12 */,
|
2449
|
-
/* 13 */,
|
2450
|
-
/* 14 */,
|
2451
|
-
/* 15 */,
|
2452
|
-
/* 16 */,
|
2453
|
-
/* 17 */,
|
2454
|
-
/* 18 */
|
2455
|
-
/***/ (function(module, exports, __webpack_require__) {
|
2456
|
-
|
2457
|
-
/**
|
2458
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
2459
|
-
*
|
2460
|
-
* This source code is licensed under the MIT license found in the
|
2461
|
-
* LICENSE file in the root directory of this source tree.
|
2462
|
-
*
|
2463
|
-
*/
|
2464
|
-
|
2465
|
-
'use strict';
|
2466
|
-
|
2467
|
-
var React = __webpack_require__(1);
|
2468
|
-
var factory = __webpack_require__(19);
|
2469
|
-
|
2470
|
-
if (typeof React === 'undefined') {
|
2471
|
-
throw Error(
|
2472
|
-
'create-react-class could not find the React object. If you are using script tags, ' +
|
2473
|
-
'make sure that React is being loaded before create-react-class.'
|
2474
|
-
);
|
2475
|
-
}
|
2476
|
-
|
2477
|
-
// Hack to grab NoopUpdateQueue from isomorphic React
|
2478
|
-
var ReactNoopUpdateQueue = new React.Component().updater;
|
2479
|
-
|
2480
|
-
module.exports = factory(
|
2481
|
-
React.Component,
|
2482
|
-
React.isValidElement,
|
2483
|
-
ReactNoopUpdateQueue
|
2484
|
-
);
|
2485
|
-
|
2486
|
-
|
2487
|
-
/***/ }),
|
2488
|
-
/* 19 */
|
2489
|
-
/***/ (function(module, exports, __webpack_require__) {
|
2490
|
-
|
2491
|
-
/* WEBPACK VAR INJECTION */(function(process) {/**
|
2492
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
2761
|
+
// Hack to grab NoopUpdateQueue from isomorphic React
|
2762
|
+
var ReactNoopUpdateQueue = new React.Component().updater;
|
2763
|
+
|
2764
|
+
module.exports = factory(
|
2765
|
+
React.Component,
|
2766
|
+
React.isValidElement,
|
2767
|
+
ReactNoopUpdateQueue
|
2768
|
+
);
|
2769
|
+
|
2770
|
+
|
2771
|
+
/***/ }),
|
2772
|
+
/* 16 */
|
2773
|
+
/***/ (function(module, exports, __webpack_require__) {
|
2774
|
+
|
2775
|
+
/* WEBPACK VAR INJECTION */(function(process) {/**
|
2776
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
2493
2777
|
*
|
2494
2778
|
* This source code is licensed under the MIT license found in the
|
2495
2779
|
* LICENSE file in the root directory of this source tree.
|
@@ -3494,7 +3778,7 @@
|
|
3494
3778
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
|
3495
3779
|
|
3496
3780
|
/***/ }),
|
3497
|
-
/*
|
3781
|
+
/* 17 */
|
3498
3782
|
/***/ (function(module, exports, __webpack_require__) {
|
3499
3783
|
|
3500
3784
|
/* WEBPACK VAR INJECTION */(function(process) {/**
|
@@ -3505,12 +3789,12 @@
|
|
3505
3789
|
*/
|
3506
3790
|
|
3507
3791
|
if (process.env.NODE_ENV !== 'production') {
|
3508
|
-
var ReactIs = __webpack_require__(
|
3792
|
+
var ReactIs = __webpack_require__(18);
|
3509
3793
|
|
3510
3794
|
// By explicitly using `prop-types` you are opting into new development behavior.
|
3511
3795
|
// http://fb.me/prop-types-in-prod
|
3512
3796
|
var throwOnDirectAccess = true;
|
3513
|
-
module.exports = __webpack_require__(
|
3797
|
+
module.exports = __webpack_require__(21)(ReactIs.isElement, throwOnDirectAccess);
|
3514
3798
|
} else {
|
3515
3799
|
// By explicitly using `prop-types` you are opting into new production behavior.
|
3516
3800
|
// http://fb.me/prop-types-in-prod
|
@@ -3520,21 +3804,21 @@
|
|
3520
3804
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
|
3521
3805
|
|
3522
3806
|
/***/ }),
|
3523
|
-
/*
|
3807
|
+
/* 18 */
|
3524
3808
|
/***/ (function(module, exports, __webpack_require__) {
|
3525
3809
|
|
3526
3810
|
/* WEBPACK VAR INJECTION */(function(process) {'use strict';
|
3527
3811
|
|
3528
3812
|
if (process.env.NODE_ENV === 'production') {
|
3529
|
-
module.exports = __webpack_require__(
|
3813
|
+
module.exports = __webpack_require__(19);
|
3530
3814
|
} else {
|
3531
|
-
module.exports = __webpack_require__(
|
3815
|
+
module.exports = __webpack_require__(20);
|
3532
3816
|
}
|
3533
3817
|
|
3534
3818
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
|
3535
3819
|
|
3536
3820
|
/***/ }),
|
3537
|
-
/*
|
3821
|
+
/* 19 */
|
3538
3822
|
/***/ (function(module, exports) {
|
3539
3823
|
|
3540
3824
|
/** @license React v16.13.1
|
@@ -3555,7 +3839,7 @@
|
|
3555
3839
|
|
3556
3840
|
|
3557
3841
|
/***/ }),
|
3558
|
-
/*
|
3842
|
+
/* 20 */
|
3559
3843
|
/***/ (function(module, exports, __webpack_require__) {
|
3560
3844
|
|
3561
3845
|
/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.13.1
|
@@ -3743,7 +4027,7 @@
|
|
3743
4027
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
|
3744
4028
|
|
3745
4029
|
/***/ }),
|
3746
|
-
/*
|
4030
|
+
/* 21 */
|
3747
4031
|
/***/ (function(module, exports, __webpack_require__) {
|
3748
4032
|
|
3749
4033
|
/* WEBPACK VAR INJECTION */(function(process) {/**
|
@@ -3755,12 +4039,12 @@
|
|
3755
4039
|
|
3756
4040
|
'use strict';
|
3757
4041
|
|
3758
|
-
var ReactIs = __webpack_require__(
|
4042
|
+
var ReactIs = __webpack_require__(18);
|
3759
4043
|
var assign = __webpack_require__(4);
|
3760
4044
|
|
3761
|
-
var ReactPropTypesSecret = __webpack_require__(
|
3762
|
-
var has = __webpack_require__(
|
3763
|
-
var checkPropTypes = __webpack_require__(
|
4045
|
+
var ReactPropTypesSecret = __webpack_require__(22);
|
4046
|
+
var has = __webpack_require__(23);
|
4047
|
+
var checkPropTypes = __webpack_require__(24);
|
3764
4048
|
|
3765
4049
|
var printWarning = function() {};
|
3766
4050
|
|
@@ -4359,6 +4643,141 @@
|
|
4359
4643
|
|
4360
4644
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
|
4361
4645
|
|
4646
|
+
/***/ }),
|
4647
|
+
/* 22 */
|
4648
|
+
/***/ (function(module, exports) {
|
4649
|
+
|
4650
|
+
/**
|
4651
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
4652
|
+
*
|
4653
|
+
* This source code is licensed under the MIT license found in the
|
4654
|
+
* LICENSE file in the root directory of this source tree.
|
4655
|
+
*/
|
4656
|
+
|
4657
|
+
'use strict';
|
4658
|
+
|
4659
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
4660
|
+
|
4661
|
+
module.exports = ReactPropTypesSecret;
|
4662
|
+
|
4663
|
+
|
4664
|
+
/***/ }),
|
4665
|
+
/* 23 */
|
4666
|
+
/***/ (function(module, exports) {
|
4667
|
+
|
4668
|
+
module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
4669
|
+
|
4670
|
+
|
4671
|
+
/***/ }),
|
4672
|
+
/* 24 */
|
4673
|
+
/***/ (function(module, exports, __webpack_require__) {
|
4674
|
+
|
4675
|
+
/* WEBPACK VAR INJECTION */(function(process) {/**
|
4676
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
4677
|
+
*
|
4678
|
+
* This source code is licensed under the MIT license found in the
|
4679
|
+
* LICENSE file in the root directory of this source tree.
|
4680
|
+
*/
|
4681
|
+
|
4682
|
+
'use strict';
|
4683
|
+
|
4684
|
+
var printWarning = function() {};
|
4685
|
+
|
4686
|
+
if (process.env.NODE_ENV !== 'production') {
|
4687
|
+
var ReactPropTypesSecret = __webpack_require__(22);
|
4688
|
+
var loggedTypeFailures = {};
|
4689
|
+
var has = __webpack_require__(23);
|
4690
|
+
|
4691
|
+
printWarning = function(text) {
|
4692
|
+
var message = 'Warning: ' + text;
|
4693
|
+
if (typeof console !== 'undefined') {
|
4694
|
+
console.error(message);
|
4695
|
+
}
|
4696
|
+
try {
|
4697
|
+
// --- Welcome to debugging React ---
|
4698
|
+
// This error was thrown as a convenience so that you can use this stack
|
4699
|
+
// to find the callsite that caused this warning to fire.
|
4700
|
+
throw new Error(message);
|
4701
|
+
} catch (x) { /**/ }
|
4702
|
+
};
|
4703
|
+
}
|
4704
|
+
|
4705
|
+
/**
|
4706
|
+
* Assert that the values match with the type specs.
|
4707
|
+
* Error messages are memorized and will only be shown once.
|
4708
|
+
*
|
4709
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
4710
|
+
* @param {object} values Runtime values that need to be type-checked
|
4711
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
4712
|
+
* @param {string} componentName Name of the component for error messages.
|
4713
|
+
* @param {?Function} getStack Returns the component stack.
|
4714
|
+
* @private
|
4715
|
+
*/
|
4716
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
4717
|
+
if (process.env.NODE_ENV !== 'production') {
|
4718
|
+
for (var typeSpecName in typeSpecs) {
|
4719
|
+
if (has(typeSpecs, typeSpecName)) {
|
4720
|
+
var error;
|
4721
|
+
// Prop type validation may throw. In case they do, we don't want to
|
4722
|
+
// fail the render phase where it didn't fail before. So we log it.
|
4723
|
+
// After these have been cleaned up, we'll let them throw.
|
4724
|
+
try {
|
4725
|
+
// This is intentionally an invariant that gets caught. It's the same
|
4726
|
+
// behavior as without this statement except with a better message.
|
4727
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
4728
|
+
var err = Error(
|
4729
|
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
4730
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
4731
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
4732
|
+
);
|
4733
|
+
err.name = 'Invariant Violation';
|
4734
|
+
throw err;
|
4735
|
+
}
|
4736
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
4737
|
+
} catch (ex) {
|
4738
|
+
error = ex;
|
4739
|
+
}
|
4740
|
+
if (error && !(error instanceof Error)) {
|
4741
|
+
printWarning(
|
4742
|
+
(componentName || 'React class') + ': type specification of ' +
|
4743
|
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
4744
|
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
4745
|
+
'You may have forgotten to pass an argument to the type checker ' +
|
4746
|
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
4747
|
+
'shape all require an argument).'
|
4748
|
+
);
|
4749
|
+
}
|
4750
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
4751
|
+
// Only monitor this failure once because there tends to be a lot of the
|
4752
|
+
// same error.
|
4753
|
+
loggedTypeFailures[error.message] = true;
|
4754
|
+
|
4755
|
+
var stack = getStack ? getStack() : '';
|
4756
|
+
|
4757
|
+
printWarning(
|
4758
|
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
4759
|
+
);
|
4760
|
+
}
|
4761
|
+
}
|
4762
|
+
}
|
4763
|
+
}
|
4764
|
+
}
|
4765
|
+
|
4766
|
+
/**
|
4767
|
+
* Resets warning cache when testing.
|
4768
|
+
*
|
4769
|
+
* @private
|
4770
|
+
*/
|
4771
|
+
checkPropTypes.resetWarningCache = function() {
|
4772
|
+
if (process.env.NODE_ENV !== 'production') {
|
4773
|
+
loggedTypeFailures = {};
|
4774
|
+
}
|
4775
|
+
}
|
4776
|
+
|
4777
|
+
module.exports = checkPropTypes;
|
4778
|
+
|
4779
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
|
4780
|
+
|
4362
4781
|
/***/ }),
|
4363
4782
|
/* 25 */
|
4364
4783
|
/***/ (function(module, exports, __webpack_require__) {
|
@@ -4372,7 +4791,7 @@
|
|
4372
4791
|
|
4373
4792
|
'use strict';
|
4374
4793
|
|
4375
|
-
var ReactPropTypesSecret = __webpack_require__(
|
4794
|
+
var ReactPropTypesSecret = __webpack_require__(22);
|
4376
4795
|
|
4377
4796
|
function emptyFunction() {}
|
4378
4797
|
function emptyFunctionWithReset() {}
|
@@ -4448,7 +4867,7 @@
|
|
4448
4867
|
/* 27 */
|
4449
4868
|
/***/ (function(module, exports, __webpack_require__) {
|
4450
4869
|
|
4451
|
-
/** @license React
|
4870
|
+
/** @license React v17.0.2
|
4452
4871
|
* react-dom-server.browser.production.min.js
|
4453
4872
|
*
|
4454
4873
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -4456,59 +4875,56 @@
|
|
4456
4875
|
* This source code is licensed under the MIT license found in the
|
4457
4876
|
* LICENSE file in the root directory of this source tree.
|
4458
4877
|
*/
|
4459
|
-
|
4460
|
-
|
4461
|
-
|
4462
|
-
|
4463
|
-
|
4464
|
-
|
4465
|
-
function
|
4466
|
-
|
4467
|
-
|
4468
|
-
function
|
4469
|
-
"
|
4470
|
-
|
4471
|
-
|
4472
|
-
"
|
4473
|
-
|
4474
|
-
|
4475
|
-
function
|
4476
|
-
function
|
4477
|
-
|
4478
|
-
function
|
4479
|
-
function
|
4480
|
-
var
|
4481
|
-
|
4482
|
-
function
|
4483
|
-
|
4484
|
-
|
4485
|
-
|
4486
|
-
|
4487
|
-
|
4488
|
-
|
4489
|
-
|
4490
|
-
var
|
4491
|
-
|
4492
|
-
this.
|
4493
|
-
|
4494
|
-
|
4495
|
-
b
|
4496
|
-
|
4497
|
-
|
4498
|
-
|
4499
|
-
|
4500
|
-
|
4501
|
-
|
4502
|
-
!1;break b;default:y=!0}y?Xa.hasOwnProperty(z)||(n=z,n=ua(n)&&null!=m?n+'="'+(N(m)+'"'):""):n=ya(z,m);n&&(G+=" "+n)}}e||I&&(G+=' data-reactroot=""');var z=G;h="";La.hasOwnProperty(c)?z+="/>":(z+=">",h="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=N(e);break a}e=null}null!=e?(d=[],Ra.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(z+="\n"),z+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===
|
4503
|
-
f?Ka(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:h});this.previousWasTextNode=!1;return z};return a}(),ab={renderToString:function(a){a=new $a(a,!1);try{return a.read(Infinity)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=new $a(a,!0);try{return a.read(Infinity)}finally{a.destroy()}},renderToNodeStream:function(){throw Error(q(207));},renderToStaticNodeStream:function(){throw Error(q(208));
|
4504
|
-
},version:"16.14.0"};module.exports=ab.default||ab;
|
4878
|
+
'use strict';var l=__webpack_require__(4),m=__webpack_require__(1);function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
4879
|
+
var q=60106,r=60107,u=60108,z=60114,B=60109,aa=60110,ba=60112,D=60113,ca=60120,da=60115,ea=60116,fa=60121,ha=60117,ia=60119,ja=60129,ka=60131;
|
4880
|
+
if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;q=E("react.portal");r=E("react.fragment");u=E("react.strict_mode");z=E("react.profiler");B=E("react.provider");aa=E("react.context");ba=E("react.forward_ref");D=E("react.suspense");ca=E("react.suspense_list");da=E("react.memo");ea=E("react.lazy");fa=E("react.block");ha=E("react.fundamental");ia=E("react.scope");ja=E("react.debug_trace_mode");ka=E("react.legacy_hidden")}
|
4881
|
+
function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case r:return"Fragment";case q:return"Portal";case z:return"Profiler";case u:return"StrictMode";case D:return"Suspense";case ca:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case aa:return(a.displayName||"Context")+".Consumer";case B:return(a._context.displayName||"Context")+".Provider";case ba:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
|
4882
|
+
(""!==b?"ForwardRef("+b+")":"ForwardRef");case da:return F(a.type);case fa:return F(a._render);case ea:b=a._payload;a=a._init;try{return F(a(b))}catch(c){}}return null}var la=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ma={};function I(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function na(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return I(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=ma;return b}
|
4883
|
+
for(var J=new Uint16Array(16),K=0;15>K;K++)J[K]=K+1;J[15]=0;var oa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pa=Object.prototype.hasOwnProperty,qa={},ra={};
|
4884
|
+
function sa(a){if(pa.call(ra,a))return!0;if(pa.call(qa,a))return!1;if(oa.test(a))return ra[a]=!0;qa[a]=!0;return!1}function ta(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
|
4885
|
+
function ua(a,b,c,d){if(null===b||"undefined"===typeof b||ta(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function M(a,b,c,d,f,h,t){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=h;this.removeEmptyString=t}var N={};
|
4886
|
+
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){N[a]=new M(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];N[b]=new M(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){N[a]=new M(a,2,!1,a.toLowerCase(),null,!1,!1)});
|
4887
|
+
["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){N[a]=new M(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){N[a]=new M(a,3,!1,a.toLowerCase(),null,!1,!1)});
|
4888
|
+
["checked","multiple","muted","selected"].forEach(function(a){N[a]=new M(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){N[a]=new M(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){N[a]=new M(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){N[a]=new M(a,5,!1,a.toLowerCase(),null,!1,!1)});var va=/[\-:]([a-z])/g;function wa(a){return a[1].toUpperCase()}
|
4889
|
+
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(va,
|
4890
|
+
wa);N[b]=new M(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!1,!1)});
|
4891
|
+
N.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!0,!0)});var xa=/["'&<>]/;
|
4892
|
+
function O(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=xa.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}
|
4893
|
+
function ya(a,b){var c=N.hasOwnProperty(a)?N[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||ua(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(O(b)+'"')}return sa(a)?a+'="'+(O(b)+'"'):""}function za(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
|
4894
|
+
var Aa="function"===typeof Object.is?Object.is:za,P=null,Q=null,R=null,S=!1,T=!1,U=null,V=0;function W(){if(null===P)throw Error(p(321));return P}function Ba(){if(0<V)throw Error(p(312));return{memoizedState:null,queue:null,next:null}}function Ca(){null===R?null===Q?(S=!1,Q=R=Ba()):(S=!0,R=Q):null===R.next?(S=!1,R=R.next=Ba()):(S=!0,R=R.next);return R}function Da(a,b,c,d){for(;T;)T=!1,V+=1,R=null,c=a(b,d);Ea();return c}function Ea(){P=null;T=!1;Q=null;V=0;R=U=null}
|
4895
|
+
function Fa(a,b){return"function"===typeof b?b(a):b}function Ga(a,b,c){P=W();R=Ca();if(S){var d=R.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=R.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);R.memoizedState=d;return[d,b]}return[R.memoizedState,b]}a=a===Fa?"function"===typeof b?b():b:void 0!==c?c(b):b;R.memoizedState=a;a=R.queue={last:null,dispatch:null};a=a.dispatch=Ha.bind(null,P,a);return[R.memoizedState,a]}
|
4896
|
+
function Ia(a,b){P=W();R=Ca();b=void 0===b?null:b;if(null!==R){var c=R.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Aa(b[f],d[f])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();R.memoizedState=[a,b];return a}function Ha(a,b,c){if(!(25>V))throw Error(p(301));if(a===P)if(T=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ja(){}
|
4897
|
+
var X=null,Ka={readContext:function(a){var b=X.threadID;I(a,b);return a[b]},useContext:function(a){W();var b=X.threadID;I(a,b);return a[b]},useMemo:Ia,useReducer:Ga,useRef:function(a){P=W();R=Ca();var b=R.memoizedState;return null===b?(a={current:a},R.memoizedState=a):b},useState:function(a){return Ga(Fa,a)},useLayoutEffect:function(){},useCallback:function(a,b){return Ia(function(){return a},b)},useImperativeHandle:Ja,useEffect:Ja,useDebugValue:Ja,useDeferredValue:function(a){W();return a},useTransition:function(){W();
|
4898
|
+
return[function(a){a()},!1]},useOpaqueIdentifier:function(){return(X.identifierPrefix||"")+"R:"+(X.uniqueID++).toString(36)},useMutableSource:function(a,b){W();return b(a._source)}},La={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Ma(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
|
4899
|
+
var Na={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Oa=l({menuitem:!0},Na),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
|
4900
|
+
gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pa=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});
|
4901
|
+
var Qa=/([A-Z])/g,Ra=/^ms-/,Z=m.Children.toArray,Sa=la.ReactCurrentDispatcher,Ta={listing:!0,pre:!0,textarea:!0},Ua=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Va={},Wa={};function Xa(a){if(void 0===a||null===a)return a;var b="";m.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Ya=Object.prototype.hasOwnProperty,Za={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function $a(a,b){if(void 0===a)throw Error(p(152,F(b)||"Component"));}
|
4902
|
+
function ab(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=na(h,b,c,e),t=[],g=!1,n={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===t)return null},enqueueReplaceState:function(a,c){g=!0;t=[c]},enqueueSetState:function(a,c){if(null===t)return null;t.push(c)}};if(e){if(e=new h(d.props,f,n),"function"===typeof h.getDerivedStateFromProps){var k=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=k&&(e.state=l({},e.state,k))}}else if(P={},e=h(d.props,
|
4903
|
+
f,n),e=Da(h,d.props,e,f),null==e||null==e.render){a=e;$a(a,h);return}e.props=d.props;e.context=f;e.updater=n;n=e.state;void 0===n&&(e.state=n=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),t.length){n=t;var v=
|
4904
|
+
g;t=null;g=!1;if(v&&1===n.length)e.state=n[0];else{k=v?n[0]:e.state;var H=!0;for(v=v?1:0;v<n.length;v++){var x=n[v];x="function"===typeof x?x.call(e,k,d.props,f):x;null!=x&&(H?(H=!1,k=l({},k,x)):l(k,x))}e.state=k}}else t=null;a=e.render();$a(a,h);if("function"===typeof e.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var y=e.getChildContext();for(var A in y)if(!(A in d))throw Error(p(108,F(h)||"Unknown",A));}y&&(b=l({},b,y))}for(;m.isValidElement(a);){var f=a,h=f.type;if("function"!==
|
4905
|
+
typeof h)break;d(f,h)}return{child:a,context:b}}
|
4906
|
+
var bb=function(){function a(a,b,f){m.isValidElement(a)?a.type!==r?a=[a]:(a=a.props.children,a=m.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:La.html,children:a,childIndex:0,context:ma,footer:""};var c=J[0];if(0===c){var d=J;c=d.length;var g=2*c;if(!(65536>=g))throw Error(p(304));var e=new Uint16Array(g);e.set(d);J=e;J[0]=c+1;for(d=c;d<g-1;d++)J[d]=d+1;J[g-1]=0}else J[0]=J[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;
|
4907
|
+
this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||""}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;J[a]=J[0];J[0]=a}};b.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;I(c,h);var t=c[h];this.contextStack[b]=c;this.contextValueStack[b]=t;c[h]=a.props.value};b.popProvider=
|
4908
|
+
function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this;var c=Sa.current;Sa.current=Ka;try{for(var h=[""],t=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var g=this.threadID;
|
4909
|
+
J[g]=J[0];J[0]=g;break}var e=this.stack[this.stack.length-1];if(t||e.childIndex>=e.children.length){var L=e.footer;""!==L&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===B)this.popProvider(e.type);else if(e.type===D){this.suspenseDepth--;var G=h.pop();if(t){t=!1;var C=e.fallbackFrame;if(!C)throw Error(p(303));this.stack.push(C);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=
|
4910
|
+
G}h[this.suspenseDepth]+=L}else{var n=e.children[e.childIndex++],k="";try{k+=this.render(n,e.context,e.domNamespace)}catch(v){if(null!=v&&"function"===typeof v.then)throw Error(p(294));throw v;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=k}}return h[0]}finally{Sa.current=c,X=b,Ea()}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return O(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+O(f);
|
4911
|
+
this.previousWasTextNode=!0;return O(f)}b=ab(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return"";if(!m.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===q)throw Error(p(257));throw Error(p(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case ka:case ja:case u:case z:case ca:case r:return a=Z(a.props.children),this.stack.push({type:null,
|
4912
|
+
domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case D:throw Error(p(294));case ia:throw Error(p(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ba:P={};var d=c.render(a.props,a.ref);d=Da(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return"";case da:return a=[m.createElement(c.type,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
|
4913
|
+
"";case B:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case aa:c=a.type;d=a.props;var g=this.threadID;I(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";case ha:throw Error(p(338));case ea:return c=a.type,d=c._init,c=d(c._payload),a=[m.createElement(c,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,
|
4914
|
+
context:b,footer:""}),""}throw Error(p(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===La.html&&Ma(c);if(!Va.hasOwnProperty(c)){if(!Ua.test(c))throw Error(p(65,c));Va[c]=!0}var d=a.props;if("input"===c)d=l({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=
|
4915
|
+
g)throw Error(p(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(p(93));e=e[0]}g=""+e}null==g&&(g="")}d=l({},d,{value:void 0,children:""+g})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=l({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var L=Xa(d.children);if(null!=e){var G=null!=d.value?d.value+"":L;g=!1;if(Array.isArray(e))for(var C=0;C<e.length;C++){if(""+e[C]===G){g=!0;break}}else g=""+e===G;d=l({selected:void 0,children:void 0},
|
4916
|
+
d,{selected:g,children:L})}}if(g=d){if(Oa[c]&&(null!=g.children||null!=g.dangerouslySetInnerHTML))throw Error(p(137,c));if(null!=g.dangerouslySetInnerHTML){if(null!=g.children)throw Error(p(60));if(!("object"===typeof g.dangerouslySetInnerHTML&&"__html"in g.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=g.style&&"object"!==typeof g.style)throw Error(p(62));}g=d;e=this.makeStaticMarkup;L=1===this.stack.length;G="<"+a.type;b:if(-1===c.indexOf("-"))C="string"===typeof g.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":C=
|
4917
|
+
!1;break b;default:C=!0}for(w in g)if(Ya.call(g,w)){var n=g[w];if(null!=n){if("style"===w){var k=void 0,v="",H="";for(k in n)if(n.hasOwnProperty(k)){var x=0===k.indexOf("--"),y=n[k];if(null!=y){if(x)var A=k;else if(A=k,Wa.hasOwnProperty(A))A=Wa[A];else{var cb=A.replace(Qa,"-$1").toLowerCase().replace(Ra,"-ms-");A=Wa[A]=cb}v+=H+A+":";H=k;x=null==y||"boolean"===typeof y||""===y?"":x||"number"!==typeof y||0===y||Y.hasOwnProperty(H)&&Y[H]?(""+y).trim():y+"px";v+=x;H=";"}}n=v||null}k=null;C?Za.hasOwnProperty(w)||
|
4918
|
+
(k=w,k=sa(k)&&null!=n?k+'="'+(O(n)+'"'):""):k=ya(w,n);k&&(G+=" "+k)}}e||L&&(G+=' data-reactroot=""');var w=G;g="";Na.hasOwnProperty(c)?w+="/>":(w+=">",g="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=O(e);break a}e=null}null!=e?(d=[],Ta.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(w+="\n"),w+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?Ma(a):"http://www.w3.org/2000/svg"===
|
4919
|
+
f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=!1;return w};return a}();exports.renderToNodeStream=function(){throw Error(p(207));};exports.renderToStaticMarkup=function(a,b){a=new bb(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};exports.renderToStaticNodeStream=function(){throw Error(p(208));};exports.renderToString=function(a,b){a=new bb(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};
|
4920
|
+
exports.version="17.0.2";
|
4505
4921
|
|
4506
4922
|
|
4507
4923
|
/***/ }),
|
4508
4924
|
/* 28 */
|
4509
4925
|
/***/ (function(module, exports, __webpack_require__) {
|
4510
4926
|
|
4511
|
-
/* WEBPACK VAR INJECTION */(function(process) {/** @license React
|
4927
|
+
/* WEBPACK VAR INJECTION */(function(process) {/** @license React v17.0.2
|
4512
4928
|
* react-dom-server.browser.development.js
|
4513
4929
|
*
|
4514
4930
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -4519,15 +4935,12 @@
|
|
4519
4935
|
|
4520
4936
|
'use strict';
|
4521
4937
|
|
4522
|
-
|
4523
|
-
|
4524
4938
|
if (process.env.NODE_ENV !== "production") {
|
4525
4939
|
(function() {
|
4526
4940
|
'use strict';
|
4527
4941
|
|
4528
4942
|
var React = __webpack_require__(1);
|
4529
4943
|
var _assign = __webpack_require__(4);
|
4530
|
-
var checkPropTypes = __webpack_require__(6);
|
4531
4944
|
|
4532
4945
|
// Do not require this module directly! Use normal `invariant` calls with
|
4533
4946
|
// template literal strings. The messages will be replaced with error codes
|
@@ -4542,23 +4955,10 @@
|
|
4542
4955
|
return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
|
4543
4956
|
}
|
4544
4957
|
|
4545
|
-
|
4546
|
-
|
4547
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
|
4548
|
-
// Current owner and dispatcher used to share the same ref,
|
4549
|
-
// but PR #14548 split them out to better support the react-debug-tools package.
|
4550
|
-
|
4551
|
-
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
|
4552
|
-
ReactSharedInternals.ReactCurrentDispatcher = {
|
4553
|
-
current: null
|
4554
|
-
};
|
4555
|
-
}
|
4958
|
+
// TODO: this is special because it gets imported during build.
|
4959
|
+
var ReactVersion = '17.0.2';
|
4556
4960
|
|
4557
|
-
|
4558
|
-
ReactSharedInternals.ReactCurrentBatchConfig = {
|
4559
|
-
suspense: null
|
4560
|
-
};
|
4561
|
-
}
|
4961
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
4562
4962
|
|
4563
4963
|
// by calls to these methods by a Babel plugin.
|
4564
4964
|
//
|
@@ -4588,16 +4988,12 @@
|
|
4588
4988
|
// When changing this logic, you might want to also
|
4589
4989
|
// update consoleWithStackDev.www.js as well.
|
4590
4990
|
{
|
4591
|
-
var
|
4991
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
4992
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
4592
4993
|
|
4593
|
-
if (
|
4594
|
-
|
4595
|
-
|
4596
|
-
|
4597
|
-
if (stack !== '') {
|
4598
|
-
format += '%s';
|
4599
|
-
args = args.concat([stack]);
|
4600
|
-
}
|
4994
|
+
if (stack !== '') {
|
4995
|
+
format += '%s';
|
4996
|
+
args = args.concat([stack]);
|
4601
4997
|
}
|
4602
4998
|
|
4603
4999
|
var argsWithFormat = args.map(function (item) {
|
@@ -4609,195 +5005,551 @@
|
|
4609
5005
|
// eslint-disable-next-line react-internal/no-production-logging
|
4610
5006
|
|
4611
5007
|
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
4612
|
-
|
4613
|
-
try {
|
4614
|
-
// --- Welcome to debugging React ---
|
4615
|
-
// This error was thrown as a convenience so that you can use this stack
|
4616
|
-
// to find the callsite that caused this warning to fire.
|
4617
|
-
var argIndex = 0;
|
4618
|
-
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
4619
|
-
return args[argIndex++];
|
4620
|
-
});
|
4621
|
-
throw new Error(message);
|
4622
|
-
} catch (x) {}
|
4623
5008
|
}
|
4624
5009
|
}
|
4625
5010
|
|
5011
|
+
// ATTENTION
|
5012
|
+
// When adding new symbols to this file,
|
5013
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
4626
5014
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
4627
5015
|
// nor polyfill, then a plain number is used for performance.
|
4628
|
-
var
|
4629
|
-
var REACT_PORTAL_TYPE =
|
4630
|
-
var REACT_FRAGMENT_TYPE =
|
4631
|
-
var REACT_STRICT_MODE_TYPE =
|
4632
|
-
var REACT_PROFILER_TYPE =
|
4633
|
-
var REACT_PROVIDER_TYPE =
|
4634
|
-
var REACT_CONTEXT_TYPE =
|
4635
|
-
var
|
4636
|
-
var
|
4637
|
-
var
|
4638
|
-
var
|
4639
|
-
var
|
4640
|
-
var
|
4641
|
-
var
|
4642
|
-
var REACT_FUNDAMENTAL_TYPE =
|
4643
|
-
var REACT_SCOPE_TYPE =
|
5016
|
+
var REACT_ELEMENT_TYPE = 0xeac7;
|
5017
|
+
var REACT_PORTAL_TYPE = 0xeaca;
|
5018
|
+
var REACT_FRAGMENT_TYPE = 0xeacb;
|
5019
|
+
var REACT_STRICT_MODE_TYPE = 0xeacc;
|
5020
|
+
var REACT_PROFILER_TYPE = 0xead2;
|
5021
|
+
var REACT_PROVIDER_TYPE = 0xeacd;
|
5022
|
+
var REACT_CONTEXT_TYPE = 0xeace;
|
5023
|
+
var REACT_FORWARD_REF_TYPE = 0xead0;
|
5024
|
+
var REACT_SUSPENSE_TYPE = 0xead1;
|
5025
|
+
var REACT_SUSPENSE_LIST_TYPE = 0xead8;
|
5026
|
+
var REACT_MEMO_TYPE = 0xead3;
|
5027
|
+
var REACT_LAZY_TYPE = 0xead4;
|
5028
|
+
var REACT_BLOCK_TYPE = 0xead9;
|
5029
|
+
var REACT_SERVER_BLOCK_TYPE = 0xeada;
|
5030
|
+
var REACT_FUNDAMENTAL_TYPE = 0xead5;
|
5031
|
+
var REACT_SCOPE_TYPE = 0xead7;
|
5032
|
+
var REACT_OPAQUE_ID_TYPE = 0xeae0;
|
5033
|
+
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
|
5034
|
+
var REACT_OFFSCREEN_TYPE = 0xeae2;
|
5035
|
+
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
|
5036
|
+
|
5037
|
+
if (typeof Symbol === 'function' && Symbol.for) {
|
5038
|
+
var symbolFor = Symbol.for;
|
5039
|
+
REACT_ELEMENT_TYPE = symbolFor('react.element');
|
5040
|
+
REACT_PORTAL_TYPE = symbolFor('react.portal');
|
5041
|
+
REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
|
5042
|
+
REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
|
5043
|
+
REACT_PROFILER_TYPE = symbolFor('react.profiler');
|
5044
|
+
REACT_PROVIDER_TYPE = symbolFor('react.provider');
|
5045
|
+
REACT_CONTEXT_TYPE = symbolFor('react.context');
|
5046
|
+
REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
|
5047
|
+
REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
|
5048
|
+
REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
|
5049
|
+
REACT_MEMO_TYPE = symbolFor('react.memo');
|
5050
|
+
REACT_LAZY_TYPE = symbolFor('react.lazy');
|
5051
|
+
REACT_BLOCK_TYPE = symbolFor('react.block');
|
5052
|
+
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
|
5053
|
+
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
|
5054
|
+
REACT_SCOPE_TYPE = symbolFor('react.scope');
|
5055
|
+
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
|
5056
|
+
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
|
5057
|
+
REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
|
5058
|
+
REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
|
5059
|
+
}
|
4644
5060
|
|
4645
|
-
|
4646
|
-
|
4647
|
-
|
4648
|
-
|
4649
|
-
|
4650
|
-
|
4651
|
-
|
4652
|
-
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4656
|
-
|
4657
|
-
|
4658
|
-
|
4659
|
-
|
4660
|
-
|
5061
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
5062
|
+
var functionName = innerType.displayName || innerType.name || '';
|
5063
|
+
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
|
5064
|
+
}
|
5065
|
+
|
5066
|
+
function getContextName(type) {
|
5067
|
+
return type.displayName || 'Context';
|
5068
|
+
}
|
5069
|
+
|
5070
|
+
function getComponentName(type) {
|
5071
|
+
if (type == null) {
|
5072
|
+
// Host root, text node or just invalid type.
|
5073
|
+
return null;
|
5074
|
+
}
|
5075
|
+
|
5076
|
+
{
|
5077
|
+
if (typeof type.tag === 'number') {
|
5078
|
+
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
5079
|
+
}
|
5080
|
+
}
|
5081
|
+
|
5082
|
+
if (typeof type === 'function') {
|
5083
|
+
return type.displayName || type.name || null;
|
5084
|
+
}
|
5085
|
+
|
5086
|
+
if (typeof type === 'string') {
|
5087
|
+
return type;
|
5088
|
+
}
|
5089
|
+
|
5090
|
+
switch (type) {
|
5091
|
+
case REACT_FRAGMENT_TYPE:
|
5092
|
+
return 'Fragment';
|
5093
|
+
|
5094
|
+
case REACT_PORTAL_TYPE:
|
5095
|
+
return 'Portal';
|
5096
|
+
|
5097
|
+
case REACT_PROFILER_TYPE:
|
5098
|
+
return 'Profiler';
|
5099
|
+
|
5100
|
+
case REACT_STRICT_MODE_TYPE:
|
5101
|
+
return 'StrictMode';
|
5102
|
+
|
5103
|
+
case REACT_SUSPENSE_TYPE:
|
5104
|
+
return 'Suspense';
|
5105
|
+
|
5106
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
5107
|
+
return 'SuspenseList';
|
5108
|
+
}
|
5109
|
+
|
5110
|
+
if (typeof type === 'object') {
|
5111
|
+
switch (type.$$typeof) {
|
5112
|
+
case REACT_CONTEXT_TYPE:
|
5113
|
+
var context = type;
|
5114
|
+
return getContextName(context) + '.Consumer';
|
5115
|
+
|
5116
|
+
case REACT_PROVIDER_TYPE:
|
5117
|
+
var provider = type;
|
5118
|
+
return getContextName(provider._context) + '.Provider';
|
5119
|
+
|
5120
|
+
case REACT_FORWARD_REF_TYPE:
|
5121
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
5122
|
+
|
5123
|
+
case REACT_MEMO_TYPE:
|
5124
|
+
return getComponentName(type.type);
|
5125
|
+
|
5126
|
+
case REACT_BLOCK_TYPE:
|
5127
|
+
return getComponentName(type._render);
|
5128
|
+
|
5129
|
+
case REACT_LAZY_TYPE:
|
5130
|
+
{
|
5131
|
+
var lazyComponent = type;
|
5132
|
+
var payload = lazyComponent._payload;
|
5133
|
+
var init = lazyComponent._init;
|
5134
|
+
|
5135
|
+
try {
|
5136
|
+
return getComponentName(init(payload));
|
5137
|
+
} catch (x) {
|
5138
|
+
return null;
|
5139
|
+
}
|
5140
|
+
}
|
5141
|
+
}
|
5142
|
+
}
|
5143
|
+
|
5144
|
+
return null;
|
5145
|
+
}
|
5146
|
+
|
5147
|
+
// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
|
5148
|
+
|
5149
|
+
var enableSuspenseServerRenderer = false;
|
5150
|
+
|
5151
|
+
// Helpers to patch console.logs to avoid logging during side-effect free
|
5152
|
+
// replaying on render function. This currently only patches the object
|
5153
|
+
// lazily which won't cover if the log function was extracted eagerly.
|
5154
|
+
// We could also eagerly patch the method.
|
5155
|
+
var disabledDepth = 0;
|
5156
|
+
var prevLog;
|
5157
|
+
var prevInfo;
|
5158
|
+
var prevWarn;
|
5159
|
+
var prevError;
|
5160
|
+
var prevGroup;
|
5161
|
+
var prevGroupCollapsed;
|
5162
|
+
var prevGroupEnd;
|
5163
|
+
|
5164
|
+
function disabledLog() {}
|
5165
|
+
|
5166
|
+
disabledLog.__reactDisabledLog = true;
|
5167
|
+
function disableLogs() {
|
5168
|
+
{
|
5169
|
+
if (disabledDepth === 0) {
|
5170
|
+
/* eslint-disable react-internal/no-production-logging */
|
5171
|
+
prevLog = console.log;
|
5172
|
+
prevInfo = console.info;
|
5173
|
+
prevWarn = console.warn;
|
5174
|
+
prevError = console.error;
|
5175
|
+
prevGroup = console.group;
|
5176
|
+
prevGroupCollapsed = console.groupCollapsed;
|
5177
|
+
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
5178
|
+
|
5179
|
+
var props = {
|
5180
|
+
configurable: true,
|
5181
|
+
enumerable: true,
|
5182
|
+
value: disabledLog,
|
5183
|
+
writable: true
|
5184
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
5185
|
+
|
5186
|
+
Object.defineProperties(console, {
|
5187
|
+
info: props,
|
5188
|
+
log: props,
|
5189
|
+
warn: props,
|
5190
|
+
error: props,
|
5191
|
+
group: props,
|
5192
|
+
groupCollapsed: props,
|
5193
|
+
groupEnd: props
|
5194
|
+
});
|
5195
|
+
/* eslint-enable react-internal/no-production-logging */
|
5196
|
+
}
|
5197
|
+
|
5198
|
+
disabledDepth++;
|
5199
|
+
}
|
5200
|
+
}
|
5201
|
+
function reenableLogs() {
|
5202
|
+
{
|
5203
|
+
disabledDepth--;
|
5204
|
+
|
5205
|
+
if (disabledDepth === 0) {
|
5206
|
+
/* eslint-disable react-internal/no-production-logging */
|
5207
|
+
var props = {
|
5208
|
+
configurable: true,
|
5209
|
+
enumerable: true,
|
5210
|
+
writable: true
|
5211
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
5212
|
+
|
5213
|
+
Object.defineProperties(console, {
|
5214
|
+
log: _assign({}, props, {
|
5215
|
+
value: prevLog
|
5216
|
+
}),
|
5217
|
+
info: _assign({}, props, {
|
5218
|
+
value: prevInfo
|
5219
|
+
}),
|
5220
|
+
warn: _assign({}, props, {
|
5221
|
+
value: prevWarn
|
5222
|
+
}),
|
5223
|
+
error: _assign({}, props, {
|
5224
|
+
value: prevError
|
5225
|
+
}),
|
5226
|
+
group: _assign({}, props, {
|
5227
|
+
value: prevGroup
|
5228
|
+
}),
|
5229
|
+
groupCollapsed: _assign({}, props, {
|
5230
|
+
value: prevGroupCollapsed
|
5231
|
+
}),
|
5232
|
+
groupEnd: _assign({}, props, {
|
5233
|
+
value: prevGroupEnd
|
5234
|
+
})
|
5235
|
+
});
|
5236
|
+
/* eslint-enable react-internal/no-production-logging */
|
5237
|
+
}
|
5238
|
+
|
5239
|
+
if (disabledDepth < 0) {
|
5240
|
+
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
5241
|
+
}
|
5242
|
+
}
|
5243
|
+
}
|
5244
|
+
|
5245
|
+
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
5246
|
+
var prefix;
|
5247
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
5248
|
+
{
|
5249
|
+
if (prefix === undefined) {
|
5250
|
+
// Extract the VM specific prefix used by each line.
|
5251
|
+
try {
|
5252
|
+
throw Error();
|
5253
|
+
} catch (x) {
|
5254
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
5255
|
+
prefix = match && match[1] || '';
|
5256
|
+
}
|
5257
|
+
} // We use the prefix to ensure our stacks line up with native stack frames.
|
5258
|
+
|
5259
|
+
|
5260
|
+
return '\n' + prefix + name;
|
5261
|
+
}
|
5262
|
+
}
|
5263
|
+
var reentry = false;
|
5264
|
+
var componentFrameCache;
|
5265
|
+
|
5266
|
+
{
|
5267
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
5268
|
+
componentFrameCache = new PossiblyWeakMap();
|
5269
|
+
}
|
5270
|
+
|
5271
|
+
function describeNativeComponentFrame(fn, construct) {
|
5272
|
+
// If something asked for a stack inside a fake render, it should get ignored.
|
5273
|
+
if (!fn || reentry) {
|
5274
|
+
return '';
|
5275
|
+
}
|
5276
|
+
|
5277
|
+
{
|
5278
|
+
var frame = componentFrameCache.get(fn);
|
5279
|
+
|
5280
|
+
if (frame !== undefined) {
|
5281
|
+
return frame;
|
5282
|
+
}
|
5283
|
+
}
|
5284
|
+
|
5285
|
+
var control;
|
5286
|
+
reentry = true;
|
5287
|
+
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
5288
|
+
|
5289
|
+
Error.prepareStackTrace = undefined;
|
5290
|
+
var previousDispatcher;
|
5291
|
+
|
5292
|
+
{
|
5293
|
+
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
5294
|
+
// for warnings.
|
5295
|
+
|
5296
|
+
ReactCurrentDispatcher.current = null;
|
5297
|
+
disableLogs();
|
5298
|
+
}
|
5299
|
+
|
5300
|
+
try {
|
5301
|
+
// This should throw.
|
5302
|
+
if (construct) {
|
5303
|
+
// Something should be setting the props in the constructor.
|
5304
|
+
var Fake = function () {
|
5305
|
+
throw Error();
|
5306
|
+
}; // $FlowFixMe
|
5307
|
+
|
5308
|
+
|
5309
|
+
Object.defineProperty(Fake.prototype, 'props', {
|
5310
|
+
set: function () {
|
5311
|
+
// We use a throwing setter instead of frozen or non-writable props
|
5312
|
+
// because that won't throw in a non-strict mode function.
|
5313
|
+
throw Error();
|
5314
|
+
}
|
5315
|
+
});
|
4661
5316
|
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4665
|
-
|
5317
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
5318
|
+
// We construct a different control for this case to include any extra
|
5319
|
+
// frames added by the construct call.
|
5320
|
+
try {
|
5321
|
+
Reflect.construct(Fake, []);
|
5322
|
+
} catch (x) {
|
5323
|
+
control = x;
|
5324
|
+
}
|
5325
|
+
|
5326
|
+
Reflect.construct(fn, [], Fake);
|
5327
|
+
} else {
|
5328
|
+
try {
|
5329
|
+
Fake.call();
|
5330
|
+
} catch (x) {
|
5331
|
+
control = x;
|
4666
5332
|
}
|
4667
5333
|
|
4668
|
-
|
4669
|
-
lazyComponent._result = defaultExport;
|
5334
|
+
fn.call(Fake.prototype);
|
4670
5335
|
}
|
4671
|
-
}
|
4672
|
-
|
4673
|
-
|
4674
|
-
|
5336
|
+
} else {
|
5337
|
+
try {
|
5338
|
+
throw Error();
|
5339
|
+
} catch (x) {
|
5340
|
+
control = x;
|
5341
|
+
}
|
5342
|
+
|
5343
|
+
fn();
|
5344
|
+
}
|
5345
|
+
} catch (sample) {
|
5346
|
+
// This is inlined manually because closure doesn't do it for us.
|
5347
|
+
if (sample && control && typeof sample.stack === 'string') {
|
5348
|
+
// This extracts the first frame from the sample that isn't also in the control.
|
5349
|
+
// Skipping one frame that we assume is the frame that calls the two.
|
5350
|
+
var sampleLines = sample.stack.split('\n');
|
5351
|
+
var controlLines = control.stack.split('\n');
|
5352
|
+
var s = sampleLines.length - 1;
|
5353
|
+
var c = controlLines.length - 1;
|
5354
|
+
|
5355
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
5356
|
+
// We expect at least one stack frame to be shared.
|
5357
|
+
// Typically this will be the root most one. However, stack frames may be
|
5358
|
+
// cut off due to maximum stack limits. In this case, one maybe cut off
|
5359
|
+
// earlier than the other. We assume that the sample is longer or the same
|
5360
|
+
// and there for cut off earlier. So we should find the root most frame in
|
5361
|
+
// the sample somewhere in the control.
|
5362
|
+
c--;
|
5363
|
+
}
|
5364
|
+
|
5365
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
5366
|
+
// Next we find the first one that isn't the same which should be the
|
5367
|
+
// frame that called our sample function and the control.
|
5368
|
+
if (sampleLines[s] !== controlLines[c]) {
|
5369
|
+
// In V8, the first line is describing the message but other VMs don't.
|
5370
|
+
// If we're about to return the first line, and the control is also on the same
|
5371
|
+
// line, that's a pretty good indicator that our sample threw at same line as
|
5372
|
+
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
5373
|
+
// This can happen if you passed a class to function component, or non-function.
|
5374
|
+
if (s !== 1 || c !== 1) {
|
5375
|
+
do {
|
5376
|
+
s--;
|
5377
|
+
c--; // We may still have similar intermediate frames from the construct call.
|
5378
|
+
// The next one that isn't the same should be our match though.
|
5379
|
+
|
5380
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
5381
|
+
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
5382
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
|
5383
|
+
|
5384
|
+
{
|
5385
|
+
if (typeof fn === 'function') {
|
5386
|
+
componentFrameCache.set(fn, _frame);
|
5387
|
+
}
|
5388
|
+
} // Return the line we found.
|
5389
|
+
|
5390
|
+
|
5391
|
+
return _frame;
|
5392
|
+
}
|
5393
|
+
} while (s >= 1 && c >= 0);
|
5394
|
+
}
|
5395
|
+
|
5396
|
+
break;
|
5397
|
+
}
|
4675
5398
|
}
|
4676
|
-
}
|
5399
|
+
}
|
5400
|
+
} finally {
|
5401
|
+
reentry = false;
|
5402
|
+
|
5403
|
+
{
|
5404
|
+
ReactCurrentDispatcher.current = previousDispatcher;
|
5405
|
+
reenableLogs();
|
5406
|
+
}
|
5407
|
+
|
5408
|
+
Error.prepareStackTrace = previousPrepareStackTrace;
|
5409
|
+
} // Fallback to just using the name if we couldn't make it throw.
|
5410
|
+
|
5411
|
+
|
5412
|
+
var name = fn ? fn.displayName || fn.name : '';
|
5413
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
5414
|
+
|
5415
|
+
{
|
5416
|
+
if (typeof fn === 'function') {
|
5417
|
+
componentFrameCache.set(fn, syntheticFrame);
|
5418
|
+
}
|
5419
|
+
}
|
5420
|
+
|
5421
|
+
return syntheticFrame;
|
5422
|
+
}
|
5423
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
5424
|
+
{
|
5425
|
+
return describeNativeComponentFrame(fn, false);
|
4677
5426
|
}
|
4678
5427
|
}
|
4679
5428
|
|
4680
|
-
function
|
4681
|
-
var
|
4682
|
-
return
|
5429
|
+
function shouldConstruct(Component) {
|
5430
|
+
var prototype = Component.prototype;
|
5431
|
+
return !!(prototype && prototype.isReactComponent);
|
4683
5432
|
}
|
4684
5433
|
|
4685
|
-
function
|
4686
|
-
if (type == null) {
|
4687
|
-
// Host root, text node or just invalid type.
|
4688
|
-
return null;
|
4689
|
-
}
|
5434
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
4690
5435
|
|
4691
|
-
{
|
4692
|
-
|
4693
|
-
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
4694
|
-
}
|
5436
|
+
if (type == null) {
|
5437
|
+
return '';
|
4695
5438
|
}
|
4696
5439
|
|
4697
5440
|
if (typeof type === 'function') {
|
4698
|
-
|
5441
|
+
{
|
5442
|
+
return describeNativeComponentFrame(type, shouldConstruct(type));
|
5443
|
+
}
|
4699
5444
|
}
|
4700
5445
|
|
4701
5446
|
if (typeof type === 'string') {
|
4702
|
-
return type;
|
5447
|
+
return describeBuiltInComponentFrame(type);
|
4703
5448
|
}
|
4704
5449
|
|
4705
5450
|
switch (type) {
|
4706
|
-
case REACT_FRAGMENT_TYPE:
|
4707
|
-
return 'Fragment';
|
4708
|
-
|
4709
|
-
case REACT_PORTAL_TYPE:
|
4710
|
-
return 'Portal';
|
4711
|
-
|
4712
|
-
case REACT_PROFILER_TYPE:
|
4713
|
-
return "Profiler";
|
4714
|
-
|
4715
|
-
case REACT_STRICT_MODE_TYPE:
|
4716
|
-
return 'StrictMode';
|
4717
|
-
|
4718
5451
|
case REACT_SUSPENSE_TYPE:
|
4719
|
-
return 'Suspense';
|
5452
|
+
return describeBuiltInComponentFrame('Suspense');
|
4720
5453
|
|
4721
5454
|
case REACT_SUSPENSE_LIST_TYPE:
|
4722
|
-
return 'SuspenseList';
|
5455
|
+
return describeBuiltInComponentFrame('SuspenseList');
|
4723
5456
|
}
|
4724
5457
|
|
4725
5458
|
if (typeof type === 'object') {
|
4726
5459
|
switch (type.$$typeof) {
|
4727
|
-
case REACT_CONTEXT_TYPE:
|
4728
|
-
return 'Context.Consumer';
|
4729
|
-
|
4730
|
-
case REACT_PROVIDER_TYPE:
|
4731
|
-
return 'Context.Provider';
|
4732
|
-
|
4733
5460
|
case REACT_FORWARD_REF_TYPE:
|
4734
|
-
return
|
5461
|
+
return describeFunctionComponentFrame(type.render);
|
4735
5462
|
|
4736
5463
|
case REACT_MEMO_TYPE:
|
4737
|
-
|
5464
|
+
// Memo may contain any component type so we recursively resolve it.
|
5465
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
4738
5466
|
|
4739
5467
|
case REACT_BLOCK_TYPE:
|
4740
|
-
return
|
5468
|
+
return describeFunctionComponentFrame(type._render);
|
4741
5469
|
|
4742
5470
|
case REACT_LAZY_TYPE:
|
4743
5471
|
{
|
4744
|
-
var
|
4745
|
-
var
|
4746
|
-
|
4747
|
-
|
4748
|
-
|
4749
|
-
|
4750
|
-
|
4751
|
-
|
5472
|
+
var lazyComponent = type;
|
5473
|
+
var payload = lazyComponent._payload;
|
5474
|
+
var init = lazyComponent._init;
|
5475
|
+
|
5476
|
+
try {
|
5477
|
+
// Lazy may contain any component type so we recursively resolve it.
|
5478
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
5479
|
+
} catch (x) {}
|
4752
5480
|
}
|
4753
5481
|
}
|
4754
5482
|
}
|
4755
5483
|
|
4756
|
-
return
|
5484
|
+
return '';
|
4757
5485
|
}
|
4758
5486
|
|
4759
|
-
var
|
4760
|
-
|
4761
|
-
var sourceInfo = '';
|
5487
|
+
var loggedTypeFailures = {};
|
5488
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
4762
5489
|
|
4763
|
-
|
4764
|
-
|
4765
|
-
|
5490
|
+
function setCurrentlyValidatingElement(element) {
|
5491
|
+
{
|
5492
|
+
if (element) {
|
5493
|
+
var owner = element._owner;
|
5494
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
5495
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
5496
|
+
} else {
|
5497
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
5498
|
+
}
|
5499
|
+
}
|
5500
|
+
}
|
4766
5501
|
|
4767
|
-
|
4768
|
-
|
4769
|
-
|
4770
|
-
|
4771
|
-
var match = path.match(BEFORE_SLASH_RE);
|
5502
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
5503
|
+
{
|
5504
|
+
// $FlowFixMe This is okay but Flow doesn't know it.
|
5505
|
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
4772
5506
|
|
4773
|
-
|
4774
|
-
|
5507
|
+
for (var typeSpecName in typeSpecs) {
|
5508
|
+
if (has(typeSpecs, typeSpecName)) {
|
5509
|
+
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
5510
|
+
// fail the render phase where it didn't fail before. So we log it.
|
5511
|
+
// After these have been cleaned up, we'll let them throw.
|
4775
5512
|
|
4776
|
-
|
4777
|
-
|
4778
|
-
|
5513
|
+
try {
|
5514
|
+
// This is intentionally an invariant that gets caught. It's the same
|
5515
|
+
// behavior as without this statement except with a better message.
|
5516
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
5517
|
+
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
5518
|
+
err.name = 'Invariant Violation';
|
5519
|
+
throw err;
|
4779
5520
|
}
|
5521
|
+
|
5522
|
+
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
5523
|
+
} catch (ex) {
|
5524
|
+
error$1 = ex;
|
4780
5525
|
}
|
4781
|
-
}
|
4782
|
-
}
|
4783
5526
|
|
4784
|
-
|
4785
|
-
|
4786
|
-
sourceInfo = ' (created by ' + ownerName + ')';
|
4787
|
-
}
|
5527
|
+
if (error$1 && !(error$1 instanceof Error)) {
|
5528
|
+
setCurrentlyValidatingElement(element);
|
4788
5529
|
|
4789
|
-
|
4790
|
-
}
|
5530
|
+
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$1);
|
4791
5531
|
|
4792
|
-
|
5532
|
+
setCurrentlyValidatingElement(null);
|
5533
|
+
}
|
5534
|
+
|
5535
|
+
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
5536
|
+
// Only monitor this failure once because there tends to be a lot of the
|
5537
|
+
// same error.
|
5538
|
+
loggedTypeFailures[error$1.message] = true;
|
5539
|
+
setCurrentlyValidatingElement(element);
|
4793
5540
|
|
4794
|
-
|
5541
|
+
error('Failed %s type: %s', location, error$1.message);
|
5542
|
+
|
5543
|
+
setCurrentlyValidatingElement(null);
|
5544
|
+
}
|
5545
|
+
}
|
5546
|
+
}
|
5547
|
+
}
|
5548
|
+
}
|
4795
5549
|
|
4796
|
-
var ReactDebugCurrentFrame;
|
4797
5550
|
var didWarnAboutInvalidateContextType;
|
4798
5551
|
|
4799
5552
|
{
|
4800
|
-
ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
4801
5553
|
didWarnAboutInvalidateContextType = new Set();
|
4802
5554
|
}
|
4803
5555
|
|
@@ -4825,7 +5577,7 @@
|
|
4825
5577
|
|
4826
5578
|
function checkContextTypes(typeSpecs, values, location) {
|
4827
5579
|
{
|
4828
|
-
checkPropTypes(typeSpecs, values, location, 'Component'
|
5580
|
+
checkPropTypes(typeSpecs, values, location, 'Component');
|
4829
5581
|
}
|
4830
5582
|
}
|
4831
5583
|
|
@@ -4954,7 +5706,7 @@
|
|
4954
5706
|
// A reserved attribute.
|
4955
5707
|
// It is handled by React separately and shouldn't be written to the DOM.
|
4956
5708
|
var RESERVED = 0; // A simple string attribute.
|
4957
|
-
// Attributes that aren't in the
|
5709
|
+
// Attributes that aren't in the filter are presumed to have this type.
|
4958
5710
|
|
4959
5711
|
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
|
4960
5712
|
// "enumerated" attributes with "true" and "false" as possible values.
|
@@ -5069,6 +5821,7 @@
|
|
5069
5821
|
}
|
5070
5822
|
|
5071
5823
|
if (propertyInfo !== null) {
|
5824
|
+
|
5072
5825
|
switch (propertyInfo.type) {
|
5073
5826
|
case BOOLEAN:
|
5074
5827
|
return !value;
|
@@ -5090,7 +5843,7 @@
|
|
5090
5843
|
return properties.hasOwnProperty(name) ? properties[name] : null;
|
5091
5844
|
}
|
5092
5845
|
|
5093
|
-
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
|
5846
|
+
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
|
5094
5847
|
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
|
5095
5848
|
this.attributeName = attributeName;
|
5096
5849
|
this.attributeNamespace = attributeNamespace;
|
@@ -5098,6 +5851,7 @@
|
|
5098
5851
|
this.propertyName = name;
|
5099
5852
|
this.type = type;
|
5100
5853
|
this.sanitizeURL = sanitizeURL;
|
5854
|
+
this.removeEmptyString = removeEmptyString;
|
5101
5855
|
} // When adding attributes to this list, be sure to also add them to
|
5102
5856
|
// the `possibleStandardNames` module to ensure casing and incorrect
|
5103
5857
|
// name warnings.
|
@@ -5109,11 +5863,11 @@
|
|
5109
5863
|
// elements (not just inputs). Now that ReactDOMInput assigns to the
|
5110
5864
|
// defaultValue property -- do we need this?
|
5111
5865
|
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
|
5112
|
-
|
5113
5866
|
reservedProps.forEach(function (name) {
|
5114
5867
|
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
|
5115
5868
|
name, // attributeName
|
5116
5869
|
null, // attributeNamespace
|
5870
|
+
false, // sanitizeURL
|
5117
5871
|
false);
|
5118
5872
|
}); // A few React string attributes have a different name.
|
5119
5873
|
// This is a mapping from React prop names to the attribute names.
|
@@ -5124,6 +5878,7 @@
|
|
5124
5878
|
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
5125
5879
|
attributeName, // attributeName
|
5126
5880
|
null, // attributeNamespace
|
5881
|
+
false, // sanitizeURL
|
5127
5882
|
false);
|
5128
5883
|
}); // These are "enumerated" HTML attributes that accept "true" and "false".
|
5129
5884
|
// In React, we let users pass `true` and `false` even though technically
|
@@ -5133,6 +5888,7 @@
|
|
5133
5888
|
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
|
5134
5889
|
name.toLowerCase(), // attributeName
|
5135
5890
|
null, // attributeNamespace
|
5891
|
+
false, // sanitizeURL
|
5136
5892
|
false);
|
5137
5893
|
}); // These are "enumerated" SVG attributes that accept "true" and "false".
|
5138
5894
|
// In React, we let users pass `true` and `false` even though technically
|
@@ -5143,16 +5899,18 @@
|
|
5143
5899
|
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
|
5144
5900
|
name, // attributeName
|
5145
5901
|
null, // attributeNamespace
|
5902
|
+
false, // sanitizeURL
|
5146
5903
|
false);
|
5147
5904
|
}); // These are HTML boolean attributes.
|
5148
5905
|
|
5149
5906
|
['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
|
5150
5907
|
// on the client side because the browsers are inconsistent. Instead we call focus().
|
5151
|
-
'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
|
5908
|
+
'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
|
5152
5909
|
'itemScope'].forEach(function (name) {
|
5153
5910
|
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
|
5154
5911
|
name.toLowerCase(), // attributeName
|
5155
5912
|
null, // attributeNamespace
|
5913
|
+
false, // sanitizeURL
|
5156
5914
|
false);
|
5157
5915
|
}); // These are the few React props that we set as DOM properties
|
5158
5916
|
// rather than attributes. These are all booleans.
|
@@ -5166,6 +5924,7 @@
|
|
5166
5924
|
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
|
5167
5925
|
name, // attributeName
|
5168
5926
|
null, // attributeNamespace
|
5927
|
+
false, // sanitizeURL
|
5169
5928
|
false);
|
5170
5929
|
}); // These are HTML attributes that are "overloaded booleans": they behave like
|
5171
5930
|
// booleans, but can also accept a string value.
|
@@ -5177,6 +5936,7 @@
|
|
5177
5936
|
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
|
5178
5937
|
name, // attributeName
|
5179
5938
|
null, // attributeNamespace
|
5939
|
+
false, // sanitizeURL
|
5180
5940
|
false);
|
5181
5941
|
}); // These are HTML attributes that must be positive numbers.
|
5182
5942
|
|
@@ -5187,6 +5947,7 @@
|
|
5187
5947
|
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
|
5188
5948
|
name, // attributeName
|
5189
5949
|
null, // attributeNamespace
|
5950
|
+
false, // sanitizeURL
|
5190
5951
|
false);
|
5191
5952
|
}); // These are HTML attributes that must be numbers.
|
5192
5953
|
|
@@ -5194,6 +5955,7 @@
|
|
5194
5955
|
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
|
5195
5956
|
name.toLowerCase(), // attributeName
|
5196
5957
|
null, // attributeNamespace
|
5958
|
+
false, // sanitizeURL
|
5197
5959
|
false);
|
5198
5960
|
});
|
5199
5961
|
var CAMELIZE = /[\-\:]([a-z])/g;
|
@@ -5202,7 +5964,7 @@
|
|
5202
5964
|
return token[1].toUpperCase();
|
5203
5965
|
}; // This is a list of all SVG attributes that need special casing, namespacing,
|
5204
5966
|
// or boolean value assignment. Regular attributes that just accept strings
|
5205
|
-
// and have the same names are omitted, just like in the HTML
|
5967
|
+
// and have the same names are omitted, just like in the HTML attribute filter.
|
5206
5968
|
// Some of these attributes can be hard to find. This list was created by
|
5207
5969
|
// scraping the MDN documentation.
|
5208
5970
|
|
@@ -5214,6 +5976,7 @@
|
|
5214
5976
|
var name = attributeName.replace(CAMELIZE, capitalize);
|
5215
5977
|
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
5216
5978
|
attributeName, null, // attributeNamespace
|
5979
|
+
false, // sanitizeURL
|
5217
5980
|
false);
|
5218
5981
|
}); // String SVG attributes with the xlink namespace.
|
5219
5982
|
|
@@ -5223,7 +5986,8 @@
|
|
5223
5986
|
].forEach(function (attributeName) {
|
5224
5987
|
var name = attributeName.replace(CAMELIZE, capitalize);
|
5225
5988
|
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
5226
|
-
attributeName, 'http://www.w3.org/1999/xlink', false
|
5989
|
+
attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
|
5990
|
+
false);
|
5227
5991
|
}); // String SVG attributes with the xml namespace.
|
5228
5992
|
|
5229
5993
|
['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
|
@@ -5232,7 +5996,8 @@
|
|
5232
5996
|
].forEach(function (attributeName) {
|
5233
5997
|
var name = attributeName.replace(CAMELIZE, capitalize);
|
5234
5998
|
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
5235
|
-
attributeName, 'http://www.w3.org/XML/1998/namespace', false
|
5999
|
+
attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
|
6000
|
+
false);
|
5236
6001
|
}); // These attribute exists both in HTML and SVG.
|
5237
6002
|
// The attribute name is case-sensitive in SVG so we can't just use
|
5238
6003
|
// the React name like we do for attributes that exist only in HTML.
|
@@ -5241,25 +6006,23 @@
|
|
5241
6006
|
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
|
5242
6007
|
attributeName.toLowerCase(), // attributeName
|
5243
6008
|
null, // attributeNamespace
|
6009
|
+
false, // sanitizeURL
|
5244
6010
|
false);
|
5245
6011
|
}); // These attributes accept URLs. These must not allow javascript: URLS.
|
5246
6012
|
// These will also need to accept Trusted Types object in the future.
|
5247
6013
|
|
5248
6014
|
var xlinkHref = 'xlinkHref';
|
5249
6015
|
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
|
5250
|
-
'xlink:href', 'http://www.w3.org/1999/xlink', true
|
6016
|
+
'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
|
6017
|
+
false);
|
5251
6018
|
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
|
5252
6019
|
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
|
5253
6020
|
attributeName.toLowerCase(), // attributeName
|
5254
6021
|
null, // attributeNamespace
|
6022
|
+
true, // sanitizeURL
|
5255
6023
|
true);
|
5256
6024
|
});
|
5257
6025
|
|
5258
|
-
var ReactDebugCurrentFrame$1 = null;
|
5259
|
-
|
5260
|
-
{
|
5261
|
-
ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
5262
|
-
} // A javascript: URL can contain leading C0 control or \u0020 SPACE,
|
5263
6026
|
// and any newline or tab are filtered out as if they're not part of the URL.
|
5264
6027
|
// https://url.spec.whatwg.org/#url-parsing
|
5265
6028
|
// Tab or newline are defined as \r\n\t:
|
@@ -5270,7 +6033,6 @@
|
|
5270
6033
|
|
5271
6034
|
/* eslint-disable max-len */
|
5272
6035
|
|
5273
|
-
|
5274
6036
|
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
|
5275
6037
|
var didWarn = false;
|
5276
6038
|
|
@@ -5473,13 +6235,13 @@
|
|
5473
6235
|
function resolveCurrentlyRenderingComponent() {
|
5474
6236
|
if (!(currentlyRenderingComponent !== null)) {
|
5475
6237
|
{
|
5476
|
-
throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://
|
6238
|
+
throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
|
5477
6239
|
}
|
5478
6240
|
}
|
5479
6241
|
|
5480
6242
|
{
|
5481
6243
|
if (isInHookUserCodeInDev) {
|
5482
|
-
error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://
|
6244
|
+
error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
|
5483
6245
|
}
|
5484
6246
|
}
|
5485
6247
|
|
@@ -5584,28 +6346,25 @@
|
|
5584
6346
|
children = Component(props, refOrContext);
|
5585
6347
|
}
|
5586
6348
|
|
6349
|
+
resetHooksState();
|
6350
|
+
return children;
|
6351
|
+
} // Reset the internal hooks state if an error occurs while rendering a component
|
6352
|
+
|
6353
|
+
function resetHooksState() {
|
6354
|
+
{
|
6355
|
+
isInHookUserCodeInDev = false;
|
6356
|
+
}
|
6357
|
+
|
5587
6358
|
currentlyRenderingComponent = null;
|
6359
|
+
didScheduleRenderPhaseUpdate = false;
|
5588
6360
|
firstWorkInProgressHook = null;
|
5589
6361
|
numberOfReRenders = 0;
|
5590
6362
|
renderPhaseUpdates = null;
|
5591
6363
|
workInProgressHook = null;
|
5592
|
-
|
5593
|
-
{
|
5594
|
-
isInHookUserCodeInDev = false;
|
5595
|
-
} // These were reset above
|
5596
|
-
// currentlyRenderingComponent = null;
|
5597
|
-
// didScheduleRenderPhaseUpdate = false;
|
5598
|
-
// firstWorkInProgressHook = null;
|
5599
|
-
// numberOfReRenders = 0;
|
5600
|
-
// renderPhaseUpdates = null;
|
5601
|
-
// workInProgressHook = null;
|
5602
|
-
|
5603
|
-
|
5604
|
-
return children;
|
5605
6364
|
}
|
5606
6365
|
|
5607
6366
|
function readContext(context, observedBits) {
|
5608
|
-
var threadID =
|
6367
|
+
var threadID = currentPartialRenderer.threadID;
|
5609
6368
|
validateContextBounds(context, threadID);
|
5610
6369
|
|
5611
6370
|
{
|
@@ -5623,7 +6382,7 @@
|
|
5623
6382
|
}
|
5624
6383
|
|
5625
6384
|
resolveCurrentlyRenderingComponent();
|
5626
|
-
var threadID =
|
6385
|
+
var threadID = currentPartialRenderer.threadID;
|
5627
6386
|
validateContextBounds(context, threadID);
|
5628
6387
|
return context[threadID];
|
5629
6388
|
}
|
@@ -5780,7 +6539,7 @@
|
|
5780
6539
|
{
|
5781
6540
|
currentHookNameInDev = 'useLayoutEffect';
|
5782
6541
|
|
5783
|
-
error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://
|
6542
|
+
error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');
|
5784
6543
|
}
|
5785
6544
|
}
|
5786
6545
|
|
@@ -5823,23 +6582,24 @@
|
|
5823
6582
|
}
|
5824
6583
|
|
5825
6584
|
function useCallback(callback, deps) {
|
5826
|
-
|
5827
|
-
|
5828
|
-
|
5829
|
-
|
5830
|
-
|
5831
|
-
|
5832
|
-
|
5833
|
-
|
5834
|
-
|
6585
|
+
return useMemo(function () {
|
6586
|
+
return callback;
|
6587
|
+
}, deps);
|
6588
|
+
} // TODO Decide on how to implement this hook for server rendering.
|
6589
|
+
// If a mutation occurs during render, consider triggering a Suspense boundary
|
6590
|
+
// and falling back to client rendering.
|
6591
|
+
|
6592
|
+
function useMutableSource(source, getSnapshot, subscribe) {
|
6593
|
+
resolveCurrentlyRenderingComponent();
|
6594
|
+
return getSnapshot(source._source);
|
5835
6595
|
}
|
5836
6596
|
|
5837
|
-
function useDeferredValue(value
|
6597
|
+
function useDeferredValue(value) {
|
5838
6598
|
resolveCurrentlyRenderingComponent();
|
5839
6599
|
return value;
|
5840
6600
|
}
|
5841
6601
|
|
5842
|
-
function useTransition(
|
6602
|
+
function useTransition() {
|
5843
6603
|
resolveCurrentlyRenderingComponent();
|
5844
6604
|
|
5845
6605
|
var startTransition = function (callback) {
|
@@ -5849,11 +6609,15 @@
|
|
5849
6609
|
return [startTransition, false];
|
5850
6610
|
}
|
5851
6611
|
|
6612
|
+
function useOpaqueIdentifier() {
|
6613
|
+
return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
|
6614
|
+
}
|
6615
|
+
|
5852
6616
|
function noop() {}
|
5853
6617
|
|
5854
|
-
var
|
5855
|
-
function
|
5856
|
-
|
6618
|
+
var currentPartialRenderer = null;
|
6619
|
+
function setCurrentPartialRenderer(renderer) {
|
6620
|
+
currentPartialRenderer = renderer;
|
5857
6621
|
}
|
5858
6622
|
var Dispatcher = {
|
5859
6623
|
readContext: readContext,
|
@@ -5870,9 +6634,11 @@
|
|
5870
6634
|
useEffect: noop,
|
5871
6635
|
// Debugging effect
|
5872
6636
|
useDebugValue: noop,
|
5873
|
-
useResponder: useResponder,
|
5874
6637
|
useDeferredValue: useDeferredValue,
|
5875
|
-
useTransition: useTransition
|
6638
|
+
useTransition: useTransition,
|
6639
|
+
useOpaqueIdentifier: useOpaqueIdentifier,
|
6640
|
+
// Subscriptions are not setup in a server environment.
|
6641
|
+
useMutableSource: useMutableSource
|
5876
6642
|
};
|
5877
6643
|
|
5878
6644
|
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
@@ -5911,49 +6677,28 @@
|
|
5911
6677
|
return parentNamespace;
|
5912
6678
|
}
|
5913
6679
|
|
5914
|
-
var
|
5915
|
-
|
5916
|
-
|
6680
|
+
var hasReadOnlyValue = {
|
6681
|
+
button: true,
|
6682
|
+
checkbox: true,
|
6683
|
+
image: true,
|
6684
|
+
hidden: true,
|
6685
|
+
radio: true,
|
6686
|
+
reset: true,
|
6687
|
+
submit: true
|
5917
6688
|
};
|
5918
|
-
|
5919
|
-
|
5920
|
-
|
5921
|
-
|
5922
|
-
button: true,
|
5923
|
-
checkbox: true,
|
5924
|
-
image: true,
|
5925
|
-
hidden: true,
|
5926
|
-
radio: true,
|
5927
|
-
reset: true,
|
5928
|
-
submit: true
|
5929
|
-
};
|
5930
|
-
var propTypes = {
|
5931
|
-
value: function (props, propName, componentName) {
|
5932
|
-
if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
|
5933
|
-
return null;
|
5934
|
-
}
|
5935
|
-
|
5936
|
-
return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
5937
|
-
},
|
5938
|
-
checked: function (props, propName, componentName) {
|
5939
|
-
if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
|
5940
|
-
return null;
|
5941
|
-
}
|
5942
|
-
|
5943
|
-
return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
6689
|
+
function checkControlledValueProps(tagName, props) {
|
6690
|
+
{
|
6691
|
+
if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
|
6692
|
+
error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
5944
6693
|
}
|
5945
|
-
};
|
5946
|
-
/**
|
5947
|
-
* Provide a linked `value` attribute for controlled forms. You should not use
|
5948
|
-
* this outside of the ReactDOM controlled form components.
|
5949
|
-
*/
|
5950
6694
|
|
5951
|
-
|
5952
|
-
|
5953
|
-
|
6695
|
+
if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
|
6696
|
+
error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
6697
|
+
}
|
6698
|
+
}
|
5954
6699
|
}
|
5955
6700
|
|
5956
|
-
// For HTML, certain tags should omit their close tag. We keep a
|
6701
|
+
// For HTML, certain tags should omit their close tag. We keep a list for
|
5957
6702
|
// those special-case tags.
|
5958
6703
|
var omittedCloseTags = {
|
5959
6704
|
area: true,
|
@@ -5981,11 +6726,6 @@
|
|
5981
6726
|
}, omittedCloseTags);
|
5982
6727
|
|
5983
6728
|
var HTML = '__html';
|
5984
|
-
var ReactDebugCurrentFrame$3 = null;
|
5985
|
-
|
5986
|
-
{
|
5987
|
-
ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
|
5988
|
-
}
|
5989
6729
|
|
5990
6730
|
function assertValidProps(tag, props) {
|
5991
6731
|
if (!props) {
|
@@ -5996,7 +6736,7 @@
|
|
5996
6736
|
if (voidElementTags[tag]) {
|
5997
6737
|
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
|
5998
6738
|
{
|
5999
|
-
throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
|
6739
|
+
throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
|
6000
6740
|
}
|
6001
6741
|
}
|
6002
6742
|
}
|
@@ -6010,7 +6750,7 @@
|
|
6010
6750
|
|
6011
6751
|
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
|
6012
6752
|
{
|
6013
|
-
throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://
|
6753
|
+
throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
|
6014
6754
|
}
|
6015
6755
|
}
|
6016
6756
|
}
|
@@ -6023,7 +6763,7 @@
|
|
6023
6763
|
|
6024
6764
|
if (!(props.style == null || typeof props.style === 'object')) {
|
6025
6765
|
{
|
6026
|
-
throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
|
6766
|
+
throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
|
6027
6767
|
}
|
6028
6768
|
}
|
6029
6769
|
}
|
@@ -6161,7 +6901,7 @@
|
|
6161
6901
|
|
6162
6902
|
switch (tagName) {
|
6163
6903
|
// These are reserved SVG and MathML elements.
|
6164
|
-
// We don't mind this
|
6904
|
+
// We don't mind this list too much because we expect it to never grow.
|
6165
6905
|
// The alternative is to track the namespace in a few places which is convoluted.
|
6166
6906
|
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
|
6167
6907
|
case 'annotation-xml':
|
@@ -6404,9 +7144,9 @@
|
|
6404
7144
|
}).join(', ');
|
6405
7145
|
|
6406
7146
|
if (invalidProps.length === 1) {
|
6407
|
-
error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://
|
7147
|
+
error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
|
6408
7148
|
} else if (invalidProps.length > 1) {
|
6409
|
-
error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://
|
7149
|
+
error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
|
6410
7150
|
}
|
6411
7151
|
}
|
6412
7152
|
}
|
@@ -6438,21 +7178,7 @@
|
|
6438
7178
|
}
|
6439
7179
|
}
|
6440
7180
|
|
6441
|
-
|
6442
|
-
* Mapping from registration name to plugin module
|
6443
|
-
*/
|
6444
|
-
|
6445
|
-
var registrationNameModules = {};
|
6446
|
-
/**
|
6447
|
-
* Mapping from lowercase registration names to the properly cased version,
|
6448
|
-
* used to warn in the case of missing event handlers. Available
|
6449
|
-
* only in true.
|
6450
|
-
* @type {Object}
|
6451
|
-
*/
|
6452
|
-
|
6453
|
-
var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
|
6454
|
-
|
6455
|
-
// When adding attributes to the HTML or SVG whitelist, be sure to
|
7181
|
+
// When adding attributes to the HTML or SVG allowed attribute list, be sure to
|
6456
7182
|
// also add them to this module to ensure casing and incorrect name
|
6457
7183
|
// warnings.
|
6458
7184
|
var possibleStandardNames = {
|
@@ -6502,9 +7228,11 @@
|
|
6502
7228
|
dir: 'dir',
|
6503
7229
|
disabled: 'disabled',
|
6504
7230
|
disablepictureinpicture: 'disablePictureInPicture',
|
7231
|
+
disableremoteplayback: 'disableRemotePlayback',
|
6505
7232
|
download: 'download',
|
6506
7233
|
draggable: 'draggable',
|
6507
7234
|
enctype: 'encType',
|
7235
|
+
enterkeyhint: 'enterKeyHint',
|
6508
7236
|
for: 'htmlFor',
|
6509
7237
|
form: 'form',
|
6510
7238
|
formmethod: 'formMethod',
|
@@ -6951,7 +7679,7 @@
|
|
6951
7679
|
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
|
6952
7680
|
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
|
6953
7681
|
|
6954
|
-
validateProperty$1 = function (tagName, name, value,
|
7682
|
+
validateProperty$1 = function (tagName, name, value, eventRegistry) {
|
6955
7683
|
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
|
6956
7684
|
return true;
|
6957
7685
|
}
|
@@ -6966,8 +7694,11 @@
|
|
6966
7694
|
} // We can't rely on the event system being injected on the server.
|
6967
7695
|
|
6968
7696
|
|
6969
|
-
if (
|
6970
|
-
|
7697
|
+
if (eventRegistry != null) {
|
7698
|
+
var registrationNameDependencies = eventRegistry.registrationNameDependencies,
|
7699
|
+
possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
|
7700
|
+
|
7701
|
+
if (registrationNameDependencies.hasOwnProperty(name)) {
|
6971
7702
|
return true;
|
6972
7703
|
}
|
6973
7704
|
|
@@ -7087,12 +7818,12 @@
|
|
7087
7818
|
};
|
7088
7819
|
}
|
7089
7820
|
|
7090
|
-
var warnUnknownProperties = function (type, props,
|
7821
|
+
var warnUnknownProperties = function (type, props, eventRegistry) {
|
7091
7822
|
{
|
7092
7823
|
var unknownProps = [];
|
7093
7824
|
|
7094
7825
|
for (var key in props) {
|
7095
|
-
var isValid = validateProperty$1(type, key, props[key],
|
7826
|
+
var isValid = validateProperty$1(type, key, props[key], eventRegistry);
|
7096
7827
|
|
7097
7828
|
if (!isValid) {
|
7098
7829
|
unknownProps.push(key);
|
@@ -7104,19 +7835,19 @@
|
|
7104
7835
|
}).join(', ');
|
7105
7836
|
|
7106
7837
|
if (unknownProps.length === 1) {
|
7107
|
-
error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://
|
7838
|
+
error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
|
7108
7839
|
} else if (unknownProps.length > 1) {
|
7109
|
-
error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://
|
7840
|
+
error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
|
7110
7841
|
}
|
7111
7842
|
}
|
7112
7843
|
};
|
7113
7844
|
|
7114
|
-
function validateProperties$2(type, props,
|
7845
|
+
function validateProperties$2(type, props, eventRegistry) {
|
7115
7846
|
if (isCustomComponent(type, props)) {
|
7116
7847
|
return;
|
7117
7848
|
}
|
7118
7849
|
|
7119
|
-
warnUnknownProperties(type, props,
|
7850
|
+
warnUnknownProperties(type, props, eventRegistry);
|
7120
7851
|
}
|
7121
7852
|
|
7122
7853
|
var toArray = React.Children.toArray; // This is only used in DEV.
|
@@ -7125,8 +7856,8 @@
|
|
7125
7856
|
// Each stack is an array of frames which may contain nested stacks of elements.
|
7126
7857
|
|
7127
7858
|
var currentDebugStacks = [];
|
7128
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
7129
|
-
var ReactDebugCurrentFrame$
|
7859
|
+
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
|
7860
|
+
var ReactDebugCurrentFrame$1;
|
7130
7861
|
var prevGetCurrentStackImpl = null;
|
7131
7862
|
|
7132
7863
|
var getCurrentServerStackImpl = function () {
|
@@ -7148,22 +7879,16 @@
|
|
7148
7879
|
var hasWarnedAboutUsingContextAsConsumer = false;
|
7149
7880
|
|
7150
7881
|
{
|
7151
|
-
ReactDebugCurrentFrame$
|
7882
|
+
ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
7152
7883
|
|
7153
7884
|
validatePropertiesInDevelopment = function (type, props) {
|
7154
7885
|
validateProperties(type, props);
|
7155
7886
|
validateProperties$1(type, props);
|
7156
|
-
validateProperties$2(type, props,
|
7157
|
-
/* canUseEventSystem */
|
7158
|
-
false);
|
7887
|
+
validateProperties$2(type, props, null);
|
7159
7888
|
};
|
7160
7889
|
|
7161
7890
|
describeStackFrame = function (element) {
|
7162
|
-
|
7163
|
-
var type = element.type;
|
7164
|
-
var name = getComponentName(type);
|
7165
|
-
var ownerName = null;
|
7166
|
-
return describeComponentFrame(name, source, ownerName);
|
7891
|
+
return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
|
7167
7892
|
};
|
7168
7893
|
|
7169
7894
|
pushCurrentDebugStack = function (stack) {
|
@@ -7172,8 +7897,8 @@
|
|
7172
7897
|
if (currentDebugStacks.length === 1) {
|
7173
7898
|
// We are entering a server renderer.
|
7174
7899
|
// Remember the previous (e.g. client) global stack implementation.
|
7175
|
-
prevGetCurrentStackImpl = ReactDebugCurrentFrame$
|
7176
|
-
ReactDebugCurrentFrame$
|
7900
|
+
prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
|
7901
|
+
ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
|
7177
7902
|
}
|
7178
7903
|
};
|
7179
7904
|
|
@@ -7194,7 +7919,7 @@
|
|
7194
7919
|
if (currentDebugStacks.length === 0) {
|
7195
7920
|
// We are exiting the server renderer.
|
7196
7921
|
// Restore the previous (e.g. client) global stack implementation.
|
7197
|
-
ReactDebugCurrentFrame$
|
7922
|
+
ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
|
7198
7923
|
prevGetCurrentStackImpl = null;
|
7199
7924
|
}
|
7200
7925
|
};
|
@@ -7318,7 +8043,7 @@
|
|
7318
8043
|
}
|
7319
8044
|
}
|
7320
8045
|
|
7321
|
-
function shouldConstruct(Component) {
|
8046
|
+
function shouldConstruct$1(Component) {
|
7322
8047
|
return Component.prototype && Component.prototype.isReactComponent;
|
7323
8048
|
}
|
7324
8049
|
|
@@ -7398,6 +8123,7 @@
|
|
7398
8123
|
|
7399
8124
|
function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
|
7400
8125
|
var ret = '<' + tagVerbatim;
|
8126
|
+
var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
|
7401
8127
|
|
7402
8128
|
for (var propKey in props) {
|
7403
8129
|
if (!hasOwnProperty$2.call(props, propKey)) {
|
@@ -7416,7 +8142,7 @@
|
|
7416
8142
|
|
7417
8143
|
var markup = null;
|
7418
8144
|
|
7419
|
-
if (isCustomComponent
|
8145
|
+
if (isCustomComponent$1) {
|
7420
8146
|
if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
7421
8147
|
markup = createMarkupForCustomAttribute(propKey, propValue);
|
7422
8148
|
}
|
@@ -7471,7 +8197,7 @@
|
|
7471
8197
|
|
7472
8198
|
|
7473
8199
|
function processChild(element, Component) {
|
7474
|
-
var isClass = shouldConstruct(Component);
|
8200
|
+
var isClass = shouldConstruct$1(Component);
|
7475
8201
|
var publicContext = processContext(Component, context, threadID, isClass);
|
7476
8202
|
var queue = [];
|
7477
8203
|
var replace = false;
|
@@ -7552,20 +8278,26 @@
|
|
7552
8278
|
inst = Component(element.props, publicContext, updater);
|
7553
8279
|
inst = finishHooks(Component, element.props, inst, publicContext);
|
7554
8280
|
|
7555
|
-
if (inst == null || inst.render == null) {
|
7556
|
-
child = inst;
|
7557
|
-
validateRenderResult(child, Component);
|
7558
|
-
return;
|
7559
|
-
}
|
7560
|
-
|
7561
8281
|
{
|
7562
|
-
|
8282
|
+
// Support for module components is deprecated and is removed behind a flag.
|
8283
|
+
// Whether or not it would crash later, we want to show a good message in DEV first.
|
8284
|
+
if (inst != null && inst.render != null) {
|
8285
|
+
var _componentName3 = getComponentName(Component) || 'Unknown';
|
7563
8286
|
|
7564
|
-
|
7565
|
-
|
8287
|
+
if (!didWarnAboutModulePatternComponent[_componentName3]) {
|
8288
|
+
error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
|
7566
8289
|
|
7567
|
-
|
8290
|
+
didWarnAboutModulePatternComponent[_componentName3] = true;
|
8291
|
+
}
|
7568
8292
|
}
|
8293
|
+
} // If the flag is on, everything is assumed to be a function component.
|
8294
|
+
// Otherwise, we also do the unfortunate dynamic checks.
|
8295
|
+
|
8296
|
+
|
8297
|
+
if ( inst == null || inst.render == null) {
|
8298
|
+
child = inst;
|
8299
|
+
validateRenderResult(child, Component);
|
8300
|
+
return;
|
7569
8301
|
}
|
7570
8302
|
}
|
7571
8303
|
|
@@ -7586,7 +8318,7 @@
|
|
7586
8318
|
|
7587
8319
|
if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
|
7588
8320
|
warn( // keep this warning in sync with ReactStrictModeWarning.js
|
7589
|
-
'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://
|
8321
|
+
'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
|
7590
8322
|
|
7591
8323
|
didWarnAboutDeprecatedWillMount[_componentName4] = true;
|
7592
8324
|
}
|
@@ -7686,12 +8418,10 @@
|
|
7686
8418
|
};
|
7687
8419
|
}
|
7688
8420
|
|
7689
|
-
var ReactDOMServerRenderer =
|
7690
|
-
/*#__PURE__*/
|
7691
|
-
function () {
|
8421
|
+
var ReactDOMServerRenderer = /*#__PURE__*/function () {
|
7692
8422
|
// TODO: type this more strictly:
|
7693
8423
|
// DEV-only
|
7694
|
-
function ReactDOMServerRenderer(children, makeStaticMarkup) {
|
8424
|
+
function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
|
7695
8425
|
var flatChildren = flattenTopLevelChildren(children);
|
7696
8426
|
var topFrame = {
|
7697
8427
|
type: null,
|
@@ -7718,7 +8448,10 @@
|
|
7718
8448
|
|
7719
8449
|
this.contextIndex = -1;
|
7720
8450
|
this.contextStack = [];
|
7721
|
-
this.contextValueStack = [];
|
8451
|
+
this.contextValueStack = []; // useOpaqueIdentifier ID
|
8452
|
+
|
8453
|
+
this.uniqueID = 0;
|
8454
|
+
this.identifierPrefix = options && options.identifierPrefix || '';
|
7722
8455
|
|
7723
8456
|
{
|
7724
8457
|
this.contextProviderStack = [];
|
@@ -7806,10 +8539,10 @@
|
|
7806
8539
|
return null;
|
7807
8540
|
}
|
7808
8541
|
|
7809
|
-
var
|
7810
|
-
|
7811
|
-
var prevDispatcher = ReactCurrentDispatcher.current;
|
7812
|
-
ReactCurrentDispatcher.current = Dispatcher;
|
8542
|
+
var prevPartialRenderer = currentPartialRenderer;
|
8543
|
+
setCurrentPartialRenderer(this);
|
8544
|
+
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
8545
|
+
ReactCurrentDispatcher$1.current = Dispatcher;
|
7813
8546
|
|
7814
8547
|
try {
|
7815
8548
|
// Markup generated within <Suspense> ends up buffered until we know
|
@@ -7915,8 +8648,9 @@
|
|
7915
8648
|
|
7916
8649
|
return out[0];
|
7917
8650
|
} finally {
|
7918
|
-
ReactCurrentDispatcher.current = prevDispatcher;
|
7919
|
-
|
8651
|
+
ReactCurrentDispatcher$1.current = prevDispatcher;
|
8652
|
+
setCurrentPartialRenderer(prevPartialRenderer);
|
8653
|
+
resetHooksState();
|
7920
8654
|
}
|
7921
8655
|
};
|
7922
8656
|
|
@@ -7994,8 +8728,16 @@
|
|
7994
8728
|
}
|
7995
8729
|
|
7996
8730
|
switch (elementType) {
|
8731
|
+
// TODO: LegacyHidden acts the same as a fragment. This only works
|
8732
|
+
// because we currently assume that every instance of LegacyHidden is
|
8733
|
+
// accompanied by a host component wrapper. In the hidden mode, the host
|
8734
|
+
// component is given a `hidden` attribute, which ensures that the
|
8735
|
+
// initial HTML is not visible. To support the use of LegacyHidden as a
|
8736
|
+
// true fragment, without an extra DOM node, we would have to hide the
|
8737
|
+
// initial HTML in some other way.
|
8738
|
+
case REACT_LEGACY_HIDDEN_TYPE:
|
8739
|
+
case REACT_DEBUG_TRACING_MODE_TYPE:
|
7997
8740
|
case REACT_STRICT_MODE_TYPE:
|
7998
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
7999
8741
|
case REACT_PROFILER_TYPE:
|
8000
8742
|
case REACT_SUSPENSE_LIST_TYPE:
|
8001
8743
|
case REACT_FRAGMENT_TYPE:
|
@@ -8029,6 +8771,17 @@
|
|
8029
8771
|
}
|
8030
8772
|
}
|
8031
8773
|
}
|
8774
|
+
// eslint-disable-next-line-no-fallthrough
|
8775
|
+
|
8776
|
+
case REACT_SCOPE_TYPE:
|
8777
|
+
{
|
8778
|
+
|
8779
|
+
{
|
8780
|
+
{
|
8781
|
+
throw Error( "ReactDOMServer does not yet support scope components." );
|
8782
|
+
}
|
8783
|
+
}
|
8784
|
+
}
|
8032
8785
|
}
|
8033
8786
|
|
8034
8787
|
if (typeof elementType === 'object' && elementType !== null) {
|
@@ -8037,50 +8790,50 @@
|
|
8037
8790
|
{
|
8038
8791
|
var element = nextChild;
|
8039
8792
|
|
8040
|
-
var
|
8793
|
+
var _nextChildren5;
|
8041
8794
|
|
8042
8795
|
var componentIdentity = {};
|
8043
8796
|
prepareToUseHooks(componentIdentity);
|
8044
|
-
|
8045
|
-
|
8046
|
-
|
8047
|
-
var
|
8797
|
+
_nextChildren5 = elementType.render(element.props, element.ref);
|
8798
|
+
_nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
|
8799
|
+
_nextChildren5 = toArray(_nextChildren5);
|
8800
|
+
var _frame5 = {
|
8048
8801
|
type: null,
|
8049
8802
|
domNamespace: parentNamespace,
|
8050
|
-
children:
|
8803
|
+
children: _nextChildren5,
|
8051
8804
|
childIndex: 0,
|
8052
8805
|
context: context,
|
8053
8806
|
footer: ''
|
8054
8807
|
};
|
8055
8808
|
|
8056
8809
|
{
|
8057
|
-
|
8810
|
+
_frame5.debugElementStack = [];
|
8058
8811
|
}
|
8059
8812
|
|
8060
|
-
this.stack.push(
|
8813
|
+
this.stack.push(_frame5);
|
8061
8814
|
return '';
|
8062
8815
|
}
|
8063
8816
|
|
8064
8817
|
case REACT_MEMO_TYPE:
|
8065
8818
|
{
|
8066
8819
|
var _element = nextChild;
|
8067
|
-
var
|
8820
|
+
var _nextChildren6 = [React.createElement(elementType.type, _assign({
|
8068
8821
|
ref: _element.ref
|
8069
8822
|
}, _element.props))];
|
8070
|
-
var
|
8823
|
+
var _frame6 = {
|
8071
8824
|
type: null,
|
8072
8825
|
domNamespace: parentNamespace,
|
8073
|
-
children:
|
8826
|
+
children: _nextChildren6,
|
8074
8827
|
childIndex: 0,
|
8075
8828
|
context: context,
|
8076
8829
|
footer: ''
|
8077
8830
|
};
|
8078
8831
|
|
8079
8832
|
{
|
8080
|
-
|
8833
|
+
_frame6.debugElementStack = [];
|
8081
8834
|
}
|
8082
8835
|
|
8083
|
-
this.stack.push(
|
8836
|
+
this.stack.push(_frame6);
|
8084
8837
|
return '';
|
8085
8838
|
}
|
8086
8839
|
|
@@ -8089,23 +8842,23 @@
|
|
8089
8842
|
var provider = nextChild;
|
8090
8843
|
var nextProps = provider.props;
|
8091
8844
|
|
8092
|
-
var
|
8845
|
+
var _nextChildren7 = toArray(nextProps.children);
|
8093
8846
|
|
8094
|
-
var
|
8847
|
+
var _frame7 = {
|
8095
8848
|
type: provider,
|
8096
8849
|
domNamespace: parentNamespace,
|
8097
|
-
children:
|
8850
|
+
children: _nextChildren7,
|
8098
8851
|
childIndex: 0,
|
8099
8852
|
context: context,
|
8100
8853
|
footer: ''
|
8101
8854
|
};
|
8102
8855
|
|
8103
8856
|
{
|
8104
|
-
|
8857
|
+
_frame7.debugElementStack = [];
|
8105
8858
|
}
|
8106
8859
|
|
8107
8860
|
this.pushProvider(provider);
|
8108
|
-
this.stack.push(
|
8861
|
+
this.stack.push(_frame7);
|
8109
8862
|
return '';
|
8110
8863
|
}
|
8111
8864
|
|
@@ -8141,22 +8894,22 @@
|
|
8141
8894
|
validateContextBounds(reactContext, threadID);
|
8142
8895
|
var nextValue = reactContext[threadID];
|
8143
8896
|
|
8144
|
-
var
|
8897
|
+
var _nextChildren8 = toArray(_nextProps.children(nextValue));
|
8145
8898
|
|
8146
|
-
var
|
8899
|
+
var _frame8 = {
|
8147
8900
|
type: nextChild,
|
8148
8901
|
domNamespace: parentNamespace,
|
8149
|
-
children:
|
8902
|
+
children: _nextChildren8,
|
8150
8903
|
childIndex: 0,
|
8151
8904
|
context: context,
|
8152
8905
|
footer: ''
|
8153
8906
|
};
|
8154
8907
|
|
8155
8908
|
{
|
8156
|
-
|
8909
|
+
_frame8.debugElementStack = [];
|
8157
8910
|
}
|
8158
8911
|
|
8159
|
-
this.stack.push(
|
8912
|
+
this.stack.push(_frame8);
|
8160
8913
|
return '';
|
8161
8914
|
}
|
8162
8915
|
// eslint-disable-next-line-no-fallthrough
|
@@ -8179,54 +8932,27 @@
|
|
8179
8932
|
// suspense server-side renderer is enabled so synchronously
|
8180
8933
|
// resolved constructors are supported.
|
8181
8934
|
|
8182
|
-
|
8183
|
-
|
8184
|
-
|
8185
|
-
|
8186
|
-
|
8187
|
-
|
8188
|
-
|
8189
|
-
|
8190
|
-
|
8191
|
-
|
8192
|
-
|
8193
|
-
|
8194
|
-
|
8195
|
-
|
8196
|
-
footer: ''
|
8197
|
-
};
|
8198
|
-
|
8199
|
-
{
|
8200
|
-
_frame9.debugElementStack = [];
|
8201
|
-
}
|
8202
|
-
|
8203
|
-
this.stack.push(_frame9);
|
8204
|
-
return '';
|
8205
|
-
}
|
8206
|
-
|
8207
|
-
case Rejected:
|
8208
|
-
throw lazyComponent._result;
|
8209
|
-
|
8210
|
-
case Pending:
|
8211
|
-
default:
|
8212
|
-
{
|
8213
|
-
{
|
8214
|
-
throw Error( "ReactDOMServer does not yet support lazy-loaded components." );
|
8215
|
-
}
|
8216
|
-
}
|
8217
|
-
|
8218
|
-
}
|
8219
|
-
}
|
8220
|
-
// eslint-disable-next-line-no-fallthrough
|
8221
|
-
|
8222
|
-
case REACT_SCOPE_TYPE:
|
8223
|
-
{
|
8935
|
+
var payload = lazyComponent._payload;
|
8936
|
+
var init = lazyComponent._init;
|
8937
|
+
var result = init(payload);
|
8938
|
+
var _nextChildren10 = [React.createElement(result, _assign({
|
8939
|
+
ref: _element2.ref
|
8940
|
+
}, _element2.props))];
|
8941
|
+
var _frame10 = {
|
8942
|
+
type: null,
|
8943
|
+
domNamespace: parentNamespace,
|
8944
|
+
children: _nextChildren10,
|
8945
|
+
childIndex: 0,
|
8946
|
+
context: context,
|
8947
|
+
footer: ''
|
8948
|
+
};
|
8224
8949
|
|
8225
8950
|
{
|
8226
|
-
|
8227
|
-
throw Error( "ReactDOMServer does not yet support scope components." );
|
8228
|
-
}
|
8951
|
+
_frame10.debugElementStack = [];
|
8229
8952
|
}
|
8953
|
+
|
8954
|
+
this.stack.push(_frame10);
|
8955
|
+
return '';
|
8230
8956
|
}
|
8231
8957
|
}
|
8232
8958
|
}
|
@@ -8278,16 +9004,16 @@
|
|
8278
9004
|
|
8279
9005
|
if (tag === 'input') {
|
8280
9006
|
{
|
8281
|
-
|
9007
|
+
checkControlledValueProps('input', props);
|
8282
9008
|
|
8283
9009
|
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
|
8284
|
-
error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://
|
9010
|
+
error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
|
8285
9011
|
|
8286
9012
|
didWarnDefaultChecked = true;
|
8287
9013
|
}
|
8288
9014
|
|
8289
9015
|
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
|
8290
|
-
error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://
|
9016
|
+
error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
|
8291
9017
|
|
8292
9018
|
didWarnDefaultInputValue = true;
|
8293
9019
|
}
|
@@ -8303,10 +9029,10 @@
|
|
8303
9029
|
});
|
8304
9030
|
} else if (tag === 'textarea') {
|
8305
9031
|
{
|
8306
|
-
|
9032
|
+
checkControlledValueProps('textarea', props);
|
8307
9033
|
|
8308
9034
|
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
|
8309
|
-
error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://
|
9035
|
+
error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
|
8310
9036
|
|
8311
9037
|
didWarnDefaultTextareaValue = true;
|
8312
9038
|
}
|
@@ -8356,7 +9082,7 @@
|
|
8356
9082
|
});
|
8357
9083
|
} else if (tag === 'select') {
|
8358
9084
|
{
|
8359
|
-
|
9085
|
+
checkControlledValueProps('select', props);
|
8360
9086
|
|
8361
9087
|
for (var i = 0; i < valuePropNames.length; i++) {
|
8362
9088
|
var propName = valuePropNames[i];
|
@@ -8375,7 +9101,7 @@
|
|
8375
9101
|
}
|
8376
9102
|
|
8377
9103
|
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
|
8378
|
-
error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://
|
9104
|
+
error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
|
8379
9105
|
|
8380
9106
|
didWarnDefaultSelectValue = true;
|
8381
9107
|
}
|
@@ -8490,8 +9216,8 @@
|
|
8490
9216
|
* See https://reactjs.org/docs/react-dom-server.html#rendertostring
|
8491
9217
|
*/
|
8492
9218
|
|
8493
|
-
function renderToString(element) {
|
8494
|
-
var renderer = new ReactDOMServerRenderer(element, false);
|
9219
|
+
function renderToString(element, options) {
|
9220
|
+
var renderer = new ReactDOMServerRenderer(element, false, options);
|
8495
9221
|
|
8496
9222
|
try {
|
8497
9223
|
var markup = renderer.read(Infinity);
|
@@ -8506,8 +9232,8 @@
|
|
8506
9232
|
* See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
|
8507
9233
|
*/
|
8508
9234
|
|
8509
|
-
function renderToStaticMarkup(element) {
|
8510
|
-
var renderer = new ReactDOMServerRenderer(element, true);
|
9235
|
+
function renderToStaticMarkup(element, options) {
|
9236
|
+
var renderer = new ReactDOMServerRenderer(element, true, options);
|
8511
9237
|
|
8512
9238
|
try {
|
8513
9239
|
var markup = renderer.read(Infinity);
|
@@ -8531,24 +9257,13 @@
|
|
8531
9257
|
throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
|
8532
9258
|
}
|
8533
9259
|
}
|
8534
|
-
}
|
8535
|
-
|
8536
|
-
|
8537
|
-
var ReactDOMServer = {
|
8538
|
-
renderToString: renderToString,
|
8539
|
-
renderToStaticMarkup: renderToStaticMarkup,
|
8540
|
-
renderToNodeStream: renderToNodeStream,
|
8541
|
-
renderToStaticNodeStream: renderToStaticNodeStream,
|
8542
|
-
version: ReactVersion
|
8543
|
-
};
|
8544
|
-
|
8545
|
-
// TODO: decide on the top-level export form.
|
8546
|
-
// This is hacky but makes it work with both Rollup and Jest
|
8547
|
-
|
8548
|
-
|
8549
|
-
var server_browser = ReactDOMServer.default || ReactDOMServer;
|
9260
|
+
}
|
8550
9261
|
|
8551
|
-
|
9262
|
+
exports.renderToNodeStream = renderToNodeStream;
|
9263
|
+
exports.renderToStaticMarkup = renderToStaticMarkup;
|
9264
|
+
exports.renderToStaticNodeStream = renderToStaticNodeStream;
|
9265
|
+
exports.renderToString = renderToString;
|
9266
|
+
exports.version = ReactVersion;
|
8552
9267
|
})();
|
8553
9268
|
}
|
8554
9269
|
|