1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | 'use strict';
|
12 |
|
13 | if (process.env.NODE_ENV !== "production") {
|
14 | (function() {
|
15 |
|
16 | 'use strict';
|
17 |
|
18 |
|
19 | if (
|
20 | typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
21 | typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
|
22 | 'function'
|
23 | ) {
|
24 | __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
25 | }
|
26 | var ReactVersion = '18.3.0-experimental-3d615fc14-20220919';
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
33 | var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
34 | var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
35 | var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
36 | var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
37 | var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
38 | var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
39 | var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
40 | var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
41 | var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
42 | var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
43 | var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
44 | var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
45 | var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');
|
46 | var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
47 | var REACT_CACHE_TYPE = Symbol.for('react.cache');
|
48 | var REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value');
|
49 | var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
50 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
51 | function getIteratorFn(maybeIterable) {
|
52 | if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
53 | return null;
|
54 | }
|
55 |
|
56 | var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
57 |
|
58 | if (typeof maybeIterator === 'function') {
|
59 | return maybeIterator;
|
60 | }
|
61 |
|
62 | return null;
|
63 | }
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | var ReactCurrentDispatcher = {
|
69 | |
70 |
|
71 |
|
72 |
|
73 | current: null
|
74 | };
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 | var ReactCurrentBatchConfig = {
|
81 | transition: null
|
82 | };
|
83 |
|
84 | var ReactCurrentActQueue = {
|
85 | current: null,
|
86 |
|
87 | isBatchingLegacy: false,
|
88 | didScheduleLegacyUpdate: false
|
89 | };
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | var ReactCurrentOwner = {
|
98 | |
99 |
|
100 |
|
101 |
|
102 | current: null
|
103 | };
|
104 |
|
105 | var ReactDebugCurrentFrame = {};
|
106 | var currentExtraStackFrame = null;
|
107 | function setExtraStackFrame(stack) {
|
108 | {
|
109 | currentExtraStackFrame = stack;
|
110 | }
|
111 | }
|
112 |
|
113 | {
|
114 | ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
|
115 | {
|
116 | currentExtraStackFrame = stack;
|
117 | }
|
118 | };
|
119 |
|
120 |
|
121 | ReactDebugCurrentFrame.getCurrentStack = null;
|
122 |
|
123 | ReactDebugCurrentFrame.getStackAddendum = function () {
|
124 | var stack = '';
|
125 |
|
126 | if (currentExtraStackFrame) {
|
127 | stack += currentExtraStackFrame;
|
128 | }
|
129 |
|
130 |
|
131 | var impl = ReactDebugCurrentFrame.getCurrentStack;
|
132 |
|
133 | if (impl) {
|
134 | stack += impl() || '';
|
135 | }
|
136 |
|
137 | return stack;
|
138 | };
|
139 | }
|
140 |
|
141 |
|
142 |
|
143 | var enableScopeAPI = false;
|
144 | var enableTransitionTracing = false;
|
145 |
|
146 | var enableLegacyHidden = false;
|
147 |
|
148 |
|
149 |
|
150 | var enableDebugTracing = false;
|
151 |
|
152 | var ContextRegistry = {};
|
153 |
|
154 | var ReactSharedInternals = {
|
155 | ReactCurrentDispatcher: ReactCurrentDispatcher,
|
156 | ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
157 | ReactCurrentOwner: ReactCurrentOwner
|
158 | };
|
159 |
|
160 | {
|
161 | ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
|
162 | ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
|
163 | }
|
164 |
|
165 | {
|
166 | ReactSharedInternals.ContextRegistry = ContextRegistry;
|
167 | }
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 | function warn(format) {
|
175 | {
|
176 | {
|
177 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
178 | args[_key - 1] = arguments[_key];
|
179 | }
|
180 |
|
181 | printWarning('warn', format, args);
|
182 | }
|
183 | }
|
184 | }
|
185 | function error(format) {
|
186 | {
|
187 | {
|
188 | for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
189 | args[_key2 - 1] = arguments[_key2];
|
190 | }
|
191 |
|
192 | printWarning('error', format, args);
|
193 | }
|
194 | }
|
195 | }
|
196 |
|
197 | function printWarning(level, format, args) {
|
198 |
|
199 |
|
200 | {
|
201 | var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
202 | var stack = ReactDebugCurrentFrame.getStackAddendum();
|
203 |
|
204 | if (stack !== '') {
|
205 | format += '%s';
|
206 | args = args.concat([stack]);
|
207 | }
|
208 |
|
209 |
|
210 | var argsWithFormat = args.map(function (item) {
|
211 | return String(item);
|
212 | });
|
213 |
|
214 | argsWithFormat.unshift('Warning: ' + format);
|
215 |
|
216 |
|
217 |
|
218 | Function.prototype.apply.call(console[level], console, argsWithFormat);
|
219 | }
|
220 | }
|
221 |
|
222 | var didWarnStateUpdateForUnmountedComponent = {};
|
223 |
|
224 | function warnNoop(publicInstance, callerName) {
|
225 | {
|
226 | var _constructor = publicInstance.constructor;
|
227 | var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
|
228 | var warningKey = componentName + "." + callerName;
|
229 |
|
230 | if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
231 | return;
|
232 | }
|
233 |
|
234 | error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
|
235 |
|
236 | didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
237 | }
|
238 | }
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 | var ReactNoopUpdateQueue = {
|
245 | |
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 | isMounted: function (publicInstance) {
|
253 | return false;
|
254 | },
|
255 |
|
256 | |
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 | enqueueForceUpdate: function (publicInstance, callback, callerName) {
|
272 | warnNoop(publicInstance, 'forceUpdate');
|
273 | },
|
274 |
|
275 | |
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 | enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
|
289 | warnNoop(publicInstance, 'replaceState');
|
290 | },
|
291 |
|
292 | |
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 | enqueueSetState: function (publicInstance, partialState, callback, callerName) {
|
305 | warnNoop(publicInstance, 'setState');
|
306 | }
|
307 | };
|
308 |
|
309 | var assign = Object.assign;
|
310 |
|
311 | var emptyObject = {};
|
312 |
|
313 | {
|
314 | Object.freeze(emptyObject);
|
315 | }
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 | function Component(props, context, updater) {
|
322 | this.props = props;
|
323 | this.context = context;
|
324 |
|
325 | this.refs = emptyObject;
|
326 |
|
327 |
|
328 | this.updater = updater || ReactNoopUpdateQueue;
|
329 | }
|
330 |
|
331 | Component.prototype.isReactComponent = {};
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 | Component.prototype.setState = function (partialState, callback) {
|
359 | if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
|
360 | throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
|
361 | }
|
362 |
|
363 | this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
364 | };
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 | Component.prototype.forceUpdate = function (callback) {
|
382 | this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
|
383 | };
|
384 |
|
385 |
|
386 |
|
387 |
|
388 |
|
389 |
|
390 |
|
391 | {
|
392 | var deprecatedAPIs = {
|
393 | isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
394 | replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
395 | };
|
396 |
|
397 | var defineDeprecationWarning = function (methodName, info) {
|
398 | Object.defineProperty(Component.prototype, methodName, {
|
399 | get: function () {
|
400 | warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
401 |
|
402 | return undefined;
|
403 | }
|
404 | });
|
405 | };
|
406 |
|
407 | for (var fnName in deprecatedAPIs) {
|
408 | if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
409 | defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
410 | }
|
411 | }
|
412 | }
|
413 |
|
414 | function ComponentDummy() {}
|
415 |
|
416 | ComponentDummy.prototype = Component.prototype;
|
417 |
|
418 |
|
419 |
|
420 |
|
421 | function PureComponent(props, context, updater) {
|
422 | this.props = props;
|
423 | this.context = context;
|
424 |
|
425 | this.refs = emptyObject;
|
426 | this.updater = updater || ReactNoopUpdateQueue;
|
427 | }
|
428 |
|
429 | var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
430 | pureComponentPrototype.constructor = PureComponent;
|
431 |
|
432 | assign(pureComponentPrototype, Component.prototype);
|
433 | pureComponentPrototype.isPureReactComponent = true;
|
434 |
|
435 |
|
436 | function createRef() {
|
437 | var refObject = {
|
438 | current: null
|
439 | };
|
440 |
|
441 | {
|
442 | Object.seal(refObject);
|
443 | }
|
444 |
|
445 | return refObject;
|
446 | }
|
447 |
|
448 | var isArrayImpl = Array.isArray;
|
449 |
|
450 | function isArray(a) {
|
451 | return isArrayImpl(a);
|
452 | }
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 | function typeName(value) {
|
465 | {
|
466 |
|
467 | var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
468 | var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
469 |
|
470 | return type;
|
471 | }
|
472 | }
|
473 |
|
474 |
|
475 | function willCoercionThrow(value) {
|
476 | {
|
477 | try {
|
478 | testStringCoercion(value);
|
479 | return false;
|
480 | } catch (e) {
|
481 | return true;
|
482 | }
|
483 | }
|
484 | }
|
485 |
|
486 | function testStringCoercion(value) {
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 |
|
497 |
|
498 |
|
499 |
|
500 |
|
501 |
|
502 |
|
503 |
|
504 |
|
505 |
|
506 |
|
507 |
|
508 |
|
509 |
|
510 | return '' + value;
|
511 | }
|
512 | function checkKeyStringCoercion(value) {
|
513 | {
|
514 | if (willCoercionThrow(value)) {
|
515 | error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
516 |
|
517 | return testStringCoercion(value);
|
518 | }
|
519 | }
|
520 | }
|
521 |
|
522 | function getWrappedName(outerType, innerType, wrapperName) {
|
523 | var displayName = outerType.displayName;
|
524 |
|
525 | if (displayName) {
|
526 | return displayName;
|
527 | }
|
528 |
|
529 | var functionName = innerType.displayName || innerType.name || '';
|
530 | return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
531 | }
|
532 |
|
533 |
|
534 | function getContextName(type) {
|
535 | return type.displayName || 'Context';
|
536 | }
|
537 |
|
538 |
|
539 | function getComponentNameFromType(type) {
|
540 | if (type == null) {
|
541 |
|
542 | return null;
|
543 | }
|
544 |
|
545 | {
|
546 | if (typeof type.tag === 'number') {
|
547 | error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
548 | }
|
549 | }
|
550 |
|
551 | if (typeof type === 'function') {
|
552 | return type.displayName || type.name || null;
|
553 | }
|
554 |
|
555 | if (typeof type === 'string') {
|
556 | return type;
|
557 | }
|
558 |
|
559 | switch (type) {
|
560 | case REACT_FRAGMENT_TYPE:
|
561 | return 'Fragment';
|
562 |
|
563 | case REACT_PORTAL_TYPE:
|
564 | return 'Portal';
|
565 |
|
566 | case REACT_PROFILER_TYPE:
|
567 | return 'Profiler';
|
568 |
|
569 | case REACT_STRICT_MODE_TYPE:
|
570 | return 'StrictMode';
|
571 |
|
572 | case REACT_SUSPENSE_TYPE:
|
573 | return 'Suspense';
|
574 |
|
575 | case REACT_SUSPENSE_LIST_TYPE:
|
576 | return 'SuspenseList';
|
577 |
|
578 | case REACT_CACHE_TYPE:
|
579 | {
|
580 | return 'Cache';
|
581 | }
|
582 |
|
583 | }
|
584 |
|
585 | if (typeof type === 'object') {
|
586 | switch (type.$$typeof) {
|
587 | case REACT_CONTEXT_TYPE:
|
588 | var context = type;
|
589 | return getContextName(context) + '.Consumer';
|
590 |
|
591 | case REACT_PROVIDER_TYPE:
|
592 | var provider = type;
|
593 | return getContextName(provider._context) + '.Provider';
|
594 |
|
595 | case REACT_FORWARD_REF_TYPE:
|
596 | return getWrappedName(type, type.render, 'ForwardRef');
|
597 |
|
598 | case REACT_MEMO_TYPE:
|
599 | var outerName = type.displayName || null;
|
600 |
|
601 | if (outerName !== null) {
|
602 | return outerName;
|
603 | }
|
604 |
|
605 | return getComponentNameFromType(type.type) || 'Memo';
|
606 |
|
607 | case REACT_LAZY_TYPE:
|
608 | {
|
609 | var lazyComponent = type;
|
610 | var payload = lazyComponent._payload;
|
611 | var init = lazyComponent._init;
|
612 |
|
613 | try {
|
614 | return getComponentNameFromType(init(payload));
|
615 | } catch (x) {
|
616 | return null;
|
617 | }
|
618 | }
|
619 |
|
620 | case REACT_SERVER_CONTEXT_TYPE:
|
621 | {
|
622 | var context2 = type;
|
623 | return (context2.displayName || context2._globalName) + '.Provider';
|
624 | }
|
625 |
|
626 |
|
627 | }
|
628 | }
|
629 |
|
630 | return null;
|
631 | }
|
632 |
|
633 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
634 |
|
635 | var RESERVED_PROPS = {
|
636 | key: true,
|
637 | ref: true,
|
638 | __self: true,
|
639 | __source: true
|
640 | };
|
641 | var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
|
642 |
|
643 | {
|
644 | didWarnAboutStringRefs = {};
|
645 | }
|
646 |
|
647 | function hasValidRef(config) {
|
648 | {
|
649 | if (hasOwnProperty.call(config, 'ref')) {
|
650 | var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
651 |
|
652 | if (getter && getter.isReactWarning) {
|
653 | return false;
|
654 | }
|
655 | }
|
656 | }
|
657 |
|
658 | return config.ref !== undefined;
|
659 | }
|
660 |
|
661 | function hasValidKey(config) {
|
662 | {
|
663 | if (hasOwnProperty.call(config, 'key')) {
|
664 | var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
665 |
|
666 | if (getter && getter.isReactWarning) {
|
667 | return false;
|
668 | }
|
669 | }
|
670 | }
|
671 |
|
672 | return config.key !== undefined;
|
673 | }
|
674 |
|
675 | function defineKeyPropWarningGetter(props, displayName) {
|
676 | var warnAboutAccessingKey = function () {
|
677 | {
|
678 | if (!specialPropKeyWarningShown) {
|
679 | specialPropKeyWarningShown = true;
|
680 |
|
681 | 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);
|
682 | }
|
683 | }
|
684 | };
|
685 |
|
686 | warnAboutAccessingKey.isReactWarning = true;
|
687 | Object.defineProperty(props, 'key', {
|
688 | get: warnAboutAccessingKey,
|
689 | configurable: true
|
690 | });
|
691 | }
|
692 |
|
693 | function defineRefPropWarningGetter(props, displayName) {
|
694 | var warnAboutAccessingRef = function () {
|
695 | {
|
696 | if (!specialPropRefWarningShown) {
|
697 | specialPropRefWarningShown = true;
|
698 |
|
699 | 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);
|
700 | }
|
701 | }
|
702 | };
|
703 |
|
704 | warnAboutAccessingRef.isReactWarning = true;
|
705 | Object.defineProperty(props, 'ref', {
|
706 | get: warnAboutAccessingRef,
|
707 | configurable: true
|
708 | });
|
709 | }
|
710 |
|
711 | function warnIfStringRefCannotBeAutoConverted(config) {
|
712 | {
|
713 | if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
|
714 | var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
715 |
|
716 | if (!didWarnAboutStringRefs[componentName]) {
|
717 | 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);
|
718 |
|
719 | didWarnAboutStringRefs[componentName] = true;
|
720 | }
|
721 | }
|
722 | }
|
723 | }
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 |
|
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 | var ReactElement = function (type, key, ref, self, source, owner, props) {
|
747 | var element = {
|
748 |
|
749 | $$typeof: REACT_ELEMENT_TYPE,
|
750 |
|
751 | type: type,
|
752 | key: key,
|
753 | ref: ref,
|
754 | props: props,
|
755 |
|
756 | _owner: owner
|
757 | };
|
758 |
|
759 | {
|
760 |
|
761 |
|
762 |
|
763 |
|
764 | element._store = {};
|
765 |
|
766 |
|
767 |
|
768 |
|
769 | Object.defineProperty(element._store, 'validated', {
|
770 | configurable: false,
|
771 | enumerable: false,
|
772 | writable: true,
|
773 | value: false
|
774 | });
|
775 |
|
776 | Object.defineProperty(element, '_self', {
|
777 | configurable: false,
|
778 | enumerable: false,
|
779 | writable: false,
|
780 | value: self
|
781 | });
|
782 |
|
783 |
|
784 | Object.defineProperty(element, '_source', {
|
785 | configurable: false,
|
786 | enumerable: false,
|
787 | writable: false,
|
788 | value: source
|
789 | });
|
790 |
|
791 | if (Object.freeze) {
|
792 | Object.freeze(element.props);
|
793 | Object.freeze(element);
|
794 | }
|
795 | }
|
796 |
|
797 | return element;
|
798 | };
|
799 |
|
800 |
|
801 |
|
802 |
|
803 |
|
804 | function createElement(type, config, children) {
|
805 | var propName;
|
806 |
|
807 | var props = {};
|
808 | var key = null;
|
809 | var ref = null;
|
810 | var self = null;
|
811 | var source = null;
|
812 |
|
813 | if (config != null) {
|
814 | if (hasValidRef(config)) {
|
815 | ref = config.ref;
|
816 |
|
817 | {
|
818 | warnIfStringRefCannotBeAutoConverted(config);
|
819 | }
|
820 | }
|
821 |
|
822 | if (hasValidKey(config)) {
|
823 | {
|
824 | checkKeyStringCoercion(config.key);
|
825 | }
|
826 |
|
827 | key = '' + config.key;
|
828 | }
|
829 |
|
830 | self = config.__self === undefined ? null : config.__self;
|
831 | source = config.__source === undefined ? null : config.__source;
|
832 |
|
833 | for (propName in config) {
|
834 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
835 | props[propName] = config[propName];
|
836 | }
|
837 | }
|
838 | }
|
839 |
|
840 |
|
841 |
|
842 | var childrenLength = arguments.length - 2;
|
843 |
|
844 | if (childrenLength === 1) {
|
845 | props.children = children;
|
846 | } else if (childrenLength > 1) {
|
847 | var childArray = Array(childrenLength);
|
848 |
|
849 | for (var i = 0; i < childrenLength; i++) {
|
850 | childArray[i] = arguments[i + 2];
|
851 | }
|
852 |
|
853 | {
|
854 | if (Object.freeze) {
|
855 | Object.freeze(childArray);
|
856 | }
|
857 | }
|
858 |
|
859 | props.children = childArray;
|
860 | }
|
861 |
|
862 |
|
863 | if (type && type.defaultProps) {
|
864 | var defaultProps = type.defaultProps;
|
865 |
|
866 | for (propName in defaultProps) {
|
867 | if (props[propName] === undefined) {
|
868 | props[propName] = defaultProps[propName];
|
869 | }
|
870 | }
|
871 | }
|
872 |
|
873 | {
|
874 | if (key || ref) {
|
875 | var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
876 |
|
877 | if (key) {
|
878 | defineKeyPropWarningGetter(props, displayName);
|
879 | }
|
880 |
|
881 | if (ref) {
|
882 | defineRefPropWarningGetter(props, displayName);
|
883 | }
|
884 | }
|
885 | }
|
886 |
|
887 | return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
888 | }
|
889 | function cloneAndReplaceKey(oldElement, newKey) {
|
890 | var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
891 | return newElement;
|
892 | }
|
893 |
|
894 |
|
895 |
|
896 |
|
897 |
|
898 | function cloneElement(element, config, children) {
|
899 | if (element === null || element === undefined) {
|
900 | throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
|
901 | }
|
902 |
|
903 | var propName;
|
904 |
|
905 | var props = assign({}, element.props);
|
906 |
|
907 | var key = element.key;
|
908 | var ref = element.ref;
|
909 |
|
910 | var self = element._self;
|
911 |
|
912 |
|
913 |
|
914 | var source = element._source;
|
915 |
|
916 | var owner = element._owner;
|
917 |
|
918 | if (config != null) {
|
919 | if (hasValidRef(config)) {
|
920 |
|
921 | ref = config.ref;
|
922 | owner = ReactCurrentOwner.current;
|
923 | }
|
924 |
|
925 | if (hasValidKey(config)) {
|
926 | {
|
927 | checkKeyStringCoercion(config.key);
|
928 | }
|
929 |
|
930 | key = '' + config.key;
|
931 | }
|
932 |
|
933 |
|
934 | var defaultProps;
|
935 |
|
936 | if (element.type && element.type.defaultProps) {
|
937 | defaultProps = element.type.defaultProps;
|
938 | }
|
939 |
|
940 | for (propName in config) {
|
941 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
942 | if (config[propName] === undefined && defaultProps !== undefined) {
|
943 |
|
944 | props[propName] = defaultProps[propName];
|
945 | } else {
|
946 | props[propName] = config[propName];
|
947 | }
|
948 | }
|
949 | }
|
950 | }
|
951 |
|
952 |
|
953 |
|
954 | var childrenLength = arguments.length - 2;
|
955 |
|
956 | if (childrenLength === 1) {
|
957 | props.children = children;
|
958 | } else if (childrenLength > 1) {
|
959 | var childArray = Array(childrenLength);
|
960 |
|
961 | for (var i = 0; i < childrenLength; i++) {
|
962 | childArray[i] = arguments[i + 2];
|
963 | }
|
964 |
|
965 | props.children = childArray;
|
966 | }
|
967 |
|
968 | return ReactElement(element.type, key, ref, self, source, owner, props);
|
969 | }
|
970 |
|
971 |
|
972 |
|
973 |
|
974 |
|
975 |
|
976 |
|
977 |
|
978 | function isValidElement(object) {
|
979 | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
980 | }
|
981 |
|
982 | var SEPARATOR = '.';
|
983 | var SUBSEPARATOR = ':';
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 |
|
991 | function escape(key) {
|
992 | var escapeRegex = /[=:]/g;
|
993 | var escaperLookup = {
|
994 | '=': '=0',
|
995 | ':': '=2'
|
996 | };
|
997 | var escapedString = key.replace(escapeRegex, function (match) {
|
998 | return escaperLookup[match];
|
999 | });
|
1000 | return '$' + escapedString;
|
1001 | }
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
|
1007 |
|
1008 | var didWarnAboutMaps = false;
|
1009 | var userProvidedKeyEscapeRegex = /\/+/g;
|
1010 |
|
1011 | function escapeUserProvidedKey(text) {
|
1012 | return text.replace(userProvidedKeyEscapeRegex, '$&/');
|
1013 | }
|
1014 |
|
1015 |
|
1016 |
|
1017 |
|
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 | function getElementKey(element, index) {
|
1024 |
|
1025 |
|
1026 | if (typeof element === 'object' && element !== null && element.key != null) {
|
1027 |
|
1028 | {
|
1029 | checkKeyStringCoercion(element.key);
|
1030 | }
|
1031 |
|
1032 | return escape('' + element.key);
|
1033 | }
|
1034 |
|
1035 |
|
1036 | return index.toString(36);
|
1037 | }
|
1038 |
|
1039 | function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
1040 | var type = typeof children;
|
1041 |
|
1042 | if (type === 'undefined' || type === 'boolean') {
|
1043 |
|
1044 | children = null;
|
1045 | }
|
1046 |
|
1047 | var invokeCallback = false;
|
1048 |
|
1049 | if (children === null) {
|
1050 | invokeCallback = true;
|
1051 | } else {
|
1052 | switch (type) {
|
1053 | case 'string':
|
1054 | case 'number':
|
1055 | invokeCallback = true;
|
1056 | break;
|
1057 |
|
1058 | case 'object':
|
1059 | switch (children.$$typeof) {
|
1060 | case REACT_ELEMENT_TYPE:
|
1061 | case REACT_PORTAL_TYPE:
|
1062 | invokeCallback = true;
|
1063 | }
|
1064 |
|
1065 | }
|
1066 | }
|
1067 |
|
1068 | if (invokeCallback) {
|
1069 | var _child = children;
|
1070 | var mappedChild = callback(_child);
|
1071 |
|
1072 |
|
1073 | var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
|
1074 |
|
1075 | if (isArray(mappedChild)) {
|
1076 | var escapedChildKey = '';
|
1077 |
|
1078 | if (childKey != null) {
|
1079 | escapedChildKey = escapeUserProvidedKey(childKey) + '/';
|
1080 | }
|
1081 |
|
1082 | mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
|
1083 | return c;
|
1084 | });
|
1085 | } else if (mappedChild != null) {
|
1086 | if (isValidElement(mappedChild)) {
|
1087 | {
|
1088 |
|
1089 |
|
1090 |
|
1091 | if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
|
1092 | checkKeyStringCoercion(mappedChild.key);
|
1093 | }
|
1094 | }
|
1095 |
|
1096 | mappedChild = cloneAndReplaceKey(mappedChild,
|
1097 |
|
1098 | escapedPrefix + (
|
1099 | mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey(
|
1100 | '' +
|
1101 | mappedChild.key) + '/' : '') + childKey);
|
1102 | }
|
1103 |
|
1104 | array.push(mappedChild);
|
1105 | }
|
1106 |
|
1107 | return 1;
|
1108 | }
|
1109 |
|
1110 | var child;
|
1111 | var nextName;
|
1112 | var subtreeCount = 0;
|
1113 |
|
1114 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
1115 |
|
1116 | if (isArray(children)) {
|
1117 | for (var i = 0; i < children.length; i++) {
|
1118 | child = children[i];
|
1119 | nextName = nextNamePrefix + getElementKey(child, i);
|
1120 | subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
1121 | }
|
1122 | } else {
|
1123 | var iteratorFn = getIteratorFn(children);
|
1124 |
|
1125 | if (typeof iteratorFn === 'function') {
|
1126 | var iterableChildren = children;
|
1127 |
|
1128 | {
|
1129 |
|
1130 | if (iteratorFn === iterableChildren.entries) {
|
1131 | if (!didWarnAboutMaps) {
|
1132 | warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
|
1133 | }
|
1134 |
|
1135 | didWarnAboutMaps = true;
|
1136 | }
|
1137 | }
|
1138 |
|
1139 | var iterator = iteratorFn.call(iterableChildren);
|
1140 | var step;
|
1141 | var ii = 0;
|
1142 |
|
1143 | while (!(step = iterator.next()).done) {
|
1144 | child = step.value;
|
1145 | nextName = nextNamePrefix + getElementKey(child, ii++);
|
1146 | subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
1147 | }
|
1148 | } else if (type === 'object') {
|
1149 |
|
1150 | var childrenString = String(children);
|
1151 | throw new 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.');
|
1152 | }
|
1153 | }
|
1154 |
|
1155 | return subtreeCount;
|
1156 | }
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
1161 |
|
1162 |
|
1163 |
|
1164 |
|
1165 |
|
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 | function mapChildren(children, func, context) {
|
1172 | if (children == null) {
|
1173 | return children;
|
1174 | }
|
1175 |
|
1176 | var result = [];
|
1177 | var count = 0;
|
1178 | mapIntoArray(children, result, '', '', function (child) {
|
1179 | return func.call(context, child, count++);
|
1180 | });
|
1181 | return result;
|
1182 | }
|
1183 |
|
1184 |
|
1185 |
|
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 |
|
1193 |
|
1194 | function countChildren(children) {
|
1195 | var n = 0;
|
1196 | mapChildren(children, function () {
|
1197 | n++;
|
1198 | });
|
1199 | return n;
|
1200 | }
|
1201 |
|
1202 |
|
1203 |
|
1204 |
|
1205 |
|
1206 |
|
1207 |
|
1208 |
|
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 | function forEachChildren(children, forEachFunc, forEachContext) {
|
1215 | mapChildren(children, function () {
|
1216 | forEachFunc.apply(this, arguments);
|
1217 | }, forEachContext);
|
1218 | }
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 |
|
1227 | function toArray(children) {
|
1228 | return mapChildren(children, function (child) {
|
1229 | return child;
|
1230 | }) || [];
|
1231 | }
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 | function onlyChild(children) {
|
1249 | if (!isValidElement(children)) {
|
1250 | throw new Error('React.Children.only expected to receive a single React element child.');
|
1251 | }
|
1252 |
|
1253 | return children;
|
1254 | }
|
1255 |
|
1256 | function createContext(defaultValue) {
|
1257 |
|
1258 |
|
1259 | var context = {
|
1260 | $$typeof: REACT_CONTEXT_TYPE,
|
1261 |
|
1262 |
|
1263 |
|
1264 |
|
1265 |
|
1266 | _currentValue: defaultValue,
|
1267 | _currentValue2: defaultValue,
|
1268 |
|
1269 |
|
1270 | _threadCount: 0,
|
1271 |
|
1272 | Provider: null,
|
1273 | Consumer: null,
|
1274 |
|
1275 | _defaultValue: null,
|
1276 | _globalName: null
|
1277 | };
|
1278 | context.Provider = {
|
1279 | $$typeof: REACT_PROVIDER_TYPE,
|
1280 | _context: context
|
1281 | };
|
1282 | var hasWarnedAboutUsingNestedContextConsumers = false;
|
1283 | var hasWarnedAboutUsingConsumerProvider = false;
|
1284 | var hasWarnedAboutDisplayNameOnConsumer = false;
|
1285 |
|
1286 | {
|
1287 |
|
1288 |
|
1289 |
|
1290 | var Consumer = {
|
1291 | $$typeof: REACT_CONTEXT_TYPE,
|
1292 | _context: context
|
1293 | };
|
1294 |
|
1295 | Object.defineProperties(Consumer, {
|
1296 | Provider: {
|
1297 | get: function () {
|
1298 | if (!hasWarnedAboutUsingConsumerProvider) {
|
1299 | hasWarnedAboutUsingConsumerProvider = true;
|
1300 |
|
1301 | error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
|
1302 | }
|
1303 |
|
1304 | return context.Provider;
|
1305 | },
|
1306 | set: function (_Provider) {
|
1307 | context.Provider = _Provider;
|
1308 | }
|
1309 | },
|
1310 | _currentValue: {
|
1311 | get: function () {
|
1312 | return context._currentValue;
|
1313 | },
|
1314 | set: function (_currentValue) {
|
1315 | context._currentValue = _currentValue;
|
1316 | }
|
1317 | },
|
1318 | _currentValue2: {
|
1319 | get: function () {
|
1320 | return context._currentValue2;
|
1321 | },
|
1322 | set: function (_currentValue2) {
|
1323 | context._currentValue2 = _currentValue2;
|
1324 | }
|
1325 | },
|
1326 | _threadCount: {
|
1327 | get: function () {
|
1328 | return context._threadCount;
|
1329 | },
|
1330 | set: function (_threadCount) {
|
1331 | context._threadCount = _threadCount;
|
1332 | }
|
1333 | },
|
1334 | Consumer: {
|
1335 | get: function () {
|
1336 | if (!hasWarnedAboutUsingNestedContextConsumers) {
|
1337 | hasWarnedAboutUsingNestedContextConsumers = true;
|
1338 |
|
1339 | error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
|
1340 | }
|
1341 |
|
1342 | return context.Consumer;
|
1343 | }
|
1344 | },
|
1345 | displayName: {
|
1346 | get: function () {
|
1347 | return context.displayName;
|
1348 | },
|
1349 | set: function (displayName) {
|
1350 | if (!hasWarnedAboutDisplayNameOnConsumer) {
|
1351 | warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
|
1352 |
|
1353 | hasWarnedAboutDisplayNameOnConsumer = true;
|
1354 | }
|
1355 | }
|
1356 | }
|
1357 | });
|
1358 |
|
1359 | context.Consumer = Consumer;
|
1360 | }
|
1361 |
|
1362 | {
|
1363 | context._currentRenderer = null;
|
1364 | context._currentRenderer2 = null;
|
1365 | }
|
1366 |
|
1367 | return context;
|
1368 | }
|
1369 |
|
1370 | var Uninitialized = -1;
|
1371 | var Pending = 0;
|
1372 | var Resolved = 1;
|
1373 | var Rejected = 2;
|
1374 |
|
1375 | function lazyInitializer(payload) {
|
1376 | if (payload._status === Uninitialized) {
|
1377 | var ctor = payload._result;
|
1378 | var thenable = ctor();
|
1379 |
|
1380 |
|
1381 |
|
1382 |
|
1383 |
|
1384 | thenable.then(function (moduleObject) {
|
1385 | if (payload._status === Pending || payload._status === Uninitialized) {
|
1386 |
|
1387 | var resolved = payload;
|
1388 | resolved._status = Resolved;
|
1389 | resolved._result = moduleObject;
|
1390 | }
|
1391 | }, function (error) {
|
1392 | if (payload._status === Pending || payload._status === Uninitialized) {
|
1393 |
|
1394 | var rejected = payload;
|
1395 | rejected._status = Rejected;
|
1396 | rejected._result = error;
|
1397 | }
|
1398 | });
|
1399 |
|
1400 | if (payload._status === Uninitialized) {
|
1401 |
|
1402 |
|
1403 | var pending = payload;
|
1404 | pending._status = Pending;
|
1405 | pending._result = thenable;
|
1406 | }
|
1407 | }
|
1408 |
|
1409 | if (payload._status === Resolved) {
|
1410 | var moduleObject = payload._result;
|
1411 |
|
1412 | {
|
1413 | if (moduleObject === undefined) {
|
1414 | error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' +
|
1415 | 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
|
1416 | }
|
1417 | }
|
1418 |
|
1419 | {
|
1420 | if (!('default' in moduleObject)) {
|
1421 | error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' +
|
1422 | 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
|
1423 | }
|
1424 | }
|
1425 |
|
1426 | return moduleObject.default;
|
1427 | } else {
|
1428 | throw payload._result;
|
1429 | }
|
1430 | }
|
1431 |
|
1432 | function lazy(ctor) {
|
1433 | var payload = {
|
1434 |
|
1435 | _status: Uninitialized,
|
1436 | _result: ctor
|
1437 | };
|
1438 | var lazyType = {
|
1439 | $$typeof: REACT_LAZY_TYPE,
|
1440 | _payload: payload,
|
1441 | _init: lazyInitializer
|
1442 | };
|
1443 |
|
1444 | {
|
1445 |
|
1446 | var defaultProps;
|
1447 | var propTypes;
|
1448 |
|
1449 | Object.defineProperties(lazyType, {
|
1450 | defaultProps: {
|
1451 | configurable: true,
|
1452 | get: function () {
|
1453 | return defaultProps;
|
1454 | },
|
1455 | set: function (newDefaultProps) {
|
1456 | 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.');
|
1457 |
|
1458 | defaultProps = newDefaultProps;
|
1459 |
|
1460 |
|
1461 | Object.defineProperty(lazyType, 'defaultProps', {
|
1462 | enumerable: true
|
1463 | });
|
1464 | }
|
1465 | },
|
1466 | propTypes: {
|
1467 | configurable: true,
|
1468 | get: function () {
|
1469 | return propTypes;
|
1470 | },
|
1471 | set: function (newPropTypes) {
|
1472 | 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.');
|
1473 |
|
1474 | propTypes = newPropTypes;
|
1475 |
|
1476 |
|
1477 | Object.defineProperty(lazyType, 'propTypes', {
|
1478 | enumerable: true
|
1479 | });
|
1480 | }
|
1481 | }
|
1482 | });
|
1483 | }
|
1484 |
|
1485 | return lazyType;
|
1486 | }
|
1487 |
|
1488 | function forwardRef(render) {
|
1489 | {
|
1490 | if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
1491 | error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
|
1492 | } else if (typeof render !== 'function') {
|
1493 | error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
|
1494 | } else {
|
1495 | if (render.length !== 0 && render.length !== 2) {
|
1496 | error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
|
1497 | }
|
1498 | }
|
1499 |
|
1500 | if (render != null) {
|
1501 | if (render.defaultProps != null || render.propTypes != null) {
|
1502 | error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
|
1503 | }
|
1504 | }
|
1505 | }
|
1506 |
|
1507 | var elementType = {
|
1508 | $$typeof: REACT_FORWARD_REF_TYPE,
|
1509 | render: render
|
1510 | };
|
1511 |
|
1512 | {
|
1513 | var ownName;
|
1514 | Object.defineProperty(elementType, 'displayName', {
|
1515 | enumerable: false,
|
1516 | configurable: true,
|
1517 | get: function () {
|
1518 | return ownName;
|
1519 | },
|
1520 | set: function (name) {
|
1521 | ownName = name;
|
1522 |
|
1523 |
|
1524 |
|
1525 |
|
1526 |
|
1527 |
|
1528 |
|
1529 | if (!render.name && !render.displayName) {
|
1530 | render.displayName = name;
|
1531 | }
|
1532 | }
|
1533 | });
|
1534 | }
|
1535 |
|
1536 | return elementType;
|
1537 | }
|
1538 |
|
1539 | var REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
1540 | function isValidElementType(type) {
|
1541 | if (typeof type === 'string' || typeof type === 'function') {
|
1542 | return true;
|
1543 | }
|
1544 |
|
1545 |
|
1546 | if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || type === REACT_CACHE_TYPE || enableTransitionTracing ) {
|
1547 | return true;
|
1548 | }
|
1549 |
|
1550 | if (typeof type === 'object' && type !== null) {
|
1551 | 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 ||
|
1552 |
|
1553 |
|
1554 |
|
1555 | type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
1556 | return true;
|
1557 | }
|
1558 | }
|
1559 |
|
1560 | return false;
|
1561 | }
|
1562 |
|
1563 | function memo(type, compare) {
|
1564 | {
|
1565 | if (!isValidElementType(type)) {
|
1566 | error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
|
1567 | }
|
1568 | }
|
1569 |
|
1570 | var elementType = {
|
1571 | $$typeof: REACT_MEMO_TYPE,
|
1572 | type: type,
|
1573 | compare: compare === undefined ? null : compare
|
1574 | };
|
1575 |
|
1576 | {
|
1577 | var ownName;
|
1578 | Object.defineProperty(elementType, 'displayName', {
|
1579 | enumerable: false,
|
1580 | configurable: true,
|
1581 | get: function () {
|
1582 | return ownName;
|
1583 | },
|
1584 | set: function (name) {
|
1585 | ownName = name;
|
1586 |
|
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 |
|
1593 | if (!type.name && !type.displayName) {
|
1594 | type.displayName = name;
|
1595 | }
|
1596 | }
|
1597 | });
|
1598 | }
|
1599 |
|
1600 | return elementType;
|
1601 | }
|
1602 |
|
1603 | function resolveDispatcher() {
|
1604 | var dispatcher = ReactCurrentDispatcher.current;
|
1605 |
|
1606 | {
|
1607 | if (dispatcher === null) {
|
1608 | 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:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
|
1609 | }
|
1610 | }
|
1611 |
|
1612 |
|
1613 |
|
1614 |
|
1615 | return dispatcher;
|
1616 | }
|
1617 |
|
1618 | function getCacheSignal() {
|
1619 | var dispatcher = resolveDispatcher();
|
1620 |
|
1621 | return dispatcher.getCacheSignal();
|
1622 | }
|
1623 | function getCacheForType(resourceType) {
|
1624 | var dispatcher = resolveDispatcher();
|
1625 |
|
1626 | return dispatcher.getCacheForType(resourceType);
|
1627 | }
|
1628 | function useContext(Context) {
|
1629 | var dispatcher = resolveDispatcher();
|
1630 |
|
1631 | {
|
1632 |
|
1633 | if (Context._context !== undefined) {
|
1634 | var realContext = Context._context;
|
1635 |
|
1636 |
|
1637 | if (realContext.Consumer === Context) {
|
1638 | error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
|
1639 | } else if (realContext.Provider === Context) {
|
1640 | error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
|
1641 | }
|
1642 | }
|
1643 | }
|
1644 |
|
1645 | return dispatcher.useContext(Context);
|
1646 | }
|
1647 | function useState(initialState) {
|
1648 | var dispatcher = resolveDispatcher();
|
1649 | return dispatcher.useState(initialState);
|
1650 | }
|
1651 | function useReducer(reducer, initialArg, init) {
|
1652 | var dispatcher = resolveDispatcher();
|
1653 | return dispatcher.useReducer(reducer, initialArg, init);
|
1654 | }
|
1655 | function useRef(initialValue) {
|
1656 | var dispatcher = resolveDispatcher();
|
1657 | return dispatcher.useRef(initialValue);
|
1658 | }
|
1659 | function useEffect(create, deps) {
|
1660 | var dispatcher = resolveDispatcher();
|
1661 | return dispatcher.useEffect(create, deps);
|
1662 | }
|
1663 | function useInsertionEffect(create, deps) {
|
1664 | var dispatcher = resolveDispatcher();
|
1665 | return dispatcher.useInsertionEffect(create, deps);
|
1666 | }
|
1667 | function useLayoutEffect(create, deps) {
|
1668 | var dispatcher = resolveDispatcher();
|
1669 | return dispatcher.useLayoutEffect(create, deps);
|
1670 | }
|
1671 | function useCallback(callback, deps) {
|
1672 | var dispatcher = resolveDispatcher();
|
1673 | return dispatcher.useCallback(callback, deps);
|
1674 | }
|
1675 | function useMemo(create, deps) {
|
1676 | var dispatcher = resolveDispatcher();
|
1677 | return dispatcher.useMemo(create, deps);
|
1678 | }
|
1679 | function useImperativeHandle(ref, create, deps) {
|
1680 | var dispatcher = resolveDispatcher();
|
1681 | return dispatcher.useImperativeHandle(ref, create, deps);
|
1682 | }
|
1683 | function useDebugValue(value, formatterFn) {
|
1684 | {
|
1685 | var dispatcher = resolveDispatcher();
|
1686 | return dispatcher.useDebugValue(value, formatterFn);
|
1687 | }
|
1688 | }
|
1689 | function useTransition() {
|
1690 | var dispatcher = resolveDispatcher();
|
1691 | return dispatcher.useTransition();
|
1692 | }
|
1693 | function useDeferredValue(value) {
|
1694 | var dispatcher = resolveDispatcher();
|
1695 | return dispatcher.useDeferredValue(value);
|
1696 | }
|
1697 | function useId() {
|
1698 | var dispatcher = resolveDispatcher();
|
1699 | return dispatcher.useId();
|
1700 | }
|
1701 | function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
1702 | var dispatcher = resolveDispatcher();
|
1703 | return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
1704 | }
|
1705 | function useCacheRefresh() {
|
1706 | var dispatcher = resolveDispatcher();
|
1707 |
|
1708 | return dispatcher.useCacheRefresh();
|
1709 | }
|
1710 | function use(usable) {
|
1711 | var dispatcher = resolveDispatcher();
|
1712 |
|
1713 | return dispatcher.use(usable);
|
1714 | }
|
1715 | function useMemoCache(size) {
|
1716 | var dispatcher = resolveDispatcher();
|
1717 |
|
1718 | return dispatcher.useMemoCache(size);
|
1719 | }
|
1720 | function useEvent(callback) {
|
1721 | var dispatcher = resolveDispatcher();
|
1722 |
|
1723 | return dispatcher.useEvent(callback);
|
1724 | }
|
1725 |
|
1726 |
|
1727 |
|
1728 |
|
1729 |
|
1730 | var disabledDepth = 0;
|
1731 | var prevLog;
|
1732 | var prevInfo;
|
1733 | var prevWarn;
|
1734 | var prevError;
|
1735 | var prevGroup;
|
1736 | var prevGroupCollapsed;
|
1737 | var prevGroupEnd;
|
1738 |
|
1739 | function disabledLog() {}
|
1740 |
|
1741 | disabledLog.__reactDisabledLog = true;
|
1742 | function disableLogs() {
|
1743 | {
|
1744 | if (disabledDepth === 0) {
|
1745 |
|
1746 | prevLog = console.log;
|
1747 | prevInfo = console.info;
|
1748 | prevWarn = console.warn;
|
1749 | prevError = console.error;
|
1750 | prevGroup = console.group;
|
1751 | prevGroupCollapsed = console.groupCollapsed;
|
1752 | prevGroupEnd = console.groupEnd;
|
1753 |
|
1754 | var props = {
|
1755 | configurable: true,
|
1756 | enumerable: true,
|
1757 | value: disabledLog,
|
1758 | writable: true
|
1759 | };
|
1760 |
|
1761 | Object.defineProperties(console, {
|
1762 | info: props,
|
1763 | log: props,
|
1764 | warn: props,
|
1765 | error: props,
|
1766 | group: props,
|
1767 | groupCollapsed: props,
|
1768 | groupEnd: props
|
1769 | });
|
1770 |
|
1771 | }
|
1772 |
|
1773 | disabledDepth++;
|
1774 | }
|
1775 | }
|
1776 | function reenableLogs() {
|
1777 | {
|
1778 | disabledDepth--;
|
1779 |
|
1780 | if (disabledDepth === 0) {
|
1781 |
|
1782 | var props = {
|
1783 | configurable: true,
|
1784 | enumerable: true,
|
1785 | writable: true
|
1786 | };
|
1787 |
|
1788 | Object.defineProperties(console, {
|
1789 | log: assign({}, props, {
|
1790 | value: prevLog
|
1791 | }),
|
1792 | info: assign({}, props, {
|
1793 | value: prevInfo
|
1794 | }),
|
1795 | warn: assign({}, props, {
|
1796 | value: prevWarn
|
1797 | }),
|
1798 | error: assign({}, props, {
|
1799 | value: prevError
|
1800 | }),
|
1801 | group: assign({}, props, {
|
1802 | value: prevGroup
|
1803 | }),
|
1804 | groupCollapsed: assign({}, props, {
|
1805 | value: prevGroupCollapsed
|
1806 | }),
|
1807 | groupEnd: assign({}, props, {
|
1808 | value: prevGroupEnd
|
1809 | })
|
1810 | });
|
1811 |
|
1812 | }
|
1813 |
|
1814 | if (disabledDepth < 0) {
|
1815 | error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
1816 | }
|
1817 | }
|
1818 | }
|
1819 |
|
1820 | var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
|
1821 | var prefix;
|
1822 | function describeBuiltInComponentFrame(name, source, ownerFn) {
|
1823 | {
|
1824 | if (prefix === undefined) {
|
1825 |
|
1826 | try {
|
1827 | throw Error();
|
1828 | } catch (x) {
|
1829 | var match = x.stack.trim().match(/\n( *(at )?)/);
|
1830 | prefix = match && match[1] || '';
|
1831 | }
|
1832 | }
|
1833 |
|
1834 |
|
1835 | return '\n' + prefix + name;
|
1836 | }
|
1837 | }
|
1838 | var reentry = false;
|
1839 | var componentFrameCache;
|
1840 |
|
1841 | {
|
1842 | var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
1843 | componentFrameCache = new PossiblyWeakMap();
|
1844 | }
|
1845 |
|
1846 | function describeNativeComponentFrame(fn, construct) {
|
1847 |
|
1848 | if ( !fn || reentry) {
|
1849 | return '';
|
1850 | }
|
1851 |
|
1852 | {
|
1853 | var frame = componentFrameCache.get(fn);
|
1854 |
|
1855 | if (frame !== undefined) {
|
1856 | return frame;
|
1857 | }
|
1858 | }
|
1859 |
|
1860 | var control;
|
1861 | reentry = true;
|
1862 | var previousPrepareStackTrace = Error.prepareStackTrace;
|
1863 |
|
1864 | Error.prepareStackTrace = undefined;
|
1865 | var previousDispatcher;
|
1866 |
|
1867 | {
|
1868 | previousDispatcher = ReactCurrentDispatcher$1.current;
|
1869 |
|
1870 |
|
1871 | ReactCurrentDispatcher$1.current = null;
|
1872 | disableLogs();
|
1873 | }
|
1874 |
|
1875 | try {
|
1876 |
|
1877 | if (construct) {
|
1878 |
|
1879 | var Fake = function () {
|
1880 | throw Error();
|
1881 | };
|
1882 |
|
1883 |
|
1884 | Object.defineProperty(Fake.prototype, 'props', {
|
1885 | set: function () {
|
1886 |
|
1887 |
|
1888 | throw Error();
|
1889 | }
|
1890 | });
|
1891 |
|
1892 | if (typeof Reflect === 'object' && Reflect.construct) {
|
1893 |
|
1894 |
|
1895 | try {
|
1896 | Reflect.construct(Fake, []);
|
1897 | } catch (x) {
|
1898 | control = x;
|
1899 | }
|
1900 |
|
1901 | Reflect.construct(fn, [], Fake);
|
1902 | } else {
|
1903 | try {
|
1904 | Fake.call();
|
1905 | } catch (x) {
|
1906 | control = x;
|
1907 | }
|
1908 |
|
1909 | fn.call(Fake.prototype);
|
1910 | }
|
1911 | } else {
|
1912 | try {
|
1913 | throw Error();
|
1914 | } catch (x) {
|
1915 | control = x;
|
1916 | }
|
1917 |
|
1918 |
|
1919 |
|
1920 |
|
1921 | fn();
|
1922 | }
|
1923 | } catch (sample) {
|
1924 |
|
1925 | if (sample && control && typeof sample.stack === 'string') {
|
1926 |
|
1927 |
|
1928 | var sampleLines = sample.stack.split('\n');
|
1929 | var controlLines = control.stack.split('\n');
|
1930 | var s = sampleLines.length - 1;
|
1931 | var c = controlLines.length - 1;
|
1932 |
|
1933 | while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
1934 |
|
1935 |
|
1936 |
|
1937 |
|
1938 |
|
1939 |
|
1940 | c--;
|
1941 | }
|
1942 |
|
1943 | for (; s >= 1 && c >= 0; s--, c--) {
|
1944 |
|
1945 |
|
1946 | if (sampleLines[s] !== controlLines[c]) {
|
1947 |
|
1948 |
|
1949 |
|
1950 |
|
1951 |
|
1952 | if (s !== 1 || c !== 1) {
|
1953 | do {
|
1954 | s--;
|
1955 | c--;
|
1956 |
|
1957 |
|
1958 | if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
1959 |
|
1960 | var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
|
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 | if (fn.displayName && _frame.includes('<anonymous>')) {
|
1966 | _frame = _frame.replace('<anonymous>', fn.displayName);
|
1967 | }
|
1968 |
|
1969 | {
|
1970 | if (typeof fn === 'function') {
|
1971 | componentFrameCache.set(fn, _frame);
|
1972 | }
|
1973 | }
|
1974 |
|
1975 |
|
1976 | return _frame;
|
1977 | }
|
1978 | } while (s >= 1 && c >= 0);
|
1979 | }
|
1980 |
|
1981 | break;
|
1982 | }
|
1983 | }
|
1984 | }
|
1985 | } finally {
|
1986 | reentry = false;
|
1987 |
|
1988 | {
|
1989 | ReactCurrentDispatcher$1.current = previousDispatcher;
|
1990 | reenableLogs();
|
1991 | }
|
1992 |
|
1993 | Error.prepareStackTrace = previousPrepareStackTrace;
|
1994 | }
|
1995 |
|
1996 |
|
1997 | var name = fn ? fn.displayName || fn.name : '';
|
1998 | var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
1999 |
|
2000 | {
|
2001 | if (typeof fn === 'function') {
|
2002 | componentFrameCache.set(fn, syntheticFrame);
|
2003 | }
|
2004 | }
|
2005 |
|
2006 | return syntheticFrame;
|
2007 | }
|
2008 | function describeFunctionComponentFrame(fn, source, ownerFn) {
|
2009 | {
|
2010 | return describeNativeComponentFrame(fn, false);
|
2011 | }
|
2012 | }
|
2013 |
|
2014 | function shouldConstruct(Component) {
|
2015 | var prototype = Component.prototype;
|
2016 | return !!(prototype && prototype.isReactComponent);
|
2017 | }
|
2018 |
|
2019 | function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
2020 |
|
2021 | if (type == null) {
|
2022 | return '';
|
2023 | }
|
2024 |
|
2025 | if (typeof type === 'function') {
|
2026 | {
|
2027 | return describeNativeComponentFrame(type, shouldConstruct(type));
|
2028 | }
|
2029 | }
|
2030 |
|
2031 | if (typeof type === 'string') {
|
2032 | return describeBuiltInComponentFrame(type);
|
2033 | }
|
2034 |
|
2035 | switch (type) {
|
2036 | case REACT_SUSPENSE_TYPE:
|
2037 | return describeBuiltInComponentFrame('Suspense');
|
2038 |
|
2039 | case REACT_SUSPENSE_LIST_TYPE:
|
2040 | return describeBuiltInComponentFrame('SuspenseList');
|
2041 | }
|
2042 |
|
2043 | if (typeof type === 'object') {
|
2044 | switch (type.$$typeof) {
|
2045 | case REACT_FORWARD_REF_TYPE:
|
2046 | return describeFunctionComponentFrame(type.render);
|
2047 |
|
2048 | case REACT_MEMO_TYPE:
|
2049 |
|
2050 | return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
2051 |
|
2052 | case REACT_LAZY_TYPE:
|
2053 | {
|
2054 | var lazyComponent = type;
|
2055 | var payload = lazyComponent._payload;
|
2056 | var init = lazyComponent._init;
|
2057 |
|
2058 | try {
|
2059 |
|
2060 | return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
2061 | } catch (x) {}
|
2062 | }
|
2063 | }
|
2064 | }
|
2065 |
|
2066 | return '';
|
2067 | }
|
2068 |
|
2069 | var loggedTypeFailures = {};
|
2070 | var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
2071 |
|
2072 | function setCurrentlyValidatingElement(element) {
|
2073 | {
|
2074 | if (element) {
|
2075 | var owner = element._owner;
|
2076 | var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
2077 | ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
2078 | } else {
|
2079 | ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
2080 | }
|
2081 | }
|
2082 | }
|
2083 |
|
2084 | function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
2085 | {
|
2086 |
|
2087 | var has = Function.call.bind(hasOwnProperty);
|
2088 |
|
2089 | for (var typeSpecName in typeSpecs) {
|
2090 | if (has(typeSpecs, typeSpecName)) {
|
2091 | var error$1 = void 0;
|
2092 |
|
2093 |
|
2094 |
|
2095 | try {
|
2096 |
|
2097 |
|
2098 | if (typeof typeSpecs[typeSpecName] !== 'function') {
|
2099 |
|
2100 | 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`.');
|
2101 | err.name = 'Invariant Violation';
|
2102 | throw err;
|
2103 | }
|
2104 |
|
2105 | error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
2106 | } catch (ex) {
|
2107 | error$1 = ex;
|
2108 | }
|
2109 |
|
2110 | if (error$1 && !(error$1 instanceof Error)) {
|
2111 | setCurrentlyValidatingElement(element);
|
2112 |
|
2113 | 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);
|
2114 |
|
2115 | setCurrentlyValidatingElement(null);
|
2116 | }
|
2117 |
|
2118 | if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
2119 |
|
2120 |
|
2121 | loggedTypeFailures[error$1.message] = true;
|
2122 | setCurrentlyValidatingElement(element);
|
2123 |
|
2124 | error('Failed %s type: %s', location, error$1.message);
|
2125 |
|
2126 | setCurrentlyValidatingElement(null);
|
2127 | }
|
2128 | }
|
2129 | }
|
2130 | }
|
2131 | }
|
2132 |
|
2133 | function setCurrentlyValidatingElement$1(element) {
|
2134 | {
|
2135 | if (element) {
|
2136 | var owner = element._owner;
|
2137 | var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
2138 | setExtraStackFrame(stack);
|
2139 | } else {
|
2140 | setExtraStackFrame(null);
|
2141 | }
|
2142 | }
|
2143 | }
|
2144 |
|
2145 | var propTypesMisspellWarningShown;
|
2146 |
|
2147 | {
|
2148 | propTypesMisspellWarningShown = false;
|
2149 | }
|
2150 |
|
2151 | function getDeclarationErrorAddendum() {
|
2152 | if (ReactCurrentOwner.current) {
|
2153 | var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
2154 |
|
2155 | if (name) {
|
2156 | return '\n\nCheck the render method of `' + name + '`.';
|
2157 | }
|
2158 | }
|
2159 |
|
2160 | return '';
|
2161 | }
|
2162 |
|
2163 | function getSourceInfoErrorAddendum(source) {
|
2164 | if (source !== undefined) {
|
2165 | var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
2166 | var lineNumber = source.lineNumber;
|
2167 | return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
2168 | }
|
2169 |
|
2170 | return '';
|
2171 | }
|
2172 |
|
2173 | function getSourceInfoErrorAddendumForProps(elementProps) {
|
2174 | if (elementProps !== null && elementProps !== undefined) {
|
2175 | return getSourceInfoErrorAddendum(elementProps.__source);
|
2176 | }
|
2177 |
|
2178 | return '';
|
2179 | }
|
2180 |
|
2181 |
|
2182 |
|
2183 |
|
2184 |
|
2185 |
|
2186 |
|
2187 | var ownerHasKeyUseWarning = {};
|
2188 |
|
2189 | function getCurrentComponentErrorInfo(parentType) {
|
2190 | var info = getDeclarationErrorAddendum();
|
2191 |
|
2192 | if (!info) {
|
2193 | var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
2194 |
|
2195 | if (parentName) {
|
2196 | info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
2197 | }
|
2198 | }
|
2199 |
|
2200 | return info;
|
2201 | }
|
2202 |
|
2203 |
|
2204 |
|
2205 |
|
2206 |
|
2207 |
|
2208 |
|
2209 |
|
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 |
|
2215 | function validateExplicitKey(element, parentType) {
|
2216 | if (!element._store || element._store.validated || element.key != null) {
|
2217 | return;
|
2218 | }
|
2219 |
|
2220 | element._store.validated = true;
|
2221 | var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
2222 |
|
2223 | if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
2224 | return;
|
2225 | }
|
2226 |
|
2227 | ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
2228 |
|
2229 |
|
2230 |
|
2231 | var childOwner = '';
|
2232 |
|
2233 | if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
2234 |
|
2235 | childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
2236 | }
|
2237 |
|
2238 | {
|
2239 | setCurrentlyValidatingElement$1(element);
|
2240 |
|
2241 | 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);
|
2242 |
|
2243 | setCurrentlyValidatingElement$1(null);
|
2244 | }
|
2245 | }
|
2246 |
|
2247 |
|
2248 |
|
2249 |
|
2250 |
|
2251 |
|
2252 |
|
2253 |
|
2254 |
|
2255 |
|
2256 |
|
2257 | function validateChildKeys(node, parentType) {
|
2258 | if (typeof node !== 'object') {
|
2259 | return;
|
2260 | }
|
2261 |
|
2262 | if (isArray(node)) {
|
2263 | for (var i = 0; i < node.length; i++) {
|
2264 | var child = node[i];
|
2265 |
|
2266 | if (isValidElement(child)) {
|
2267 | validateExplicitKey(child, parentType);
|
2268 | }
|
2269 | }
|
2270 | } else if (isValidElement(node)) {
|
2271 |
|
2272 | if (node._store) {
|
2273 | node._store.validated = true;
|
2274 | }
|
2275 | } else if (node) {
|
2276 | var iteratorFn = getIteratorFn(node);
|
2277 |
|
2278 | if (typeof iteratorFn === 'function') {
|
2279 |
|
2280 |
|
2281 | if (iteratorFn !== node.entries) {
|
2282 | var iterator = iteratorFn.call(node);
|
2283 | var step;
|
2284 |
|
2285 | while (!(step = iterator.next()).done) {
|
2286 | if (isValidElement(step.value)) {
|
2287 | validateExplicitKey(step.value, parentType);
|
2288 | }
|
2289 | }
|
2290 | }
|
2291 | }
|
2292 | }
|
2293 | }
|
2294 |
|
2295 |
|
2296 |
|
2297 |
|
2298 |
|
2299 |
|
2300 |
|
2301 |
|
2302 | function validatePropTypes(element) {
|
2303 | {
|
2304 | var type = element.type;
|
2305 |
|
2306 | if (type === null || type === undefined || typeof type === 'string') {
|
2307 | return;
|
2308 | }
|
2309 |
|
2310 | var propTypes;
|
2311 |
|
2312 | if (typeof type === 'function') {
|
2313 | propTypes = type.propTypes;
|
2314 | } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
2315 |
|
2316 | type.$$typeof === REACT_MEMO_TYPE)) {
|
2317 | propTypes = type.propTypes;
|
2318 | } else {
|
2319 | return;
|
2320 | }
|
2321 |
|
2322 | if (propTypes) {
|
2323 |
|
2324 | var name = getComponentNameFromType(type);
|
2325 | checkPropTypes(propTypes, element.props, 'prop', name, element);
|
2326 | } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
2327 | propTypesMisspellWarningShown = true;
|
2328 |
|
2329 | var _name = getComponentNameFromType(type);
|
2330 |
|
2331 | error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
2332 | }
|
2333 |
|
2334 | if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
2335 | error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
2336 | }
|
2337 | }
|
2338 | }
|
2339 |
|
2340 |
|
2341 |
|
2342 |
|
2343 |
|
2344 |
|
2345 | function validateFragmentProps(fragment) {
|
2346 | {
|
2347 | var keys = Object.keys(fragment.props);
|
2348 |
|
2349 | for (var i = 0; i < keys.length; i++) {
|
2350 | var key = keys[i];
|
2351 |
|
2352 | if (key !== 'children' && key !== 'key') {
|
2353 | setCurrentlyValidatingElement$1(fragment);
|
2354 |
|
2355 | error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
2356 |
|
2357 | setCurrentlyValidatingElement$1(null);
|
2358 | break;
|
2359 | }
|
2360 | }
|
2361 |
|
2362 | if (fragment.ref !== null) {
|
2363 | setCurrentlyValidatingElement$1(fragment);
|
2364 |
|
2365 | error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
2366 |
|
2367 | setCurrentlyValidatingElement$1(null);
|
2368 | }
|
2369 | }
|
2370 | }
|
2371 | function createElementWithValidation(type, props, children) {
|
2372 | var validType = isValidElementType(type);
|
2373 |
|
2374 |
|
2375 | if (!validType) {
|
2376 | var info = '';
|
2377 |
|
2378 | if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
2379 | info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
2380 | }
|
2381 |
|
2382 | var sourceInfo = getSourceInfoErrorAddendumForProps(props);
|
2383 |
|
2384 | if (sourceInfo) {
|
2385 | info += sourceInfo;
|
2386 | } else {
|
2387 | info += getDeclarationErrorAddendum();
|
2388 | }
|
2389 |
|
2390 | var typeString;
|
2391 |
|
2392 | if (type === null) {
|
2393 | typeString = 'null';
|
2394 | } else if (isArray(type)) {
|
2395 | typeString = 'array';
|
2396 | } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
2397 | typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
2398 | info = ' Did you accidentally export a JSX literal instead of a component?';
|
2399 | } else {
|
2400 | typeString = typeof type;
|
2401 | }
|
2402 |
|
2403 | {
|
2404 | error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
2405 | }
|
2406 | }
|
2407 |
|
2408 | var element = createElement.apply(this, arguments);
|
2409 |
|
2410 |
|
2411 | if (element == null) {
|
2412 | return element;
|
2413 | }
|
2414 |
|
2415 |
|
2416 |
|
2417 |
|
2418 |
|
2419 |
|
2420 | if (validType) {
|
2421 | for (var i = 2; i < arguments.length; i++) {
|
2422 | validateChildKeys(arguments[i], type);
|
2423 | }
|
2424 | }
|
2425 |
|
2426 | if (type === REACT_FRAGMENT_TYPE) {
|
2427 | validateFragmentProps(element);
|
2428 | } else {
|
2429 | validatePropTypes(element);
|
2430 | }
|
2431 |
|
2432 | return element;
|
2433 | }
|
2434 | var didWarnAboutDeprecatedCreateFactory = false;
|
2435 | function createFactoryWithValidation(type) {
|
2436 | var validatedFactory = createElementWithValidation.bind(null, type);
|
2437 | validatedFactory.type = type;
|
2438 |
|
2439 | {
|
2440 | if (!didWarnAboutDeprecatedCreateFactory) {
|
2441 | didWarnAboutDeprecatedCreateFactory = true;
|
2442 |
|
2443 | warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
|
2444 | }
|
2445 |
|
2446 |
|
2447 | Object.defineProperty(validatedFactory, 'type', {
|
2448 | enumerable: false,
|
2449 | get: function () {
|
2450 | warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
2451 |
|
2452 | Object.defineProperty(this, 'type', {
|
2453 | value: type
|
2454 | });
|
2455 | return type;
|
2456 | }
|
2457 | });
|
2458 | }
|
2459 |
|
2460 | return validatedFactory;
|
2461 | }
|
2462 | function cloneElementWithValidation(element, props, children) {
|
2463 | var newElement = cloneElement.apply(this, arguments);
|
2464 |
|
2465 | for (var i = 2; i < arguments.length; i++) {
|
2466 | validateChildKeys(arguments[i], newElement.type);
|
2467 | }
|
2468 |
|
2469 | validatePropTypes(newElement);
|
2470 | return newElement;
|
2471 | }
|
2472 |
|
2473 | var ContextRegistry$1 = ReactSharedInternals.ContextRegistry;
|
2474 | function createServerContext(globalName, defaultValue) {
|
2475 |
|
2476 | var wasDefined = true;
|
2477 |
|
2478 | if (!ContextRegistry$1[globalName]) {
|
2479 | wasDefined = false;
|
2480 | var _context = {
|
2481 | $$typeof: REACT_SERVER_CONTEXT_TYPE,
|
2482 |
|
2483 |
|
2484 |
|
2485 |
|
2486 |
|
2487 | _currentValue: defaultValue,
|
2488 | _currentValue2: defaultValue,
|
2489 | _defaultValue: defaultValue,
|
2490 |
|
2491 |
|
2492 | _threadCount: 0,
|
2493 |
|
2494 | Provider: null,
|
2495 | Consumer: null,
|
2496 | _globalName: globalName
|
2497 | };
|
2498 | _context.Provider = {
|
2499 | $$typeof: REACT_PROVIDER_TYPE,
|
2500 | _context: _context
|
2501 | };
|
2502 |
|
2503 | {
|
2504 | var hasWarnedAboutUsingConsumer;
|
2505 | _context._currentRenderer = null;
|
2506 | _context._currentRenderer2 = null;
|
2507 | Object.defineProperties(_context, {
|
2508 | Consumer: {
|
2509 | get: function () {
|
2510 | if (!hasWarnedAboutUsingConsumer) {
|
2511 | error('Consumer pattern is not supported by ReactServerContext');
|
2512 |
|
2513 | hasWarnedAboutUsingConsumer = true;
|
2514 | }
|
2515 |
|
2516 | return null;
|
2517 | }
|
2518 | }
|
2519 | });
|
2520 | }
|
2521 |
|
2522 | ContextRegistry$1[globalName] = _context;
|
2523 | }
|
2524 |
|
2525 | var context = ContextRegistry$1[globalName];
|
2526 |
|
2527 | if (context._defaultValue === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {
|
2528 | context._defaultValue = defaultValue;
|
2529 |
|
2530 | if (context._currentValue === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {
|
2531 | context._currentValue = defaultValue;
|
2532 | }
|
2533 |
|
2534 | if (context._currentValue2 === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {
|
2535 | context._currentValue2 = defaultValue;
|
2536 | }
|
2537 | } else if (wasDefined) {
|
2538 | throw new Error("ServerContext: " + globalName + " already defined");
|
2539 | }
|
2540 |
|
2541 | return context;
|
2542 | }
|
2543 |
|
2544 | function startTransition(scope, options) {
|
2545 | var prevTransition = ReactCurrentBatchConfig.transition;
|
2546 | ReactCurrentBatchConfig.transition = {};
|
2547 | var currentTransition = ReactCurrentBatchConfig.transition;
|
2548 |
|
2549 | {
|
2550 | ReactCurrentBatchConfig.transition._updatedFibers = new Set();
|
2551 | }
|
2552 |
|
2553 | try {
|
2554 | scope();
|
2555 | } finally {
|
2556 | ReactCurrentBatchConfig.transition = prevTransition;
|
2557 |
|
2558 | {
|
2559 | if (prevTransition === null && currentTransition._updatedFibers) {
|
2560 | var updatedFibersCount = currentTransition._updatedFibers.size;
|
2561 |
|
2562 | if (updatedFibersCount > 10) {
|
2563 | warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
|
2564 | }
|
2565 |
|
2566 | currentTransition._updatedFibers.clear();
|
2567 | }
|
2568 | }
|
2569 | }
|
2570 | }
|
2571 |
|
2572 | var didWarnAboutMessageChannel = false;
|
2573 | var enqueueTaskImpl = null;
|
2574 | function enqueueTask(task) {
|
2575 | if (enqueueTaskImpl === null) {
|
2576 | try {
|
2577 |
|
2578 |
|
2579 | var requireString = ('require' + Math.random()).slice(0, 7);
|
2580 | var nodeRequire = module && module[requireString];
|
2581 |
|
2582 |
|
2583 | enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
|
2584 | } catch (_err) {
|
2585 |
|
2586 |
|
2587 |
|
2588 | enqueueTaskImpl = function (callback) {
|
2589 | {
|
2590 | if (didWarnAboutMessageChannel === false) {
|
2591 | didWarnAboutMessageChannel = true;
|
2592 |
|
2593 | if (typeof MessageChannel === 'undefined') {
|
2594 | error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
|
2595 | }
|
2596 | }
|
2597 | }
|
2598 |
|
2599 | var channel = new MessageChannel();
|
2600 | channel.port1.onmessage = callback;
|
2601 | channel.port2.postMessage(undefined);
|
2602 | };
|
2603 | }
|
2604 | }
|
2605 |
|
2606 | return enqueueTaskImpl(task);
|
2607 | }
|
2608 |
|
2609 | var actScopeDepth = 0;
|
2610 | var didWarnNoAwaitAct = false;
|
2611 | function act(callback) {
|
2612 | {
|
2613 |
|
2614 |
|
2615 | var prevActScopeDepth = actScopeDepth;
|
2616 | actScopeDepth++;
|
2617 |
|
2618 | if (ReactCurrentActQueue.current === null) {
|
2619 |
|
2620 |
|
2621 | ReactCurrentActQueue.current = [];
|
2622 | }
|
2623 |
|
2624 | var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
|
2625 | var result;
|
2626 |
|
2627 | try {
|
2628 |
|
2629 |
|
2630 |
|
2631 |
|
2632 | ReactCurrentActQueue.isBatchingLegacy = true;
|
2633 | result = callback();
|
2634 |
|
2635 |
|
2636 |
|
2637 | if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
|
2638 | var queue = ReactCurrentActQueue.current;
|
2639 |
|
2640 | if (queue !== null) {
|
2641 | ReactCurrentActQueue.didScheduleLegacyUpdate = false;
|
2642 | flushActQueue(queue);
|
2643 | }
|
2644 | }
|
2645 | } catch (error) {
|
2646 | popActScope(prevActScopeDepth);
|
2647 | throw error;
|
2648 | } finally {
|
2649 | ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
|
2650 | }
|
2651 |
|
2652 | if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
|
2653 | var thenableResult = result;
|
2654 |
|
2655 |
|
2656 | var wasAwaited = false;
|
2657 | var thenable = {
|
2658 | then: function (resolve, reject) {
|
2659 | wasAwaited = true;
|
2660 | thenableResult.then(function (returnValue) {
|
2661 | popActScope(prevActScopeDepth);
|
2662 |
|
2663 | if (actScopeDepth === 0) {
|
2664 |
|
2665 |
|
2666 | recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
2667 | } else {
|
2668 | resolve(returnValue);
|
2669 | }
|
2670 | }, function (error) {
|
2671 |
|
2672 | popActScope(prevActScopeDepth);
|
2673 | reject(error);
|
2674 | });
|
2675 | }
|
2676 | };
|
2677 |
|
2678 | {
|
2679 | if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
|
2680 |
|
2681 | Promise.resolve().then(function () {}).then(function () {
|
2682 | if (!wasAwaited) {
|
2683 | didWarnNoAwaitAct = true;
|
2684 |
|
2685 | error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
|
2686 | }
|
2687 | });
|
2688 | }
|
2689 | }
|
2690 |
|
2691 | return thenable;
|
2692 | } else {
|
2693 | var returnValue = result;
|
2694 |
|
2695 |
|
2696 | popActScope(prevActScopeDepth);
|
2697 |
|
2698 | if (actScopeDepth === 0) {
|
2699 |
|
2700 | var _queue = ReactCurrentActQueue.current;
|
2701 |
|
2702 | if (_queue !== null) {
|
2703 | flushActQueue(_queue);
|
2704 | ReactCurrentActQueue.current = null;
|
2705 | }
|
2706 |
|
2707 |
|
2708 |
|
2709 | var _thenable = {
|
2710 | then: function (resolve, reject) {
|
2711 |
|
2712 |
|
2713 |
|
2714 | if (ReactCurrentActQueue.current === null) {
|
2715 |
|
2716 | ReactCurrentActQueue.current = [];
|
2717 | recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
2718 | } else {
|
2719 | resolve(returnValue);
|
2720 | }
|
2721 | }
|
2722 | };
|
2723 | return _thenable;
|
2724 | } else {
|
2725 |
|
2726 |
|
2727 | var _thenable2 = {
|
2728 | then: function (resolve, reject) {
|
2729 | resolve(returnValue);
|
2730 | }
|
2731 | };
|
2732 | return _thenable2;
|
2733 | }
|
2734 | }
|
2735 | }
|
2736 | }
|
2737 |
|
2738 | function popActScope(prevActScopeDepth) {
|
2739 | {
|
2740 | if (prevActScopeDepth !== actScopeDepth - 1) {
|
2741 | error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
|
2742 | }
|
2743 |
|
2744 | actScopeDepth = prevActScopeDepth;
|
2745 | }
|
2746 | }
|
2747 |
|
2748 | function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
2749 | {
|
2750 | var queue = ReactCurrentActQueue.current;
|
2751 |
|
2752 | if (queue !== null) {
|
2753 | try {
|
2754 | flushActQueue(queue);
|
2755 | enqueueTask(function () {
|
2756 | if (queue.length === 0) {
|
2757 |
|
2758 | ReactCurrentActQueue.current = null;
|
2759 | resolve(returnValue);
|
2760 | } else {
|
2761 |
|
2762 | recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
2763 | }
|
2764 | });
|
2765 | } catch (error) {
|
2766 | reject(error);
|
2767 | }
|
2768 | } else {
|
2769 | resolve(returnValue);
|
2770 | }
|
2771 | }
|
2772 | }
|
2773 |
|
2774 | var isFlushing = false;
|
2775 |
|
2776 | function flushActQueue(queue) {
|
2777 | {
|
2778 | if (!isFlushing) {
|
2779 |
|
2780 | isFlushing = true;
|
2781 | var i = 0;
|
2782 |
|
2783 | try {
|
2784 | for (; i < queue.length; i++) {
|
2785 | var callback = queue[i];
|
2786 |
|
2787 | do {
|
2788 | callback = callback(true);
|
2789 | } while (callback !== null);
|
2790 | }
|
2791 |
|
2792 | queue.length = 0;
|
2793 | } catch (error) {
|
2794 |
|
2795 | queue = queue.slice(i + 1);
|
2796 | throw error;
|
2797 | } finally {
|
2798 | isFlushing = false;
|
2799 | }
|
2800 | }
|
2801 | }
|
2802 | }
|
2803 |
|
2804 | var createElement$1 = createElementWithValidation ;
|
2805 | var cloneElement$1 = cloneElementWithValidation ;
|
2806 | var createFactory = createFactoryWithValidation ;
|
2807 | var Children = {
|
2808 | map: mapChildren,
|
2809 | forEach: forEachChildren,
|
2810 | count: countChildren,
|
2811 | toArray: toArray,
|
2812 | only: onlyChild
|
2813 | };
|
2814 |
|
2815 | exports.Children = Children;
|
2816 | exports.Component = Component;
|
2817 | exports.Fragment = REACT_FRAGMENT_TYPE;
|
2818 | exports.Profiler = REACT_PROFILER_TYPE;
|
2819 | exports.PureComponent = PureComponent;
|
2820 | exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
2821 | exports.Suspense = REACT_SUSPENSE_TYPE;
|
2822 | exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
2823 | exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
2824 | exports.cloneElement = cloneElement$1;
|
2825 | exports.createContext = createContext;
|
2826 | exports.createElement = createElement$1;
|
2827 | exports.createFactory = createFactory;
|
2828 | exports.createRef = createRef;
|
2829 | exports.createServerContext = createServerContext;
|
2830 | exports.experimental_use = use;
|
2831 | exports.experimental_useEvent = useEvent;
|
2832 | exports.forwardRef = forwardRef;
|
2833 | exports.isValidElement = isValidElement;
|
2834 | exports.lazy = lazy;
|
2835 | exports.memo = memo;
|
2836 | exports.startTransition = startTransition;
|
2837 | exports.unstable_Cache = REACT_CACHE_TYPE;
|
2838 | exports.unstable_DebugTracingMode = REACT_DEBUG_TRACING_MODE_TYPE;
|
2839 | exports.unstable_Offscreen = REACT_OFFSCREEN_TYPE;
|
2840 | exports.unstable_act = act;
|
2841 | exports.unstable_getCacheForType = getCacheForType;
|
2842 | exports.unstable_getCacheSignal = getCacheSignal;
|
2843 | exports.unstable_useCacheRefresh = useCacheRefresh;
|
2844 | exports.unstable_useMemoCache = useMemoCache;
|
2845 | exports.useCallback = useCallback;
|
2846 | exports.useContext = useContext;
|
2847 | exports.useDebugValue = useDebugValue;
|
2848 | exports.useDeferredValue = useDeferredValue;
|
2849 | exports.useEffect = useEffect;
|
2850 | exports.useId = useId;
|
2851 | exports.useImperativeHandle = useImperativeHandle;
|
2852 | exports.useInsertionEffect = useInsertionEffect;
|
2853 | exports.useLayoutEffect = useLayoutEffect;
|
2854 | exports.useMemo = useMemo;
|
2855 | exports.useReducer = useReducer;
|
2856 | exports.useRef = useRef;
|
2857 | exports.useState = useState;
|
2858 | exports.useSyncExternalStore = useSyncExternalStore;
|
2859 | exports.useTransition = useTransition;
|
2860 | exports.version = ReactVersion;
|
2861 |
|
2862 | if (
|
2863 | typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
2864 | typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
|
2865 | 'function'
|
2866 | ) {
|
2867 | __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
2868 | }
|
2869 |
|
2870 | })();
|
2871 | }
|