UNPKG

287 kBJavaScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @noflow
8 * @preventMunge
9 * @generated
10 */
11
12"use strict";
13require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore");
14var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"),
15 React = require("react"),
16 Scheduler = require("scheduler"),
17 tracing = require("scheduler/tracing");
18function ReactError(error) {
19 error.name = "Invariant Violation";
20 return error;
21}
22var eventPluginOrder = null,
23 namesToPlugins = {};
24function recomputePluginOrdering() {
25 if (eventPluginOrder)
26 for (var pluginName in namesToPlugins) {
27 var pluginModule = namesToPlugins[pluginName],
28 pluginIndex = eventPluginOrder.indexOf(pluginName);
29 if (!(-1 < pluginIndex))
30 throw ReactError(
31 Error(
32 "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" +
33 pluginName +
34 "`."
35 )
36 );
37 if (!plugins[pluginIndex]) {
38 if (!pluginModule.extractEvents)
39 throw ReactError(
40 Error(
41 "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" +
42 pluginName +
43 "` does not."
44 )
45 );
46 plugins[pluginIndex] = pluginModule;
47 pluginIndex = pluginModule.eventTypes;
48 for (var eventName in pluginIndex) {
49 var JSCompiler_inline_result = void 0;
50 var dispatchConfig = pluginIndex[eventName],
51 pluginModule$jscomp$0 = pluginModule,
52 eventName$jscomp$0 = eventName;
53 if (eventNameDispatchConfigs.hasOwnProperty(eventName$jscomp$0))
54 throw ReactError(
55 Error(
56 "EventPluginHub: More than one plugin attempted to publish the same event name, `" +
57 eventName$jscomp$0 +
58 "`."
59 )
60 );
61 eventNameDispatchConfigs[eventName$jscomp$0] = dispatchConfig;
62 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
63 if (phasedRegistrationNames) {
64 for (JSCompiler_inline_result in phasedRegistrationNames)
65 phasedRegistrationNames.hasOwnProperty(
66 JSCompiler_inline_result
67 ) &&
68 publishRegistrationName(
69 phasedRegistrationNames[JSCompiler_inline_result],
70 pluginModule$jscomp$0,
71 eventName$jscomp$0
72 );
73 JSCompiler_inline_result = !0;
74 } else
75 dispatchConfig.registrationName
76 ? (publishRegistrationName(
77 dispatchConfig.registrationName,
78 pluginModule$jscomp$0,
79 eventName$jscomp$0
80 ),
81 (JSCompiler_inline_result = !0))
82 : (JSCompiler_inline_result = !1);
83 if (!JSCompiler_inline_result)
84 throw ReactError(
85 Error(
86 "EventPluginRegistry: Failed to publish event `" +
87 eventName +
88 "` for plugin `" +
89 pluginName +
90 "`."
91 )
92 );
93 }
94 }
95 }
96}
97function publishRegistrationName(registrationName, pluginModule) {
98 if (registrationNameModules[registrationName])
99 throw ReactError(
100 Error(
101 "EventPluginHub: More than one plugin attempted to publish the same registration name, `" +
102 registrationName +
103 "`."
104 )
105 );
106 registrationNameModules[registrationName] = pluginModule;
107}
108var plugins = [],
109 eventNameDispatchConfigs = {},
110 registrationNameModules = {};
111function invokeGuardedCallbackImpl(name, func, context, a, b, c, d, e, f) {
112 var funcArgs = Array.prototype.slice.call(arguments, 3);
113 try {
114 func.apply(context, funcArgs);
115 } catch (error) {
116 this.onError(error);
117 }
118}
119var hasError = !1,
120 caughtError = null,
121 hasRethrowError = !1,
122 rethrowError = null,
123 reporter = {
124 onError: function(error) {
125 hasError = !0;
126 caughtError = error;
127 }
128 };
129function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
130 hasError = !1;
131 caughtError = null;
132 invokeGuardedCallbackImpl.apply(reporter, arguments);
133}
134function invokeGuardedCallbackAndCatchFirstError(
135 name,
136 func,
137 context,
138 a,
139 b,
140 c,
141 d,
142 e,
143 f
144) {
145 invokeGuardedCallback.apply(this, arguments);
146 if (hasError) {
147 if (hasError) {
148 var error = caughtError;
149 hasError = !1;
150 caughtError = null;
151 } else
152 throw ReactError(
153 Error(
154 "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue."
155 )
156 );
157 hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
158 }
159}
160var getFiberCurrentPropsFromNode = null,
161 getInstanceFromNode = null,
162 getNodeFromInstance = null;
163function executeDispatch(event, listener, inst) {
164 var type = event.type || "unknown-event";
165 event.currentTarget = getNodeFromInstance(inst);
166 invokeGuardedCallbackAndCatchFirstError(type, listener, void 0, event);
167 event.currentTarget = null;
168}
169function executeDirectDispatch(event) {
170 var dispatchListener = event._dispatchListeners,
171 dispatchInstance = event._dispatchInstances;
172 if (Array.isArray(dispatchListener))
173 throw ReactError(Error("executeDirectDispatch(...): Invalid `event`."));
174 event.currentTarget = dispatchListener
175 ? getNodeFromInstance(dispatchInstance)
176 : null;
177 dispatchListener = dispatchListener ? dispatchListener(event) : null;
178 event.currentTarget = null;
179 event._dispatchListeners = null;
180 event._dispatchInstances = null;
181 return dispatchListener;
182}
183function accumulateInto(current, next) {
184 if (null == next)
185 throw ReactError(
186 Error(
187 "accumulateInto(...): Accumulated items must not be null or undefined."
188 )
189 );
190 if (null == current) return next;
191 if (Array.isArray(current)) {
192 if (Array.isArray(next)) return current.push.apply(current, next), current;
193 current.push(next);
194 return current;
195 }
196 return Array.isArray(next) ? [current].concat(next) : [current, next];
197}
198function forEachAccumulated(arr, cb, scope) {
199 Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
200}
201var eventQueue = null;
202function executeDispatchesAndReleaseTopLevel(e) {
203 if (e) {
204 var dispatchListeners = e._dispatchListeners,
205 dispatchInstances = e._dispatchInstances;
206 if (Array.isArray(dispatchListeners))
207 for (
208 var i = 0;
209 i < dispatchListeners.length && !e.isPropagationStopped();
210 i++
211 )
212 executeDispatch(e, dispatchListeners[i], dispatchInstances[i]);
213 else
214 dispatchListeners &&
215 executeDispatch(e, dispatchListeners, dispatchInstances);
216 e._dispatchListeners = null;
217 e._dispatchInstances = null;
218 e.isPersistent() || e.constructor.release(e);
219 }
220}
221var injection = {
222 injectEventPluginOrder: function(injectedEventPluginOrder) {
223 if (eventPluginOrder)
224 throw ReactError(
225 Error(
226 "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."
227 )
228 );
229 eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
230 recomputePluginOrdering();
231 },
232 injectEventPluginsByName: function(injectedNamesToPlugins) {
233 var isOrderingDirty = !1,
234 pluginName;
235 for (pluginName in injectedNamesToPlugins)
236 if (injectedNamesToPlugins.hasOwnProperty(pluginName)) {
237 var pluginModule = injectedNamesToPlugins[pluginName];
238 if (
239 !namesToPlugins.hasOwnProperty(pluginName) ||
240 namesToPlugins[pluginName] !== pluginModule
241 ) {
242 if (namesToPlugins[pluginName])
243 throw ReactError(
244 Error(
245 "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
246 pluginName +
247 "`."
248 )
249 );
250 namesToPlugins[pluginName] = pluginModule;
251 isOrderingDirty = !0;
252 }
253 }
254 isOrderingDirty && recomputePluginOrdering();
255 }
256};
257function getListener(inst, registrationName) {
258 var listener = inst.stateNode;
259 if (!listener) return null;
260 var props = getFiberCurrentPropsFromNode(listener);
261 if (!props) return null;
262 listener = props[registrationName];
263 a: switch (registrationName) {
264 case "onClick":
265 case "onClickCapture":
266 case "onDoubleClick":
267 case "onDoubleClickCapture":
268 case "onMouseDown":
269 case "onMouseDownCapture":
270 case "onMouseMove":
271 case "onMouseMoveCapture":
272 case "onMouseUp":
273 case "onMouseUpCapture":
274 (props = !props.disabled) ||
275 ((inst = inst.type),
276 (props = !(
277 "button" === inst ||
278 "input" === inst ||
279 "select" === inst ||
280 "textarea" === inst
281 )));
282 inst = !props;
283 break a;
284 default:
285 inst = !1;
286 }
287 if (inst) return null;
288 if (listener && "function" !== typeof listener)
289 throw ReactError(
290 Error(
291 "Expected `" +
292 registrationName +
293 "` listener to be a function, instead got a value of `" +
294 typeof listener +
295 "` type."
296 )
297 );
298 return listener;
299}
300function getParent(inst) {
301 do inst = inst.return;
302 while (inst && 5 !== inst.tag);
303 return inst ? inst : null;
304}
305function traverseTwoPhase(inst, fn, arg) {
306 for (var path = []; inst; ) path.push(inst), (inst = getParent(inst));
307 for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg);
308 for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg);
309}
310function accumulateDirectionalDispatches(inst, phase, event) {
311 if (
312 (phase = getListener(
313 inst,
314 event.dispatchConfig.phasedRegistrationNames[phase]
315 ))
316 )
317 (event._dispatchListeners = accumulateInto(
318 event._dispatchListeners,
319 phase
320 )),
321 (event._dispatchInstances = accumulateInto(
322 event._dispatchInstances,
323 inst
324 ));
325}
326function accumulateTwoPhaseDispatchesSingle(event) {
327 event &&
328 event.dispatchConfig.phasedRegistrationNames &&
329 traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
330}
331function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
332 if (event && event.dispatchConfig.phasedRegistrationNames) {
333 var targetInst = event._targetInst;
334 targetInst = targetInst ? getParent(targetInst) : null;
335 traverseTwoPhase(targetInst, accumulateDirectionalDispatches, event);
336 }
337}
338function accumulateDirectDispatchesSingle(event) {
339 if (event && event.dispatchConfig.registrationName) {
340 var inst = event._targetInst;
341 if (inst && event && event.dispatchConfig.registrationName) {
342 var listener = getListener(inst, event.dispatchConfig.registrationName);
343 listener &&
344 ((event._dispatchListeners = accumulateInto(
345 event._dispatchListeners,
346 listener
347 )),
348 (event._dispatchInstances = accumulateInto(
349 event._dispatchInstances,
350 inst
351 )));
352 }
353 }
354}
355function functionThatReturnsTrue() {
356 return !0;
357}
358function functionThatReturnsFalse() {
359 return !1;
360}
361function SyntheticEvent(
362 dispatchConfig,
363 targetInst,
364 nativeEvent,
365 nativeEventTarget
366) {
367 this.dispatchConfig = dispatchConfig;
368 this._targetInst = targetInst;
369 this.nativeEvent = nativeEvent;
370 dispatchConfig = this.constructor.Interface;
371 for (var propName in dispatchConfig)
372 dispatchConfig.hasOwnProperty(propName) &&
373 ((targetInst = dispatchConfig[propName])
374 ? (this[propName] = targetInst(nativeEvent))
375 : "target" === propName
376 ? (this.target = nativeEventTarget)
377 : (this[propName] = nativeEvent[propName]));
378 this.isDefaultPrevented = (null != nativeEvent.defaultPrevented
379 ? nativeEvent.defaultPrevented
380 : !1 === nativeEvent.returnValue)
381 ? functionThatReturnsTrue
382 : functionThatReturnsFalse;
383 this.isPropagationStopped = functionThatReturnsFalse;
384 return this;
385}
386Object.assign(SyntheticEvent.prototype, {
387 preventDefault: function() {
388 this.defaultPrevented = !0;
389 var event = this.nativeEvent;
390 event &&
391 (event.preventDefault
392 ? event.preventDefault()
393 : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
394 (this.isDefaultPrevented = functionThatReturnsTrue));
395 },
396 stopPropagation: function() {
397 var event = this.nativeEvent;
398 event &&
399 (event.stopPropagation
400 ? event.stopPropagation()
401 : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = !0),
402 (this.isPropagationStopped = functionThatReturnsTrue));
403 },
404 persist: function() {
405 this.isPersistent = functionThatReturnsTrue;
406 },
407 isPersistent: functionThatReturnsFalse,
408 destructor: function() {
409 var Interface = this.constructor.Interface,
410 propName;
411 for (propName in Interface) this[propName] = null;
412 this.nativeEvent = this._targetInst = this.dispatchConfig = null;
413 this.isPropagationStopped = this.isDefaultPrevented = functionThatReturnsFalse;
414 this._dispatchInstances = this._dispatchListeners = null;
415 }
416});
417SyntheticEvent.Interface = {
418 type: null,
419 target: null,
420 currentTarget: function() {
421 return null;
422 },
423 eventPhase: null,
424 bubbles: null,
425 cancelable: null,
426 timeStamp: function(event) {
427 return event.timeStamp || Date.now();
428 },
429 defaultPrevented: null,
430 isTrusted: null
431};
432SyntheticEvent.extend = function(Interface) {
433 function E() {}
434 function Class() {
435 return Super.apply(this, arguments);
436 }
437 var Super = this;
438 E.prototype = Super.prototype;
439 var prototype = new E();
440 Object.assign(prototype, Class.prototype);
441 Class.prototype = prototype;
442 Class.prototype.constructor = Class;
443 Class.Interface = Object.assign({}, Super.Interface, Interface);
444 Class.extend = Super.extend;
445 addEventPoolingTo(Class);
446 return Class;
447};
448addEventPoolingTo(SyntheticEvent);
449function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
450 if (this.eventPool.length) {
451 var instance = this.eventPool.pop();
452 this.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
453 return instance;
454 }
455 return new this(dispatchConfig, targetInst, nativeEvent, nativeInst);
456}
457function releasePooledEvent(event) {
458 if (!(event instanceof this))
459 throw ReactError(
460 Error(
461 "Trying to release an event instance into a pool of a different type."
462 )
463 );
464 event.destructor();
465 10 > this.eventPool.length && this.eventPool.push(event);
466}
467function addEventPoolingTo(EventConstructor) {
468 EventConstructor.eventPool = [];
469 EventConstructor.getPooled = getPooledEvent;
470 EventConstructor.release = releasePooledEvent;
471}
472var ResponderSyntheticEvent = SyntheticEvent.extend({
473 touchHistory: function() {
474 return null;
475 }
476});
477function isStartish(topLevelType) {
478 return "topTouchStart" === topLevelType;
479}
480function isMoveish(topLevelType) {
481 return "topTouchMove" === topLevelType;
482}
483var startDependencies = ["topTouchStart"],
484 moveDependencies = ["topTouchMove"],
485 endDependencies = ["topTouchCancel", "topTouchEnd"],
486 touchBank = [],
487 touchHistory = {
488 touchBank: touchBank,
489 numberActiveTouches: 0,
490 indexOfSingleActiveTouch: -1,
491 mostRecentTimeStamp: 0
492 };
493function timestampForTouch(touch) {
494 return touch.timeStamp || touch.timestamp;
495}
496function getTouchIdentifier(_ref) {
497 _ref = _ref.identifier;
498 if (null == _ref)
499 throw ReactError(Error("Touch object is missing identifier."));
500 return _ref;
501}
502function recordTouchStart(touch) {
503 var identifier = getTouchIdentifier(touch),
504 touchRecord = touchBank[identifier];
505 touchRecord
506 ? ((touchRecord.touchActive = !0),
507 (touchRecord.startPageX = touch.pageX),
508 (touchRecord.startPageY = touch.pageY),
509 (touchRecord.startTimeStamp = timestampForTouch(touch)),
510 (touchRecord.currentPageX = touch.pageX),
511 (touchRecord.currentPageY = touch.pageY),
512 (touchRecord.currentTimeStamp = timestampForTouch(touch)),
513 (touchRecord.previousPageX = touch.pageX),
514 (touchRecord.previousPageY = touch.pageY),
515 (touchRecord.previousTimeStamp = timestampForTouch(touch)))
516 : ((touchRecord = {
517 touchActive: !0,
518 startPageX: touch.pageX,
519 startPageY: touch.pageY,
520 startTimeStamp: timestampForTouch(touch),
521 currentPageX: touch.pageX,
522 currentPageY: touch.pageY,
523 currentTimeStamp: timestampForTouch(touch),
524 previousPageX: touch.pageX,
525 previousPageY: touch.pageY,
526 previousTimeStamp: timestampForTouch(touch)
527 }),
528 (touchBank[identifier] = touchRecord));
529 touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
530}
531function recordTouchMove(touch) {
532 var touchRecord = touchBank[getTouchIdentifier(touch)];
533 touchRecord
534 ? ((touchRecord.touchActive = !0),
535 (touchRecord.previousPageX = touchRecord.currentPageX),
536 (touchRecord.previousPageY = touchRecord.currentPageY),
537 (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
538 (touchRecord.currentPageX = touch.pageX),
539 (touchRecord.currentPageY = touch.pageY),
540 (touchRecord.currentTimeStamp = timestampForTouch(touch)),
541 (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)))
542 : console.warn(
543 "Cannot record touch move without a touch start.\nTouch Move: %s\n",
544 "Touch Bank: %s",
545 printTouch(touch),
546 printTouchBank()
547 );
548}
549function recordTouchEnd(touch) {
550 var touchRecord = touchBank[getTouchIdentifier(touch)];
551 touchRecord
552 ? ((touchRecord.touchActive = !1),
553 (touchRecord.previousPageX = touchRecord.currentPageX),
554 (touchRecord.previousPageY = touchRecord.currentPageY),
555 (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
556 (touchRecord.currentPageX = touch.pageX),
557 (touchRecord.currentPageY = touch.pageY),
558 (touchRecord.currentTimeStamp = timestampForTouch(touch)),
559 (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)))
560 : console.warn(
561 "Cannot record touch end without a touch start.\nTouch End: %s\n",
562 "Touch Bank: %s",
563 printTouch(touch),
564 printTouchBank()
565 );
566}
567function printTouch(touch) {
568 return JSON.stringify({
569 identifier: touch.identifier,
570 pageX: touch.pageX,
571 pageY: touch.pageY,
572 timestamp: timestampForTouch(touch)
573 });
574}
575function printTouchBank() {
576 var printed = JSON.stringify(touchBank.slice(0, 20));
577 20 < touchBank.length &&
578 (printed += " (original size: " + touchBank.length + ")");
579 return printed;
580}
581var ResponderTouchHistoryStore = {
582 recordTouchTrack: function(topLevelType, nativeEvent) {
583 if (isMoveish(topLevelType))
584 nativeEvent.changedTouches.forEach(recordTouchMove);
585 else if (isStartish(topLevelType))
586 nativeEvent.changedTouches.forEach(recordTouchStart),
587 (touchHistory.numberActiveTouches = nativeEvent.touches.length),
588 1 === touchHistory.numberActiveTouches &&
589 (touchHistory.indexOfSingleActiveTouch =
590 nativeEvent.touches[0].identifier);
591 else if (
592 "topTouchEnd" === topLevelType ||
593 "topTouchCancel" === topLevelType
594 )
595 if (
596 (nativeEvent.changedTouches.forEach(recordTouchEnd),
597 (touchHistory.numberActiveTouches = nativeEvent.touches.length),
598 1 === touchHistory.numberActiveTouches)
599 )
600 for (topLevelType = 0; topLevelType < touchBank.length; topLevelType++)
601 if (
602 ((nativeEvent = touchBank[topLevelType]),
603 null != nativeEvent && nativeEvent.touchActive)
604 ) {
605 touchHistory.indexOfSingleActiveTouch = topLevelType;
606 break;
607 }
608 },
609 touchHistory: touchHistory
610};
611function accumulate(current, next) {
612 if (null == next)
613 throw ReactError(
614 Error("accumulate(...): Accumulated items must not be null or undefined.")
615 );
616 return null == current
617 ? next
618 : Array.isArray(current)
619 ? current.concat(next)
620 : Array.isArray(next)
621 ? [current].concat(next)
622 : [current, next];
623}
624var responderInst = null,
625 trackedTouchCount = 0;
626function changeResponder(nextResponderInst, blockHostResponder) {
627 var oldResponderInst = responderInst;
628 responderInst = nextResponderInst;
629 if (null !== ResponderEventPlugin.GlobalResponderHandler)
630 ResponderEventPlugin.GlobalResponderHandler.onChange(
631 oldResponderInst,
632 nextResponderInst,
633 blockHostResponder
634 );
635}
636var eventTypes = {
637 startShouldSetResponder: {
638 phasedRegistrationNames: {
639 bubbled: "onStartShouldSetResponder",
640 captured: "onStartShouldSetResponderCapture"
641 },
642 dependencies: startDependencies
643 },
644 scrollShouldSetResponder: {
645 phasedRegistrationNames: {
646 bubbled: "onScrollShouldSetResponder",
647 captured: "onScrollShouldSetResponderCapture"
648 },
649 dependencies: ["topScroll"]
650 },
651 selectionChangeShouldSetResponder: {
652 phasedRegistrationNames: {
653 bubbled: "onSelectionChangeShouldSetResponder",
654 captured: "onSelectionChangeShouldSetResponderCapture"
655 },
656 dependencies: ["topSelectionChange"]
657 },
658 moveShouldSetResponder: {
659 phasedRegistrationNames: {
660 bubbled: "onMoveShouldSetResponder",
661 captured: "onMoveShouldSetResponderCapture"
662 },
663 dependencies: moveDependencies
664 },
665 responderStart: {
666 registrationName: "onResponderStart",
667 dependencies: startDependencies
668 },
669 responderMove: {
670 registrationName: "onResponderMove",
671 dependencies: moveDependencies
672 },
673 responderEnd: {
674 registrationName: "onResponderEnd",
675 dependencies: endDependencies
676 },
677 responderRelease: {
678 registrationName: "onResponderRelease",
679 dependencies: endDependencies
680 },
681 responderTerminationRequest: {
682 registrationName: "onResponderTerminationRequest",
683 dependencies: []
684 },
685 responderGrant: { registrationName: "onResponderGrant", dependencies: [] },
686 responderReject: {
687 registrationName: "onResponderReject",
688 dependencies: []
689 },
690 responderTerminate: {
691 registrationName: "onResponderTerminate",
692 dependencies: []
693 }
694 },
695 ResponderEventPlugin = {
696 _getResponder: function() {
697 return responderInst;
698 },
699 eventTypes: eventTypes,
700 extractEvents: function(
701 topLevelType,
702 targetInst,
703 nativeEvent,
704 nativeEventTarget
705 ) {
706 if (isStartish(topLevelType)) trackedTouchCount += 1;
707 else if (
708 "topTouchEnd" === topLevelType ||
709 "topTouchCancel" === topLevelType
710 )
711 if (0 <= trackedTouchCount) --trackedTouchCount;
712 else
713 return (
714 console.error(
715 "Ended a touch event which was not counted in `trackedTouchCount`."
716 ),
717 null
718 );
719 ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
720 if (
721 targetInst &&
722 (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) ||
723 (0 < trackedTouchCount && "topSelectionChange" === topLevelType) ||
724 isStartish(topLevelType) ||
725 isMoveish(topLevelType))
726 ) {
727 var JSCompiler_temp = isStartish(topLevelType)
728 ? eventTypes.startShouldSetResponder
729 : isMoveish(topLevelType)
730 ? eventTypes.moveShouldSetResponder
731 : "topSelectionChange" === topLevelType
732 ? eventTypes.selectionChangeShouldSetResponder
733 : eventTypes.scrollShouldSetResponder;
734 if (responderInst)
735 b: {
736 var JSCompiler_temp$jscomp$0 = responderInst;
737 for (
738 var depthA = 0, tempA = JSCompiler_temp$jscomp$0;
739 tempA;
740 tempA = getParent(tempA)
741 )
742 depthA++;
743 tempA = 0;
744 for (var tempB = targetInst; tempB; tempB = getParent(tempB))
745 tempA++;
746 for (; 0 < depthA - tempA; )
747 (JSCompiler_temp$jscomp$0 = getParent(JSCompiler_temp$jscomp$0)),
748 depthA--;
749 for (; 0 < tempA - depthA; )
750 (targetInst = getParent(targetInst)), tempA--;
751 for (; depthA--; ) {
752 if (
753 JSCompiler_temp$jscomp$0 === targetInst ||
754 JSCompiler_temp$jscomp$0 === targetInst.alternate
755 )
756 break b;
757 JSCompiler_temp$jscomp$0 = getParent(JSCompiler_temp$jscomp$0);
758 targetInst = getParent(targetInst);
759 }
760 JSCompiler_temp$jscomp$0 = null;
761 }
762 else JSCompiler_temp$jscomp$0 = targetInst;
763 targetInst = JSCompiler_temp$jscomp$0 === responderInst;
764 JSCompiler_temp$jscomp$0 = ResponderSyntheticEvent.getPooled(
765 JSCompiler_temp,
766 JSCompiler_temp$jscomp$0,
767 nativeEvent,
768 nativeEventTarget
769 );
770 JSCompiler_temp$jscomp$0.touchHistory =
771 ResponderTouchHistoryStore.touchHistory;
772 targetInst
773 ? forEachAccumulated(
774 JSCompiler_temp$jscomp$0,
775 accumulateTwoPhaseDispatchesSingleSkipTarget
776 )
777 : forEachAccumulated(
778 JSCompiler_temp$jscomp$0,
779 accumulateTwoPhaseDispatchesSingle
780 );
781 b: {
782 JSCompiler_temp = JSCompiler_temp$jscomp$0._dispatchListeners;
783 targetInst = JSCompiler_temp$jscomp$0._dispatchInstances;
784 if (Array.isArray(JSCompiler_temp))
785 for (
786 depthA = 0;
787 depthA < JSCompiler_temp.length &&
788 !JSCompiler_temp$jscomp$0.isPropagationStopped();
789 depthA++
790 ) {
791 if (
792 JSCompiler_temp[depthA](
793 JSCompiler_temp$jscomp$0,
794 targetInst[depthA]
795 )
796 ) {
797 JSCompiler_temp = targetInst[depthA];
798 break b;
799 }
800 }
801 else if (
802 JSCompiler_temp &&
803 JSCompiler_temp(JSCompiler_temp$jscomp$0, targetInst)
804 ) {
805 JSCompiler_temp = targetInst;
806 break b;
807 }
808 JSCompiler_temp = null;
809 }
810 JSCompiler_temp$jscomp$0._dispatchInstances = null;
811 JSCompiler_temp$jscomp$0._dispatchListeners = null;
812 JSCompiler_temp$jscomp$0.isPersistent() ||
813 JSCompiler_temp$jscomp$0.constructor.release(
814 JSCompiler_temp$jscomp$0
815 );
816 JSCompiler_temp && JSCompiler_temp !== responderInst
817 ? ((JSCompiler_temp$jscomp$0 = void 0),
818 (targetInst = ResponderSyntheticEvent.getPooled(
819 eventTypes.responderGrant,
820 JSCompiler_temp,
821 nativeEvent,
822 nativeEventTarget
823 )),
824 (targetInst.touchHistory = ResponderTouchHistoryStore.touchHistory),
825 forEachAccumulated(targetInst, accumulateDirectDispatchesSingle),
826 (depthA = !0 === executeDirectDispatch(targetInst)),
827 responderInst
828 ? ((tempA = ResponderSyntheticEvent.getPooled(
829 eventTypes.responderTerminationRequest,
830 responderInst,
831 nativeEvent,
832 nativeEventTarget
833 )),
834 (tempA.touchHistory = ResponderTouchHistoryStore.touchHistory),
835 forEachAccumulated(tempA, accumulateDirectDispatchesSingle),
836 (tempB =
837 !tempA._dispatchListeners || executeDirectDispatch(tempA)),
838 tempA.isPersistent() || tempA.constructor.release(tempA),
839 tempB
840 ? ((tempA = ResponderSyntheticEvent.getPooled(
841 eventTypes.responderTerminate,
842 responderInst,
843 nativeEvent,
844 nativeEventTarget
845 )),
846 (tempA.touchHistory =
847 ResponderTouchHistoryStore.touchHistory),
848 forEachAccumulated(tempA, accumulateDirectDispatchesSingle),
849 (JSCompiler_temp$jscomp$0 = accumulate(
850 JSCompiler_temp$jscomp$0,
851 [targetInst, tempA]
852 )),
853 changeResponder(JSCompiler_temp, depthA))
854 : ((JSCompiler_temp = ResponderSyntheticEvent.getPooled(
855 eventTypes.responderReject,
856 JSCompiler_temp,
857 nativeEvent,
858 nativeEventTarget
859 )),
860 (JSCompiler_temp.touchHistory =
861 ResponderTouchHistoryStore.touchHistory),
862 forEachAccumulated(
863 JSCompiler_temp,
864 accumulateDirectDispatchesSingle
865 ),
866 (JSCompiler_temp$jscomp$0 = accumulate(
867 JSCompiler_temp$jscomp$0,
868 JSCompiler_temp
869 ))))
870 : ((JSCompiler_temp$jscomp$0 = accumulate(
871 JSCompiler_temp$jscomp$0,
872 targetInst
873 )),
874 changeResponder(JSCompiler_temp, depthA)),
875 (JSCompiler_temp = JSCompiler_temp$jscomp$0))
876 : (JSCompiler_temp = null);
877 } else JSCompiler_temp = null;
878 JSCompiler_temp$jscomp$0 = responderInst && isStartish(topLevelType);
879 targetInst = responderInst && isMoveish(topLevelType);
880 depthA =
881 responderInst &&
882 ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType);
883 if (
884 (JSCompiler_temp$jscomp$0 = JSCompiler_temp$jscomp$0
885 ? eventTypes.responderStart
886 : targetInst
887 ? eventTypes.responderMove
888 : depthA
889 ? eventTypes.responderEnd
890 : null)
891 )
892 (JSCompiler_temp$jscomp$0 = ResponderSyntheticEvent.getPooled(
893 JSCompiler_temp$jscomp$0,
894 responderInst,
895 nativeEvent,
896 nativeEventTarget
897 )),
898 (JSCompiler_temp$jscomp$0.touchHistory =
899 ResponderTouchHistoryStore.touchHistory),
900 forEachAccumulated(
901 JSCompiler_temp$jscomp$0,
902 accumulateDirectDispatchesSingle
903 ),
904 (JSCompiler_temp = accumulate(
905 JSCompiler_temp,
906 JSCompiler_temp$jscomp$0
907 ));
908 JSCompiler_temp$jscomp$0 =
909 responderInst && "topTouchCancel" === topLevelType;
910 if (
911 (topLevelType =
912 responderInst &&
913 !JSCompiler_temp$jscomp$0 &&
914 ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType))
915 )
916 a: {
917 if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length)
918 for (targetInst = 0; targetInst < topLevelType.length; targetInst++)
919 if (
920 ((depthA = topLevelType[targetInst].target),
921 null !== depthA && void 0 !== depthA && 0 !== depthA)
922 ) {
923 tempA = getInstanceFromNode(depthA);
924 b: {
925 for (depthA = responderInst; tempA; ) {
926 if (depthA === tempA || depthA === tempA.alternate) {
927 depthA = !0;
928 break b;
929 }
930 tempA = getParent(tempA);
931 }
932 depthA = !1;
933 }
934 if (depthA) {
935 topLevelType = !1;
936 break a;
937 }
938 }
939 topLevelType = !0;
940 }
941 if (
942 (topLevelType = JSCompiler_temp$jscomp$0
943 ? eventTypes.responderTerminate
944 : topLevelType
945 ? eventTypes.responderRelease
946 : null)
947 )
948 (nativeEvent = ResponderSyntheticEvent.getPooled(
949 topLevelType,
950 responderInst,
951 nativeEvent,
952 nativeEventTarget
953 )),
954 (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory),
955 forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle),
956 (JSCompiler_temp = accumulate(JSCompiler_temp, nativeEvent)),
957 changeResponder(null);
958 return JSCompiler_temp;
959 },
960 GlobalResponderHandler: null,
961 injection: {
962 injectGlobalResponderHandler: function(GlobalResponderHandler) {
963 ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
964 }
965 }
966 },
967 customBubblingEventTypes =
968 ReactNativePrivateInterface.ReactNativeViewConfigRegistry
969 .customBubblingEventTypes,
970 customDirectEventTypes =
971 ReactNativePrivateInterface.ReactNativeViewConfigRegistry
972 .customDirectEventTypes;
973injection.injectEventPluginOrder([
974 "ResponderEventPlugin",
975 "ReactNativeBridgeEventPlugin"
976]);
977injection.injectEventPluginsByName({
978 ResponderEventPlugin: ResponderEventPlugin,
979 ReactNativeBridgeEventPlugin: {
980 eventTypes: {},
981 extractEvents: function(
982 topLevelType,
983 targetInst,
984 nativeEvent,
985 nativeEventTarget
986 ) {
987 if (null == targetInst) return null;
988 var bubbleDispatchConfig = customBubblingEventTypes[topLevelType],
989 directDispatchConfig = customDirectEventTypes[topLevelType];
990 if (!bubbleDispatchConfig && !directDispatchConfig)
991 throw ReactError(
992 Error(
993 'Unsupported top level event type "' + topLevelType + '" dispatched'
994 )
995 );
996 topLevelType = SyntheticEvent.getPooled(
997 bubbleDispatchConfig || directDispatchConfig,
998 targetInst,
999 nativeEvent,
1000 nativeEventTarget
1001 );
1002 if (bubbleDispatchConfig)
1003 forEachAccumulated(topLevelType, accumulateTwoPhaseDispatchesSingle);
1004 else if (directDispatchConfig)
1005 forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle);
1006 else return null;
1007 return topLevelType;
1008 }
1009 }
1010});
1011var instanceCache = new Map(),
1012 instanceProps = new Map();
1013function getInstanceFromTag(tag) {
1014 return instanceCache.get(tag) || null;
1015}
1016var restoreTarget = null,
1017 restoreQueue = null;
1018function restoreStateOfTarget(target) {
1019 if (getInstanceFromNode(target))
1020 throw ReactError(
1021 Error(
1022 "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue."
1023 )
1024 );
1025}
1026require("../shims/ReactFeatureFlags");
1027function batchedUpdatesImpl(fn, bookkeeping) {
1028 return fn(bookkeeping);
1029}
1030function flushDiscreteUpdatesImpl() {}
1031var isInsideEventHandler = !1;
1032function batchedUpdates(fn, bookkeeping) {
1033 if (isInsideEventHandler) return fn(bookkeeping);
1034 isInsideEventHandler = !0;
1035 try {
1036 return batchedUpdatesImpl(fn, bookkeeping);
1037 } finally {
1038 if (
1039 ((isInsideEventHandler = !1),
1040 null !== restoreTarget || null !== restoreQueue)
1041 )
1042 if (
1043 (flushDiscreteUpdatesImpl(),
1044 restoreTarget &&
1045 ((bookkeeping = restoreTarget),
1046 (fn = restoreQueue),
1047 (restoreQueue = restoreTarget = null),
1048 restoreStateOfTarget(bookkeeping),
1049 fn))
1050 )
1051 for (bookkeeping = 0; bookkeeping < fn.length; bookkeeping++)
1052 restoreStateOfTarget(fn[bookkeeping]);
1053 }
1054}
1055var EMPTY_NATIVE_EVENT = {};
1056function _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam) {
1057 var nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT,
1058 inst = getInstanceFromTag(rootNodeID);
1059 batchedUpdates(function() {
1060 var events = nativeEvent.target;
1061 for (var events$jscomp$0 = null, i = 0; i < plugins.length; i++) {
1062 var possiblePlugin = plugins[i];
1063 possiblePlugin &&
1064 (possiblePlugin = possiblePlugin.extractEvents(
1065 topLevelType,
1066 inst,
1067 nativeEvent,
1068 events
1069 )) &&
1070 (events$jscomp$0 = accumulateInto(events$jscomp$0, possiblePlugin));
1071 }
1072 events = events$jscomp$0;
1073 null !== events && (eventQueue = accumulateInto(eventQueue, events));
1074 events = eventQueue;
1075 eventQueue = null;
1076 if (events) {
1077 forEachAccumulated(events, executeDispatchesAndReleaseTopLevel);
1078 if (eventQueue)
1079 throw ReactError(
1080 Error(
1081 "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."
1082 )
1083 );
1084 if (hasRethrowError)
1085 throw ((events = rethrowError),
1086 (hasRethrowError = !1),
1087 (rethrowError = null),
1088 events);
1089 }
1090 });
1091}
1092ReactNativePrivateInterface.RCTEventEmitter.register({
1093 receiveEvent: function(rootNodeID, topLevelType, nativeEventParam) {
1094 _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam);
1095 },
1096 receiveTouches: function(eventTopLevelType, touches, changedIndices) {
1097 if (
1098 "topTouchEnd" === eventTopLevelType ||
1099 "topTouchCancel" === eventTopLevelType
1100 ) {
1101 var JSCompiler_temp = [];
1102 for (var i = 0; i < changedIndices.length; i++) {
1103 var index = changedIndices[i];
1104 JSCompiler_temp.push(touches[index]);
1105 touches[index] = null;
1106 }
1107 for (i = changedIndices = 0; i < touches.length; i++)
1108 (index = touches[i]),
1109 null !== index && (touches[changedIndices++] = index);
1110 touches.length = changedIndices;
1111 } else
1112 for (JSCompiler_temp = [], i = 0; i < changedIndices.length; i++)
1113 JSCompiler_temp.push(touches[changedIndices[i]]);
1114 for (
1115 changedIndices = 0;
1116 changedIndices < JSCompiler_temp.length;
1117 changedIndices++
1118 ) {
1119 i = JSCompiler_temp[changedIndices];
1120 i.changedTouches = JSCompiler_temp;
1121 i.touches = touches;
1122 index = null;
1123 var target = i.target;
1124 null === target || void 0 === target || 1 > target || (index = target);
1125 _receiveRootNodeIDEvent(index, eventTopLevelType, i);
1126 }
1127 }
1128});
1129getFiberCurrentPropsFromNode = function(stateNode) {
1130 return instanceProps.get(stateNode._nativeTag) || null;
1131};
1132getInstanceFromNode = getInstanceFromTag;
1133getNodeFromInstance = function(inst) {
1134 var tag = inst.stateNode._nativeTag;
1135 void 0 === tag && (tag = inst.stateNode.canonical._nativeTag);
1136 if (!tag) throw ReactError(Error("All native instances should have a tag."));
1137 return tag;
1138};
1139ResponderEventPlugin.injection.injectGlobalResponderHandler({
1140 onChange: function(from, to, blockNativeResponder) {
1141 null !== to
1142 ? ReactNativePrivateInterface.UIManager.setJSResponder(
1143 to.stateNode._nativeTag,
1144 blockNativeResponder
1145 )
1146 : ReactNativePrivateInterface.UIManager.clearJSResponder();
1147 }
1148});
1149var ReactSharedInternals =
1150 React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1151ReactSharedInternals.hasOwnProperty("ReactCurrentDispatcher") ||
1152 (ReactSharedInternals.ReactCurrentDispatcher = { current: null });
1153ReactSharedInternals.hasOwnProperty("ReactCurrentBatchConfig") ||
1154 (ReactSharedInternals.ReactCurrentBatchConfig = { suspense: null });
1155var hasSymbol = "function" === typeof Symbol && Symbol.for,
1156 REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103,
1157 REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106,
1158 REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107,
1159 REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108,
1160 REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114,
1161 REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109,
1162 REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110,
1163 REACT_CONCURRENT_MODE_TYPE = hasSymbol
1164 ? Symbol.for("react.concurrent_mode")
1165 : 60111,
1166 REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112,
1167 REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113,
1168 REACT_SUSPENSE_LIST_TYPE = hasSymbol
1169 ? Symbol.for("react.suspense_list")
1170 : 60120,
1171 REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115,
1172 REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
1173hasSymbol && Symbol.for("react.fundamental");
1174hasSymbol && Symbol.for("react.responder");
1175var MAYBE_ITERATOR_SYMBOL = "function" === typeof Symbol && Symbol.iterator;
1176function getIteratorFn(maybeIterable) {
1177 if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
1178 maybeIterable =
1179 (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
1180 maybeIterable["@@iterator"];
1181 return "function" === typeof maybeIterable ? maybeIterable : null;
1182}
1183function getComponentName(type) {
1184 if (null == type) return null;
1185 if ("function" === typeof type) return type.displayName || type.name || null;
1186 if ("string" === typeof type) return type;
1187 switch (type) {
1188 case REACT_FRAGMENT_TYPE:
1189 return "Fragment";
1190 case REACT_PORTAL_TYPE:
1191 return "Portal";
1192 case REACT_PROFILER_TYPE:
1193 return "Profiler";
1194 case REACT_STRICT_MODE_TYPE:
1195 return "StrictMode";
1196 case REACT_SUSPENSE_TYPE:
1197 return "Suspense";
1198 case REACT_SUSPENSE_LIST_TYPE:
1199 return "SuspenseList";
1200 }
1201 if ("object" === typeof type)
1202 switch (type.$$typeof) {
1203 case REACT_CONTEXT_TYPE:
1204 return "Context.Consumer";
1205 case REACT_PROVIDER_TYPE:
1206 return "Context.Provider";
1207 case REACT_FORWARD_REF_TYPE:
1208 var innerType = type.render;
1209 innerType = innerType.displayName || innerType.name || "";
1210 return (
1211 type.displayName ||
1212 ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef")
1213 );
1214 case REACT_MEMO_TYPE:
1215 return getComponentName(type.type);
1216 case REACT_LAZY_TYPE:
1217 if ((type = 1 === type._status ? type._result : null))
1218 return getComponentName(type);
1219 }
1220 return null;
1221}
1222function isFiberMountedImpl(fiber) {
1223 var node = fiber;
1224 if (fiber.alternate) for (; node.return; ) node = node.return;
1225 else {
1226 if (0 !== (node.effectTag & 2)) return 1;
1227 for (; node.return; )
1228 if (((node = node.return), 0 !== (node.effectTag & 2))) return 1;
1229 }
1230 return 3 === node.tag ? 2 : 3;
1231}
1232function assertIsMounted(fiber) {
1233 if (2 !== isFiberMountedImpl(fiber))
1234 throw ReactError(Error("Unable to find node on an unmounted component."));
1235}
1236function findCurrentFiberUsingSlowPath(fiber) {
1237 var alternate = fiber.alternate;
1238 if (!alternate) {
1239 alternate = isFiberMountedImpl(fiber);
1240 if (3 === alternate)
1241 throw ReactError(Error("Unable to find node on an unmounted component."));
1242 return 1 === alternate ? null : fiber;
1243 }
1244 for (var a = fiber, b = alternate; ; ) {
1245 var parentA = a.return;
1246 if (null === parentA) break;
1247 var parentB = parentA.alternate;
1248 if (null === parentB) {
1249 b = parentA.return;
1250 if (null !== b) {
1251 a = b;
1252 continue;
1253 }
1254 break;
1255 }
1256 if (parentA.child === parentB.child) {
1257 for (parentB = parentA.child; parentB; ) {
1258 if (parentB === a) return assertIsMounted(parentA), fiber;
1259 if (parentB === b) return assertIsMounted(parentA), alternate;
1260 parentB = parentB.sibling;
1261 }
1262 throw ReactError(Error("Unable to find node on an unmounted component."));
1263 }
1264 if (a.return !== b.return) (a = parentA), (b = parentB);
1265 else {
1266 for (var didFindChild = !1, _child = parentA.child; _child; ) {
1267 if (_child === a) {
1268 didFindChild = !0;
1269 a = parentA;
1270 b = parentB;
1271 break;
1272 }
1273 if (_child === b) {
1274 didFindChild = !0;
1275 b = parentA;
1276 a = parentB;
1277 break;
1278 }
1279 _child = _child.sibling;
1280 }
1281 if (!didFindChild) {
1282 for (_child = parentB.child; _child; ) {
1283 if (_child === a) {
1284 didFindChild = !0;
1285 a = parentB;
1286 b = parentA;
1287 break;
1288 }
1289 if (_child === b) {
1290 didFindChild = !0;
1291 b = parentB;
1292 a = parentA;
1293 break;
1294 }
1295 _child = _child.sibling;
1296 }
1297 if (!didFindChild)
1298 throw ReactError(
1299 Error(
1300 "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
1301 )
1302 );
1303 }
1304 }
1305 if (a.alternate !== b)
1306 throw ReactError(
1307 Error(
1308 "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
1309 )
1310 );
1311 }
1312 if (3 !== a.tag)
1313 throw ReactError(Error("Unable to find node on an unmounted component."));
1314 return a.stateNode.current === a ? fiber : alternate;
1315}
1316function findCurrentHostFiber(parent) {
1317 parent = findCurrentFiberUsingSlowPath(parent);
1318 if (!parent) return null;
1319 for (var node = parent; ; ) {
1320 if (5 === node.tag || 6 === node.tag) return node;
1321 if (node.child) (node.child.return = node), (node = node.child);
1322 else {
1323 if (node === parent) break;
1324 for (; !node.sibling; ) {
1325 if (!node.return || node.return === parent) return null;
1326 node = node.return;
1327 }
1328 node.sibling.return = node.return;
1329 node = node.sibling;
1330 }
1331 }
1332 return null;
1333}
1334var emptyObject = {},
1335 removedKeys = null,
1336 removedKeyCount = 0;
1337function restoreDeletedValuesInNestedArray(
1338 updatePayload,
1339 node,
1340 validAttributes
1341) {
1342 if (Array.isArray(node))
1343 for (var i = node.length; i-- && 0 < removedKeyCount; )
1344 restoreDeletedValuesInNestedArray(
1345 updatePayload,
1346 node[i],
1347 validAttributes
1348 );
1349 else if (node && 0 < removedKeyCount)
1350 for (i in removedKeys)
1351 if (removedKeys[i]) {
1352 var nextProp = node[i];
1353 if (void 0 !== nextProp) {
1354 var attributeConfig = validAttributes[i];
1355 if (attributeConfig) {
1356 "function" === typeof nextProp && (nextProp = !0);
1357 "undefined" === typeof nextProp && (nextProp = null);
1358 if ("object" !== typeof attributeConfig)
1359 updatePayload[i] = nextProp;
1360 else if (
1361 "function" === typeof attributeConfig.diff ||
1362 "function" === typeof attributeConfig.process
1363 )
1364 (nextProp =
1365 "function" === typeof attributeConfig.process
1366 ? attributeConfig.process(nextProp)
1367 : nextProp),
1368 (updatePayload[i] = nextProp);
1369 removedKeys[i] = !1;
1370 removedKeyCount--;
1371 }
1372 }
1373 }
1374}
1375function diffNestedProperty(
1376 updatePayload,
1377 prevProp,
1378 nextProp,
1379 validAttributes
1380) {
1381 if (!updatePayload && prevProp === nextProp) return updatePayload;
1382 if (!prevProp || !nextProp)
1383 return nextProp
1384 ? addNestedProperty(updatePayload, nextProp, validAttributes)
1385 : prevProp
1386 ? clearNestedProperty(updatePayload, prevProp, validAttributes)
1387 : updatePayload;
1388 if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
1389 return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
1390 if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
1391 var minLength =
1392 prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
1393 i;
1394 for (i = 0; i < minLength; i++)
1395 updatePayload = diffNestedProperty(
1396 updatePayload,
1397 prevProp[i],
1398 nextProp[i],
1399 validAttributes
1400 );
1401 for (; i < prevProp.length; i++)
1402 updatePayload = clearNestedProperty(
1403 updatePayload,
1404 prevProp[i],
1405 validAttributes
1406 );
1407 for (; i < nextProp.length; i++)
1408 updatePayload = addNestedProperty(
1409 updatePayload,
1410 nextProp[i],
1411 validAttributes
1412 );
1413 return updatePayload;
1414 }
1415 return Array.isArray(prevProp)
1416 ? diffProperties(
1417 updatePayload,
1418 ReactNativePrivateInterface.flattenStyle(prevProp),
1419 nextProp,
1420 validAttributes
1421 )
1422 : diffProperties(
1423 updatePayload,
1424 prevProp,
1425 ReactNativePrivateInterface.flattenStyle(nextProp),
1426 validAttributes
1427 );
1428}
1429function addNestedProperty(updatePayload, nextProp, validAttributes) {
1430 if (!nextProp) return updatePayload;
1431 if (!Array.isArray(nextProp))
1432 return diffProperties(
1433 updatePayload,
1434 emptyObject,
1435 nextProp,
1436 validAttributes
1437 );
1438 for (var i = 0; i < nextProp.length; i++)
1439 updatePayload = addNestedProperty(
1440 updatePayload,
1441 nextProp[i],
1442 validAttributes
1443 );
1444 return updatePayload;
1445}
1446function clearNestedProperty(updatePayload, prevProp, validAttributes) {
1447 if (!prevProp) return updatePayload;
1448 if (!Array.isArray(prevProp))
1449 return diffProperties(
1450 updatePayload,
1451 prevProp,
1452 emptyObject,
1453 validAttributes
1454 );
1455 for (var i = 0; i < prevProp.length; i++)
1456 updatePayload = clearNestedProperty(
1457 updatePayload,
1458 prevProp[i],
1459 validAttributes
1460 );
1461 return updatePayload;
1462}
1463function diffProperties(updatePayload, prevProps, nextProps, validAttributes) {
1464 var attributeConfig, propKey;
1465 for (propKey in nextProps)
1466 if ((attributeConfig = validAttributes[propKey])) {
1467 var prevProp = prevProps[propKey];
1468 var nextProp = nextProps[propKey];
1469 "function" === typeof nextProp &&
1470 ((nextProp = !0), "function" === typeof prevProp && (prevProp = !0));
1471 "undefined" === typeof nextProp &&
1472 ((nextProp = null),
1473 "undefined" === typeof prevProp && (prevProp = null));
1474 removedKeys && (removedKeys[propKey] = !1);
1475 if (updatePayload && void 0 !== updatePayload[propKey])
1476 if ("object" !== typeof attributeConfig)
1477 updatePayload[propKey] = nextProp;
1478 else {
1479 if (
1480 "function" === typeof attributeConfig.diff ||
1481 "function" === typeof attributeConfig.process
1482 )
1483 (attributeConfig =
1484 "function" === typeof attributeConfig.process
1485 ? attributeConfig.process(nextProp)
1486 : nextProp),
1487 (updatePayload[propKey] = attributeConfig);
1488 }
1489 else if (prevProp !== nextProp)
1490 if ("object" !== typeof attributeConfig)
1491 ("object" !== typeof nextProp ||
1492 null === nextProp ||
1493 ReactNativePrivateInterface.deepDiffer(prevProp, nextProp)) &&
1494 ((updatePayload || (updatePayload = {}))[propKey] = nextProp);
1495 else if (
1496 "function" === typeof attributeConfig.diff ||
1497 "function" === typeof attributeConfig.process
1498 ) {
1499 if (
1500 void 0 === prevProp ||
1501 ("function" === typeof attributeConfig.diff
1502 ? attributeConfig.diff(prevProp, nextProp)
1503 : "object" !== typeof nextProp ||
1504 null === nextProp ||
1505 ReactNativePrivateInterface.deepDiffer(prevProp, nextProp))
1506 )
1507 (attributeConfig =
1508 "function" === typeof attributeConfig.process
1509 ? attributeConfig.process(nextProp)
1510 : nextProp),
1511 ((updatePayload || (updatePayload = {}))[
1512 propKey
1513 ] = attributeConfig);
1514 } else
1515 (removedKeys = null),
1516 (removedKeyCount = 0),
1517 (updatePayload = diffNestedProperty(
1518 updatePayload,
1519 prevProp,
1520 nextProp,
1521 attributeConfig
1522 )),
1523 0 < removedKeyCount &&
1524 updatePayload &&
1525 (restoreDeletedValuesInNestedArray(
1526 updatePayload,
1527 nextProp,
1528 attributeConfig
1529 ),
1530 (removedKeys = null));
1531 }
1532 for (var _propKey in prevProps)
1533 void 0 === nextProps[_propKey] &&
1534 (!(attributeConfig = validAttributes[_propKey]) ||
1535 (updatePayload && void 0 !== updatePayload[_propKey]) ||
1536 ((prevProp = prevProps[_propKey]),
1537 void 0 !== prevProp &&
1538 ("object" !== typeof attributeConfig ||
1539 "function" === typeof attributeConfig.diff ||
1540 "function" === typeof attributeConfig.process
1541 ? (((updatePayload || (updatePayload = {}))[_propKey] = null),
1542 removedKeys || (removedKeys = {}),
1543 removedKeys[_propKey] ||
1544 ((removedKeys[_propKey] = !0), removedKeyCount++))
1545 : (updatePayload = clearNestedProperty(
1546 updatePayload,
1547 prevProp,
1548 attributeConfig
1549 )))));
1550 return updatePayload;
1551}
1552function mountSafeCallback_NOT_REALLY_SAFE(context, callback) {
1553 return function() {
1554 if (
1555 callback &&
1556 ("boolean" !== typeof context.__isMounted || context.__isMounted)
1557 )
1558 return callback.apply(context, arguments);
1559 };
1560}
1561var ReactNativeFiberHostComponent = (function() {
1562 function ReactNativeFiberHostComponent(tag, viewConfig) {
1563 if (!(this instanceof ReactNativeFiberHostComponent))
1564 throw new TypeError("Cannot call a class as a function");
1565 this._nativeTag = tag;
1566 this._children = [];
1567 this.viewConfig = viewConfig;
1568 }
1569 ReactNativeFiberHostComponent.prototype.blur = function() {
1570 ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag);
1571 };
1572 ReactNativeFiberHostComponent.prototype.focus = function() {
1573 ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag);
1574 };
1575 ReactNativeFiberHostComponent.prototype.measure = function(callback) {
1576 ReactNativePrivateInterface.UIManager.measure(
1577 this._nativeTag,
1578 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
1579 );
1580 };
1581 ReactNativeFiberHostComponent.prototype.measureInWindow = function(callback) {
1582 ReactNativePrivateInterface.UIManager.measureInWindow(
1583 this._nativeTag,
1584 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
1585 );
1586 };
1587 ReactNativeFiberHostComponent.prototype.measureLayout = function(
1588 relativeToNativeNode,
1589 onSuccess,
1590 onFail
1591 ) {
1592 var relativeNode = void 0;
1593 "number" === typeof relativeToNativeNode
1594 ? (relativeNode = relativeToNativeNode)
1595 : relativeToNativeNode._nativeTag
1596 ? (relativeNode = relativeToNativeNode._nativeTag)
1597 : relativeToNativeNode.canonical &&
1598 relativeToNativeNode.canonical._nativeTag &&
1599 (relativeNode = relativeToNativeNode.canonical._nativeTag);
1600 null != relativeNode &&
1601 ReactNativePrivateInterface.UIManager.measureLayout(
1602 this._nativeTag,
1603 relativeNode,
1604 mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
1605 mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
1606 );
1607 };
1608 ReactNativeFiberHostComponent.prototype.setNativeProps = function(
1609 nativeProps
1610 ) {
1611 nativeProps = diffProperties(
1612 null,
1613 emptyObject,
1614 nativeProps,
1615 this.viewConfig.validAttributes
1616 );
1617 null != nativeProps &&
1618 ReactNativePrivateInterface.UIManager.updateView(
1619 this._nativeTag,
1620 this.viewConfig.uiViewClassName,
1621 nativeProps
1622 );
1623 };
1624 return ReactNativeFiberHostComponent;
1625})();
1626function shim$1() {
1627 throw ReactError(
1628 Error(
1629 "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue."
1630 )
1631 );
1632}
1633var getViewConfigForType =
1634 ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
1635 UPDATE_SIGNAL = {},
1636 nextReactTag = 3;
1637function allocateTag() {
1638 var tag = nextReactTag;
1639 1 === tag % 10 && (tag += 2);
1640 nextReactTag = tag + 2;
1641 return tag;
1642}
1643function recursivelyUncacheFiberNode(node) {
1644 if ("number" === typeof node)
1645 instanceCache.delete(node), instanceProps.delete(node);
1646 else {
1647 var tag = node._nativeTag;
1648 instanceCache.delete(tag);
1649 instanceProps.delete(tag);
1650 node._children.forEach(recursivelyUncacheFiberNode);
1651 }
1652}
1653function finalizeInitialChildren(parentInstance) {
1654 if (0 === parentInstance._children.length) return !1;
1655 var nativeTags = parentInstance._children.map(function(child) {
1656 return "number" === typeof child ? child : child._nativeTag;
1657 });
1658 ReactNativePrivateInterface.UIManager.setChildren(
1659 parentInstance._nativeTag,
1660 nativeTags
1661 );
1662 return !1;
1663}
1664var scheduleTimeout = setTimeout,
1665 cancelTimeout = clearTimeout,
1666 BEFORE_SLASH_RE = /^(.*)[\\\/]/;
1667function getStackByFiberInDevAndProd(workInProgress) {
1668 var info = "";
1669 do {
1670 a: switch (workInProgress.tag) {
1671 case 3:
1672 case 4:
1673 case 6:
1674 case 7:
1675 case 10:
1676 case 9:
1677 var JSCompiler_inline_result = "";
1678 break a;
1679 default:
1680 var owner = workInProgress._debugOwner,
1681 source = workInProgress._debugSource,
1682 name = getComponentName(workInProgress.type);
1683 JSCompiler_inline_result = null;
1684 owner && (JSCompiler_inline_result = getComponentName(owner.type));
1685 owner = name;
1686 name = "";
1687 source
1688 ? (name =
1689 " (at " +
1690 source.fileName.replace(BEFORE_SLASH_RE, "") +
1691 ":" +
1692 source.lineNumber +
1693 ")")
1694 : JSCompiler_inline_result &&
1695 (name = " (created by " + JSCompiler_inline_result + ")");
1696 JSCompiler_inline_result = "\n in " + (owner || "Unknown") + name;
1697 }
1698 info += JSCompiler_inline_result;
1699 workInProgress = workInProgress.return;
1700 } while (workInProgress);
1701 return info;
1702}
1703new Set();
1704var valueStack = [],
1705 index = -1;
1706function pop(cursor) {
1707 0 > index ||
1708 ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
1709}
1710function push(cursor, value) {
1711 index++;
1712 valueStack[index] = cursor.current;
1713 cursor.current = value;
1714}
1715var emptyContextObject = {},
1716 contextStackCursor = { current: emptyContextObject },
1717 didPerformWorkStackCursor = { current: !1 },
1718 previousContext = emptyContextObject;
1719function getMaskedContext(workInProgress, unmaskedContext) {
1720 var contextTypes = workInProgress.type.contextTypes;
1721 if (!contextTypes) return emptyContextObject;
1722 var instance = workInProgress.stateNode;
1723 if (
1724 instance &&
1725 instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext
1726 )
1727 return instance.__reactInternalMemoizedMaskedChildContext;
1728 var context = {},
1729 key;
1730 for (key in contextTypes) context[key] = unmaskedContext[key];
1731 instance &&
1732 ((workInProgress = workInProgress.stateNode),
1733 (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
1734 (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
1735 return context;
1736}
1737function isContextProvider(type) {
1738 type = type.childContextTypes;
1739 return null !== type && void 0 !== type;
1740}
1741function popContext(fiber) {
1742 pop(didPerformWorkStackCursor, fiber);
1743 pop(contextStackCursor, fiber);
1744}
1745function popTopLevelContextObject(fiber) {
1746 pop(didPerformWorkStackCursor, fiber);
1747 pop(contextStackCursor, fiber);
1748}
1749function pushTopLevelContextObject(fiber, context, didChange) {
1750 if (contextStackCursor.current !== emptyContextObject)
1751 throw ReactError(
1752 Error(
1753 "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."
1754 )
1755 );
1756 push(contextStackCursor, context, fiber);
1757 push(didPerformWorkStackCursor, didChange, fiber);
1758}
1759function processChildContext(fiber, type, parentContext) {
1760 var instance = fiber.stateNode;
1761 fiber = type.childContextTypes;
1762 if ("function" !== typeof instance.getChildContext) return parentContext;
1763 instance = instance.getChildContext();
1764 for (var contextKey in instance)
1765 if (!(contextKey in fiber))
1766 throw ReactError(
1767 Error(
1768 (getComponentName(type) || "Unknown") +
1769 '.getChildContext(): key "' +
1770 contextKey +
1771 '" is not defined in childContextTypes.'
1772 )
1773 );
1774 return Object.assign({}, parentContext, instance);
1775}
1776function pushContextProvider(workInProgress) {
1777 var instance = workInProgress.stateNode;
1778 instance =
1779 (instance && instance.__reactInternalMemoizedMergedChildContext) ||
1780 emptyContextObject;
1781 previousContext = contextStackCursor.current;
1782 push(contextStackCursor, instance, workInProgress);
1783 push(
1784 didPerformWorkStackCursor,
1785 didPerformWorkStackCursor.current,
1786 workInProgress
1787 );
1788 return !0;
1789}
1790function invalidateContextProvider(workInProgress, type, didChange) {
1791 var instance = workInProgress.stateNode;
1792 if (!instance)
1793 throw ReactError(
1794 Error(
1795 "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."
1796 )
1797 );
1798 didChange
1799 ? ((type = processChildContext(workInProgress, type, previousContext)),
1800 (instance.__reactInternalMemoizedMergedChildContext = type),
1801 pop(didPerformWorkStackCursor, workInProgress),
1802 pop(contextStackCursor, workInProgress),
1803 push(contextStackCursor, type, workInProgress))
1804 : pop(didPerformWorkStackCursor, workInProgress);
1805 push(didPerformWorkStackCursor, didChange, workInProgress);
1806}
1807var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
1808 Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
1809 Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
1810 Scheduler_shouldYield = Scheduler.unstable_shouldYield,
1811 Scheduler_requestPaint = Scheduler.unstable_requestPaint,
1812 Scheduler_now = Scheduler.unstable_now,
1813 Scheduler_getCurrentPriorityLevel =
1814 Scheduler.unstable_getCurrentPriorityLevel,
1815 Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
1816 Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
1817 Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
1818 Scheduler_LowPriority = Scheduler.unstable_LowPriority,
1819 Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
1820if (
1821 null == tracing.__interactionsRef ||
1822 null == tracing.__interactionsRef.current
1823)
1824 throw ReactError(
1825 Error(
1826 "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling"
1827 )
1828 );
1829var fakeCallbackNode = {},
1830 requestPaint =
1831 void 0 !== Scheduler_requestPaint ? Scheduler_requestPaint : function() {},
1832 syncQueue = null,
1833 immediateQueueCallbackNode = null,
1834 isFlushingSyncQueue = !1,
1835 initialTimeMs = Scheduler_now(),
1836 now =
1837 1e4 > initialTimeMs
1838 ? Scheduler_now
1839 : function() {
1840 return Scheduler_now() - initialTimeMs;
1841 };
1842function getCurrentPriorityLevel() {
1843 switch (Scheduler_getCurrentPriorityLevel()) {
1844 case Scheduler_ImmediatePriority:
1845 return 99;
1846 case Scheduler_UserBlockingPriority:
1847 return 98;
1848 case Scheduler_NormalPriority:
1849 return 97;
1850 case Scheduler_LowPriority:
1851 return 96;
1852 case Scheduler_IdlePriority:
1853 return 95;
1854 default:
1855 throw ReactError(Error("Unknown priority level."));
1856 }
1857}
1858function reactPriorityToSchedulerPriority(reactPriorityLevel) {
1859 switch (reactPriorityLevel) {
1860 case 99:
1861 return Scheduler_ImmediatePriority;
1862 case 98:
1863 return Scheduler_UserBlockingPriority;
1864 case 97:
1865 return Scheduler_NormalPriority;
1866 case 96:
1867 return Scheduler_LowPriority;
1868 case 95:
1869 return Scheduler_IdlePriority;
1870 default:
1871 throw ReactError(Error("Unknown priority level."));
1872 }
1873}
1874function runWithPriority(reactPriorityLevel, fn) {
1875 reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
1876 return Scheduler_runWithPriority(reactPriorityLevel, fn);
1877}
1878function scheduleCallback(reactPriorityLevel, callback, options) {
1879 reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
1880 return Scheduler_scheduleCallback(reactPriorityLevel, callback, options);
1881}
1882function scheduleSyncCallback(callback) {
1883 null === syncQueue
1884 ? ((syncQueue = [callback]),
1885 (immediateQueueCallbackNode = Scheduler_scheduleCallback(
1886 Scheduler_ImmediatePriority,
1887 flushSyncCallbackQueueImpl
1888 )))
1889 : syncQueue.push(callback);
1890 return fakeCallbackNode;
1891}
1892function flushSyncCallbackQueue() {
1893 null !== immediateQueueCallbackNode &&
1894 Scheduler_cancelCallback(immediateQueueCallbackNode);
1895 flushSyncCallbackQueueImpl();
1896}
1897function flushSyncCallbackQueueImpl() {
1898 if (!isFlushingSyncQueue && null !== syncQueue) {
1899 isFlushingSyncQueue = !0;
1900 var i = 0;
1901 try {
1902 var queue = syncQueue;
1903 runWithPriority(99, function() {
1904 for (; i < queue.length; i++) {
1905 var callback = queue[i];
1906 do callback = callback(!0);
1907 while (null !== callback);
1908 }
1909 });
1910 syncQueue = null;
1911 } catch (error) {
1912 throw (null !== syncQueue && (syncQueue = syncQueue.slice(i + 1)),
1913 Scheduler_scheduleCallback(
1914 Scheduler_ImmediatePriority,
1915 flushSyncCallbackQueue
1916 ),
1917 error);
1918 } finally {
1919 isFlushingSyncQueue = !1;
1920 }
1921 }
1922}
1923function inferPriorityFromExpirationTime(currentTime, expirationTime) {
1924 if (1073741823 === expirationTime) return 99;
1925 if (1 === expirationTime) return 95;
1926 currentTime =
1927 10 * (1073741821 - expirationTime) - 10 * (1073741821 - currentTime);
1928 return 0 >= currentTime
1929 ? 99
1930 : 250 >= currentTime
1931 ? 98
1932 : 5250 >= currentTime
1933 ? 97
1934 : 95;
1935}
1936function is(x, y) {
1937 return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
1938}
1939var hasOwnProperty = Object.prototype.hasOwnProperty;
1940function shallowEqual(objA, objB) {
1941 if (is(objA, objB)) return !0;
1942 if (
1943 "object" !== typeof objA ||
1944 null === objA ||
1945 "object" !== typeof objB ||
1946 null === objB
1947 )
1948 return !1;
1949 var keysA = Object.keys(objA),
1950 keysB = Object.keys(objB);
1951 if (keysA.length !== keysB.length) return !1;
1952 for (keysB = 0; keysB < keysA.length; keysB++)
1953 if (
1954 !hasOwnProperty.call(objB, keysA[keysB]) ||
1955 !is(objA[keysA[keysB]], objB[keysA[keysB]])
1956 )
1957 return !1;
1958 return !0;
1959}
1960function resolveDefaultProps(Component, baseProps) {
1961 if (Component && Component.defaultProps) {
1962 baseProps = Object.assign({}, baseProps);
1963 Component = Component.defaultProps;
1964 for (var propName in Component)
1965 void 0 === baseProps[propName] &&
1966 (baseProps[propName] = Component[propName]);
1967 }
1968 return baseProps;
1969}
1970function readLazyComponentType(lazyComponent) {
1971 var result = lazyComponent._result;
1972 switch (lazyComponent._status) {
1973 case 1:
1974 return result;
1975 case 2:
1976 throw result;
1977 case 0:
1978 throw result;
1979 default:
1980 lazyComponent._status = 0;
1981 result = lazyComponent._ctor;
1982 result = result();
1983 result.then(
1984 function(moduleObject) {
1985 0 === lazyComponent._status &&
1986 ((moduleObject = moduleObject.default),
1987 (lazyComponent._status = 1),
1988 (lazyComponent._result = moduleObject));
1989 },
1990 function(error) {
1991 0 === lazyComponent._status &&
1992 ((lazyComponent._status = 2), (lazyComponent._result = error));
1993 }
1994 );
1995 switch (lazyComponent._status) {
1996 case 1:
1997 return lazyComponent._result;
1998 case 2:
1999 throw lazyComponent._result;
2000 }
2001 lazyComponent._result = result;
2002 throw result;
2003 }
2004}
2005var valueCursor = { current: null },
2006 currentlyRenderingFiber = null,
2007 lastContextDependency = null,
2008 lastContextWithAllBitsObserved = null;
2009function resetContextDependencies() {
2010 lastContextWithAllBitsObserved = lastContextDependency = currentlyRenderingFiber = null;
2011}
2012function pushProvider(providerFiber, nextValue) {
2013 var context = providerFiber.type._context;
2014 push(valueCursor, context._currentValue, providerFiber);
2015 context._currentValue = nextValue;
2016}
2017function popProvider(providerFiber) {
2018 var currentValue = valueCursor.current;
2019 pop(valueCursor, providerFiber);
2020 providerFiber.type._context._currentValue = currentValue;
2021}
2022function scheduleWorkOnParentPath(parent, renderExpirationTime) {
2023 for (; null !== parent; ) {
2024 var alternate = parent.alternate;
2025 if (parent.childExpirationTime < renderExpirationTime)
2026 (parent.childExpirationTime = renderExpirationTime),
2027 null !== alternate &&
2028 alternate.childExpirationTime < renderExpirationTime &&
2029 (alternate.childExpirationTime = renderExpirationTime);
2030 else if (
2031 null !== alternate &&
2032 alternate.childExpirationTime < renderExpirationTime
2033 )
2034 alternate.childExpirationTime = renderExpirationTime;
2035 else break;
2036 parent = parent.return;
2037 }
2038}
2039function prepareToReadContext(workInProgress, renderExpirationTime) {
2040 currentlyRenderingFiber = workInProgress;
2041 lastContextWithAllBitsObserved = lastContextDependency = null;
2042 workInProgress = workInProgress.dependencies;
2043 null !== workInProgress &&
2044 null !== workInProgress.firstContext &&
2045 (workInProgress.expirationTime >= renderExpirationTime &&
2046 (didReceiveUpdate = !0),
2047 (workInProgress.firstContext = null));
2048}
2049function readContext(context, observedBits) {
2050 if (
2051 lastContextWithAllBitsObserved !== context &&
2052 !1 !== observedBits &&
2053 0 !== observedBits
2054 ) {
2055 if ("number" !== typeof observedBits || 1073741823 === observedBits)
2056 (lastContextWithAllBitsObserved = context), (observedBits = 1073741823);
2057 observedBits = { context: context, observedBits: observedBits, next: null };
2058 if (null === lastContextDependency) {
2059 if (null === currentlyRenderingFiber)
2060 throw ReactError(
2061 Error(
2062 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
2063 )
2064 );
2065 lastContextDependency = observedBits;
2066 currentlyRenderingFiber.dependencies = {
2067 expirationTime: 0,
2068 firstContext: observedBits,
2069 responders: null
2070 };
2071 } else lastContextDependency = lastContextDependency.next = observedBits;
2072 }
2073 return context._currentValue;
2074}
2075var hasForceUpdate = !1;
2076function createUpdateQueue(baseState) {
2077 return {
2078 baseState: baseState,
2079 firstUpdate: null,
2080 lastUpdate: null,
2081 firstCapturedUpdate: null,
2082 lastCapturedUpdate: null,
2083 firstEffect: null,
2084 lastEffect: null,
2085 firstCapturedEffect: null,
2086 lastCapturedEffect: null
2087 };
2088}
2089function cloneUpdateQueue(currentQueue) {
2090 return {
2091 baseState: currentQueue.baseState,
2092 firstUpdate: currentQueue.firstUpdate,
2093 lastUpdate: currentQueue.lastUpdate,
2094 firstCapturedUpdate: null,
2095 lastCapturedUpdate: null,
2096 firstEffect: null,
2097 lastEffect: null,
2098 firstCapturedEffect: null,
2099 lastCapturedEffect: null
2100 };
2101}
2102function createUpdate(expirationTime, suspenseConfig) {
2103 return {
2104 expirationTime: expirationTime,
2105 suspenseConfig: suspenseConfig,
2106 tag: 0,
2107 payload: null,
2108 callback: null,
2109 next: null,
2110 nextEffect: null
2111 };
2112}
2113function appendUpdateToQueue(queue, update) {
2114 null === queue.lastUpdate
2115 ? (queue.firstUpdate = queue.lastUpdate = update)
2116 : ((queue.lastUpdate.next = update), (queue.lastUpdate = update));
2117}
2118function enqueueUpdate(fiber, update) {
2119 var alternate = fiber.alternate;
2120 if (null === alternate) {
2121 var queue1 = fiber.updateQueue;
2122 var queue2 = null;
2123 null === queue1 &&
2124 (queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState));
2125 } else
2126 (queue1 = fiber.updateQueue),
2127 (queue2 = alternate.updateQueue),
2128 null === queue1
2129 ? null === queue2
2130 ? ((queue1 = fiber.updateQueue = createUpdateQueue(
2131 fiber.memoizedState
2132 )),
2133 (queue2 = alternate.updateQueue = createUpdateQueue(
2134 alternate.memoizedState
2135 )))
2136 : (queue1 = fiber.updateQueue = cloneUpdateQueue(queue2))
2137 : null === queue2 &&
2138 (queue2 = alternate.updateQueue = cloneUpdateQueue(queue1));
2139 null === queue2 || queue1 === queue2
2140 ? appendUpdateToQueue(queue1, update)
2141 : null === queue1.lastUpdate || null === queue2.lastUpdate
2142 ? (appendUpdateToQueue(queue1, update),
2143 appendUpdateToQueue(queue2, update))
2144 : (appendUpdateToQueue(queue1, update), (queue2.lastUpdate = update));
2145}
2146function enqueueCapturedUpdate(workInProgress, update) {
2147 var workInProgressQueue = workInProgress.updateQueue;
2148 workInProgressQueue =
2149 null === workInProgressQueue
2150 ? (workInProgress.updateQueue = createUpdateQueue(
2151 workInProgress.memoizedState
2152 ))
2153 : ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue);
2154 null === workInProgressQueue.lastCapturedUpdate
2155 ? (workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update)
2156 : ((workInProgressQueue.lastCapturedUpdate.next = update),
2157 (workInProgressQueue.lastCapturedUpdate = update));
2158}
2159function ensureWorkInProgressQueueIsAClone(workInProgress, queue) {
2160 var current = workInProgress.alternate;
2161 null !== current &&
2162 queue === current.updateQueue &&
2163 (queue = workInProgress.updateQueue = cloneUpdateQueue(queue));
2164 return queue;
2165}
2166function getStateFromUpdate(
2167 workInProgress,
2168 queue,
2169 update,
2170 prevState,
2171 nextProps,
2172 instance
2173) {
2174 switch (update.tag) {
2175 case 1:
2176 return (
2177 (workInProgress = update.payload),
2178 "function" === typeof workInProgress
2179 ? workInProgress.call(instance, prevState, nextProps)
2180 : workInProgress
2181 );
2182 case 3:
2183 workInProgress.effectTag = (workInProgress.effectTag & -2049) | 64;
2184 case 0:
2185 workInProgress = update.payload;
2186 nextProps =
2187 "function" === typeof workInProgress
2188 ? workInProgress.call(instance, prevState, nextProps)
2189 : workInProgress;
2190 if (null === nextProps || void 0 === nextProps) break;
2191 return Object.assign({}, prevState, nextProps);
2192 case 2:
2193 hasForceUpdate = !0;
2194 }
2195 return prevState;
2196}
2197function processUpdateQueue(
2198 workInProgress,
2199 queue,
2200 props,
2201 instance,
2202 renderExpirationTime
2203) {
2204 hasForceUpdate = !1;
2205 queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue);
2206 for (
2207 var newBaseState = queue.baseState,
2208 newFirstUpdate = null,
2209 newExpirationTime = 0,
2210 update = queue.firstUpdate,
2211 resultState = newBaseState;
2212 null !== update;
2213
2214 ) {
2215 var updateExpirationTime = update.expirationTime;
2216 updateExpirationTime < renderExpirationTime
2217 ? (null === newFirstUpdate &&
2218 ((newFirstUpdate = update), (newBaseState = resultState)),
2219 newExpirationTime < updateExpirationTime &&
2220 (newExpirationTime = updateExpirationTime))
2221 : (markRenderEventTimeAndConfig(
2222 updateExpirationTime,
2223 update.suspenseConfig
2224 ),
2225 (resultState = getStateFromUpdate(
2226 workInProgress,
2227 queue,
2228 update,
2229 resultState,
2230 props,
2231 instance
2232 )),
2233 null !== update.callback &&
2234 ((workInProgress.effectTag |= 32),
2235 (update.nextEffect = null),
2236 null === queue.lastEffect
2237 ? (queue.firstEffect = queue.lastEffect = update)
2238 : ((queue.lastEffect.nextEffect = update),
2239 (queue.lastEffect = update))));
2240 update = update.next;
2241 }
2242 updateExpirationTime = null;
2243 for (update = queue.firstCapturedUpdate; null !== update; ) {
2244 var _updateExpirationTime = update.expirationTime;
2245 _updateExpirationTime < renderExpirationTime
2246 ? (null === updateExpirationTime &&
2247 ((updateExpirationTime = update),
2248 null === newFirstUpdate && (newBaseState = resultState)),
2249 newExpirationTime < _updateExpirationTime &&
2250 (newExpirationTime = _updateExpirationTime))
2251 : ((resultState = getStateFromUpdate(
2252 workInProgress,
2253 queue,
2254 update,
2255 resultState,
2256 props,
2257 instance
2258 )),
2259 null !== update.callback &&
2260 ((workInProgress.effectTag |= 32),
2261 (update.nextEffect = null),
2262 null === queue.lastCapturedEffect
2263 ? (queue.firstCapturedEffect = queue.lastCapturedEffect = update)
2264 : ((queue.lastCapturedEffect.nextEffect = update),
2265 (queue.lastCapturedEffect = update))));
2266 update = update.next;
2267 }
2268 null === newFirstUpdate && (queue.lastUpdate = null);
2269 null === updateExpirationTime
2270 ? (queue.lastCapturedUpdate = null)
2271 : (workInProgress.effectTag |= 32);
2272 null === newFirstUpdate &&
2273 null === updateExpirationTime &&
2274 (newBaseState = resultState);
2275 queue.baseState = newBaseState;
2276 queue.firstUpdate = newFirstUpdate;
2277 queue.firstCapturedUpdate = updateExpirationTime;
2278 workInProgress.expirationTime = newExpirationTime;
2279 workInProgress.memoizedState = resultState;
2280}
2281function commitUpdateQueue(finishedWork, finishedQueue, instance) {
2282 null !== finishedQueue.firstCapturedUpdate &&
2283 (null !== finishedQueue.lastUpdate &&
2284 ((finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate),
2285 (finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate)),
2286 (finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null));
2287 commitUpdateEffects(finishedQueue.firstEffect, instance);
2288 finishedQueue.firstEffect = finishedQueue.lastEffect = null;
2289 commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
2290 finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
2291}
2292function commitUpdateEffects(effect, instance) {
2293 for (; null !== effect; ) {
2294 var _callback3 = effect.callback;
2295 if (null !== _callback3) {
2296 effect.callback = null;
2297 var context = instance;
2298 if ("function" !== typeof _callback3)
2299 throw ReactError(
2300 Error(
2301 "Invalid argument passed as callback. Expected a function. Instead received: " +
2302 _callback3
2303 )
2304 );
2305 _callback3.call(context);
2306 }
2307 effect = effect.nextEffect;
2308 }
2309}
2310var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
2311 emptyRefsObject = new React.Component().refs;
2312function applyDerivedStateFromProps(
2313 workInProgress,
2314 ctor,
2315 getDerivedStateFromProps,
2316 nextProps
2317) {
2318 ctor = workInProgress.memoizedState;
2319 getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
2320 getDerivedStateFromProps =
2321 null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
2322 ? ctor
2323 : Object.assign({}, ctor, getDerivedStateFromProps);
2324 workInProgress.memoizedState = getDerivedStateFromProps;
2325 nextProps = workInProgress.updateQueue;
2326 null !== nextProps &&
2327 0 === workInProgress.expirationTime &&
2328 (nextProps.baseState = getDerivedStateFromProps);
2329}
2330var classComponentUpdater = {
2331 isMounted: function(component) {
2332 return (component = component._reactInternalFiber)
2333 ? 2 === isFiberMountedImpl(component)
2334 : !1;
2335 },
2336 enqueueSetState: function(inst, payload, callback) {
2337 inst = inst._reactInternalFiber;
2338 var currentTime = requestCurrentTime(),
2339 suspenseConfig = ReactCurrentBatchConfig.suspense;
2340 currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
2341 suspenseConfig = createUpdate(currentTime, suspenseConfig);
2342 suspenseConfig.payload = payload;
2343 void 0 !== callback &&
2344 null !== callback &&
2345 (suspenseConfig.callback = callback);
2346 enqueueUpdate(inst, suspenseConfig);
2347 scheduleUpdateOnFiber(inst, currentTime);
2348 },
2349 enqueueReplaceState: function(inst, payload, callback) {
2350 inst = inst._reactInternalFiber;
2351 var currentTime = requestCurrentTime(),
2352 suspenseConfig = ReactCurrentBatchConfig.suspense;
2353 currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
2354 suspenseConfig = createUpdate(currentTime, suspenseConfig);
2355 suspenseConfig.tag = 1;
2356 suspenseConfig.payload = payload;
2357 void 0 !== callback &&
2358 null !== callback &&
2359 (suspenseConfig.callback = callback);
2360 enqueueUpdate(inst, suspenseConfig);
2361 scheduleUpdateOnFiber(inst, currentTime);
2362 },
2363 enqueueForceUpdate: function(inst, callback) {
2364 inst = inst._reactInternalFiber;
2365 var currentTime = requestCurrentTime(),
2366 suspenseConfig = ReactCurrentBatchConfig.suspense;
2367 currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
2368 suspenseConfig = createUpdate(currentTime, suspenseConfig);
2369 suspenseConfig.tag = 2;
2370 void 0 !== callback &&
2371 null !== callback &&
2372 (suspenseConfig.callback = callback);
2373 enqueueUpdate(inst, suspenseConfig);
2374 scheduleUpdateOnFiber(inst, currentTime);
2375 }
2376};
2377function checkShouldComponentUpdate(
2378 workInProgress,
2379 ctor,
2380 oldProps,
2381 newProps,
2382 oldState,
2383 newState,
2384 nextContext
2385) {
2386 workInProgress = workInProgress.stateNode;
2387 return "function" === typeof workInProgress.shouldComponentUpdate
2388 ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
2389 : ctor.prototype && ctor.prototype.isPureReactComponent
2390 ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
2391 : !0;
2392}
2393function constructClassInstance(workInProgress, ctor, props) {
2394 var isLegacyContextConsumer = !1,
2395 unmaskedContext = emptyContextObject;
2396 var context = ctor.contextType;
2397 "object" === typeof context && null !== context
2398 ? (context = readContext(context))
2399 : ((unmaskedContext = isContextProvider(ctor)
2400 ? previousContext
2401 : contextStackCursor.current),
2402 (isLegacyContextConsumer = ctor.contextTypes),
2403 (context = (isLegacyContextConsumer =
2404 null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer)
2405 ? getMaskedContext(workInProgress, unmaskedContext)
2406 : emptyContextObject));
2407 ctor = new ctor(props, context);
2408 workInProgress.memoizedState =
2409 null !== ctor.state && void 0 !== ctor.state ? ctor.state : null;
2410 ctor.updater = classComponentUpdater;
2411 workInProgress.stateNode = ctor;
2412 ctor._reactInternalFiber = workInProgress;
2413 isLegacyContextConsumer &&
2414 ((workInProgress = workInProgress.stateNode),
2415 (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
2416 (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
2417 return ctor;
2418}
2419function callComponentWillReceiveProps(
2420 workInProgress,
2421 instance,
2422 newProps,
2423 nextContext
2424) {
2425 workInProgress = instance.state;
2426 "function" === typeof instance.componentWillReceiveProps &&
2427 instance.componentWillReceiveProps(newProps, nextContext);
2428 "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
2429 instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
2430 instance.state !== workInProgress &&
2431 classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
2432}
2433function mountClassInstance(
2434 workInProgress,
2435 ctor,
2436 newProps,
2437 renderExpirationTime
2438) {
2439 var instance = workInProgress.stateNode;
2440 instance.props = newProps;
2441 instance.state = workInProgress.memoizedState;
2442 instance.refs = emptyRefsObject;
2443 var contextType = ctor.contextType;
2444 "object" === typeof contextType && null !== contextType
2445 ? (instance.context = readContext(contextType))
2446 : ((contextType = isContextProvider(ctor)
2447 ? previousContext
2448 : contextStackCursor.current),
2449 (instance.context = getMaskedContext(workInProgress, contextType)));
2450 contextType = workInProgress.updateQueue;
2451 null !== contextType &&
2452 (processUpdateQueue(
2453 workInProgress,
2454 contextType,
2455 newProps,
2456 instance,
2457 renderExpirationTime
2458 ),
2459 (instance.state = workInProgress.memoizedState));
2460 contextType = ctor.getDerivedStateFromProps;
2461 "function" === typeof contextType &&
2462 (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps),
2463 (instance.state = workInProgress.memoizedState));
2464 "function" === typeof ctor.getDerivedStateFromProps ||
2465 "function" === typeof instance.getSnapshotBeforeUpdate ||
2466 ("function" !== typeof instance.UNSAFE_componentWillMount &&
2467 "function" !== typeof instance.componentWillMount) ||
2468 ((ctor = instance.state),
2469 "function" === typeof instance.componentWillMount &&
2470 instance.componentWillMount(),
2471 "function" === typeof instance.UNSAFE_componentWillMount &&
2472 instance.UNSAFE_componentWillMount(),
2473 ctor !== instance.state &&
2474 classComponentUpdater.enqueueReplaceState(instance, instance.state, null),
2475 (contextType = workInProgress.updateQueue),
2476 null !== contextType &&
2477 (processUpdateQueue(
2478 workInProgress,
2479 contextType,
2480 newProps,
2481 instance,
2482 renderExpirationTime
2483 ),
2484 (instance.state = workInProgress.memoizedState)));
2485 "function" === typeof instance.componentDidMount &&
2486 (workInProgress.effectTag |= 4);
2487}
2488var isArray = Array.isArray;
2489function coerceRef(returnFiber, current$$1, element) {
2490 returnFiber = element.ref;
2491 if (
2492 null !== returnFiber &&
2493 "function" !== typeof returnFiber &&
2494 "object" !== typeof returnFiber
2495 ) {
2496 if (element._owner) {
2497 element = element._owner;
2498 var inst = void 0;
2499 if (element) {
2500 if (1 !== element.tag)
2501 throw ReactError(
2502 Error(
2503 "Function components cannot have refs. Did you mean to use React.forwardRef()?"
2504 )
2505 );
2506 inst = element.stateNode;
2507 }
2508 if (!inst)
2509 throw ReactError(
2510 Error(
2511 "Missing owner for string ref " +
2512 returnFiber +
2513 ". This error is likely caused by a bug in React. Please file an issue."
2514 )
2515 );
2516 var stringRef = "" + returnFiber;
2517 if (
2518 null !== current$$1 &&
2519 null !== current$$1.ref &&
2520 "function" === typeof current$$1.ref &&
2521 current$$1.ref._stringRef === stringRef
2522 )
2523 return current$$1.ref;
2524 current$$1 = function(value) {
2525 var refs = inst.refs;
2526 refs === emptyRefsObject && (refs = inst.refs = {});
2527 null === value ? delete refs[stringRef] : (refs[stringRef] = value);
2528 };
2529 current$$1._stringRef = stringRef;
2530 return current$$1;
2531 }
2532 if ("string" !== typeof returnFiber)
2533 throw ReactError(
2534 Error(
2535 "Expected ref to be a function, a string, an object returned by React.createRef(), or null."
2536 )
2537 );
2538 if (!element._owner)
2539 throw ReactError(
2540 Error(
2541 "Element ref was specified as a string (" +
2542 returnFiber +
2543 ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information."
2544 )
2545 );
2546 }
2547 return returnFiber;
2548}
2549function throwOnInvalidObjectType(returnFiber, newChild) {
2550 if ("textarea" !== returnFiber.type)
2551 throw ReactError(
2552 Error(
2553 "Objects are not valid as a React child (found: " +
2554 ("[object Object]" === Object.prototype.toString.call(newChild)
2555 ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
2556 : newChild) +
2557 ")."
2558 )
2559 );
2560}
2561function ChildReconciler(shouldTrackSideEffects) {
2562 function deleteChild(returnFiber, childToDelete) {
2563 if (shouldTrackSideEffects) {
2564 var last = returnFiber.lastEffect;
2565 null !== last
2566 ? ((last.nextEffect = childToDelete),
2567 (returnFiber.lastEffect = childToDelete))
2568 : (returnFiber.firstEffect = returnFiber.lastEffect = childToDelete);
2569 childToDelete.nextEffect = null;
2570 childToDelete.effectTag = 8;
2571 }
2572 }
2573 function deleteRemainingChildren(returnFiber, currentFirstChild) {
2574 if (!shouldTrackSideEffects) return null;
2575 for (; null !== currentFirstChild; )
2576 deleteChild(returnFiber, currentFirstChild),
2577 (currentFirstChild = currentFirstChild.sibling);
2578 return null;
2579 }
2580 function mapRemainingChildren(returnFiber, currentFirstChild) {
2581 for (returnFiber = new Map(); null !== currentFirstChild; )
2582 null !== currentFirstChild.key
2583 ? returnFiber.set(currentFirstChild.key, currentFirstChild)
2584 : returnFiber.set(currentFirstChild.index, currentFirstChild),
2585 (currentFirstChild = currentFirstChild.sibling);
2586 return returnFiber;
2587 }
2588 function useFiber(fiber, pendingProps, expirationTime) {
2589 fiber = createWorkInProgress(fiber, pendingProps, expirationTime);
2590 fiber.index = 0;
2591 fiber.sibling = null;
2592 return fiber;
2593 }
2594 function placeChild(newFiber, lastPlacedIndex, newIndex) {
2595 newFiber.index = newIndex;
2596 if (!shouldTrackSideEffects) return lastPlacedIndex;
2597 newIndex = newFiber.alternate;
2598 if (null !== newIndex)
2599 return (
2600 (newIndex = newIndex.index),
2601 newIndex < lastPlacedIndex
2602 ? ((newFiber.effectTag = 2), lastPlacedIndex)
2603 : newIndex
2604 );
2605 newFiber.effectTag = 2;
2606 return lastPlacedIndex;
2607 }
2608 function placeSingleChild(newFiber) {
2609 shouldTrackSideEffects &&
2610 null === newFiber.alternate &&
2611 (newFiber.effectTag = 2);
2612 return newFiber;
2613 }
2614 function updateTextNode(
2615 returnFiber,
2616 current$$1,
2617 textContent,
2618 expirationTime
2619 ) {
2620 if (null === current$$1 || 6 !== current$$1.tag)
2621 return (
2622 (current$$1 = createFiberFromText(
2623 textContent,
2624 returnFiber.mode,
2625 expirationTime
2626 )),
2627 (current$$1.return = returnFiber),
2628 current$$1
2629 );
2630 current$$1 = useFiber(current$$1, textContent, expirationTime);
2631 current$$1.return = returnFiber;
2632 return current$$1;
2633 }
2634 function updateElement(returnFiber, current$$1, element, expirationTime) {
2635 if (null !== current$$1 && current$$1.elementType === element.type)
2636 return (
2637 (expirationTime = useFiber(current$$1, element.props, expirationTime)),
2638 (expirationTime.ref = coerceRef(returnFiber, current$$1, element)),
2639 (expirationTime.return = returnFiber),
2640 expirationTime
2641 );
2642 expirationTime = createFiberFromTypeAndProps(
2643 element.type,
2644 element.key,
2645 element.props,
2646 null,
2647 returnFiber.mode,
2648 expirationTime
2649 );
2650 expirationTime.ref = coerceRef(returnFiber, current$$1, element);
2651 expirationTime.return = returnFiber;
2652 return expirationTime;
2653 }
2654 function updatePortal(returnFiber, current$$1, portal, expirationTime) {
2655 if (
2656 null === current$$1 ||
2657 4 !== current$$1.tag ||
2658 current$$1.stateNode.containerInfo !== portal.containerInfo ||
2659 current$$1.stateNode.implementation !== portal.implementation
2660 )
2661 return (
2662 (current$$1 = createFiberFromPortal(
2663 portal,
2664 returnFiber.mode,
2665 expirationTime
2666 )),
2667 (current$$1.return = returnFiber),
2668 current$$1
2669 );
2670 current$$1 = useFiber(current$$1, portal.children || [], expirationTime);
2671 current$$1.return = returnFiber;
2672 return current$$1;
2673 }
2674 function updateFragment(
2675 returnFiber,
2676 current$$1,
2677 fragment,
2678 expirationTime,
2679 key
2680 ) {
2681 if (null === current$$1 || 7 !== current$$1.tag)
2682 return (
2683 (current$$1 = createFiberFromFragment(
2684 fragment,
2685 returnFiber.mode,
2686 expirationTime,
2687 key
2688 )),
2689 (current$$1.return = returnFiber),
2690 current$$1
2691 );
2692 current$$1 = useFiber(current$$1, fragment, expirationTime);
2693 current$$1.return = returnFiber;
2694 return current$$1;
2695 }
2696 function createChild(returnFiber, newChild, expirationTime) {
2697 if ("string" === typeof newChild || "number" === typeof newChild)
2698 return (
2699 (newChild = createFiberFromText(
2700 "" + newChild,
2701 returnFiber.mode,
2702 expirationTime
2703 )),
2704 (newChild.return = returnFiber),
2705 newChild
2706 );
2707 if ("object" === typeof newChild && null !== newChild) {
2708 switch (newChild.$$typeof) {
2709 case REACT_ELEMENT_TYPE:
2710 return (
2711 (expirationTime = createFiberFromTypeAndProps(
2712 newChild.type,
2713 newChild.key,
2714 newChild.props,
2715 null,
2716 returnFiber.mode,
2717 expirationTime
2718 )),
2719 (expirationTime.ref = coerceRef(returnFiber, null, newChild)),
2720 (expirationTime.return = returnFiber),
2721 expirationTime
2722 );
2723 case REACT_PORTAL_TYPE:
2724 return (
2725 (newChild = createFiberFromPortal(
2726 newChild,
2727 returnFiber.mode,
2728 expirationTime
2729 )),
2730 (newChild.return = returnFiber),
2731 newChild
2732 );
2733 }
2734 if (isArray(newChild) || getIteratorFn(newChild))
2735 return (
2736 (newChild = createFiberFromFragment(
2737 newChild,
2738 returnFiber.mode,
2739 expirationTime,
2740 null
2741 )),
2742 (newChild.return = returnFiber),
2743 newChild
2744 );
2745 throwOnInvalidObjectType(returnFiber, newChild);
2746 }
2747 return null;
2748 }
2749 function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
2750 var key = null !== oldFiber ? oldFiber.key : null;
2751 if ("string" === typeof newChild || "number" === typeof newChild)
2752 return null !== key
2753 ? null
2754 : updateTextNode(returnFiber, oldFiber, "" + newChild, expirationTime);
2755 if ("object" === typeof newChild && null !== newChild) {
2756 switch (newChild.$$typeof) {
2757 case REACT_ELEMENT_TYPE:
2758 return newChild.key === key
2759 ? newChild.type === REACT_FRAGMENT_TYPE
2760 ? updateFragment(
2761 returnFiber,
2762 oldFiber,
2763 newChild.props.children,
2764 expirationTime,
2765 key
2766 )
2767 : updateElement(returnFiber, oldFiber, newChild, expirationTime)
2768 : null;
2769 case REACT_PORTAL_TYPE:
2770 return newChild.key === key
2771 ? updatePortal(returnFiber, oldFiber, newChild, expirationTime)
2772 : null;
2773 }
2774 if (isArray(newChild) || getIteratorFn(newChild))
2775 return null !== key
2776 ? null
2777 : updateFragment(
2778 returnFiber,
2779 oldFiber,
2780 newChild,
2781 expirationTime,
2782 null
2783 );
2784 throwOnInvalidObjectType(returnFiber, newChild);
2785 }
2786 return null;
2787 }
2788 function updateFromMap(
2789 existingChildren,
2790 returnFiber,
2791 newIdx,
2792 newChild,
2793 expirationTime
2794 ) {
2795 if ("string" === typeof newChild || "number" === typeof newChild)
2796 return (
2797 (existingChildren = existingChildren.get(newIdx) || null),
2798 updateTextNode(
2799 returnFiber,
2800 existingChildren,
2801 "" + newChild,
2802 expirationTime
2803 )
2804 );
2805 if ("object" === typeof newChild && null !== newChild) {
2806 switch (newChild.$$typeof) {
2807 case REACT_ELEMENT_TYPE:
2808 return (
2809 (existingChildren =
2810 existingChildren.get(
2811 null === newChild.key ? newIdx : newChild.key
2812 ) || null),
2813 newChild.type === REACT_FRAGMENT_TYPE
2814 ? updateFragment(
2815 returnFiber,
2816 existingChildren,
2817 newChild.props.children,
2818 expirationTime,
2819 newChild.key
2820 )
2821 : updateElement(
2822 returnFiber,
2823 existingChildren,
2824 newChild,
2825 expirationTime
2826 )
2827 );
2828 case REACT_PORTAL_TYPE:
2829 return (
2830 (existingChildren =
2831 existingChildren.get(
2832 null === newChild.key ? newIdx : newChild.key
2833 ) || null),
2834 updatePortal(
2835 returnFiber,
2836 existingChildren,
2837 newChild,
2838 expirationTime
2839 )
2840 );
2841 }
2842 if (isArray(newChild) || getIteratorFn(newChild))
2843 return (
2844 (existingChildren = existingChildren.get(newIdx) || null),
2845 updateFragment(
2846 returnFiber,
2847 existingChildren,
2848 newChild,
2849 expirationTime,
2850 null
2851 )
2852 );
2853 throwOnInvalidObjectType(returnFiber, newChild);
2854 }
2855 return null;
2856 }
2857 function reconcileChildrenArray(
2858 returnFiber,
2859 currentFirstChild,
2860 newChildren,
2861 expirationTime
2862 ) {
2863 for (
2864 var resultingFirstChild = null,
2865 previousNewFiber = null,
2866 oldFiber = currentFirstChild,
2867 newIdx = (currentFirstChild = 0),
2868 nextOldFiber = null;
2869 null !== oldFiber && newIdx < newChildren.length;
2870 newIdx++
2871 ) {
2872 oldFiber.index > newIdx
2873 ? ((nextOldFiber = oldFiber), (oldFiber = null))
2874 : (nextOldFiber = oldFiber.sibling);
2875 var newFiber = updateSlot(
2876 returnFiber,
2877 oldFiber,
2878 newChildren[newIdx],
2879 expirationTime
2880 );
2881 if (null === newFiber) {
2882 null === oldFiber && (oldFiber = nextOldFiber);
2883 break;
2884 }
2885 shouldTrackSideEffects &&
2886 oldFiber &&
2887 null === newFiber.alternate &&
2888 deleteChild(returnFiber, oldFiber);
2889 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
2890 null === previousNewFiber
2891 ? (resultingFirstChild = newFiber)
2892 : (previousNewFiber.sibling = newFiber);
2893 previousNewFiber = newFiber;
2894 oldFiber = nextOldFiber;
2895 }
2896 if (newIdx === newChildren.length)
2897 return (
2898 deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild
2899 );
2900 if (null === oldFiber) {
2901 for (; newIdx < newChildren.length; newIdx++)
2902 (oldFiber = createChild(
2903 returnFiber,
2904 newChildren[newIdx],
2905 expirationTime
2906 )),
2907 null !== oldFiber &&
2908 ((currentFirstChild = placeChild(
2909 oldFiber,
2910 currentFirstChild,
2911 newIdx
2912 )),
2913 null === previousNewFiber
2914 ? (resultingFirstChild = oldFiber)
2915 : (previousNewFiber.sibling = oldFiber),
2916 (previousNewFiber = oldFiber));
2917 return resultingFirstChild;
2918 }
2919 for (
2920 oldFiber = mapRemainingChildren(returnFiber, oldFiber);
2921 newIdx < newChildren.length;
2922 newIdx++
2923 )
2924 (nextOldFiber = updateFromMap(
2925 oldFiber,
2926 returnFiber,
2927 newIdx,
2928 newChildren[newIdx],
2929 expirationTime
2930 )),
2931 null !== nextOldFiber &&
2932 (shouldTrackSideEffects &&
2933 null !== nextOldFiber.alternate &&
2934 oldFiber.delete(
2935 null === nextOldFiber.key ? newIdx : nextOldFiber.key
2936 ),
2937 (currentFirstChild = placeChild(
2938 nextOldFiber,
2939 currentFirstChild,
2940 newIdx
2941 )),
2942 null === previousNewFiber
2943 ? (resultingFirstChild = nextOldFiber)
2944 : (previousNewFiber.sibling = nextOldFiber),
2945 (previousNewFiber = nextOldFiber));
2946 shouldTrackSideEffects &&
2947 oldFiber.forEach(function(child) {
2948 return deleteChild(returnFiber, child);
2949 });
2950 return resultingFirstChild;
2951 }
2952 function reconcileChildrenIterator(
2953 returnFiber,
2954 currentFirstChild,
2955 newChildrenIterable,
2956 expirationTime
2957 ) {
2958 var iteratorFn = getIteratorFn(newChildrenIterable);
2959 if ("function" !== typeof iteratorFn)
2960 throw ReactError(
2961 Error(
2962 "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
2963 )
2964 );
2965 newChildrenIterable = iteratorFn.call(newChildrenIterable);
2966 if (null == newChildrenIterable)
2967 throw ReactError(Error("An iterable object provided no iterator."));
2968 for (
2969 var previousNewFiber = (iteratorFn = null),
2970 oldFiber = currentFirstChild,
2971 newIdx = (currentFirstChild = 0),
2972 nextOldFiber = null,
2973 step = newChildrenIterable.next();
2974 null !== oldFiber && !step.done;
2975 newIdx++, step = newChildrenIterable.next()
2976 ) {
2977 oldFiber.index > newIdx
2978 ? ((nextOldFiber = oldFiber), (oldFiber = null))
2979 : (nextOldFiber = oldFiber.sibling);
2980 var newFiber = updateSlot(
2981 returnFiber,
2982 oldFiber,
2983 step.value,
2984 expirationTime
2985 );
2986 if (null === newFiber) {
2987 null === oldFiber && (oldFiber = nextOldFiber);
2988 break;
2989 }
2990 shouldTrackSideEffects &&
2991 oldFiber &&
2992 null === newFiber.alternate &&
2993 deleteChild(returnFiber, oldFiber);
2994 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
2995 null === previousNewFiber
2996 ? (iteratorFn = newFiber)
2997 : (previousNewFiber.sibling = newFiber);
2998 previousNewFiber = newFiber;
2999 oldFiber = nextOldFiber;
3000 }
3001 if (step.done)
3002 return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn;
3003 if (null === oldFiber) {
3004 for (; !step.done; newIdx++, step = newChildrenIterable.next())
3005 (step = createChild(returnFiber, step.value, expirationTime)),
3006 null !== step &&
3007 ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
3008 null === previousNewFiber
3009 ? (iteratorFn = step)
3010 : (previousNewFiber.sibling = step),
3011 (previousNewFiber = step));
3012 return iteratorFn;
3013 }
3014 for (
3015 oldFiber = mapRemainingChildren(returnFiber, oldFiber);
3016 !step.done;
3017 newIdx++, step = newChildrenIterable.next()
3018 )
3019 (step = updateFromMap(
3020 oldFiber,
3021 returnFiber,
3022 newIdx,
3023 step.value,
3024 expirationTime
3025 )),
3026 null !== step &&
3027 (shouldTrackSideEffects &&
3028 null !== step.alternate &&
3029 oldFiber.delete(null === step.key ? newIdx : step.key),
3030 (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
3031 null === previousNewFiber
3032 ? (iteratorFn = step)
3033 : (previousNewFiber.sibling = step),
3034 (previousNewFiber = step));
3035 shouldTrackSideEffects &&
3036 oldFiber.forEach(function(child) {
3037 return deleteChild(returnFiber, child);
3038 });
3039 return iteratorFn;
3040 }
3041 return function(returnFiber, currentFirstChild, newChild, expirationTime) {
3042 var isUnkeyedTopLevelFragment =
3043 "object" === typeof newChild &&
3044 null !== newChild &&
3045 newChild.type === REACT_FRAGMENT_TYPE &&
3046 null === newChild.key;
3047 isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
3048 var isObject = "object" === typeof newChild && null !== newChild;
3049 if (isObject)
3050 switch (newChild.$$typeof) {
3051 case REACT_ELEMENT_TYPE:
3052 a: {
3053 isObject = newChild.key;
3054 for (
3055 isUnkeyedTopLevelFragment = currentFirstChild;
3056 null !== isUnkeyedTopLevelFragment;
3057
3058 ) {
3059 if (isUnkeyedTopLevelFragment.key === isObject) {
3060 if (
3061 7 === isUnkeyedTopLevelFragment.tag
3062 ? newChild.type === REACT_FRAGMENT_TYPE
3063 : isUnkeyedTopLevelFragment.elementType === newChild.type
3064 ) {
3065 deleteRemainingChildren(
3066 returnFiber,
3067 isUnkeyedTopLevelFragment.sibling
3068 );
3069 currentFirstChild = useFiber(
3070 isUnkeyedTopLevelFragment,
3071 newChild.type === REACT_FRAGMENT_TYPE
3072 ? newChild.props.children
3073 : newChild.props,
3074 expirationTime
3075 );
3076 currentFirstChild.ref = coerceRef(
3077 returnFiber,
3078 isUnkeyedTopLevelFragment,
3079 newChild
3080 );
3081 currentFirstChild.return = returnFiber;
3082 returnFiber = currentFirstChild;
3083 break a;
3084 }
3085 deleteRemainingChildren(returnFiber, isUnkeyedTopLevelFragment);
3086 break;
3087 } else deleteChild(returnFiber, isUnkeyedTopLevelFragment);
3088 isUnkeyedTopLevelFragment = isUnkeyedTopLevelFragment.sibling;
3089 }
3090 newChild.type === REACT_FRAGMENT_TYPE
3091 ? ((currentFirstChild = createFiberFromFragment(
3092 newChild.props.children,
3093 returnFiber.mode,
3094 expirationTime,
3095 newChild.key
3096 )),
3097 (currentFirstChild.return = returnFiber),
3098 (returnFiber = currentFirstChild))
3099 : ((expirationTime = createFiberFromTypeAndProps(
3100 newChild.type,
3101 newChild.key,
3102 newChild.props,
3103 null,
3104 returnFiber.mode,
3105 expirationTime
3106 )),
3107 (expirationTime.ref = coerceRef(
3108 returnFiber,
3109 currentFirstChild,
3110 newChild
3111 )),
3112 (expirationTime.return = returnFiber),
3113 (returnFiber = expirationTime));
3114 }
3115 return placeSingleChild(returnFiber);
3116 case REACT_PORTAL_TYPE:
3117 a: {
3118 for (
3119 isUnkeyedTopLevelFragment = newChild.key;
3120 null !== currentFirstChild;
3121
3122 ) {
3123 if (currentFirstChild.key === isUnkeyedTopLevelFragment) {
3124 if (
3125 4 === currentFirstChild.tag &&
3126 currentFirstChild.stateNode.containerInfo ===
3127 newChild.containerInfo &&
3128 currentFirstChild.stateNode.implementation ===
3129 newChild.implementation
3130 ) {
3131 deleteRemainingChildren(
3132 returnFiber,
3133 currentFirstChild.sibling
3134 );
3135 currentFirstChild = useFiber(
3136 currentFirstChild,
3137 newChild.children || [],
3138 expirationTime
3139 );
3140 currentFirstChild.return = returnFiber;
3141 returnFiber = currentFirstChild;
3142 break a;
3143 }
3144 deleteRemainingChildren(returnFiber, currentFirstChild);
3145 break;
3146 } else deleteChild(returnFiber, currentFirstChild);
3147 currentFirstChild = currentFirstChild.sibling;
3148 }
3149 currentFirstChild = createFiberFromPortal(
3150 newChild,
3151 returnFiber.mode,
3152 expirationTime
3153 );
3154 currentFirstChild.return = returnFiber;
3155 returnFiber = currentFirstChild;
3156 }
3157 return placeSingleChild(returnFiber);
3158 }
3159 if ("string" === typeof newChild || "number" === typeof newChild)
3160 return (
3161 (newChild = "" + newChild),
3162 null !== currentFirstChild && 6 === currentFirstChild.tag
3163 ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
3164 (currentFirstChild = useFiber(
3165 currentFirstChild,
3166 newChild,
3167 expirationTime
3168 )),
3169 (currentFirstChild.return = returnFiber),
3170 (returnFiber = currentFirstChild))
3171 : (deleteRemainingChildren(returnFiber, currentFirstChild),
3172 (currentFirstChild = createFiberFromText(
3173 newChild,
3174 returnFiber.mode,
3175 expirationTime
3176 )),
3177 (currentFirstChild.return = returnFiber),
3178 (returnFiber = currentFirstChild)),
3179 placeSingleChild(returnFiber)
3180 );
3181 if (isArray(newChild))
3182 return reconcileChildrenArray(
3183 returnFiber,
3184 currentFirstChild,
3185 newChild,
3186 expirationTime
3187 );
3188 if (getIteratorFn(newChild))
3189 return reconcileChildrenIterator(
3190 returnFiber,
3191 currentFirstChild,
3192 newChild,
3193 expirationTime
3194 );
3195 isObject && throwOnInvalidObjectType(returnFiber, newChild);
3196 if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
3197 switch (returnFiber.tag) {
3198 case 1:
3199 case 0:
3200 throw ((returnFiber = returnFiber.type),
3201 ReactError(
3202 Error(
3203 (returnFiber.displayName || returnFiber.name || "Component") +
3204 "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."
3205 )
3206 ));
3207 }
3208 return deleteRemainingChildren(returnFiber, currentFirstChild);
3209 };
3210}
3211var reconcileChildFibers = ChildReconciler(!0),
3212 mountChildFibers = ChildReconciler(!1),
3213 NO_CONTEXT = {},
3214 contextStackCursor$1 = { current: NO_CONTEXT },
3215 contextFiberStackCursor = { current: NO_CONTEXT },
3216 rootInstanceStackCursor = { current: NO_CONTEXT };
3217function requiredContext(c) {
3218 if (c === NO_CONTEXT)
3219 throw ReactError(
3220 Error(
3221 "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
3222 )
3223 );
3224 return c;
3225}
3226function pushHostContainer(fiber, nextRootInstance) {
3227 push(rootInstanceStackCursor, nextRootInstance, fiber);
3228 push(contextFiberStackCursor, fiber, fiber);
3229 push(contextStackCursor$1, NO_CONTEXT, fiber);
3230 pop(contextStackCursor$1, fiber);
3231 push(contextStackCursor$1, { isInAParentText: !1 }, fiber);
3232}
3233function popHostContainer(fiber) {
3234 pop(contextStackCursor$1, fiber);
3235 pop(contextFiberStackCursor, fiber);
3236 pop(rootInstanceStackCursor, fiber);
3237}
3238function pushHostContext(fiber) {
3239 requiredContext(rootInstanceStackCursor.current);
3240 var context = requiredContext(contextStackCursor$1.current);
3241 var nextContext = fiber.type;
3242 nextContext =
3243 "AndroidTextInput" === nextContext ||
3244 "RCTMultilineTextInputView" === nextContext ||
3245 "RCTSinglelineTextInputView" === nextContext ||
3246 "RCTText" === nextContext ||
3247 "RCTVirtualText" === nextContext;
3248 nextContext =
3249 context.isInAParentText !== nextContext
3250 ? { isInAParentText: nextContext }
3251 : context;
3252 context !== nextContext &&
3253 (push(contextFiberStackCursor, fiber, fiber),
3254 push(contextStackCursor$1, nextContext, fiber));
3255}
3256function popHostContext(fiber) {
3257 contextFiberStackCursor.current === fiber &&
3258 (pop(contextStackCursor$1, fiber), pop(contextFiberStackCursor, fiber));
3259}
3260var SubtreeSuspenseContextMask = 1,
3261 InvisibleParentSuspenseContext = 1,
3262 ForceSuspenseFallback = 2,
3263 suspenseStackCursor = { current: 0 };
3264function findFirstSuspended(row) {
3265 for (var node = row; null !== node; ) {
3266 if (13 === node.tag) {
3267 if (null !== node.memoizedState) return node;
3268 } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
3269 if (0 !== (node.effectTag & 64)) return node;
3270 } else if (null !== node.child) {
3271 node.child.return = node;
3272 node = node.child;
3273 continue;
3274 }
3275 if (node === row) break;
3276 for (; null === node.sibling; ) {
3277 if (null === node.return || node.return === row) return null;
3278 node = node.return;
3279 }
3280 node.sibling.return = node.return;
3281 node = node.sibling;
3282 }
3283 return null;
3284}
3285function createResponderListener(responder, props) {
3286 return { responder: responder, props: props };
3287}
3288var NoEffect$1 = 0,
3289 UnmountSnapshot = 2,
3290 UnmountMutation = 4,
3291 MountMutation = 8,
3292 UnmountLayout = 16,
3293 MountLayout = 32,
3294 MountPassive = 64,
3295 UnmountPassive = 128,
3296 ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
3297 renderExpirationTime$1 = 0,
3298 currentlyRenderingFiber$1 = null,
3299 currentHook = null,
3300 nextCurrentHook = null,
3301 firstWorkInProgressHook = null,
3302 workInProgressHook = null,
3303 nextWorkInProgressHook = null,
3304 remainingExpirationTime = 0,
3305 componentUpdateQueue = null,
3306 sideEffectTag = 0,
3307 didScheduleRenderPhaseUpdate = !1,
3308 renderPhaseUpdates = null,
3309 numberOfReRenders = 0;
3310function throwInvalidHookError() {
3311 throw ReactError(
3312 Error(
3313 "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://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."
3314 )
3315 );
3316}
3317function areHookInputsEqual(nextDeps, prevDeps) {
3318 if (null === prevDeps) return !1;
3319 for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
3320 if (!is(nextDeps[i], prevDeps[i])) return !1;
3321 return !0;
3322}
3323function renderWithHooks(
3324 current,
3325 workInProgress,
3326 Component,
3327 props,
3328 refOrContext,
3329 nextRenderExpirationTime
3330) {
3331 renderExpirationTime$1 = nextRenderExpirationTime;
3332 currentlyRenderingFiber$1 = workInProgress;
3333 nextCurrentHook = null !== current ? current.memoizedState : null;
3334 ReactCurrentDispatcher$1.current =
3335 null === nextCurrentHook ? HooksDispatcherOnMount : HooksDispatcherOnUpdate;
3336 workInProgress = Component(props, refOrContext);
3337 if (didScheduleRenderPhaseUpdate) {
3338 do
3339 (didScheduleRenderPhaseUpdate = !1),
3340 (numberOfReRenders += 1),
3341 (nextCurrentHook = null !== current ? current.memoizedState : null),
3342 (nextWorkInProgressHook = firstWorkInProgressHook),
3343 (componentUpdateQueue = workInProgressHook = currentHook = null),
3344 (ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdate),
3345 (workInProgress = Component(props, refOrContext));
3346 while (didScheduleRenderPhaseUpdate);
3347 renderPhaseUpdates = null;
3348 numberOfReRenders = 0;
3349 }
3350 ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
3351 current = currentlyRenderingFiber$1;
3352 current.memoizedState = firstWorkInProgressHook;
3353 current.expirationTime = remainingExpirationTime;
3354 current.updateQueue = componentUpdateQueue;
3355 current.effectTag |= sideEffectTag;
3356 current = null !== currentHook && null !== currentHook.next;
3357 renderExpirationTime$1 = 0;
3358 nextWorkInProgressHook = workInProgressHook = firstWorkInProgressHook = nextCurrentHook = currentHook = currentlyRenderingFiber$1 = null;
3359 remainingExpirationTime = 0;
3360 componentUpdateQueue = null;
3361 sideEffectTag = 0;
3362 if (current)
3363 throw ReactError(
3364 Error(
3365 "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
3366 )
3367 );
3368 return workInProgress;
3369}
3370function resetHooks() {
3371 ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
3372 renderExpirationTime$1 = 0;
3373 nextWorkInProgressHook = workInProgressHook = firstWorkInProgressHook = nextCurrentHook = currentHook = currentlyRenderingFiber$1 = null;
3374 remainingExpirationTime = 0;
3375 componentUpdateQueue = null;
3376 sideEffectTag = 0;
3377 didScheduleRenderPhaseUpdate = !1;
3378 renderPhaseUpdates = null;
3379 numberOfReRenders = 0;
3380}
3381function mountWorkInProgressHook() {
3382 var hook = {
3383 memoizedState: null,
3384 baseState: null,
3385 queue: null,
3386 baseUpdate: null,
3387 next: null
3388 };
3389 null === workInProgressHook
3390 ? (firstWorkInProgressHook = workInProgressHook = hook)
3391 : (workInProgressHook = workInProgressHook.next = hook);
3392 return workInProgressHook;
3393}
3394function updateWorkInProgressHook() {
3395 if (null !== nextWorkInProgressHook)
3396 (workInProgressHook = nextWorkInProgressHook),
3397 (nextWorkInProgressHook = workInProgressHook.next),
3398 (currentHook = nextCurrentHook),
3399 (nextCurrentHook = null !== currentHook ? currentHook.next : null);
3400 else {
3401 if (null === nextCurrentHook)
3402 throw ReactError(
3403 Error("Rendered more hooks than during the previous render.")
3404 );
3405 currentHook = nextCurrentHook;
3406 var newHook = {
3407 memoizedState: currentHook.memoizedState,
3408 baseState: currentHook.baseState,
3409 queue: currentHook.queue,
3410 baseUpdate: currentHook.baseUpdate,
3411 next: null
3412 };
3413 workInProgressHook =
3414 null === workInProgressHook
3415 ? (firstWorkInProgressHook = newHook)
3416 : (workInProgressHook.next = newHook);
3417 nextCurrentHook = currentHook.next;
3418 }
3419 return workInProgressHook;
3420}
3421function basicStateReducer(state, action) {
3422 return "function" === typeof action ? action(state) : action;
3423}
3424function updateReducer(reducer) {
3425 var hook = updateWorkInProgressHook(),
3426 queue = hook.queue;
3427 if (null === queue)
3428 throw ReactError(
3429 Error(
3430 "Should have a queue. This is likely a bug in React. Please file an issue."
3431 )
3432 );
3433 queue.lastRenderedReducer = reducer;
3434 if (0 < numberOfReRenders) {
3435 var _dispatch = queue.dispatch;
3436 if (null !== renderPhaseUpdates) {
3437 var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
3438 if (void 0 !== firstRenderPhaseUpdate) {
3439 renderPhaseUpdates.delete(queue);
3440 var newState = hook.memoizedState;
3441 do
3442 (newState = reducer(newState, firstRenderPhaseUpdate.action)),
3443 (firstRenderPhaseUpdate = firstRenderPhaseUpdate.next);
3444 while (null !== firstRenderPhaseUpdate);
3445 is(newState, hook.memoizedState) || (didReceiveUpdate = !0);
3446 hook.memoizedState = newState;
3447 hook.baseUpdate === queue.last && (hook.baseState = newState);
3448 queue.lastRenderedState = newState;
3449 return [newState, _dispatch];
3450 }
3451 }
3452 return [hook.memoizedState, _dispatch];
3453 }
3454 _dispatch = queue.last;
3455 var baseUpdate = hook.baseUpdate;
3456 newState = hook.baseState;
3457 null !== baseUpdate
3458 ? (null !== _dispatch && (_dispatch.next = null),
3459 (_dispatch = baseUpdate.next))
3460 : (_dispatch = null !== _dispatch ? _dispatch.next : null);
3461 if (null !== _dispatch) {
3462 var newBaseUpdate = (firstRenderPhaseUpdate = null),
3463 _update = _dispatch,
3464 didSkip = !1;
3465 do {
3466 var updateExpirationTime = _update.expirationTime;
3467 updateExpirationTime < renderExpirationTime$1
3468 ? (didSkip ||
3469 ((didSkip = !0),
3470 (newBaseUpdate = baseUpdate),
3471 (firstRenderPhaseUpdate = newState)),
3472 updateExpirationTime > remainingExpirationTime &&
3473 (remainingExpirationTime = updateExpirationTime))
3474 : (markRenderEventTimeAndConfig(
3475 updateExpirationTime,
3476 _update.suspenseConfig
3477 ),
3478 (newState =
3479 _update.eagerReducer === reducer
3480 ? _update.eagerState
3481 : reducer(newState, _update.action)));
3482 baseUpdate = _update;
3483 _update = _update.next;
3484 } while (null !== _update && _update !== _dispatch);
3485 didSkip ||
3486 ((newBaseUpdate = baseUpdate), (firstRenderPhaseUpdate = newState));
3487 is(newState, hook.memoizedState) || (didReceiveUpdate = !0);
3488 hook.memoizedState = newState;
3489 hook.baseUpdate = newBaseUpdate;
3490 hook.baseState = firstRenderPhaseUpdate;
3491 queue.lastRenderedState = newState;
3492 }
3493 return [hook.memoizedState, queue.dispatch];
3494}
3495function pushEffect(tag, create, destroy, deps) {
3496 tag = { tag: tag, create: create, destroy: destroy, deps: deps, next: null };
3497 null === componentUpdateQueue
3498 ? ((componentUpdateQueue = { lastEffect: null }),
3499 (componentUpdateQueue.lastEffect = tag.next = tag))
3500 : ((create = componentUpdateQueue.lastEffect),
3501 null === create
3502 ? (componentUpdateQueue.lastEffect = tag.next = tag)
3503 : ((destroy = create.next),
3504 (create.next = tag),
3505 (tag.next = destroy),
3506 (componentUpdateQueue.lastEffect = tag)));
3507 return tag;
3508}
3509function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
3510 var hook = mountWorkInProgressHook();
3511 sideEffectTag |= fiberEffectTag;
3512 hook.memoizedState = pushEffect(
3513 hookEffectTag,
3514 create,
3515 void 0,
3516 void 0 === deps ? null : deps
3517 );
3518}
3519function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
3520 var hook = updateWorkInProgressHook();
3521 deps = void 0 === deps ? null : deps;
3522 var destroy = void 0;
3523 if (null !== currentHook) {
3524 var prevEffect = currentHook.memoizedState;
3525 destroy = prevEffect.destroy;
3526 if (null !== deps && areHookInputsEqual(deps, prevEffect.deps)) {
3527 pushEffect(NoEffect$1, create, destroy, deps);
3528 return;
3529 }
3530 }
3531 sideEffectTag |= fiberEffectTag;
3532 hook.memoizedState = pushEffect(hookEffectTag, create, destroy, deps);
3533}
3534function imperativeHandleEffect(create, ref) {
3535 if ("function" === typeof ref)
3536 return (
3537 (create = create()),
3538 ref(create),
3539 function() {
3540 ref(null);
3541 }
3542 );
3543 if (null !== ref && void 0 !== ref)
3544 return (
3545 (create = create()),
3546 (ref.current = create),
3547 function() {
3548 ref.current = null;
3549 }
3550 );
3551}
3552function mountDebugValue() {}
3553function dispatchAction(fiber, queue, action) {
3554 if (!(25 > numberOfReRenders))
3555 throw ReactError(
3556 Error(
3557 "Too many re-renders. React limits the number of renders to prevent an infinite loop."
3558 )
3559 );
3560 var alternate = fiber.alternate;
3561 if (
3562 fiber === currentlyRenderingFiber$1 ||
3563 (null !== alternate && alternate === currentlyRenderingFiber$1)
3564 )
3565 if (
3566 ((didScheduleRenderPhaseUpdate = !0),
3567 (fiber = {
3568 expirationTime: renderExpirationTime$1,
3569 suspenseConfig: null,
3570 action: action,
3571 eagerReducer: null,
3572 eagerState: null,
3573 next: null
3574 }),
3575 null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),
3576 (action = renderPhaseUpdates.get(queue)),
3577 void 0 === action)
3578 )
3579 renderPhaseUpdates.set(queue, fiber);
3580 else {
3581 for (queue = action; null !== queue.next; ) queue = queue.next;
3582 queue.next = fiber;
3583 }
3584 else {
3585 var currentTime = requestCurrentTime(),
3586 _suspenseConfig = ReactCurrentBatchConfig.suspense;
3587 currentTime = computeExpirationForFiber(
3588 currentTime,
3589 fiber,
3590 _suspenseConfig
3591 );
3592 _suspenseConfig = {
3593 expirationTime: currentTime,
3594 suspenseConfig: _suspenseConfig,
3595 action: action,
3596 eagerReducer: null,
3597 eagerState: null,
3598 next: null
3599 };
3600 var _last = queue.last;
3601 if (null === _last) _suspenseConfig.next = _suspenseConfig;
3602 else {
3603 var first = _last.next;
3604 null !== first && (_suspenseConfig.next = first);
3605 _last.next = _suspenseConfig;
3606 }
3607 queue.last = _suspenseConfig;
3608 if (
3609 0 === fiber.expirationTime &&
3610 (null === alternate || 0 === alternate.expirationTime) &&
3611 ((alternate = queue.lastRenderedReducer), null !== alternate)
3612 )
3613 try {
3614 var currentState = queue.lastRenderedState,
3615 _eagerState = alternate(currentState, action);
3616 _suspenseConfig.eagerReducer = alternate;
3617 _suspenseConfig.eagerState = _eagerState;
3618 if (is(_eagerState, currentState)) return;
3619 } catch (error) {
3620 } finally {
3621 }
3622 scheduleUpdateOnFiber(fiber, currentTime);
3623 }
3624}
3625var ContextOnlyDispatcher = {
3626 readContext: readContext,
3627 useCallback: throwInvalidHookError,
3628 useContext: throwInvalidHookError,
3629 useEffect: throwInvalidHookError,
3630 useImperativeHandle: throwInvalidHookError,
3631 useLayoutEffect: throwInvalidHookError,
3632 useMemo: throwInvalidHookError,
3633 useReducer: throwInvalidHookError,
3634 useRef: throwInvalidHookError,
3635 useState: throwInvalidHookError,
3636 useDebugValue: throwInvalidHookError,
3637 useResponder: throwInvalidHookError
3638 },
3639 HooksDispatcherOnMount = {
3640 readContext: readContext,
3641 useCallback: function(callback, deps) {
3642 mountWorkInProgressHook().memoizedState = [
3643 callback,
3644 void 0 === deps ? null : deps
3645 ];
3646 return callback;
3647 },
3648 useContext: readContext,
3649 useEffect: function(create, deps) {
3650 return mountEffectImpl(516, UnmountPassive | MountPassive, create, deps);
3651 },
3652 useImperativeHandle: function(ref, create, deps) {
3653 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
3654 return mountEffectImpl(
3655 4,
3656 UnmountMutation | MountLayout,
3657 imperativeHandleEffect.bind(null, create, ref),
3658 deps
3659 );
3660 },
3661 useLayoutEffect: function(create, deps) {
3662 return mountEffectImpl(4, UnmountMutation | MountLayout, create, deps);
3663 },
3664 useMemo: function(nextCreate, deps) {
3665 var hook = mountWorkInProgressHook();
3666 deps = void 0 === deps ? null : deps;
3667 nextCreate = nextCreate();
3668 hook.memoizedState = [nextCreate, deps];
3669 return nextCreate;
3670 },
3671 useReducer: function(reducer, initialArg, init) {
3672 var hook = mountWorkInProgressHook();
3673 initialArg = void 0 !== init ? init(initialArg) : initialArg;
3674 hook.memoizedState = hook.baseState = initialArg;
3675 reducer = hook.queue = {
3676 last: null,
3677 dispatch: null,
3678 lastRenderedReducer: reducer,
3679 lastRenderedState: initialArg
3680 };
3681 reducer = reducer.dispatch = dispatchAction.bind(
3682 null,
3683 currentlyRenderingFiber$1,
3684 reducer
3685 );
3686 return [hook.memoizedState, reducer];
3687 },
3688 useRef: function(initialValue) {
3689 var hook = mountWorkInProgressHook();
3690 initialValue = { current: initialValue };
3691 return (hook.memoizedState = initialValue);
3692 },
3693 useState: function(initialState) {
3694 var hook = mountWorkInProgressHook();
3695 "function" === typeof initialState && (initialState = initialState());
3696 hook.memoizedState = hook.baseState = initialState;
3697 initialState = hook.queue = {
3698 last: null,
3699 dispatch: null,
3700 lastRenderedReducer: basicStateReducer,
3701 lastRenderedState: initialState
3702 };
3703 initialState = initialState.dispatch = dispatchAction.bind(
3704 null,
3705 currentlyRenderingFiber$1,
3706 initialState
3707 );
3708 return [hook.memoizedState, initialState];
3709 },
3710 useDebugValue: mountDebugValue,
3711 useResponder: createResponderListener
3712 },
3713 HooksDispatcherOnUpdate = {
3714 readContext: readContext,
3715 useCallback: function(callback, deps) {
3716 var hook = updateWorkInProgressHook();
3717 deps = void 0 === deps ? null : deps;
3718 var prevState = hook.memoizedState;
3719 if (
3720 null !== prevState &&
3721 null !== deps &&
3722 areHookInputsEqual(deps, prevState[1])
3723 )
3724 return prevState[0];
3725 hook.memoizedState = [callback, deps];
3726 return callback;
3727 },
3728 useContext: readContext,
3729 useEffect: function(create, deps) {
3730 return updateEffectImpl(516, UnmountPassive | MountPassive, create, deps);
3731 },
3732 useImperativeHandle: function(ref, create, deps) {
3733 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
3734 return updateEffectImpl(
3735 4,
3736 UnmountMutation | MountLayout,
3737 imperativeHandleEffect.bind(null, create, ref),
3738 deps
3739 );
3740 },
3741 useLayoutEffect: function(create, deps) {
3742 return updateEffectImpl(4, UnmountMutation | MountLayout, create, deps);
3743 },
3744 useMemo: function(nextCreate, deps) {
3745 var hook = updateWorkInProgressHook();
3746 deps = void 0 === deps ? null : deps;
3747 var prevState = hook.memoizedState;
3748 if (
3749 null !== prevState &&
3750 null !== deps &&
3751 areHookInputsEqual(deps, prevState[1])
3752 )
3753 return prevState[0];
3754 nextCreate = nextCreate();
3755 hook.memoizedState = [nextCreate, deps];
3756 return nextCreate;
3757 },
3758 useReducer: updateReducer,
3759 useRef: function() {
3760 return updateWorkInProgressHook().memoizedState;
3761 },
3762 useState: function(initialState) {
3763 return updateReducer(basicStateReducer, initialState);
3764 },
3765 useDebugValue: mountDebugValue,
3766 useResponder: createResponderListener
3767 },
3768 now$1 = Scheduler.unstable_now,
3769 commitTime = 0,
3770 profilerStartTime = -1;
3771function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
3772 if (0 <= profilerStartTime) {
3773 var elapsedTime = now$1() - profilerStartTime;
3774 fiber.actualDuration += elapsedTime;
3775 overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
3776 profilerStartTime = -1;
3777 }
3778}
3779var hydrationParentFiber = null,
3780 nextHydratableInstance = null,
3781 isHydrating = !1;
3782function tryHydrate(fiber, nextInstance) {
3783 switch (fiber.tag) {
3784 case 5:
3785 return (
3786 (nextInstance = shim$1(nextInstance, fiber.type, fiber.pendingProps)),
3787 null !== nextInstance ? ((fiber.stateNode = nextInstance), !0) : !1
3788 );
3789 case 6:
3790 return (
3791 (nextInstance = shim$1(nextInstance, fiber.pendingProps)),
3792 null !== nextInstance ? ((fiber.stateNode = nextInstance), !0) : !1
3793 );
3794 case 13:
3795 return !1;
3796 default:
3797 return !1;
3798 }
3799}
3800function tryToClaimNextHydratableInstance(fiber$jscomp$0) {
3801 if (isHydrating) {
3802 var nextInstance = nextHydratableInstance;
3803 if (nextInstance) {
3804 var firstAttemptedInstance = nextInstance;
3805 if (!tryHydrate(fiber$jscomp$0, nextInstance)) {
3806 nextInstance = shim$1(firstAttemptedInstance);
3807 if (!nextInstance || !tryHydrate(fiber$jscomp$0, nextInstance)) {
3808 fiber$jscomp$0.effectTag |= 2;
3809 isHydrating = !1;
3810 hydrationParentFiber = fiber$jscomp$0;
3811 return;
3812 }
3813 var returnFiber = hydrationParentFiber,
3814 fiber = createFiber(5, null, null, 0);
3815 fiber.elementType = "DELETED";
3816 fiber.type = "DELETED";
3817 fiber.stateNode = firstAttemptedInstance;
3818 fiber.return = returnFiber;
3819 fiber.effectTag = 8;
3820 null !== returnFiber.lastEffect
3821 ? ((returnFiber.lastEffect.nextEffect = fiber),
3822 (returnFiber.lastEffect = fiber))
3823 : (returnFiber.firstEffect = returnFiber.lastEffect = fiber);
3824 }
3825 hydrationParentFiber = fiber$jscomp$0;
3826 nextHydratableInstance = shim$1(nextInstance);
3827 } else
3828 (fiber$jscomp$0.effectTag |= 2),
3829 (isHydrating = !1),
3830 (hydrationParentFiber = fiber$jscomp$0);
3831 }
3832}
3833var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner,
3834 didReceiveUpdate = !1;
3835function reconcileChildren(
3836 current$$1,
3837 workInProgress,
3838 nextChildren,
3839 renderExpirationTime
3840) {
3841 workInProgress.child =
3842 null === current$$1
3843 ? mountChildFibers(
3844 workInProgress,
3845 null,
3846 nextChildren,
3847 renderExpirationTime
3848 )
3849 : reconcileChildFibers(
3850 workInProgress,
3851 current$$1.child,
3852 nextChildren,
3853 renderExpirationTime
3854 );
3855}
3856function updateForwardRef(
3857 current$$1,
3858 workInProgress,
3859 Component,
3860 nextProps,
3861 renderExpirationTime
3862) {
3863 Component = Component.render;
3864 var ref = workInProgress.ref;
3865 prepareToReadContext(workInProgress, renderExpirationTime);
3866 nextProps = renderWithHooks(
3867 current$$1,
3868 workInProgress,
3869 Component,
3870 nextProps,
3871 ref,
3872 renderExpirationTime
3873 );
3874 if (null !== current$$1 && !didReceiveUpdate)
3875 return (
3876 (workInProgress.updateQueue = current$$1.updateQueue),
3877 (workInProgress.effectTag &= -517),
3878 current$$1.expirationTime <= renderExpirationTime &&
3879 (current$$1.expirationTime = 0),
3880 bailoutOnAlreadyFinishedWork(
3881 current$$1,
3882 workInProgress,
3883 renderExpirationTime
3884 )
3885 );
3886 workInProgress.effectTag |= 1;
3887 reconcileChildren(
3888 current$$1,
3889 workInProgress,
3890 nextProps,
3891 renderExpirationTime
3892 );
3893 return workInProgress.child;
3894}
3895function updateMemoComponent(
3896 current$$1,
3897 workInProgress,
3898 Component,
3899 nextProps,
3900 updateExpirationTime,
3901 renderExpirationTime
3902) {
3903 if (null === current$$1) {
3904 var type = Component.type;
3905 if (
3906 "function" === typeof type &&
3907 !shouldConstruct(type) &&
3908 void 0 === type.defaultProps &&
3909 null === Component.compare &&
3910 void 0 === Component.defaultProps
3911 )
3912 return (
3913 (workInProgress.tag = 15),
3914 (workInProgress.type = type),
3915 updateSimpleMemoComponent(
3916 current$$1,
3917 workInProgress,
3918 type,
3919 nextProps,
3920 updateExpirationTime,
3921 renderExpirationTime
3922 )
3923 );
3924 current$$1 = createFiberFromTypeAndProps(
3925 Component.type,
3926 null,
3927 nextProps,
3928 null,
3929 workInProgress.mode,
3930 renderExpirationTime
3931 );
3932 current$$1.ref = workInProgress.ref;
3933 current$$1.return = workInProgress;
3934 return (workInProgress.child = current$$1);
3935 }
3936 type = current$$1.child;
3937 if (
3938 updateExpirationTime < renderExpirationTime &&
3939 ((updateExpirationTime = type.memoizedProps),
3940 (Component = Component.compare),
3941 (Component = null !== Component ? Component : shallowEqual),
3942 Component(updateExpirationTime, nextProps) &&
3943 current$$1.ref === workInProgress.ref)
3944 )
3945 return bailoutOnAlreadyFinishedWork(
3946 current$$1,
3947 workInProgress,
3948 renderExpirationTime
3949 );
3950 workInProgress.effectTag |= 1;
3951 current$$1 = createWorkInProgress(type, nextProps, renderExpirationTime);
3952 current$$1.ref = workInProgress.ref;
3953 current$$1.return = workInProgress;
3954 return (workInProgress.child = current$$1);
3955}
3956function updateSimpleMemoComponent(
3957 current$$1,
3958 workInProgress,
3959 Component,
3960 nextProps,
3961 updateExpirationTime,
3962 renderExpirationTime
3963) {
3964 return null !== current$$1 &&
3965 shallowEqual(current$$1.memoizedProps, nextProps) &&
3966 current$$1.ref === workInProgress.ref &&
3967 ((didReceiveUpdate = !1), updateExpirationTime < renderExpirationTime)
3968 ? bailoutOnAlreadyFinishedWork(
3969 current$$1,
3970 workInProgress,
3971 renderExpirationTime
3972 )
3973 : updateFunctionComponent(
3974 current$$1,
3975 workInProgress,
3976 Component,
3977 nextProps,
3978 renderExpirationTime
3979 );
3980}
3981function markRef(current$$1, workInProgress) {
3982 var ref = workInProgress.ref;
3983 if (
3984 (null === current$$1 && null !== ref) ||
3985 (null !== current$$1 && current$$1.ref !== ref)
3986 )
3987 workInProgress.effectTag |= 128;
3988}
3989function updateFunctionComponent(
3990 current$$1,
3991 workInProgress,
3992 Component,
3993 nextProps,
3994 renderExpirationTime
3995) {
3996 var context = isContextProvider(Component)
3997 ? previousContext
3998 : contextStackCursor.current;
3999 context = getMaskedContext(workInProgress, context);
4000 prepareToReadContext(workInProgress, renderExpirationTime);
4001 Component = renderWithHooks(
4002 current$$1,
4003 workInProgress,
4004 Component,
4005 nextProps,
4006 context,
4007 renderExpirationTime
4008 );
4009 if (null !== current$$1 && !didReceiveUpdate)
4010 return (
4011 (workInProgress.updateQueue = current$$1.updateQueue),
4012 (workInProgress.effectTag &= -517),
4013 current$$1.expirationTime <= renderExpirationTime &&
4014 (current$$1.expirationTime = 0),
4015 bailoutOnAlreadyFinishedWork(
4016 current$$1,
4017 workInProgress,
4018 renderExpirationTime
4019 )
4020 );
4021 workInProgress.effectTag |= 1;
4022 reconcileChildren(
4023 current$$1,
4024 workInProgress,
4025 Component,
4026 renderExpirationTime
4027 );
4028 return workInProgress.child;
4029}
4030function updateClassComponent(
4031 current$$1,
4032 workInProgress,
4033 Component,
4034 nextProps,
4035 renderExpirationTime
4036) {
4037 if (isContextProvider(Component)) {
4038 var hasContext = !0;
4039 pushContextProvider(workInProgress);
4040 } else hasContext = !1;
4041 prepareToReadContext(workInProgress, renderExpirationTime);
4042 if (null === workInProgress.stateNode)
4043 null !== current$$1 &&
4044 ((current$$1.alternate = null),
4045 (workInProgress.alternate = null),
4046 (workInProgress.effectTag |= 2)),
4047 constructClassInstance(
4048 workInProgress,
4049 Component,
4050 nextProps,
4051 renderExpirationTime
4052 ),
4053 mountClassInstance(
4054 workInProgress,
4055 Component,
4056 nextProps,
4057 renderExpirationTime
4058 ),
4059 (nextProps = !0);
4060 else if (null === current$$1) {
4061 var instance = workInProgress.stateNode,
4062 oldProps = workInProgress.memoizedProps;
4063 instance.props = oldProps;
4064 var oldContext = instance.context,
4065 contextType = Component.contextType;
4066 "object" === typeof contextType && null !== contextType
4067 ? (contextType = readContext(contextType))
4068 : ((contextType = isContextProvider(Component)
4069 ? previousContext
4070 : contextStackCursor.current),
4071 (contextType = getMaskedContext(workInProgress, contextType)));
4072 var getDerivedStateFromProps = Component.getDerivedStateFromProps,
4073 hasNewLifecycles =
4074 "function" === typeof getDerivedStateFromProps ||
4075 "function" === typeof instance.getSnapshotBeforeUpdate;
4076 hasNewLifecycles ||
4077 ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
4078 "function" !== typeof instance.componentWillReceiveProps) ||
4079 ((oldProps !== nextProps || oldContext !== contextType) &&
4080 callComponentWillReceiveProps(
4081 workInProgress,
4082 instance,
4083 nextProps,
4084 contextType
4085 ));
4086 hasForceUpdate = !1;
4087 var oldState = workInProgress.memoizedState;
4088 oldContext = instance.state = oldState;
4089 var updateQueue = workInProgress.updateQueue;
4090 null !== updateQueue &&
4091 (processUpdateQueue(
4092 workInProgress,
4093 updateQueue,
4094 nextProps,
4095 instance,
4096 renderExpirationTime
4097 ),
4098 (oldContext = workInProgress.memoizedState));
4099 oldProps !== nextProps ||
4100 oldState !== oldContext ||
4101 didPerformWorkStackCursor.current ||
4102 hasForceUpdate
4103 ? ("function" === typeof getDerivedStateFromProps &&
4104 (applyDerivedStateFromProps(
4105 workInProgress,
4106 Component,
4107 getDerivedStateFromProps,
4108 nextProps
4109 ),
4110 (oldContext = workInProgress.memoizedState)),
4111 (oldProps =
4112 hasForceUpdate ||
4113 checkShouldComponentUpdate(
4114 workInProgress,
4115 Component,
4116 oldProps,
4117 nextProps,
4118 oldState,
4119 oldContext,
4120 contextType
4121 ))
4122 ? (hasNewLifecycles ||
4123 ("function" !== typeof instance.UNSAFE_componentWillMount &&
4124 "function" !== typeof instance.componentWillMount) ||
4125 ("function" === typeof instance.componentWillMount &&
4126 instance.componentWillMount(),
4127 "function" === typeof instance.UNSAFE_componentWillMount &&
4128 instance.UNSAFE_componentWillMount()),
4129 "function" === typeof instance.componentDidMount &&
4130 (workInProgress.effectTag |= 4))
4131 : ("function" === typeof instance.componentDidMount &&
4132 (workInProgress.effectTag |= 4),
4133 (workInProgress.memoizedProps = nextProps),
4134 (workInProgress.memoizedState = oldContext)),
4135 (instance.props = nextProps),
4136 (instance.state = oldContext),
4137 (instance.context = contextType),
4138 (nextProps = oldProps))
4139 : ("function" === typeof instance.componentDidMount &&
4140 (workInProgress.effectTag |= 4),
4141 (nextProps = !1));
4142 } else
4143 (instance = workInProgress.stateNode),
4144 (oldProps = workInProgress.memoizedProps),
4145 (instance.props =
4146 workInProgress.type === workInProgress.elementType
4147 ? oldProps
4148 : resolveDefaultProps(workInProgress.type, oldProps)),
4149 (oldContext = instance.context),
4150 (contextType = Component.contextType),
4151 "object" === typeof contextType && null !== contextType
4152 ? (contextType = readContext(contextType))
4153 : ((contextType = isContextProvider(Component)
4154 ? previousContext
4155 : contextStackCursor.current),
4156 (contextType = getMaskedContext(workInProgress, contextType))),
4157 (getDerivedStateFromProps = Component.getDerivedStateFromProps),
4158 (hasNewLifecycles =
4159 "function" === typeof getDerivedStateFromProps ||
4160 "function" === typeof instance.getSnapshotBeforeUpdate) ||
4161 ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
4162 "function" !== typeof instance.componentWillReceiveProps) ||
4163 ((oldProps !== nextProps || oldContext !== contextType) &&
4164 callComponentWillReceiveProps(
4165 workInProgress,
4166 instance,
4167 nextProps,
4168 contextType
4169 )),
4170 (hasForceUpdate = !1),
4171 (oldContext = workInProgress.memoizedState),
4172 (oldState = instance.state = oldContext),
4173 (updateQueue = workInProgress.updateQueue),
4174 null !== updateQueue &&
4175 (processUpdateQueue(
4176 workInProgress,
4177 updateQueue,
4178 nextProps,
4179 instance,
4180 renderExpirationTime
4181 ),
4182 (oldState = workInProgress.memoizedState)),
4183 oldProps !== nextProps ||
4184 oldContext !== oldState ||
4185 didPerformWorkStackCursor.current ||
4186 hasForceUpdate
4187 ? ("function" === typeof getDerivedStateFromProps &&
4188 (applyDerivedStateFromProps(
4189 workInProgress,
4190 Component,
4191 getDerivedStateFromProps,
4192 nextProps
4193 ),
4194 (oldState = workInProgress.memoizedState)),
4195 (getDerivedStateFromProps =
4196 hasForceUpdate ||
4197 checkShouldComponentUpdate(
4198 workInProgress,
4199 Component,
4200 oldProps,
4201 nextProps,
4202 oldContext,
4203 oldState,
4204 contextType
4205 ))
4206 ? (hasNewLifecycles ||
4207 ("function" !== typeof instance.UNSAFE_componentWillUpdate &&
4208 "function" !== typeof instance.componentWillUpdate) ||
4209 ("function" === typeof instance.componentWillUpdate &&
4210 instance.componentWillUpdate(
4211 nextProps,
4212 oldState,
4213 contextType
4214 ),
4215 "function" === typeof instance.UNSAFE_componentWillUpdate &&
4216 instance.UNSAFE_componentWillUpdate(
4217 nextProps,
4218 oldState,
4219 contextType
4220 )),
4221 "function" === typeof instance.componentDidUpdate &&
4222 (workInProgress.effectTag |= 4),
4223 "function" === typeof instance.getSnapshotBeforeUpdate &&
4224 (workInProgress.effectTag |= 256))
4225 : ("function" !== typeof instance.componentDidUpdate ||
4226 (oldProps === current$$1.memoizedProps &&
4227 oldContext === current$$1.memoizedState) ||
4228 (workInProgress.effectTag |= 4),
4229 "function" !== typeof instance.getSnapshotBeforeUpdate ||
4230 (oldProps === current$$1.memoizedProps &&
4231 oldContext === current$$1.memoizedState) ||
4232 (workInProgress.effectTag |= 256),
4233 (workInProgress.memoizedProps = nextProps),
4234 (workInProgress.memoizedState = oldState)),
4235 (instance.props = nextProps),
4236 (instance.state = oldState),
4237 (instance.context = contextType),
4238 (nextProps = getDerivedStateFromProps))
4239 : ("function" !== typeof instance.componentDidUpdate ||
4240 (oldProps === current$$1.memoizedProps &&
4241 oldContext === current$$1.memoizedState) ||
4242 (workInProgress.effectTag |= 4),
4243 "function" !== typeof instance.getSnapshotBeforeUpdate ||
4244 (oldProps === current$$1.memoizedProps &&
4245 oldContext === current$$1.memoizedState) ||
4246 (workInProgress.effectTag |= 256),
4247 (nextProps = !1));
4248 return finishClassComponent(
4249 current$$1,
4250 workInProgress,
4251 Component,
4252 nextProps,
4253 hasContext,
4254 renderExpirationTime
4255 );
4256}
4257function finishClassComponent(
4258 current$$1,
4259 workInProgress,
4260 Component,
4261 shouldUpdate,
4262 hasContext,
4263 renderExpirationTime
4264) {
4265 markRef(current$$1, workInProgress);
4266 var didCaptureError = 0 !== (workInProgress.effectTag & 64);
4267 if (!shouldUpdate && !didCaptureError)
4268 return (
4269 hasContext && invalidateContextProvider(workInProgress, Component, !1),
4270 bailoutOnAlreadyFinishedWork(
4271 current$$1,
4272 workInProgress,
4273 renderExpirationTime
4274 )
4275 );
4276 shouldUpdate = workInProgress.stateNode;
4277 ReactCurrentOwner$3.current = workInProgress;
4278 if (
4279 didCaptureError &&
4280 "function" !== typeof Component.getDerivedStateFromError
4281 ) {
4282 var nextChildren = null;
4283 profilerStartTime = -1;
4284 } else nextChildren = shouldUpdate.render();
4285 workInProgress.effectTag |= 1;
4286 null !== current$$1 && didCaptureError
4287 ? ((didCaptureError = nextChildren),
4288 (workInProgress.child = reconcileChildFibers(
4289 workInProgress,
4290 current$$1.child,
4291 null,
4292 renderExpirationTime
4293 )),
4294 (workInProgress.child = reconcileChildFibers(
4295 workInProgress,
4296 null,
4297 didCaptureError,
4298 renderExpirationTime
4299 )))
4300 : reconcileChildren(
4301 current$$1,
4302 workInProgress,
4303 nextChildren,
4304 renderExpirationTime
4305 );
4306 workInProgress.memoizedState = shouldUpdate.state;
4307 hasContext && invalidateContextProvider(workInProgress, Component, !0);
4308 return workInProgress.child;
4309}
4310function pushHostRootContext(workInProgress) {
4311 var root = workInProgress.stateNode;
4312 root.pendingContext
4313 ? pushTopLevelContextObject(
4314 workInProgress,
4315 root.pendingContext,
4316 root.pendingContext !== root.context
4317 )
4318 : root.context &&
4319 pushTopLevelContextObject(workInProgress, root.context, !1);
4320 pushHostContainer(workInProgress, root.containerInfo);
4321}
4322var SUSPENDED_MARKER = {};
4323function updateSuspenseComponent(
4324 current$$1,
4325 workInProgress,
4326 renderExpirationTime
4327) {
4328 var mode = workInProgress.mode,
4329 nextProps = workInProgress.pendingProps,
4330 suspenseContext = suspenseStackCursor.current,
4331 nextState = null,
4332 nextDidTimeout = !1,
4333 JSCompiler_temp;
4334 (JSCompiler_temp = 0 !== (workInProgress.effectTag & 64)) ||
4335 (JSCompiler_temp =
4336 0 !== (suspenseContext & ForceSuspenseFallback) &&
4337 (null === current$$1 || null !== current$$1.memoizedState));
4338 JSCompiler_temp
4339 ? ((nextState = SUSPENDED_MARKER),
4340 (nextDidTimeout = !0),
4341 (workInProgress.effectTag &= -65))
4342 : (null !== current$$1 && null === current$$1.memoizedState) ||
4343 void 0 === nextProps.fallback ||
4344 !0 === nextProps.unstable_avoidThisFallback ||
4345 (suspenseContext |= InvisibleParentSuspenseContext);
4346 suspenseContext &= SubtreeSuspenseContextMask;
4347 push(suspenseStackCursor, suspenseContext, workInProgress);
4348 if (null === current$$1)
4349 if (nextDidTimeout) {
4350 nextProps = nextProps.fallback;
4351 current$$1 = createFiberFromFragment(null, mode, 0, null);
4352 current$$1.return = workInProgress;
4353 if (0 === (workInProgress.mode & 2))
4354 for (
4355 nextDidTimeout =
4356 null !== workInProgress.memoizedState
4357 ? workInProgress.child.child
4358 : workInProgress.child,
4359 current$$1.child = nextDidTimeout;
4360 null !== nextDidTimeout;
4361
4362 )
4363 (nextDidTimeout.return = current$$1),
4364 (nextDidTimeout = nextDidTimeout.sibling);
4365 renderExpirationTime = createFiberFromFragment(
4366 nextProps,
4367 mode,
4368 renderExpirationTime,
4369 null
4370 );
4371 renderExpirationTime.return = workInProgress;
4372 current$$1.sibling = renderExpirationTime;
4373 mode = current$$1;
4374 } else
4375 mode = renderExpirationTime = mountChildFibers(
4376 workInProgress,
4377 null,
4378 nextProps.children,
4379 renderExpirationTime
4380 );
4381 else {
4382 if (null !== current$$1.memoizedState)
4383 if (
4384 ((suspenseContext = current$$1.child),
4385 (mode = suspenseContext.sibling),
4386 nextDidTimeout)
4387 ) {
4388 nextProps = nextProps.fallback;
4389 renderExpirationTime = createWorkInProgress(
4390 suspenseContext,
4391 suspenseContext.pendingProps,
4392 0
4393 );
4394 renderExpirationTime.return = workInProgress;
4395 if (
4396 0 === (workInProgress.mode & 2) &&
4397 ((nextDidTimeout =
4398 null !== workInProgress.memoizedState
4399 ? workInProgress.child.child
4400 : workInProgress.child),
4401 nextDidTimeout !== suspenseContext.child)
4402 )
4403 for (
4404 renderExpirationTime.child = nextDidTimeout;
4405 null !== nextDidTimeout;
4406
4407 )
4408 (nextDidTimeout.return = renderExpirationTime),
4409 (nextDidTimeout = nextDidTimeout.sibling);
4410 if (workInProgress.mode & 8) {
4411 nextDidTimeout = 0;
4412 for (
4413 suspenseContext = renderExpirationTime.child;
4414 null !== suspenseContext;
4415
4416 )
4417 (nextDidTimeout += suspenseContext.treeBaseDuration),
4418 (suspenseContext = suspenseContext.sibling);
4419 renderExpirationTime.treeBaseDuration = nextDidTimeout;
4420 }
4421 nextProps = createWorkInProgress(mode, nextProps, mode.expirationTime);
4422 nextProps.return = workInProgress;
4423 renderExpirationTime.sibling = nextProps;
4424 mode = renderExpirationTime;
4425 renderExpirationTime.childExpirationTime = 0;
4426 renderExpirationTime = nextProps;
4427 } else
4428 mode = renderExpirationTime = reconcileChildFibers(
4429 workInProgress,
4430 suspenseContext.child,
4431 nextProps.children,
4432 renderExpirationTime
4433 );
4434 else if (((suspenseContext = current$$1.child), nextDidTimeout)) {
4435 nextDidTimeout = nextProps.fallback;
4436 nextProps = createFiberFromFragment(null, mode, 0, null);
4437 nextProps.return = workInProgress;
4438 nextProps.child = suspenseContext;
4439 null !== suspenseContext && (suspenseContext.return = nextProps);
4440 if (0 === (workInProgress.mode & 2))
4441 for (
4442 suspenseContext =
4443 null !== workInProgress.memoizedState
4444 ? workInProgress.child.child
4445 : workInProgress.child,
4446 nextProps.child = suspenseContext;
4447 null !== suspenseContext;
4448
4449 )
4450 (suspenseContext.return = nextProps),
4451 (suspenseContext = suspenseContext.sibling);
4452 if (workInProgress.mode & 8) {
4453 suspenseContext = 0;
4454 for (JSCompiler_temp = nextProps.child; null !== JSCompiler_temp; )
4455 (suspenseContext += JSCompiler_temp.treeBaseDuration),
4456 (JSCompiler_temp = JSCompiler_temp.sibling);
4457 nextProps.treeBaseDuration = suspenseContext;
4458 }
4459 renderExpirationTime = createFiberFromFragment(
4460 nextDidTimeout,
4461 mode,
4462 renderExpirationTime,
4463 null
4464 );
4465 renderExpirationTime.return = workInProgress;
4466 nextProps.sibling = renderExpirationTime;
4467 renderExpirationTime.effectTag |= 2;
4468 mode = nextProps;
4469 nextProps.childExpirationTime = 0;
4470 } else
4471 renderExpirationTime = mode = reconcileChildFibers(
4472 workInProgress,
4473 suspenseContext,
4474 nextProps.children,
4475 renderExpirationTime
4476 );
4477 workInProgress.stateNode = current$$1.stateNode;
4478 }
4479 workInProgress.memoizedState = nextState;
4480 workInProgress.child = mode;
4481 return renderExpirationTime;
4482}
4483function initSuspenseListRenderState(
4484 workInProgress,
4485 isBackwards,
4486 tail,
4487 lastContentRow,
4488 tailMode
4489) {
4490 var renderState = workInProgress.memoizedState;
4491 null === renderState
4492 ? (workInProgress.memoizedState = {
4493 isBackwards: isBackwards,
4494 rendering: null,
4495 last: lastContentRow,
4496 tail: tail,
4497 tailExpiration: 0,
4498 tailMode: tailMode
4499 })
4500 : ((renderState.isBackwards = isBackwards),
4501 (renderState.rendering = null),
4502 (renderState.last = lastContentRow),
4503 (renderState.tail = tail),
4504 (renderState.tailExpiration = 0),
4505 (renderState.tailMode = tailMode));
4506}
4507function updateSuspenseListComponent(
4508 current$$1,
4509 workInProgress,
4510 renderExpirationTime
4511) {
4512 var nextProps = workInProgress.pendingProps,
4513 revealOrder = nextProps.revealOrder,
4514 tailMode = nextProps.tail;
4515 reconcileChildren(
4516 current$$1,
4517 workInProgress,
4518 nextProps.children,
4519 renderExpirationTime
4520 );
4521 nextProps = suspenseStackCursor.current;
4522 if (0 !== (nextProps & ForceSuspenseFallback))
4523 (nextProps =
4524 (nextProps & SubtreeSuspenseContextMask) | ForceSuspenseFallback),
4525 (workInProgress.effectTag |= 64);
4526 else {
4527 if (null !== current$$1 && 0 !== (current$$1.effectTag & 64))
4528 a: for (current$$1 = workInProgress.child; null !== current$$1; ) {
4529 if (13 === current$$1.tag) {
4530 if (null !== current$$1.memoizedState) {
4531 current$$1.expirationTime < renderExpirationTime &&
4532 (current$$1.expirationTime = renderExpirationTime);
4533 var alternate = current$$1.alternate;
4534 null !== alternate &&
4535 alternate.expirationTime < renderExpirationTime &&
4536 (alternate.expirationTime = renderExpirationTime);
4537 scheduleWorkOnParentPath(current$$1.return, renderExpirationTime);
4538 }
4539 } else if (null !== current$$1.child) {
4540 current$$1.child.return = current$$1;
4541 current$$1 = current$$1.child;
4542 continue;
4543 }
4544 if (current$$1 === workInProgress) break a;
4545 for (; null === current$$1.sibling; ) {
4546 if (
4547 null === current$$1.return ||
4548 current$$1.return === workInProgress
4549 )
4550 break a;
4551 current$$1 = current$$1.return;
4552 }
4553 current$$1.sibling.return = current$$1.return;
4554 current$$1 = current$$1.sibling;
4555 }
4556 nextProps &= SubtreeSuspenseContextMask;
4557 }
4558 push(suspenseStackCursor, nextProps, workInProgress);
4559 if (0 === (workInProgress.mode & 2)) workInProgress.memoizedState = null;
4560 else
4561 switch (revealOrder) {
4562 case "forwards":
4563 renderExpirationTime = workInProgress.child;
4564 for (revealOrder = null; null !== renderExpirationTime; )
4565 (nextProps = renderExpirationTime.alternate),
4566 null !== nextProps &&
4567 null === findFirstSuspended(nextProps) &&
4568 (revealOrder = renderExpirationTime),
4569 (renderExpirationTime = renderExpirationTime.sibling);
4570 renderExpirationTime = revealOrder;
4571 null === renderExpirationTime
4572 ? ((revealOrder = workInProgress.child),
4573 (workInProgress.child = null))
4574 : ((revealOrder = renderExpirationTime.sibling),
4575 (renderExpirationTime.sibling = null));
4576 initSuspenseListRenderState(
4577 workInProgress,
4578 !1,
4579 revealOrder,
4580 renderExpirationTime,
4581 tailMode
4582 );
4583 break;
4584 case "backwards":
4585 renderExpirationTime = null;
4586 revealOrder = workInProgress.child;
4587 for (workInProgress.child = null; null !== revealOrder; ) {
4588 nextProps = revealOrder.alternate;
4589 if (null !== nextProps && null === findFirstSuspended(nextProps)) {
4590 workInProgress.child = revealOrder;
4591 break;
4592 }
4593 nextProps = revealOrder.sibling;
4594 revealOrder.sibling = renderExpirationTime;
4595 renderExpirationTime = revealOrder;
4596 revealOrder = nextProps;
4597 }
4598 initSuspenseListRenderState(
4599 workInProgress,
4600 !0,
4601 renderExpirationTime,
4602 null,
4603 tailMode
4604 );
4605 break;
4606 case "together":
4607 initSuspenseListRenderState(workInProgress, !1, null, null, void 0);
4608 break;
4609 default:
4610 workInProgress.memoizedState = null;
4611 }
4612 return workInProgress.child;
4613}
4614function bailoutOnAlreadyFinishedWork(
4615 current$$1,
4616 workInProgress,
4617 renderExpirationTime
4618) {
4619 null !== current$$1 &&
4620 (workInProgress.dependencies = current$$1.dependencies);
4621 profilerStartTime = -1;
4622 if (workInProgress.childExpirationTime < renderExpirationTime) return null;
4623 if (null !== current$$1 && workInProgress.child !== current$$1.child)
4624 throw ReactError(Error("Resuming work not yet implemented."));
4625 if (null !== workInProgress.child) {
4626 current$$1 = workInProgress.child;
4627 renderExpirationTime = createWorkInProgress(
4628 current$$1,
4629 current$$1.pendingProps,
4630 current$$1.expirationTime
4631 );
4632 workInProgress.child = renderExpirationTime;
4633 for (
4634 renderExpirationTime.return = workInProgress;
4635 null !== current$$1.sibling;
4636
4637 )
4638 (current$$1 = current$$1.sibling),
4639 (renderExpirationTime = renderExpirationTime.sibling = createWorkInProgress(
4640 current$$1,
4641 current$$1.pendingProps,
4642 current$$1.expirationTime
4643 )),
4644 (renderExpirationTime.return = workInProgress);
4645 renderExpirationTime.sibling = null;
4646 }
4647 return workInProgress.child;
4648}
4649var appendAllChildren = void 0,
4650 updateHostContainer = void 0,
4651 updateHostComponent$1 = void 0,
4652 updateHostText$1 = void 0;
4653appendAllChildren = function(parent, workInProgress) {
4654 for (var node = workInProgress.child; null !== node; ) {
4655 if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
4656 else if (4 !== node.tag && null !== node.child) {
4657 node.child.return = node;
4658 node = node.child;
4659 continue;
4660 }
4661 if (node === workInProgress) break;
4662 for (; null === node.sibling; ) {
4663 if (null === node.return || node.return === workInProgress) return;
4664 node = node.return;
4665 }
4666 node.sibling.return = node.return;
4667 node = node.sibling;
4668 }
4669};
4670updateHostContainer = function() {};
4671updateHostComponent$1 = function(current, workInProgress, type, newProps) {
4672 current.memoizedProps !== newProps &&
4673 (requiredContext(contextStackCursor$1.current),
4674 (workInProgress.updateQueue = UPDATE_SIGNAL)) &&
4675 (workInProgress.effectTag |= 4);
4676};
4677updateHostText$1 = function(current, workInProgress, oldText, newText) {
4678 oldText !== newText && (workInProgress.effectTag |= 4);
4679};
4680function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
4681 switch (renderState.tailMode) {
4682 case "hidden":
4683 hasRenderedATailFallback = renderState.tail;
4684 for (var lastTailNode = null; null !== hasRenderedATailFallback; )
4685 null !== hasRenderedATailFallback.alternate &&
4686 (lastTailNode = hasRenderedATailFallback),
4687 (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
4688 null === lastTailNode
4689 ? (renderState.tail = null)
4690 : (lastTailNode.sibling = null);
4691 break;
4692 case "collapsed":
4693 lastTailNode = renderState.tail;
4694 for (var _lastTailNode = null; null !== lastTailNode; )
4695 null !== lastTailNode.alternate && (_lastTailNode = lastTailNode),
4696 (lastTailNode = lastTailNode.sibling);
4697 null === _lastTailNode
4698 ? hasRenderedATailFallback || null === renderState.tail
4699 ? (renderState.tail = null)
4700 : (renderState.tail.sibling = null)
4701 : (_lastTailNode.sibling = null);
4702 }
4703}
4704function completeWork(current, workInProgress, renderExpirationTime) {
4705 var newProps = workInProgress.pendingProps;
4706 switch (workInProgress.tag) {
4707 case 2:
4708 break;
4709 case 16:
4710 break;
4711 case 15:
4712 case 0:
4713 break;
4714 case 1:
4715 isContextProvider(workInProgress.type) && popContext(workInProgress);
4716 break;
4717 case 3:
4718 popHostContainer(workInProgress);
4719 popTopLevelContextObject(workInProgress);
4720 newProps = workInProgress.stateNode;
4721 newProps.pendingContext &&
4722 ((newProps.context = newProps.pendingContext),
4723 (newProps.pendingContext = null));
4724 if (null === current || null === current.child)
4725 workInProgress.effectTag &= -3;
4726 updateHostContainer(workInProgress);
4727 break;
4728 case 5:
4729 popHostContext(workInProgress);
4730 var rootContainerInstance = requiredContext(
4731 rootInstanceStackCursor.current
4732 );
4733 renderExpirationTime = workInProgress.type;
4734 if (null !== current && null != workInProgress.stateNode)
4735 updateHostComponent$1(
4736 current,
4737 workInProgress,
4738 renderExpirationTime,
4739 newProps,
4740 rootContainerInstance
4741 ),
4742 current.ref !== workInProgress.ref &&
4743 (workInProgress.effectTag |= 128);
4744 else if (newProps) {
4745 current = requiredContext(contextStackCursor$1.current);
4746 var tag = allocateTag(),
4747 viewConfig = getViewConfigForType(renderExpirationTime),
4748 updatePayload = diffProperties(
4749 null,
4750 emptyObject,
4751 newProps,
4752 viewConfig.validAttributes
4753 );
4754 ReactNativePrivateInterface.UIManager.createView(
4755 tag,
4756 viewConfig.uiViewClassName,
4757 rootContainerInstance,
4758 updatePayload
4759 );
4760 viewConfig = new ReactNativeFiberHostComponent(tag, viewConfig);
4761 instanceCache.set(tag, workInProgress);
4762 instanceProps.set(tag, newProps);
4763 appendAllChildren(viewConfig, workInProgress, !1, !1);
4764 finalizeInitialChildren(
4765 viewConfig,
4766 renderExpirationTime,
4767 newProps,
4768 rootContainerInstance,
4769 current
4770 ) && (workInProgress.effectTag |= 4);
4771 workInProgress.stateNode = viewConfig;
4772 null !== workInProgress.ref && (workInProgress.effectTag |= 128);
4773 } else if (null === workInProgress.stateNode)
4774 throw ReactError(
4775 Error(
4776 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
4777 )
4778 );
4779 break;
4780 case 6:
4781 if (current && null != workInProgress.stateNode)
4782 updateHostText$1(
4783 current,
4784 workInProgress,
4785 current.memoizedProps,
4786 newProps
4787 );
4788 else {
4789 if ("string" !== typeof newProps && null === workInProgress.stateNode)
4790 throw ReactError(
4791 Error(
4792 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
4793 )
4794 );
4795 current = requiredContext(rootInstanceStackCursor.current);
4796 if (!requiredContext(contextStackCursor$1.current).isInAParentText)
4797 throw ReactError(
4798 Error("Text strings must be rendered within a <Text> component.")
4799 );
4800 rootContainerInstance = allocateTag();
4801 ReactNativePrivateInterface.UIManager.createView(
4802 rootContainerInstance,
4803 "RCTRawText",
4804 current,
4805 { text: newProps }
4806 );
4807 instanceCache.set(rootContainerInstance, workInProgress);
4808 workInProgress.stateNode = rootContainerInstance;
4809 }
4810 break;
4811 case 11:
4812 break;
4813 case 13:
4814 pop(suspenseStackCursor, workInProgress);
4815 newProps = workInProgress.memoizedState;
4816 if (0 !== (workInProgress.effectTag & 64))
4817 return (
4818 (workInProgress.expirationTime = renderExpirationTime), workInProgress
4819 );
4820 newProps = null !== newProps;
4821 rootContainerInstance = !1;
4822 null !== current &&
4823 ((renderExpirationTime = current.memoizedState),
4824 (rootContainerInstance = null !== renderExpirationTime),
4825 newProps ||
4826 null === renderExpirationTime ||
4827 ((renderExpirationTime = current.child.sibling),
4828 null !== renderExpirationTime &&
4829 ((tag = workInProgress.firstEffect),
4830 null !== tag
4831 ? ((workInProgress.firstEffect = renderExpirationTime),
4832 (renderExpirationTime.nextEffect = tag))
4833 : ((workInProgress.firstEffect = workInProgress.lastEffect = renderExpirationTime),
4834 (renderExpirationTime.nextEffect = null)),
4835 (renderExpirationTime.effectTag = 8))));
4836 if (newProps && !rootContainerInstance && 0 !== (workInProgress.mode & 2))
4837 if (
4838 (null === current &&
4839 !0 !== workInProgress.memoizedProps.unstable_avoidThisFallback) ||
4840 0 !== (suspenseStackCursor.current & InvisibleParentSuspenseContext)
4841 )
4842 workInProgressRootExitStatus === RootIncomplete &&
4843 (workInProgressRootExitStatus = RootSuspended);
4844 else if (
4845 workInProgressRootExitStatus === RootIncomplete ||
4846 workInProgressRootExitStatus === RootSuspended
4847 )
4848 workInProgressRootExitStatus = RootSuspendedWithDelay;
4849 if (newProps || rootContainerInstance) workInProgress.effectTag |= 4;
4850 break;
4851 case 7:
4852 break;
4853 case 8:
4854 break;
4855 case 12:
4856 break;
4857 case 4:
4858 popHostContainer(workInProgress);
4859 updateHostContainer(workInProgress);
4860 break;
4861 case 10:
4862 popProvider(workInProgress);
4863 break;
4864 case 9:
4865 break;
4866 case 14:
4867 break;
4868 case 17:
4869 isContextProvider(workInProgress.type) && popContext(workInProgress);
4870 break;
4871 case 18:
4872 break;
4873 case 19:
4874 pop(suspenseStackCursor, workInProgress);
4875 newProps = workInProgress.memoizedState;
4876 if (null === newProps) break;
4877 rootContainerInstance = 0 !== (workInProgress.effectTag & 64);
4878 tag = newProps.rendering;
4879 if (null === tag)
4880 if (rootContainerInstance) cutOffTailIfNeeded(newProps, !1);
4881 else {
4882 if (
4883 workInProgressRootExitStatus !== RootIncomplete ||
4884 (null !== current && 0 !== (current.effectTag & 64))
4885 )
4886 for (current = workInProgress.child; null !== current; ) {
4887 tag = findFirstSuspended(current);
4888 if (null !== tag) {
4889 workInProgress.effectTag |= 64;
4890 cutOffTailIfNeeded(newProps, !1);
4891 current = tag.updateQueue;
4892 null !== current &&
4893 ((workInProgress.updateQueue = current),
4894 (workInProgress.effectTag |= 4));
4895 workInProgress.firstEffect = workInProgress.lastEffect = null;
4896 current = renderExpirationTime;
4897 for (newProps = workInProgress.child; null !== newProps; )
4898 (rootContainerInstance = newProps),
4899 (tag = current),
4900 (rootContainerInstance.effectTag &= 2),
4901 (rootContainerInstance.nextEffect = null),
4902 (rootContainerInstance.firstEffect = null),
4903 (rootContainerInstance.lastEffect = null),
4904 (renderExpirationTime = rootContainerInstance.alternate),
4905 null === renderExpirationTime
4906 ? ((rootContainerInstance.childExpirationTime = 0),
4907 (rootContainerInstance.expirationTime = tag),
4908 (rootContainerInstance.child = null),
4909 (rootContainerInstance.memoizedProps = null),
4910 (rootContainerInstance.memoizedState = null),
4911 (rootContainerInstance.updateQueue = null),
4912 (rootContainerInstance.dependencies = null),
4913 (rootContainerInstance.selfBaseDuration = 0),
4914 (rootContainerInstance.treeBaseDuration = 0))
4915 : ((rootContainerInstance.childExpirationTime =
4916 renderExpirationTime.childExpirationTime),
4917 (rootContainerInstance.expirationTime =
4918 renderExpirationTime.expirationTime),
4919 (rootContainerInstance.child =
4920 renderExpirationTime.child),
4921 (rootContainerInstance.memoizedProps =
4922 renderExpirationTime.memoizedProps),
4923 (rootContainerInstance.memoizedState =
4924 renderExpirationTime.memoizedState),
4925 (rootContainerInstance.updateQueue =
4926 renderExpirationTime.updateQueue),
4927 (tag = renderExpirationTime.dependencies),
4928 (rootContainerInstance.dependencies =
4929 null === tag
4930 ? null
4931 : {
4932 expirationTime: tag.expirationTime,
4933 firstContext: tag.firstContext,
4934 responders: tag.responders
4935 }),
4936 (rootContainerInstance.selfBaseDuration =
4937 renderExpirationTime.selfBaseDuration),
4938 (rootContainerInstance.treeBaseDuration =
4939 renderExpirationTime.treeBaseDuration)),
4940 (newProps = newProps.sibling);
4941 push(
4942 suspenseStackCursor,
4943 (suspenseStackCursor.current & SubtreeSuspenseContextMask) |
4944 ForceSuspenseFallback,
4945 workInProgress
4946 );
4947 return workInProgress.child;
4948 }
4949 current = current.sibling;
4950 }
4951 }
4952 else {
4953 if (!rootContainerInstance)
4954 if (((current = findFirstSuspended(tag)), null !== current)) {
4955 if (
4956 ((workInProgress.effectTag |= 64),
4957 (rootContainerInstance = !0),
4958 cutOffTailIfNeeded(newProps, !0),
4959 null === newProps.tail && "hidden" === newProps.tailMode)
4960 ) {
4961 current = current.updateQueue;
4962 null !== current &&
4963 ((workInProgress.updateQueue = current),
4964 (workInProgress.effectTag |= 4));
4965 workInProgress = workInProgress.lastEffect = newProps.lastEffect;
4966 null !== workInProgress && (workInProgress.nextEffect = null);
4967 break;
4968 }
4969 } else
4970 now() > newProps.tailExpiration &&
4971 1 < renderExpirationTime &&
4972 ((workInProgress.effectTag |= 64),
4973 (rootContainerInstance = !0),
4974 cutOffTailIfNeeded(newProps, !1),
4975 (current = renderExpirationTime - 1),
4976 (workInProgress.expirationTime = workInProgress.childExpirationTime = current),
4977 null === spawnedWorkDuringRender
4978 ? (spawnedWorkDuringRender = [current])
4979 : spawnedWorkDuringRender.push(current));
4980 newProps.isBackwards
4981 ? ((tag.sibling = workInProgress.child), (workInProgress.child = tag))
4982 : ((current = newProps.last),
4983 null !== current
4984 ? (current.sibling = tag)
4985 : (workInProgress.child = tag),
4986 (newProps.last = tag));
4987 }
4988 if (null !== newProps.tail)
4989 return (
4990 0 === newProps.tailExpiration &&
4991 (newProps.tailExpiration = now() + 500),
4992 (current = newProps.tail),
4993 (newProps.rendering = current),
4994 (newProps.tail = current.sibling),
4995 (newProps.lastEffect = workInProgress.lastEffect),
4996 (current.sibling = null),
4997 (newProps = suspenseStackCursor.current),
4998 (newProps = rootContainerInstance
4999 ? (newProps & SubtreeSuspenseContextMask) | ForceSuspenseFallback
5000 : newProps & SubtreeSuspenseContextMask),
5001 push(suspenseStackCursor, newProps, workInProgress),
5002 current
5003 );
5004 break;
5005 case 20:
5006 break;
5007 default:
5008 throw ReactError(
5009 Error(
5010 "Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue."
5011 )
5012 );
5013 }
5014 return null;
5015}
5016function unwindWork(workInProgress) {
5017 switch (workInProgress.tag) {
5018 case 1:
5019 isContextProvider(workInProgress.type) && popContext(workInProgress);
5020 var effectTag = workInProgress.effectTag;
5021 return effectTag & 2048
5022 ? ((workInProgress.effectTag = (effectTag & -2049) | 64),
5023 workInProgress)
5024 : null;
5025 case 3:
5026 popHostContainer(workInProgress);
5027 popTopLevelContextObject(workInProgress);
5028 effectTag = workInProgress.effectTag;
5029 if (0 !== (effectTag & 64))
5030 throw ReactError(
5031 Error(
5032 "The root failed to unmount after an error. This is likely a bug in React. Please file an issue."
5033 )
5034 );
5035 workInProgress.effectTag = (effectTag & -2049) | 64;
5036 return workInProgress;
5037 case 5:
5038 return popHostContext(workInProgress), null;
5039 case 13:
5040 return (
5041 pop(suspenseStackCursor, workInProgress),
5042 (effectTag = workInProgress.effectTag),
5043 effectTag & 2048
5044 ? ((workInProgress.effectTag = (effectTag & -2049) | 64),
5045 workInProgress)
5046 : null
5047 );
5048 case 18:
5049 return null;
5050 case 19:
5051 return pop(suspenseStackCursor, workInProgress), null;
5052 case 4:
5053 return popHostContainer(workInProgress), null;
5054 case 10:
5055 return popProvider(workInProgress), null;
5056 default:
5057 return null;
5058 }
5059}
5060function createCapturedValue(value, source) {
5061 return {
5062 value: value,
5063 source: source,
5064 stack: getStackByFiberInDevAndProd(source)
5065 };
5066}
5067if (
5068 "function" !==
5069 typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog
5070)
5071 throw ReactError(
5072 Error("Expected ReactFiberErrorDialog.showErrorDialog to be a function.")
5073 );
5074function logCapturedError(capturedError) {
5075 !1 !==
5076 ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog(
5077 capturedError
5078 ) && console.error(capturedError.error);
5079}
5080var PossiblyWeakSet$1 = "function" === typeof WeakSet ? WeakSet : Set;
5081function logError(boundary, errorInfo) {
5082 var source = errorInfo.source,
5083 stack = errorInfo.stack;
5084 null === stack &&
5085 null !== source &&
5086 (stack = getStackByFiberInDevAndProd(source));
5087 errorInfo = {
5088 componentName: null !== source ? getComponentName(source.type) : null,
5089 componentStack: null !== stack ? stack : "",
5090 error: errorInfo.value,
5091 errorBoundary: null,
5092 errorBoundaryName: null,
5093 errorBoundaryFound: !1,
5094 willRetry: !1
5095 };
5096 null !== boundary &&
5097 1 === boundary.tag &&
5098 ((errorInfo.errorBoundary = boundary.stateNode),
5099 (errorInfo.errorBoundaryName = getComponentName(boundary.type)),
5100 (errorInfo.errorBoundaryFound = !0),
5101 (errorInfo.willRetry = !0));
5102 try {
5103 logCapturedError(errorInfo);
5104 } catch (e) {
5105 setTimeout(function() {
5106 throw e;
5107 });
5108 }
5109}
5110function safelyCallComponentWillUnmount(current$$1, instance) {
5111 try {
5112 (instance.props = current$$1.memoizedProps),
5113 (instance.state = current$$1.memoizedState),
5114 instance.componentWillUnmount();
5115 } catch (unmountError) {
5116 captureCommitPhaseError(current$$1, unmountError);
5117 }
5118}
5119function safelyDetachRef(current$$1) {
5120 var ref = current$$1.ref;
5121 if (null !== ref)
5122 if ("function" === typeof ref)
5123 try {
5124 ref(null);
5125 } catch (refError) {
5126 captureCommitPhaseError(current$$1, refError);
5127 }
5128 else ref.current = null;
5129}
5130function commitHookEffectList(unmountTag, mountTag, finishedWork) {
5131 finishedWork = finishedWork.updateQueue;
5132 finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
5133 if (null !== finishedWork) {
5134 var effect = (finishedWork = finishedWork.next);
5135 do {
5136 if ((effect.tag & unmountTag) !== NoEffect$1) {
5137 var destroy = effect.destroy;
5138 effect.destroy = void 0;
5139 void 0 !== destroy && destroy();
5140 }
5141 (effect.tag & mountTag) !== NoEffect$1 &&
5142 ((destroy = effect.create), (effect.destroy = destroy()));
5143 effect = effect.next;
5144 } while (effect !== finishedWork);
5145 }
5146}
5147function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
5148 "function" === typeof onCommitFiberUnmount &&
5149 onCommitFiberUnmount(current$$1$jscomp$0);
5150 switch (current$$1$jscomp$0.tag) {
5151 case 0:
5152 case 11:
5153 case 14:
5154 case 15:
5155 var updateQueue = current$$1$jscomp$0.updateQueue;
5156 if (
5157 null !== updateQueue &&
5158 ((updateQueue = updateQueue.lastEffect), null !== updateQueue)
5159 ) {
5160 var firstEffect = updateQueue.next;
5161 runWithPriority(
5162 97 < renderPriorityLevel ? 97 : renderPriorityLevel,
5163 function() {
5164 var effect = firstEffect;
5165 do {
5166 var destroy = effect.destroy;
5167 if (void 0 !== destroy) {
5168 var current$$1 = current$$1$jscomp$0;
5169 try {
5170 destroy();
5171 } catch (error) {
5172 captureCommitPhaseError(current$$1, error);
5173 }
5174 }
5175 effect = effect.next;
5176 } while (effect !== firstEffect);
5177 }
5178 );
5179 }
5180 break;
5181 case 1:
5182 safelyDetachRef(current$$1$jscomp$0);
5183 renderPriorityLevel = current$$1$jscomp$0.stateNode;
5184 "function" === typeof renderPriorityLevel.componentWillUnmount &&
5185 safelyCallComponentWillUnmount(
5186 current$$1$jscomp$0,
5187 renderPriorityLevel
5188 );
5189 break;
5190 case 5:
5191 safelyDetachRef(current$$1$jscomp$0);
5192 break;
5193 case 4:
5194 unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
5195 }
5196}
5197function detachFiber(current$$1) {
5198 var alternate = current$$1.alternate;
5199 current$$1.return = null;
5200 current$$1.child = null;
5201 current$$1.memoizedState = null;
5202 current$$1.updateQueue = null;
5203 current$$1.dependencies = null;
5204 current$$1.alternate = null;
5205 current$$1.firstEffect = null;
5206 current$$1.lastEffect = null;
5207 current$$1.pendingProps = null;
5208 current$$1.memoizedProps = null;
5209 null !== alternate && detachFiber(alternate);
5210}
5211function isHostParent(fiber) {
5212 return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
5213}
5214function commitPlacement(finishedWork) {
5215 a: {
5216 for (var parent = finishedWork.return; null !== parent; ) {
5217 if (isHostParent(parent)) {
5218 var parentFiber = parent;
5219 break a;
5220 }
5221 parent = parent.return;
5222 }
5223 throw ReactError(
5224 Error(
5225 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
5226 )
5227 );
5228 }
5229 parent = parentFiber.stateNode;
5230 switch (parentFiber.tag) {
5231 case 5:
5232 var isContainer = !1;
5233 break;
5234 case 3:
5235 parent = parent.containerInfo;
5236 isContainer = !0;
5237 break;
5238 case 4:
5239 parent = parent.containerInfo;
5240 isContainer = !0;
5241 break;
5242 default:
5243 throw ReactError(
5244 Error(
5245 "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
5246 )
5247 );
5248 }
5249 parentFiber.effectTag & 16 && (parentFiber.effectTag &= -17);
5250 a: b: for (parentFiber = finishedWork; ; ) {
5251 for (; null === parentFiber.sibling; ) {
5252 if (null === parentFiber.return || isHostParent(parentFiber.return)) {
5253 parentFiber = null;
5254 break a;
5255 }
5256 parentFiber = parentFiber.return;
5257 }
5258 parentFiber.sibling.return = parentFiber.return;
5259 for (
5260 parentFiber = parentFiber.sibling;
5261 5 !== parentFiber.tag && 6 !== parentFiber.tag && 18 !== parentFiber.tag;
5262
5263 ) {
5264 if (parentFiber.effectTag & 2) continue b;
5265 if (null === parentFiber.child || 4 === parentFiber.tag) continue b;
5266 else
5267 (parentFiber.child.return = parentFiber),
5268 (parentFiber = parentFiber.child);
5269 }
5270 if (!(parentFiber.effectTag & 2)) {
5271 parentFiber = parentFiber.stateNode;
5272 break a;
5273 }
5274 }
5275 for (var node = finishedWork; ; ) {
5276 var isHost = 5 === node.tag || 6 === node.tag;
5277 if (isHost) {
5278 var stateNode = isHost ? node.stateNode : node.stateNode.instance;
5279 if (parentFiber)
5280 if (isContainer) {
5281 if ("number" === typeof parent)
5282 throw ReactError(
5283 Error("Container does not support insertBefore operation")
5284 );
5285 } else {
5286 isHost = parent;
5287 var beforeChild = parentFiber,
5288 children = isHost._children,
5289 index = children.indexOf(stateNode);
5290 0 <= index
5291 ? (children.splice(index, 1),
5292 (beforeChild = children.indexOf(beforeChild)),
5293 children.splice(beforeChild, 0, stateNode),
5294 ReactNativePrivateInterface.UIManager.manageChildren(
5295 isHost._nativeTag,
5296 [index],
5297 [beforeChild],
5298 [],
5299 [],
5300 []
5301 ))
5302 : ((index = children.indexOf(beforeChild)),
5303 children.splice(index, 0, stateNode),
5304 ReactNativePrivateInterface.UIManager.manageChildren(
5305 isHost._nativeTag,
5306 [],
5307 [],
5308 [
5309 "number" === typeof stateNode
5310 ? stateNode
5311 : stateNode._nativeTag
5312 ],
5313 [index],
5314 []
5315 ));
5316 }
5317 else
5318 isContainer
5319 ? ReactNativePrivateInterface.UIManager.setChildren(parent, [
5320 "number" === typeof stateNode ? stateNode : stateNode._nativeTag
5321 ])
5322 : ((isHost = parent),
5323 (children =
5324 "number" === typeof stateNode ? stateNode : stateNode._nativeTag),
5325 (index = isHost._children),
5326 (beforeChild = index.indexOf(stateNode)),
5327 0 <= beforeChild
5328 ? (index.splice(beforeChild, 1),
5329 index.push(stateNode),
5330 ReactNativePrivateInterface.UIManager.manageChildren(
5331 isHost._nativeTag,
5332 [beforeChild],
5333 [index.length - 1],
5334 [],
5335 [],
5336 []
5337 ))
5338 : (index.push(stateNode),
5339 ReactNativePrivateInterface.UIManager.manageChildren(
5340 isHost._nativeTag,
5341 [],
5342 [],
5343 [children],
5344 [index.length - 1],
5345 []
5346 )));
5347 } else if (4 !== node.tag && null !== node.child) {
5348 node.child.return = node;
5349 node = node.child;
5350 continue;
5351 }
5352 if (node === finishedWork) break;
5353 for (; null === node.sibling; ) {
5354 if (null === node.return || node.return === finishedWork) return;
5355 node = node.return;
5356 }
5357 node.sibling.return = node.return;
5358 node = node.sibling;
5359 }
5360}
5361function unmountHostComponents(current$$1, renderPriorityLevel$jscomp$0) {
5362 for (
5363 var node = current$$1,
5364 currentParentIsValid = !1,
5365 currentParent = void 0,
5366 currentParentIsContainer = void 0;
5367 ;
5368
5369 ) {
5370 if (!currentParentIsValid) {
5371 currentParentIsValid = node.return;
5372 a: for (;;) {
5373 if (null === currentParentIsValid)
5374 throw ReactError(
5375 Error(
5376 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
5377 )
5378 );
5379 currentParent = currentParentIsValid.stateNode;
5380 switch (currentParentIsValid.tag) {
5381 case 5:
5382 currentParentIsContainer = !1;
5383 break a;
5384 case 3:
5385 currentParent = currentParent.containerInfo;
5386 currentParentIsContainer = !0;
5387 break a;
5388 case 4:
5389 currentParent = currentParent.containerInfo;
5390 currentParentIsContainer = !0;
5391 break a;
5392 }
5393 currentParentIsValid = currentParentIsValid.return;
5394 }
5395 currentParentIsValid = !0;
5396 }
5397 if (5 === node.tag || 6 === node.tag) {
5398 a: for (
5399 var root = node,
5400 renderPriorityLevel = renderPriorityLevel$jscomp$0,
5401 node$jscomp$0 = root;
5402 ;
5403
5404 )
5405 if (
5406 (commitUnmount(node$jscomp$0, renderPriorityLevel),
5407 null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag)
5408 )
5409 (node$jscomp$0.child.return = node$jscomp$0),
5410 (node$jscomp$0 = node$jscomp$0.child);
5411 else {
5412 if (node$jscomp$0 === root) break;
5413 for (; null === node$jscomp$0.sibling; ) {
5414 if (null === node$jscomp$0.return || node$jscomp$0.return === root)
5415 break a;
5416 node$jscomp$0 = node$jscomp$0.return;
5417 }
5418 node$jscomp$0.sibling.return = node$jscomp$0.return;
5419 node$jscomp$0 = node$jscomp$0.sibling;
5420 }
5421 currentParentIsContainer
5422 ? ((root = currentParent),
5423 recursivelyUncacheFiberNode(node.stateNode),
5424 ReactNativePrivateInterface.UIManager.manageChildren(
5425 root,
5426 [],
5427 [],
5428 [],
5429 [],
5430 [0]
5431 ))
5432 : ((root = currentParent),
5433 (node$jscomp$0 = node.stateNode),
5434 recursivelyUncacheFiberNode(node$jscomp$0),
5435 (renderPriorityLevel = root._children),
5436 (node$jscomp$0 = renderPriorityLevel.indexOf(node$jscomp$0)),
5437 renderPriorityLevel.splice(node$jscomp$0, 1),
5438 ReactNativePrivateInterface.UIManager.manageChildren(
5439 root._nativeTag,
5440 [],
5441 [],
5442 [],
5443 [],
5444 [node$jscomp$0]
5445 ));
5446 } else if (4 === node.tag) {
5447 if (null !== node.child) {
5448 currentParent = node.stateNode.containerInfo;
5449 currentParentIsContainer = !0;
5450 node.child.return = node;
5451 node = node.child;
5452 continue;
5453 }
5454 } else if (
5455 (commitUnmount(node, renderPriorityLevel$jscomp$0), null !== node.child)
5456 ) {
5457 node.child.return = node;
5458 node = node.child;
5459 continue;
5460 }
5461 if (node === current$$1) break;
5462 for (; null === node.sibling; ) {
5463 if (null === node.return || node.return === current$$1) return;
5464 node = node.return;
5465 4 === node.tag && (currentParentIsValid = !1);
5466 }
5467 node.sibling.return = node.return;
5468 node = node.sibling;
5469 }
5470}
5471function commitWork(current$$1, finishedWork) {
5472 switch (finishedWork.tag) {
5473 case 0:
5474 case 11:
5475 case 14:
5476 case 15:
5477 commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
5478 break;
5479 case 1:
5480 break;
5481 case 5:
5482 var instance = finishedWork.stateNode;
5483 if (null != instance) {
5484 var newProps = finishedWork.memoizedProps;
5485 current$$1 = null !== current$$1 ? current$$1.memoizedProps : newProps;
5486 var updatePayload = finishedWork.updateQueue;
5487 finishedWork.updateQueue = null;
5488 null !== updatePayload &&
5489 ((finishedWork = instance.viewConfig),
5490 instanceProps.set(instance._nativeTag, newProps),
5491 (newProps = diffProperties(
5492 null,
5493 current$$1,
5494 newProps,
5495 finishedWork.validAttributes
5496 )),
5497 null != newProps &&
5498 ReactNativePrivateInterface.UIManager.updateView(
5499 instance._nativeTag,
5500 finishedWork.uiViewClassName,
5501 newProps
5502 ));
5503 }
5504 break;
5505 case 6:
5506 if (null === finishedWork.stateNode)
5507 throw ReactError(
5508 Error(
5509 "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
5510 )
5511 );
5512 ReactNativePrivateInterface.UIManager.updateView(
5513 finishedWork.stateNode,
5514 "RCTRawText",
5515 { text: finishedWork.memoizedProps }
5516 );
5517 break;
5518 case 3:
5519 break;
5520 case 12:
5521 break;
5522 case 13:
5523 instance = finishedWork;
5524 null === finishedWork.memoizedState
5525 ? (newProps = !1)
5526 : ((newProps = !0),
5527 (instance = finishedWork.child),
5528 (globalMostRecentFallbackTime = now()));
5529 if (null !== instance)
5530 a: for (current$$1 = instance; ; ) {
5531 if (5 === current$$1.tag)
5532 if (((updatePayload = current$$1.stateNode), newProps)) {
5533 var viewConfig = updatePayload.viewConfig;
5534 var updatePayload$jscomp$0 = diffProperties(
5535 null,
5536 emptyObject,
5537 { style: { display: "none" } },
5538 viewConfig.validAttributes
5539 );
5540 ReactNativePrivateInterface.UIManager.updateView(
5541 updatePayload._nativeTag,
5542 viewConfig.uiViewClassName,
5543 updatePayload$jscomp$0
5544 );
5545 } else {
5546 updatePayload = current$$1.stateNode;
5547 updatePayload$jscomp$0 = current$$1.memoizedProps;
5548 viewConfig = updatePayload.viewConfig;
5549 var prevProps = Object.assign({}, updatePayload$jscomp$0, {
5550 style: [updatePayload$jscomp$0.style, { display: "none" }]
5551 });
5552 updatePayload$jscomp$0 = diffProperties(
5553 null,
5554 prevProps,
5555 updatePayload$jscomp$0,
5556 viewConfig.validAttributes
5557 );
5558 ReactNativePrivateInterface.UIManager.updateView(
5559 updatePayload._nativeTag,
5560 viewConfig.uiViewClassName,
5561 updatePayload$jscomp$0
5562 );
5563 }
5564 else {
5565 if (6 === current$$1.tag) throw Error("Not yet implemented.");
5566 if (13 === current$$1.tag && null !== current$$1.memoizedState) {
5567 updatePayload = current$$1.child.sibling;
5568 updatePayload.return = current$$1;
5569 current$$1 = updatePayload;
5570 continue;
5571 } else if (null !== current$$1.child) {
5572 current$$1.child.return = current$$1;
5573 current$$1 = current$$1.child;
5574 continue;
5575 }
5576 }
5577 if (current$$1 === instance) break a;
5578 for (; null === current$$1.sibling; ) {
5579 if (null === current$$1.return || current$$1.return === instance)
5580 break a;
5581 current$$1 = current$$1.return;
5582 }
5583 current$$1.sibling.return = current$$1.return;
5584 current$$1 = current$$1.sibling;
5585 }
5586 attachSuspenseRetryListeners(finishedWork);
5587 break;
5588 case 19:
5589 attachSuspenseRetryListeners(finishedWork);
5590 break;
5591 case 17:
5592 break;
5593 case 20:
5594 break;
5595 default:
5596 throw ReactError(
5597 Error(
5598 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
5599 )
5600 );
5601 }
5602}
5603function attachSuspenseRetryListeners(finishedWork) {
5604 var thenables = finishedWork.updateQueue;
5605 if (null !== thenables) {
5606 finishedWork.updateQueue = null;
5607 var retryCache = finishedWork.stateNode;
5608 null === retryCache &&
5609 (retryCache = finishedWork.stateNode = new PossiblyWeakSet$1());
5610 thenables.forEach(function(thenable) {
5611 var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
5612 retryCache.has(thenable) ||
5613 ((retry = tracing.unstable_wrap(retry)),
5614 retryCache.add(thenable),
5615 thenable.then(retry, retry));
5616 });
5617 }
5618}
5619var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map;
5620function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
5621 expirationTime = createUpdate(expirationTime, null);
5622 expirationTime.tag = 3;
5623 expirationTime.payload = { element: null };
5624 var error = errorInfo.value;
5625 expirationTime.callback = function() {
5626 hasUncaughtError || ((hasUncaughtError = !0), (firstUncaughtError = error));
5627 logError(fiber, errorInfo);
5628 };
5629 return expirationTime;
5630}
5631function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
5632 expirationTime = createUpdate(expirationTime, null);
5633 expirationTime.tag = 3;
5634 var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
5635 if ("function" === typeof getDerivedStateFromError) {
5636 var error = errorInfo.value;
5637 expirationTime.payload = function() {
5638 logError(fiber, errorInfo);
5639 return getDerivedStateFromError(error);
5640 };
5641 }
5642 var inst = fiber.stateNode;
5643 null !== inst &&
5644 "function" === typeof inst.componentDidCatch &&
5645 (expirationTime.callback = function() {
5646 "function" !== typeof getDerivedStateFromError &&
5647 (null === legacyErrorBoundariesThatAlreadyFailed
5648 ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
5649 : legacyErrorBoundariesThatAlreadyFailed.add(this),
5650 logError(fiber, errorInfo));
5651 var stack = errorInfo.stack;
5652 this.componentDidCatch(errorInfo.value, {
5653 componentStack: null !== stack ? stack : ""
5654 });
5655 });
5656 return expirationTime;
5657}
5658var ceil = Math.ceil,
5659 ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
5660 ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
5661 NoContext = 0,
5662 LegacyUnbatchedContext = 8,
5663 RenderContext = 16,
5664 CommitContext = 32,
5665 RootIncomplete = 0,
5666 RootErrored = 1,
5667 RootSuspended = 2,
5668 RootSuspendedWithDelay = 3,
5669 RootCompleted = 4,
5670 executionContext = NoContext,
5671 workInProgressRoot = null,
5672 workInProgress = null,
5673 renderExpirationTime = 0,
5674 workInProgressRootExitStatus = RootIncomplete,
5675 workInProgressRootLatestProcessedExpirationTime = 1073741823,
5676 workInProgressRootLatestSuspenseTimeout = 1073741823,
5677 workInProgressRootCanSuspendUsingConfig = null,
5678 workInProgressRootHasPendingPing = !1,
5679 globalMostRecentFallbackTime = 0,
5680 FALLBACK_THROTTLE_MS = 500,
5681 nextEffect = null,
5682 hasUncaughtError = !1,
5683 firstUncaughtError = null,
5684 legacyErrorBoundariesThatAlreadyFailed = null,
5685 rootDoesHavePassiveEffects = !1,
5686 rootWithPendingPassiveEffects = null,
5687 pendingPassiveEffectsRenderPriority = 90,
5688 pendingPassiveEffectsExpirationTime = 0,
5689 rootsWithPendingDiscreteUpdates = null,
5690 nestedUpdateCount = 0,
5691 rootWithNestedUpdates = null,
5692 spawnedWorkDuringRender = null,
5693 currentEventTime = 0;
5694function requestCurrentTime() {
5695 return (executionContext & (RenderContext | CommitContext)) !== NoContext
5696 ? 1073741821 - ((now() / 10) | 0)
5697 : 0 !== currentEventTime
5698 ? currentEventTime
5699 : (currentEventTime = 1073741821 - ((now() / 10) | 0));
5700}
5701function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
5702 fiber = fiber.mode;
5703 if (0 === (fiber & 2)) return 1073741823;
5704 var priorityLevel = getCurrentPriorityLevel();
5705 if (0 === (fiber & 4)) return 99 === priorityLevel ? 1073741823 : 1073741822;
5706 if ((executionContext & RenderContext) !== NoContext)
5707 return renderExpirationTime;
5708 if (null !== suspenseConfig)
5709 currentTime =
5710 1073741821 -
5711 25 *
5712 ((((1073741821 -
5713 currentTime +
5714 (suspenseConfig.timeoutMs | 0 || 5e3) / 10) /
5715 25) |
5716 0) +
5717 1);
5718 else
5719 switch (priorityLevel) {
5720 case 99:
5721 currentTime = 1073741823;
5722 break;
5723 case 98:
5724 currentTime =
5725 1073741821 - 10 * ((((1073741821 - currentTime + 15) / 10) | 0) + 1);
5726 break;
5727 case 97:
5728 case 96:
5729 currentTime =
5730 1073741821 - 25 * ((((1073741821 - currentTime + 500) / 25) | 0) + 1);
5731 break;
5732 case 95:
5733 currentTime = 1;
5734 break;
5735 default:
5736 throw ReactError(Error("Expected a valid priority level"));
5737 }
5738 null !== workInProgressRoot &&
5739 currentTime === renderExpirationTime &&
5740 --currentTime;
5741 return currentTime;
5742}
5743function scheduleUpdateOnFiber(fiber, expirationTime) {
5744 if (50 < nestedUpdateCount)
5745 throw ((nestedUpdateCount = 0),
5746 (rootWithNestedUpdates = null),
5747 ReactError(
5748 Error(
5749 "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
5750 )
5751 ));
5752 fiber = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
5753 if (null !== fiber) {
5754 fiber.pingTime = 0;
5755 var priorityLevel = getCurrentPriorityLevel();
5756 if (1073741823 === expirationTime)
5757 if (
5758 (executionContext & LegacyUnbatchedContext) !== NoContext &&
5759 (executionContext & (RenderContext | CommitContext)) === NoContext
5760 ) {
5761 scheduleInteractions(
5762 fiber,
5763 expirationTime,
5764 tracing.__interactionsRef.current
5765 );
5766 for (
5767 var callback = renderRoot(fiber, 1073741823, !0);
5768 null !== callback;
5769
5770 )
5771 callback = callback(!0);
5772 } else
5773 scheduleCallbackForRoot(fiber, 99, 1073741823),
5774 executionContext === NoContext && flushSyncCallbackQueue();
5775 else scheduleCallbackForRoot(fiber, priorityLevel, expirationTime);
5776 (executionContext & 4) === NoContext ||
5777 (98 !== priorityLevel && 99 !== priorityLevel) ||
5778 (null === rootsWithPendingDiscreteUpdates
5779 ? (rootsWithPendingDiscreteUpdates = new Map([[fiber, expirationTime]]))
5780 : ((priorityLevel = rootsWithPendingDiscreteUpdates.get(fiber)),
5781 (void 0 === priorityLevel || priorityLevel > expirationTime) &&
5782 rootsWithPendingDiscreteUpdates.set(fiber, expirationTime)));
5783 }
5784}
5785function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
5786 fiber.expirationTime < expirationTime &&
5787 (fiber.expirationTime = expirationTime);
5788 var alternate = fiber.alternate;
5789 null !== alternate &&
5790 alternate.expirationTime < expirationTime &&
5791 (alternate.expirationTime = expirationTime);
5792 var node = fiber.return,
5793 root = null;
5794 if (null === node && 3 === fiber.tag) root = fiber.stateNode;
5795 else
5796 for (; null !== node; ) {
5797 alternate = node.alternate;
5798 node.childExpirationTime < expirationTime &&
5799 (node.childExpirationTime = expirationTime);
5800 null !== alternate &&
5801 alternate.childExpirationTime < expirationTime &&
5802 (alternate.childExpirationTime = expirationTime);
5803 if (null === node.return && 3 === node.tag) {
5804 root = node.stateNode;
5805 break;
5806 }
5807 node = node.return;
5808 }
5809 null !== root &&
5810 (expirationTime > root.firstPendingTime &&
5811 (root.firstPendingTime = expirationTime),
5812 (fiber = root.lastPendingTime),
5813 0 === fiber || expirationTime < fiber) &&
5814 (root.lastPendingTime = expirationTime);
5815 return root;
5816}
5817function scheduleCallbackForRoot(root, priorityLevel, expirationTime) {
5818 if (root.callbackExpirationTime < expirationTime) {
5819 var existingCallbackNode = root.callbackNode;
5820 null !== existingCallbackNode &&
5821 existingCallbackNode !== fakeCallbackNode &&
5822 Scheduler_cancelCallback(existingCallbackNode);
5823 root.callbackExpirationTime = expirationTime;
5824 1073741823 === expirationTime
5825 ? (root.callbackNode = scheduleSyncCallback(
5826 runRootCallback.bind(
5827 null,
5828 root,
5829 renderRoot.bind(null, root, expirationTime)
5830 )
5831 ))
5832 : ((existingCallbackNode = null),
5833 1 !== expirationTime &&
5834 (existingCallbackNode = {
5835 timeout: 10 * (1073741821 - expirationTime) - now()
5836 }),
5837 (root.callbackNode = scheduleCallback(
5838 priorityLevel,
5839 runRootCallback.bind(
5840 null,
5841 root,
5842 renderRoot.bind(null, root, expirationTime)
5843 ),
5844 existingCallbackNode
5845 )));
5846 }
5847 scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
5848}
5849function runRootCallback(root, callback, isSync) {
5850 var prevCallbackNode = root.callbackNode,
5851 continuation = null;
5852 try {
5853 return (
5854 (continuation = callback(isSync)),
5855 null !== continuation
5856 ? runRootCallback.bind(null, root, continuation)
5857 : null
5858 );
5859 } finally {
5860 null === continuation &&
5861 prevCallbackNode === root.callbackNode &&
5862 ((root.callbackNode = null), (root.callbackExpirationTime = 0));
5863 }
5864}
5865function resolveLocksOnRoot(root, expirationTime) {
5866 var firstBatch = root.firstBatch;
5867 return null !== firstBatch &&
5868 firstBatch._defer &&
5869 firstBatch._expirationTime >= expirationTime
5870 ? (scheduleCallback(97, function() {
5871 firstBatch._onComplete();
5872 return null;
5873 }),
5874 !0)
5875 : !1;
5876}
5877function flushPendingDiscreteUpdates() {
5878 if (null !== rootsWithPendingDiscreteUpdates) {
5879 var roots = rootsWithPendingDiscreteUpdates;
5880 rootsWithPendingDiscreteUpdates = null;
5881 roots.forEach(function(expirationTime, root) {
5882 scheduleSyncCallback(renderRoot.bind(null, root, expirationTime));
5883 });
5884 flushSyncCallbackQueue();
5885 }
5886}
5887function prepareFreshStack(root, expirationTime) {
5888 root.finishedWork = null;
5889 root.finishedExpirationTime = 0;
5890 var timeoutHandle = root.timeoutHandle;
5891 -1 !== timeoutHandle &&
5892 ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
5893 if (null !== workInProgress)
5894 for (timeoutHandle = workInProgress.return; null !== timeoutHandle; ) {
5895 var interruptedWork = timeoutHandle;
5896 switch (interruptedWork.tag) {
5897 case 1:
5898 var childContextTypes = interruptedWork.type.childContextTypes;
5899 null !== childContextTypes &&
5900 void 0 !== childContextTypes &&
5901 popContext(interruptedWork);
5902 break;
5903 case 3:
5904 popHostContainer(interruptedWork);
5905 popTopLevelContextObject(interruptedWork);
5906 break;
5907 case 5:
5908 popHostContext(interruptedWork);
5909 break;
5910 case 4:
5911 popHostContainer(interruptedWork);
5912 break;
5913 case 13:
5914 pop(suspenseStackCursor, interruptedWork);
5915 break;
5916 case 19:
5917 pop(suspenseStackCursor, interruptedWork);
5918 break;
5919 case 10:
5920 popProvider(interruptedWork);
5921 }
5922 timeoutHandle = timeoutHandle.return;
5923 }
5924 workInProgressRoot = root;
5925 workInProgress = createWorkInProgress(root.current, null, expirationTime);
5926 renderExpirationTime = expirationTime;
5927 workInProgressRootExitStatus = RootIncomplete;
5928 workInProgressRootLatestSuspenseTimeout = workInProgressRootLatestProcessedExpirationTime = 1073741823;
5929 workInProgressRootCanSuspendUsingConfig = null;
5930 workInProgressRootHasPendingPing = !1;
5931 spawnedWorkDuringRender = null;
5932}
5933function renderRoot(root$jscomp$0, expirationTime, isSync) {
5934 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
5935 throw ReactError(Error("Should not already be working."));
5936 if (root$jscomp$0.firstPendingTime < expirationTime) return null;
5937 if (isSync && root$jscomp$0.finishedExpirationTime === expirationTime)
5938 return commitRoot.bind(null, root$jscomp$0);
5939 flushPassiveEffects();
5940 if (
5941 root$jscomp$0 !== workInProgressRoot ||
5942 expirationTime !== renderExpirationTime
5943 )
5944 prepareFreshStack(root$jscomp$0, expirationTime),
5945 startWorkOnPendingInteractions(root$jscomp$0, expirationTime);
5946 else if (workInProgressRootExitStatus === RootSuspendedWithDelay)
5947 if (workInProgressRootHasPendingPing)
5948 prepareFreshStack(root$jscomp$0, expirationTime);
5949 else {
5950 var lastPendingTime = root$jscomp$0.lastPendingTime;
5951 if (lastPendingTime < expirationTime)
5952 return renderRoot.bind(null, root$jscomp$0, lastPendingTime);
5953 }
5954 if (null !== workInProgress) {
5955 lastPendingTime = executionContext;
5956 executionContext |= RenderContext;
5957 var prevDispatcher = ReactCurrentDispatcher.current;
5958 null === prevDispatcher && (prevDispatcher = ContextOnlyDispatcher);
5959 ReactCurrentDispatcher.current = ContextOnlyDispatcher;
5960 var prevInteractions = tracing.__interactionsRef.current;
5961 tracing.__interactionsRef.current = root$jscomp$0.memoizedInteractions;
5962 if (isSync) {
5963 if (1073741823 !== expirationTime) {
5964 var currentTime = requestCurrentTime();
5965 if (currentTime < expirationTime)
5966 return (
5967 (executionContext = lastPendingTime),
5968 resetContextDependencies(),
5969 (ReactCurrentDispatcher.current = prevDispatcher),
5970 (tracing.__interactionsRef.current = prevInteractions),
5971 renderRoot.bind(null, root$jscomp$0, currentTime)
5972 );
5973 }
5974 } else currentEventTime = 0;
5975 do
5976 try {
5977 if (isSync)
5978 for (; null !== workInProgress; )
5979 workInProgress = performUnitOfWork(workInProgress);
5980 else
5981 for (; null !== workInProgress && !Scheduler_shouldYield(); )
5982 workInProgress = performUnitOfWork(workInProgress);
5983 break;
5984 } catch (thrownValue) {
5985 resetContextDependencies();
5986 resetHooks();
5987 currentTime = workInProgress;
5988 if (null === currentTime || null === currentTime.return)
5989 throw (prepareFreshStack(root$jscomp$0, expirationTime),
5990 (executionContext = lastPendingTime),
5991 thrownValue);
5992 currentTime.mode & 8 &&
5993 stopProfilerTimerIfRunningAndRecordDelta(currentTime, !0);
5994 a: {
5995 var root = root$jscomp$0,
5996 returnFiber = currentTime.return,
5997 sourceFiber = currentTime,
5998 value = thrownValue,
5999 renderExpirationTime$jscomp$0 = renderExpirationTime;
6000 sourceFiber.effectTag |= 1024;
6001 sourceFiber.firstEffect = sourceFiber.lastEffect = null;
6002 if (
6003 null !== value &&
6004 "object" === typeof value &&
6005 "function" === typeof value.then
6006 ) {
6007 var thenable = value,
6008 hasInvisibleParentBoundary =
6009 0 !==
6010 (suspenseStackCursor.current & InvisibleParentSuspenseContext);
6011 value = returnFiber;
6012 do {
6013 var JSCompiler_temp;
6014 if ((JSCompiler_temp = 13 === value.tag))
6015 null !== value.memoizedState
6016 ? (JSCompiler_temp = !1)
6017 : ((JSCompiler_temp = value.memoizedProps),
6018 (JSCompiler_temp =
6019 void 0 === JSCompiler_temp.fallback
6020 ? !1
6021 : !0 !== JSCompiler_temp.unstable_avoidThisFallback
6022 ? !0
6023 : hasInvisibleParentBoundary
6024 ? !1
6025 : !0));
6026 if (JSCompiler_temp) {
6027 returnFiber = value.updateQueue;
6028 null === returnFiber
6029 ? ((returnFiber = new Set()),
6030 returnFiber.add(thenable),
6031 (value.updateQueue = returnFiber))
6032 : returnFiber.add(thenable);
6033 if (0 === (value.mode & 2)) {
6034 value.effectTag |= 64;
6035 sourceFiber.effectTag &= -1957;
6036 1 === sourceFiber.tag &&
6037 (null === sourceFiber.alternate
6038 ? (sourceFiber.tag = 17)
6039 : ((renderExpirationTime$jscomp$0 = createUpdate(
6040 1073741823,
6041 null
6042 )),
6043 (renderExpirationTime$jscomp$0.tag = 2),
6044 enqueueUpdate(
6045 sourceFiber,
6046 renderExpirationTime$jscomp$0
6047 )));
6048 sourceFiber.expirationTime = 1073741823;
6049 break a;
6050 }
6051 sourceFiber = root;
6052 root = renderExpirationTime$jscomp$0;
6053 hasInvisibleParentBoundary = sourceFiber.pingCache;
6054 null === hasInvisibleParentBoundary
6055 ? ((hasInvisibleParentBoundary = sourceFiber.pingCache = new PossiblyWeakMap()),
6056 (returnFiber = new Set()),
6057 hasInvisibleParentBoundary.set(thenable, returnFiber))
6058 : ((returnFiber = hasInvisibleParentBoundary.get(thenable)),
6059 void 0 === returnFiber &&
6060 ((returnFiber = new Set()),
6061 hasInvisibleParentBoundary.set(thenable, returnFiber)));
6062 returnFiber.has(root) ||
6063 (returnFiber.add(root),
6064 (sourceFiber = pingSuspendedRoot.bind(
6065 null,
6066 sourceFiber,
6067 thenable,
6068 root
6069 )),
6070 (sourceFiber = tracing.unstable_wrap(sourceFiber)),
6071 thenable.then(sourceFiber, sourceFiber));
6072 value.effectTag |= 2048;
6073 value.expirationTime = renderExpirationTime$jscomp$0;
6074 break a;
6075 }
6076 value = value.return;
6077 } while (null !== value);
6078 value = Error(
6079 (getComponentName(sourceFiber.type) || "A React component") +
6080 " suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." +
6081 getStackByFiberInDevAndProd(sourceFiber)
6082 );
6083 }
6084 workInProgressRootExitStatus !== RootCompleted &&
6085 (workInProgressRootExitStatus = RootErrored);
6086 value = createCapturedValue(value, sourceFiber);
6087 sourceFiber = returnFiber;
6088 do {
6089 switch (sourceFiber.tag) {
6090 case 3:
6091 sourceFiber.effectTag |= 2048;
6092 sourceFiber.expirationTime = renderExpirationTime$jscomp$0;
6093 renderExpirationTime$jscomp$0 = createRootErrorUpdate(
6094 sourceFiber,
6095 value,
6096 renderExpirationTime$jscomp$0
6097 );
6098 enqueueCapturedUpdate(
6099 sourceFiber,
6100 renderExpirationTime$jscomp$0
6101 );
6102 break a;
6103 case 1:
6104 if (
6105 ((thenable = value),
6106 (root = sourceFiber.type),
6107 (returnFiber = sourceFiber.stateNode),
6108 0 === (sourceFiber.effectTag & 64) &&
6109 ("function" === typeof root.getDerivedStateFromError ||
6110 (null !== returnFiber &&
6111 "function" === typeof returnFiber.componentDidCatch &&
6112 (null === legacyErrorBoundariesThatAlreadyFailed ||
6113 !legacyErrorBoundariesThatAlreadyFailed.has(
6114 returnFiber
6115 )))))
6116 ) {
6117 sourceFiber.effectTag |= 2048;
6118 sourceFiber.expirationTime = renderExpirationTime$jscomp$0;
6119 renderExpirationTime$jscomp$0 = createClassErrorUpdate(
6120 sourceFiber,
6121 thenable,
6122 renderExpirationTime$jscomp$0
6123 );
6124 enqueueCapturedUpdate(
6125 sourceFiber,
6126 renderExpirationTime$jscomp$0
6127 );
6128 break a;
6129 }
6130 }
6131 sourceFiber = sourceFiber.return;
6132 } while (null !== sourceFiber);
6133 }
6134 workInProgress = completeUnitOfWork(currentTime);
6135 }
6136 while (1);
6137 executionContext = lastPendingTime;
6138 resetContextDependencies();
6139 ReactCurrentDispatcher.current = prevDispatcher;
6140 tracing.__interactionsRef.current = prevInteractions;
6141 if (null !== workInProgress)
6142 return renderRoot.bind(null, root$jscomp$0, expirationTime);
6143 }
6144 root$jscomp$0.finishedWork = root$jscomp$0.current.alternate;
6145 root$jscomp$0.finishedExpirationTime = expirationTime;
6146 if (resolveLocksOnRoot(root$jscomp$0, expirationTime)) return null;
6147 workInProgressRoot = null;
6148 switch (workInProgressRootExitStatus) {
6149 case RootIncomplete:
6150 throw ReactError(Error("Should have a work-in-progress."));
6151 case RootErrored:
6152 return (
6153 (lastPendingTime = root$jscomp$0.lastPendingTime),
6154 lastPendingTime < expirationTime
6155 ? renderRoot.bind(null, root$jscomp$0, lastPendingTime)
6156 : isSync
6157 ? commitRoot.bind(null, root$jscomp$0)
6158 : (prepareFreshStack(root$jscomp$0, expirationTime),
6159 scheduleSyncCallback(
6160 renderRoot.bind(null, root$jscomp$0, expirationTime)
6161 ),
6162 null)
6163 );
6164 case RootSuspended:
6165 if (
6166 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
6167 !isSync &&
6168 ((isSync = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now()),
6169 10 < isSync)
6170 ) {
6171 if (workInProgressRootHasPendingPing)
6172 return (
6173 prepareFreshStack(root$jscomp$0, expirationTime),
6174 renderRoot.bind(null, root$jscomp$0, expirationTime)
6175 );
6176 lastPendingTime = root$jscomp$0.lastPendingTime;
6177 if (lastPendingTime < expirationTime)
6178 return renderRoot.bind(null, root$jscomp$0, lastPendingTime);
6179 root$jscomp$0.timeoutHandle = scheduleTimeout(
6180 commitRoot.bind(null, root$jscomp$0),
6181 isSync
6182 );
6183 return null;
6184 }
6185 return commitRoot.bind(null, root$jscomp$0);
6186 case RootSuspendedWithDelay:
6187 if (!isSync) {
6188 if (workInProgressRootHasPendingPing)
6189 return (
6190 prepareFreshStack(root$jscomp$0, expirationTime),
6191 renderRoot.bind(null, root$jscomp$0, expirationTime)
6192 );
6193 isSync = root$jscomp$0.lastPendingTime;
6194 if (isSync < expirationTime)
6195 return renderRoot.bind(null, root$jscomp$0, isSync);
6196 1073741823 !== workInProgressRootLatestSuspenseTimeout
6197 ? (isSync =
6198 10 * (1073741821 - workInProgressRootLatestSuspenseTimeout) -
6199 now())
6200 : 1073741823 === workInProgressRootLatestProcessedExpirationTime
6201 ? (isSync = 0)
6202 : ((isSync =
6203 10 *
6204 (1073741821 -
6205 workInProgressRootLatestProcessedExpirationTime) -
6206 5e3),
6207 (lastPendingTime = now()),
6208 (expirationTime =
6209 10 * (1073741821 - expirationTime) - lastPendingTime),
6210 (isSync = lastPendingTime - isSync),
6211 0 > isSync && (isSync = 0),
6212 (isSync =
6213 (120 > isSync
6214 ? 120
6215 : 480 > isSync
6216 ? 480
6217 : 1080 > isSync
6218 ? 1080
6219 : 1920 > isSync
6220 ? 1920
6221 : 3e3 > isSync
6222 ? 3e3
6223 : 4320 > isSync
6224 ? 4320
6225 : 1960 * ceil(isSync / 1960)) - isSync),
6226 expirationTime < isSync && (isSync = expirationTime));
6227 if (10 < isSync)
6228 return (
6229 (root$jscomp$0.timeoutHandle = scheduleTimeout(
6230 commitRoot.bind(null, root$jscomp$0),
6231 isSync
6232 )),
6233 null
6234 );
6235 }
6236 return commitRoot.bind(null, root$jscomp$0);
6237 case RootCompleted:
6238 return !isSync &&
6239 1073741823 !== workInProgressRootLatestProcessedExpirationTime &&
6240 null !== workInProgressRootCanSuspendUsingConfig &&
6241 ((lastPendingTime = workInProgressRootLatestProcessedExpirationTime),
6242 (prevDispatcher = workInProgressRootCanSuspendUsingConfig),
6243 (expirationTime = prevDispatcher.busyMinDurationMs | 0),
6244 0 >= expirationTime
6245 ? (expirationTime = 0)
6246 : ((isSync = prevDispatcher.busyDelayMs | 0),
6247 (lastPendingTime =
6248 now() -
6249 (10 * (1073741821 - lastPendingTime) -
6250 (prevDispatcher.timeoutMs | 0 || 5e3))),
6251 (expirationTime =
6252 lastPendingTime <= isSync
6253 ? 0
6254 : isSync + expirationTime - lastPendingTime)),
6255 10 < expirationTime)
6256 ? ((root$jscomp$0.timeoutHandle = scheduleTimeout(
6257 commitRoot.bind(null, root$jscomp$0),
6258 expirationTime
6259 )),
6260 null)
6261 : commitRoot.bind(null, root$jscomp$0);
6262 default:
6263 throw ReactError(Error("Unknown root exit status."));
6264 }
6265}
6266function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
6267 expirationTime < workInProgressRootLatestProcessedExpirationTime &&
6268 1 < expirationTime &&
6269 (workInProgressRootLatestProcessedExpirationTime = expirationTime);
6270 null !== suspenseConfig &&
6271 expirationTime < workInProgressRootLatestSuspenseTimeout &&
6272 1 < expirationTime &&
6273 ((workInProgressRootLatestSuspenseTimeout = expirationTime),
6274 (workInProgressRootCanSuspendUsingConfig = suspenseConfig));
6275}
6276function performUnitOfWork(unitOfWork) {
6277 var current$$1 = unitOfWork.alternate;
6278 0 !== (unitOfWork.mode & 8)
6279 ? ((profilerStartTime = now$1()),
6280 0 > unitOfWork.actualStartTime && (unitOfWork.actualStartTime = now$1()),
6281 (current$$1 = beginWork$$1(current$$1, unitOfWork, renderExpirationTime)),
6282 stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
6283 : (current$$1 = beginWork$$1(current$$1, unitOfWork, renderExpirationTime));
6284 unitOfWork.memoizedProps = unitOfWork.pendingProps;
6285 null === current$$1 && (current$$1 = completeUnitOfWork(unitOfWork));
6286 ReactCurrentOwner$2.current = null;
6287 return current$$1;
6288}
6289function completeUnitOfWork(unitOfWork) {
6290 workInProgress = unitOfWork;
6291 do {
6292 var current$$1 = workInProgress.alternate;
6293 unitOfWork = workInProgress.return;
6294 if (0 === (workInProgress.effectTag & 1024)) {
6295 if (0 === (workInProgress.mode & 8))
6296 current$$1 = completeWork(
6297 current$$1,
6298 workInProgress,
6299 renderExpirationTime
6300 );
6301 else {
6302 var fiber = workInProgress;
6303 profilerStartTime = now$1();
6304 0 > fiber.actualStartTime && (fiber.actualStartTime = now$1());
6305 current$$1 = completeWork(
6306 current$$1,
6307 workInProgress,
6308 renderExpirationTime
6309 );
6310 stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !1);
6311 }
6312 fiber = workInProgress;
6313 if (1 === renderExpirationTime || 1 !== fiber.childExpirationTime) {
6314 var newChildExpirationTime = 0;
6315 if (0 !== (fiber.mode & 8)) {
6316 for (
6317 var actualDuration = fiber.actualDuration,
6318 treeBaseDuration = fiber.selfBaseDuration,
6319 shouldBubbleActualDurations =
6320 null === fiber.alternate ||
6321 fiber.child !== fiber.alternate.child,
6322 child = fiber.child;
6323 null !== child;
6324
6325 ) {
6326 var childUpdateExpirationTime = child.expirationTime,
6327 childChildExpirationTime = child.childExpirationTime;
6328 childUpdateExpirationTime > newChildExpirationTime &&
6329 (newChildExpirationTime = childUpdateExpirationTime);
6330 childChildExpirationTime > newChildExpirationTime &&
6331 (newChildExpirationTime = childChildExpirationTime);
6332 shouldBubbleActualDurations &&
6333 (actualDuration += child.actualDuration);
6334 treeBaseDuration += child.treeBaseDuration;
6335 child = child.sibling;
6336 }
6337 fiber.actualDuration = actualDuration;
6338 fiber.treeBaseDuration = treeBaseDuration;
6339 } else
6340 for (actualDuration = fiber.child; null !== actualDuration; )
6341 (treeBaseDuration = actualDuration.expirationTime),
6342 (shouldBubbleActualDurations =
6343 actualDuration.childExpirationTime),
6344 treeBaseDuration > newChildExpirationTime &&
6345 (newChildExpirationTime = treeBaseDuration),
6346 shouldBubbleActualDurations > newChildExpirationTime &&
6347 (newChildExpirationTime = shouldBubbleActualDurations),
6348 (actualDuration = actualDuration.sibling);
6349 fiber.childExpirationTime = newChildExpirationTime;
6350 }
6351 if (null !== current$$1) return current$$1;
6352 null !== unitOfWork &&
6353 0 === (unitOfWork.effectTag & 1024) &&
6354 (null === unitOfWork.firstEffect &&
6355 (unitOfWork.firstEffect = workInProgress.firstEffect),
6356 null !== workInProgress.lastEffect &&
6357 (null !== unitOfWork.lastEffect &&
6358 (unitOfWork.lastEffect.nextEffect = workInProgress.firstEffect),
6359 (unitOfWork.lastEffect = workInProgress.lastEffect)),
6360 1 < workInProgress.effectTag &&
6361 (null !== unitOfWork.lastEffect
6362 ? (unitOfWork.lastEffect.nextEffect = workInProgress)
6363 : (unitOfWork.firstEffect = workInProgress),
6364 (unitOfWork.lastEffect = workInProgress)));
6365 } else {
6366 current$$1 = unwindWork(workInProgress, renderExpirationTime);
6367 if (0 !== (workInProgress.mode & 8)) {
6368 stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !1);
6369 fiber = workInProgress.actualDuration;
6370 for (
6371 newChildExpirationTime = workInProgress.child;
6372 null !== newChildExpirationTime;
6373
6374 )
6375 (fiber += newChildExpirationTime.actualDuration),
6376 (newChildExpirationTime = newChildExpirationTime.sibling);
6377 workInProgress.actualDuration = fiber;
6378 }
6379 if (null !== current$$1)
6380 return (current$$1.effectTag &= 1023), current$$1;
6381 null !== unitOfWork &&
6382 ((unitOfWork.firstEffect = unitOfWork.lastEffect = null),
6383 (unitOfWork.effectTag |= 1024));
6384 }
6385 current$$1 = workInProgress.sibling;
6386 if (null !== current$$1) return current$$1;
6387 workInProgress = unitOfWork;
6388 } while (null !== workInProgress);
6389 workInProgressRootExitStatus === RootIncomplete &&
6390 (workInProgressRootExitStatus = RootCompleted);
6391 return null;
6392}
6393function commitRoot(root) {
6394 var renderPriorityLevel = getCurrentPriorityLevel();
6395 runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
6396 null !== rootWithPendingPassiveEffects &&
6397 scheduleCallback(97, function() {
6398 flushPassiveEffects();
6399 return null;
6400 });
6401 return null;
6402}
6403function commitRootImpl(root, renderPriorityLevel) {
6404 flushPassiveEffects();
6405 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
6406 throw ReactError(Error("Should not already be working."));
6407 var finishedWork = root.finishedWork,
6408 expirationTime = root.finishedExpirationTime;
6409 if (null === finishedWork) return null;
6410 root.finishedWork = null;
6411 root.finishedExpirationTime = 0;
6412 if (finishedWork === root.current)
6413 throw ReactError(
6414 Error(
6415 "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
6416 )
6417 );
6418 root.callbackNode = null;
6419 root.callbackExpirationTime = 0;
6420 var updateExpirationTimeBeforeCommit = finishedWork.expirationTime,
6421 childExpirationTimeBeforeCommit = finishedWork.childExpirationTime;
6422 updateExpirationTimeBeforeCommit =
6423 childExpirationTimeBeforeCommit > updateExpirationTimeBeforeCommit
6424 ? childExpirationTimeBeforeCommit
6425 : updateExpirationTimeBeforeCommit;
6426 root.firstPendingTime = updateExpirationTimeBeforeCommit;
6427 updateExpirationTimeBeforeCommit < root.lastPendingTime &&
6428 (root.lastPendingTime = updateExpirationTimeBeforeCommit);
6429 root === workInProgressRoot &&
6430 ((workInProgress = workInProgressRoot = null), (renderExpirationTime = 0));
6431 1 < finishedWork.effectTag
6432 ? null !== finishedWork.lastEffect
6433 ? ((finishedWork.lastEffect.nextEffect = finishedWork),
6434 (updateExpirationTimeBeforeCommit = finishedWork.firstEffect))
6435 : (updateExpirationTimeBeforeCommit = finishedWork)
6436 : (updateExpirationTimeBeforeCommit = finishedWork.firstEffect);
6437 if (null !== updateExpirationTimeBeforeCommit) {
6438 childExpirationTimeBeforeCommit = executionContext;
6439 executionContext |= CommitContext;
6440 var prevInteractions = tracing.__interactionsRef.current;
6441 tracing.__interactionsRef.current = root.memoizedInteractions;
6442 ReactCurrentOwner$2.current = null;
6443 nextEffect = updateExpirationTimeBeforeCommit;
6444 do
6445 try {
6446 for (; null !== nextEffect; ) {
6447 if (0 !== (nextEffect.effectTag & 256)) {
6448 var current$$1 = nextEffect.alternate,
6449 finishedWork$jscomp$0 = nextEffect;
6450 switch (finishedWork$jscomp$0.tag) {
6451 case 0:
6452 case 11:
6453 case 15:
6454 commitHookEffectList(
6455 UnmountSnapshot,
6456 NoEffect$1,
6457 finishedWork$jscomp$0
6458 );
6459 break;
6460 case 1:
6461 if (
6462 finishedWork$jscomp$0.effectTag & 256 &&
6463 null !== current$$1
6464 ) {
6465 var prevProps = current$$1.memoizedProps,
6466 prevState = current$$1.memoizedState,
6467 instance = finishedWork$jscomp$0.stateNode,
6468 snapshot = instance.getSnapshotBeforeUpdate(
6469 finishedWork$jscomp$0.elementType ===
6470 finishedWork$jscomp$0.type
6471 ? prevProps
6472 : resolveDefaultProps(
6473 finishedWork$jscomp$0.type,
6474 prevProps
6475 ),
6476 prevState
6477 );
6478 instance.__reactInternalSnapshotBeforeUpdate = snapshot;
6479 }
6480 break;
6481 case 3:
6482 case 5:
6483 case 6:
6484 case 4:
6485 case 17:
6486 break;
6487 default:
6488 throw ReactError(
6489 Error(
6490 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
6491 )
6492 );
6493 }
6494 }
6495 nextEffect = nextEffect.nextEffect;
6496 }
6497 } catch (error) {
6498 if (null === nextEffect)
6499 throw ReactError(Error("Should be working on an effect."));
6500 captureCommitPhaseError(nextEffect, error);
6501 nextEffect = nextEffect.nextEffect;
6502 }
6503 while (null !== nextEffect);
6504 commitTime = now$1();
6505 nextEffect = updateExpirationTimeBeforeCommit;
6506 do
6507 try {
6508 for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
6509 var effectTag = nextEffect.effectTag;
6510 if (effectTag & 128) {
6511 var current$$1$jscomp$0 = nextEffect.alternate;
6512 if (null !== current$$1$jscomp$0) {
6513 var currentRef = current$$1$jscomp$0.ref;
6514 null !== currentRef &&
6515 ("function" === typeof currentRef
6516 ? currentRef(null)
6517 : (currentRef.current = null));
6518 }
6519 }
6520 switch (effectTag & 14) {
6521 case 2:
6522 commitPlacement(nextEffect);
6523 nextEffect.effectTag &= -3;
6524 break;
6525 case 6:
6526 commitPlacement(nextEffect);
6527 nextEffect.effectTag &= -3;
6528 commitWork(nextEffect.alternate, nextEffect);
6529 break;
6530 case 4:
6531 commitWork(nextEffect.alternate, nextEffect);
6532 break;
6533 case 8:
6534 (prevProps = nextEffect),
6535 unmountHostComponents(prevProps, current$$1),
6536 detachFiber(prevProps);
6537 }
6538 nextEffect = nextEffect.nextEffect;
6539 }
6540 } catch (error) {
6541 if (null === nextEffect)
6542 throw ReactError(Error("Should be working on an effect."));
6543 captureCommitPhaseError(nextEffect, error);
6544 nextEffect = nextEffect.nextEffect;
6545 }
6546 while (null !== nextEffect);
6547 root.current = finishedWork;
6548 nextEffect = updateExpirationTimeBeforeCommit;
6549 do
6550 try {
6551 for (
6552 effectTag = root, current$$1$jscomp$0 = expirationTime;
6553 null !== nextEffect;
6554
6555 ) {
6556 var effectTag$jscomp$0 = nextEffect.effectTag;
6557 if (effectTag$jscomp$0 & 36) {
6558 prevProps = effectTag;
6559 var current$$1$jscomp$1 = nextEffect.alternate;
6560 currentRef = nextEffect;
6561 current$$1 = current$$1$jscomp$0;
6562 switch (currentRef.tag) {
6563 case 0:
6564 case 11:
6565 case 15:
6566 commitHookEffectList(UnmountLayout, MountLayout, currentRef);
6567 break;
6568 case 1:
6569 var instance$jscomp$0 = currentRef.stateNode;
6570 if (currentRef.effectTag & 4)
6571 if (null === current$$1$jscomp$1)
6572 instance$jscomp$0.componentDidMount();
6573 else {
6574 var prevProps$jscomp$0 =
6575 currentRef.elementType === currentRef.type
6576 ? current$$1$jscomp$1.memoizedProps
6577 : resolveDefaultProps(
6578 currentRef.type,
6579 current$$1$jscomp$1.memoizedProps
6580 );
6581 instance$jscomp$0.componentDidUpdate(
6582 prevProps$jscomp$0,
6583 current$$1$jscomp$1.memoizedState,
6584 instance$jscomp$0.__reactInternalSnapshotBeforeUpdate
6585 );
6586 }
6587 var updateQueue = currentRef.updateQueue;
6588 null !== updateQueue &&
6589 commitUpdateQueue(
6590 currentRef,
6591 updateQueue,
6592 instance$jscomp$0,
6593 current$$1
6594 );
6595 break;
6596 case 3:
6597 var _updateQueue = currentRef.updateQueue;
6598 if (null !== _updateQueue) {
6599 prevProps = null;
6600 if (null !== currentRef.child)
6601 switch (currentRef.child.tag) {
6602 case 5:
6603 prevProps = currentRef.child.stateNode;
6604 break;
6605 case 1:
6606 prevProps = currentRef.child.stateNode;
6607 }
6608 commitUpdateQueue(
6609 currentRef,
6610 _updateQueue,
6611 prevProps,
6612 current$$1
6613 );
6614 }
6615 break;
6616 case 5:
6617 break;
6618 case 6:
6619 break;
6620 case 4:
6621 break;
6622 case 12:
6623 var onRender = currentRef.memoizedProps.onRender;
6624 "function" === typeof onRender &&
6625 onRender(
6626 currentRef.memoizedProps.id,
6627 null === current$$1$jscomp$1 ? "mount" : "update",
6628 currentRef.actualDuration,
6629 currentRef.treeBaseDuration,
6630 currentRef.actualStartTime,
6631 commitTime,
6632 prevProps.memoizedInteractions
6633 );
6634 break;
6635 case 13:
6636 case 19:
6637 case 17:
6638 case 20:
6639 break;
6640 default:
6641 throw ReactError(
6642 Error(
6643 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
6644 )
6645 );
6646 }
6647 }
6648 if (effectTag$jscomp$0 & 128) {
6649 var ref = nextEffect.ref;
6650 if (null !== ref) {
6651 var instance$jscomp$1 = nextEffect.stateNode;
6652 switch (nextEffect.tag) {
6653 case 5:
6654 var instanceToUse = instance$jscomp$1;
6655 break;
6656 default:
6657 instanceToUse = instance$jscomp$1;
6658 }
6659 "function" === typeof ref
6660 ? ref(instanceToUse)
6661 : (ref.current = instanceToUse);
6662 }
6663 }
6664 effectTag$jscomp$0 & 512 && (rootDoesHavePassiveEffects = !0);
6665 nextEffect = nextEffect.nextEffect;
6666 }
6667 } catch (error) {
6668 if (null === nextEffect)
6669 throw ReactError(Error("Should be working on an effect."));
6670 captureCommitPhaseError(nextEffect, error);
6671 nextEffect = nextEffect.nextEffect;
6672 }
6673 while (null !== nextEffect);
6674 nextEffect = null;
6675 requestPaint();
6676 tracing.__interactionsRef.current = prevInteractions;
6677 executionContext = childExpirationTimeBeforeCommit;
6678 } else (root.current = finishedWork), (commitTime = now$1());
6679 if ((effectTag$jscomp$0 = rootDoesHavePassiveEffects))
6680 (rootDoesHavePassiveEffects = !1),
6681 (rootWithPendingPassiveEffects = root),
6682 (pendingPassiveEffectsExpirationTime = expirationTime),
6683 (pendingPassiveEffectsRenderPriority = renderPriorityLevel);
6684 else
6685 for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
6686 (renderPriorityLevel = nextEffect.nextEffect),
6687 (nextEffect.nextEffect = null),
6688 (nextEffect = renderPriorityLevel);
6689 renderPriorityLevel = root.firstPendingTime;
6690 if (0 !== renderPriorityLevel) {
6691 current$$1$jscomp$1 = requestCurrentTime();
6692 current$$1$jscomp$1 = inferPriorityFromExpirationTime(
6693 current$$1$jscomp$1,
6694 renderPriorityLevel
6695 );
6696 if (null !== spawnedWorkDuringRender)
6697 for (
6698 instance$jscomp$0 = spawnedWorkDuringRender,
6699 spawnedWorkDuringRender = null,
6700 prevProps$jscomp$0 = 0;
6701 prevProps$jscomp$0 < instance$jscomp$0.length;
6702 prevProps$jscomp$0++
6703 )
6704 scheduleInteractions(
6705 root,
6706 instance$jscomp$0[prevProps$jscomp$0],
6707 root.memoizedInteractions
6708 );
6709 scheduleCallbackForRoot(root, current$$1$jscomp$1, renderPriorityLevel);
6710 } else legacyErrorBoundariesThatAlreadyFailed = null;
6711 effectTag$jscomp$0 || finishPendingInteractions(root, expirationTime);
6712 "function" === typeof onCommitFiberRoot &&
6713 onCommitFiberRoot(finishedWork.stateNode, expirationTime);
6714 1073741823 === renderPriorityLevel
6715 ? root === rootWithNestedUpdates
6716 ? nestedUpdateCount++
6717 : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
6718 : (nestedUpdateCount = 0);
6719 if (hasUncaughtError)
6720 throw ((hasUncaughtError = !1),
6721 (root = firstUncaughtError),
6722 (firstUncaughtError = null),
6723 root);
6724 if ((executionContext & LegacyUnbatchedContext) !== NoContext) return null;
6725 flushSyncCallbackQueue();
6726 return null;
6727}
6728function flushPassiveEffects() {
6729 if (null === rootWithPendingPassiveEffects) return !1;
6730 var root = rootWithPendingPassiveEffects,
6731 expirationTime = pendingPassiveEffectsExpirationTime,
6732 renderPriorityLevel = pendingPassiveEffectsRenderPriority;
6733 rootWithPendingPassiveEffects = null;
6734 pendingPassiveEffectsExpirationTime = 0;
6735 pendingPassiveEffectsRenderPriority = 90;
6736 return runWithPriority(
6737 97 < renderPriorityLevel ? 97 : renderPriorityLevel,
6738 flushPassiveEffectsImpl.bind(null, root, expirationTime)
6739 );
6740}
6741function flushPassiveEffectsImpl(root, expirationTime) {
6742 var prevInteractions = tracing.__interactionsRef.current;
6743 tracing.__interactionsRef.current = root.memoizedInteractions;
6744 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
6745 throw ReactError(
6746 Error("Cannot flush passive effects while already rendering.")
6747 );
6748 var prevExecutionContext = executionContext;
6749 executionContext |= CommitContext;
6750 for (var effect = root.current.firstEffect; null !== effect; ) {
6751 try {
6752 var finishedWork = effect;
6753 if (0 !== (finishedWork.effectTag & 512))
6754 switch (finishedWork.tag) {
6755 case 0:
6756 case 11:
6757 case 15:
6758 commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork),
6759 commitHookEffectList(NoEffect$1, MountPassive, finishedWork);
6760 }
6761 } catch (error) {
6762 if (null === effect)
6763 throw ReactError(Error("Should be working on an effect."));
6764 captureCommitPhaseError(effect, error);
6765 }
6766 finishedWork = effect.nextEffect;
6767 effect.nextEffect = null;
6768 effect = finishedWork;
6769 }
6770 tracing.__interactionsRef.current = prevInteractions;
6771 finishPendingInteractions(root, expirationTime);
6772 executionContext = prevExecutionContext;
6773 flushSyncCallbackQueue();
6774 return !0;
6775}
6776function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
6777 sourceFiber = createCapturedValue(error, sourceFiber);
6778 sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 1073741823);
6779 enqueueUpdate(rootFiber, sourceFiber);
6780 rootFiber = markUpdateTimeFromFiberToRoot(rootFiber, 1073741823);
6781 null !== rootFiber && scheduleCallbackForRoot(rootFiber, 99, 1073741823);
6782}
6783function captureCommitPhaseError(sourceFiber, error) {
6784 if (3 === sourceFiber.tag)
6785 captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
6786 else
6787 for (var fiber = sourceFiber.return; null !== fiber; ) {
6788 if (3 === fiber.tag) {
6789 captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
6790 break;
6791 } else if (1 === fiber.tag) {
6792 var instance = fiber.stateNode;
6793 if (
6794 "function" === typeof fiber.type.getDerivedStateFromError ||
6795 ("function" === typeof instance.componentDidCatch &&
6796 (null === legacyErrorBoundariesThatAlreadyFailed ||
6797 !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
6798 ) {
6799 sourceFiber = createCapturedValue(error, sourceFiber);
6800 sourceFiber = createClassErrorUpdate(fiber, sourceFiber, 1073741823);
6801 enqueueUpdate(fiber, sourceFiber);
6802 fiber = markUpdateTimeFromFiberToRoot(fiber, 1073741823);
6803 null !== fiber && scheduleCallbackForRoot(fiber, 99, 1073741823);
6804 break;
6805 }
6806 }
6807 fiber = fiber.return;
6808 }
6809}
6810function pingSuspendedRoot(root, thenable, suspendedTime) {
6811 var pingCache = root.pingCache;
6812 null !== pingCache && pingCache.delete(thenable);
6813 workInProgressRoot === root && renderExpirationTime === suspendedTime
6814 ? workInProgressRootExitStatus === RootSuspendedWithDelay ||
6815 (workInProgressRootExitStatus === RootSuspended &&
6816 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
6817 now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
6818 ? prepareFreshStack(root, renderExpirationTime)
6819 : (workInProgressRootHasPendingPing = !0)
6820 : root.lastPendingTime < suspendedTime ||
6821 ((thenable = root.pingTime),
6822 (0 !== thenable && thenable < suspendedTime) ||
6823 ((root.pingTime = suspendedTime),
6824 root.finishedExpirationTime === suspendedTime &&
6825 ((root.finishedExpirationTime = 0), (root.finishedWork = null)),
6826 (thenable = requestCurrentTime()),
6827 (thenable = inferPriorityFromExpirationTime(thenable, suspendedTime)),
6828 scheduleCallbackForRoot(root, thenable, suspendedTime)));
6829}
6830function resolveRetryThenable(boundaryFiber, thenable) {
6831 var retryCache = boundaryFiber.stateNode;
6832 null !== retryCache && retryCache.delete(thenable);
6833 retryCache = requestCurrentTime();
6834 thenable = computeExpirationForFiber(retryCache, boundaryFiber, null);
6835 retryCache = inferPriorityFromExpirationTime(retryCache, thenable);
6836 boundaryFiber = markUpdateTimeFromFiberToRoot(boundaryFiber, thenable);
6837 null !== boundaryFiber &&
6838 scheduleCallbackForRoot(boundaryFiber, retryCache, thenable);
6839}
6840var beginWork$$1 = void 0;
6841beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
6842 var updateExpirationTime = workInProgress.expirationTime;
6843 if (null !== current$$1)
6844 if (
6845 current$$1.memoizedProps !== workInProgress.pendingProps ||
6846 didPerformWorkStackCursor.current
6847 )
6848 didReceiveUpdate = !0;
6849 else {
6850 if (updateExpirationTime < renderExpirationTime) {
6851 didReceiveUpdate = !1;
6852 switch (workInProgress.tag) {
6853 case 3:
6854 pushHostRootContext(workInProgress);
6855 break;
6856 case 5:
6857 pushHostContext(workInProgress);
6858 break;
6859 case 1:
6860 isContextProvider(workInProgress.type) &&
6861 pushContextProvider(workInProgress);
6862 break;
6863 case 4:
6864 pushHostContainer(
6865 workInProgress,
6866 workInProgress.stateNode.containerInfo
6867 );
6868 break;
6869 case 10:
6870 pushProvider(workInProgress, workInProgress.memoizedProps.value);
6871 break;
6872 case 12:
6873 workInProgress.effectTag |= 4;
6874 break;
6875 case 13:
6876 if (null !== workInProgress.memoizedState) {
6877 updateExpirationTime = workInProgress.child.childExpirationTime;
6878 if (
6879 0 !== updateExpirationTime &&
6880 updateExpirationTime >= renderExpirationTime
6881 )
6882 return updateSuspenseComponent(
6883 current$$1,
6884 workInProgress,
6885 renderExpirationTime
6886 );
6887 push(
6888 suspenseStackCursor,
6889 suspenseStackCursor.current & SubtreeSuspenseContextMask,
6890 workInProgress
6891 );
6892 workInProgress = bailoutOnAlreadyFinishedWork(
6893 current$$1,
6894 workInProgress,
6895 renderExpirationTime
6896 );
6897 return null !== workInProgress ? workInProgress.sibling : null;
6898 }
6899 push(
6900 suspenseStackCursor,
6901 suspenseStackCursor.current & SubtreeSuspenseContextMask,
6902 workInProgress
6903 );
6904 break;
6905 case 19:
6906 updateExpirationTime =
6907 workInProgress.childExpirationTime >= renderExpirationTime;
6908 if (0 !== (current$$1.effectTag & 64)) {
6909 if (updateExpirationTime)
6910 return updateSuspenseListComponent(
6911 current$$1,
6912 workInProgress,
6913 renderExpirationTime
6914 );
6915 workInProgress.effectTag |= 64;
6916 }
6917 var renderState = workInProgress.memoizedState;
6918 null !== renderState &&
6919 ((renderState.rendering = null), (renderState.tail = null));
6920 push(
6921 suspenseStackCursor,
6922 suspenseStackCursor.current,
6923 workInProgress
6924 );
6925 if (!updateExpirationTime) return null;
6926 }
6927 return bailoutOnAlreadyFinishedWork(
6928 current$$1,
6929 workInProgress,
6930 renderExpirationTime
6931 );
6932 }
6933 }
6934 else didReceiveUpdate = !1;
6935 workInProgress.expirationTime = 0;
6936 switch (workInProgress.tag) {
6937 case 2:
6938 updateExpirationTime = workInProgress.type;
6939 null !== current$$1 &&
6940 ((current$$1.alternate = null),
6941 (workInProgress.alternate = null),
6942 (workInProgress.effectTag |= 2));
6943 current$$1 = workInProgress.pendingProps;
6944 renderState = getMaskedContext(
6945 workInProgress,
6946 contextStackCursor.current
6947 );
6948 prepareToReadContext(workInProgress, renderExpirationTime);
6949 renderState = renderWithHooks(
6950 null,
6951 workInProgress,
6952 updateExpirationTime,
6953 current$$1,
6954 renderState,
6955 renderExpirationTime
6956 );
6957 workInProgress.effectTag |= 1;
6958 if (
6959 "object" === typeof renderState &&
6960 null !== renderState &&
6961 "function" === typeof renderState.render &&
6962 void 0 === renderState.$$typeof
6963 ) {
6964 workInProgress.tag = 1;
6965 resetHooks();
6966 if (isContextProvider(updateExpirationTime)) {
6967 var hasContext = !0;
6968 pushContextProvider(workInProgress);
6969 } else hasContext = !1;
6970 workInProgress.memoizedState =
6971 null !== renderState.state && void 0 !== renderState.state
6972 ? renderState.state
6973 : null;
6974 var getDerivedStateFromProps =
6975 updateExpirationTime.getDerivedStateFromProps;
6976 "function" === typeof getDerivedStateFromProps &&
6977 applyDerivedStateFromProps(
6978 workInProgress,
6979 updateExpirationTime,
6980 getDerivedStateFromProps,
6981 current$$1
6982 );
6983 renderState.updater = classComponentUpdater;
6984 workInProgress.stateNode = renderState;
6985 renderState._reactInternalFiber = workInProgress;
6986 mountClassInstance(
6987 workInProgress,
6988 updateExpirationTime,
6989 current$$1,
6990 renderExpirationTime
6991 );
6992 workInProgress = finishClassComponent(
6993 null,
6994 workInProgress,
6995 updateExpirationTime,
6996 !0,
6997 hasContext,
6998 renderExpirationTime
6999 );
7000 } else
7001 (workInProgress.tag = 0),
7002 reconcileChildren(
7003 null,
7004 workInProgress,
7005 renderState,
7006 renderExpirationTime
7007 ),
7008 (workInProgress = workInProgress.child);
7009 return workInProgress;
7010 case 16:
7011 renderState = workInProgress.elementType;
7012 null !== current$$1 &&
7013 ((current$$1.alternate = null),
7014 (workInProgress.alternate = null),
7015 (workInProgress.effectTag |= 2));
7016 current$$1 = workInProgress.pendingProps;
7017 renderState = readLazyComponentType(renderState);
7018 workInProgress.type = renderState;
7019 hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
7020 current$$1 = resolveDefaultProps(renderState, current$$1);
7021 switch (hasContext) {
7022 case 0:
7023 workInProgress = updateFunctionComponent(
7024 null,
7025 workInProgress,
7026 renderState,
7027 current$$1,
7028 renderExpirationTime
7029 );
7030 break;
7031 case 1:
7032 workInProgress = updateClassComponent(
7033 null,
7034 workInProgress,
7035 renderState,
7036 current$$1,
7037 renderExpirationTime
7038 );
7039 break;
7040 case 11:
7041 workInProgress = updateForwardRef(
7042 null,
7043 workInProgress,
7044 renderState,
7045 current$$1,
7046 renderExpirationTime
7047 );
7048 break;
7049 case 14:
7050 workInProgress = updateMemoComponent(
7051 null,
7052 workInProgress,
7053 renderState,
7054 resolveDefaultProps(renderState.type, current$$1),
7055 updateExpirationTime,
7056 renderExpirationTime
7057 );
7058 break;
7059 default:
7060 throw ReactError(
7061 Error(
7062 "Element type is invalid. Received a promise that resolves to: " +
7063 renderState +
7064 ". Lazy element type must resolve to a class or function."
7065 )
7066 );
7067 }
7068 return workInProgress;
7069 case 0:
7070 return (
7071 (updateExpirationTime = workInProgress.type),
7072 (renderState = workInProgress.pendingProps),
7073 (renderState =
7074 workInProgress.elementType === updateExpirationTime
7075 ? renderState
7076 : resolveDefaultProps(updateExpirationTime, renderState)),
7077 updateFunctionComponent(
7078 current$$1,
7079 workInProgress,
7080 updateExpirationTime,
7081 renderState,
7082 renderExpirationTime
7083 )
7084 );
7085 case 1:
7086 return (
7087 (updateExpirationTime = workInProgress.type),
7088 (renderState = workInProgress.pendingProps),
7089 (renderState =
7090 workInProgress.elementType === updateExpirationTime
7091 ? renderState
7092 : resolveDefaultProps(updateExpirationTime, renderState)),
7093 updateClassComponent(
7094 current$$1,
7095 workInProgress,
7096 updateExpirationTime,
7097 renderState,
7098 renderExpirationTime
7099 )
7100 );
7101 case 3:
7102 pushHostRootContext(workInProgress);
7103 updateExpirationTime = workInProgress.updateQueue;
7104 if (null === updateExpirationTime)
7105 throw ReactError(
7106 Error(
7107 "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
7108 )
7109 );
7110 renderState = workInProgress.memoizedState;
7111 renderState = null !== renderState ? renderState.element : null;
7112 processUpdateQueue(
7113 workInProgress,
7114 updateExpirationTime,
7115 workInProgress.pendingProps,
7116 null,
7117 renderExpirationTime
7118 );
7119 updateExpirationTime = workInProgress.memoizedState.element;
7120 updateExpirationTime === renderState
7121 ? (workInProgress = bailoutOnAlreadyFinishedWork(
7122 current$$1,
7123 workInProgress,
7124 renderExpirationTime
7125 ))
7126 : (reconcileChildren(
7127 current$$1,
7128 workInProgress,
7129 updateExpirationTime,
7130 renderExpirationTime
7131 ),
7132 (workInProgress = workInProgress.child));
7133 return workInProgress;
7134 case 5:
7135 return (
7136 pushHostContext(workInProgress),
7137 null === current$$1 && tryToClaimNextHydratableInstance(workInProgress),
7138 (updateExpirationTime = workInProgress.pendingProps.children),
7139 markRef(current$$1, workInProgress),
7140 reconcileChildren(
7141 current$$1,
7142 workInProgress,
7143 updateExpirationTime,
7144 renderExpirationTime
7145 ),
7146 workInProgress.child
7147 );
7148 case 6:
7149 return (
7150 null === current$$1 && tryToClaimNextHydratableInstance(workInProgress),
7151 null
7152 );
7153 case 13:
7154 return updateSuspenseComponent(
7155 current$$1,
7156 workInProgress,
7157 renderExpirationTime
7158 );
7159 case 4:
7160 return (
7161 pushHostContainer(
7162 workInProgress,
7163 workInProgress.stateNode.containerInfo
7164 ),
7165 (updateExpirationTime = workInProgress.pendingProps),
7166 null === current$$1
7167 ? (workInProgress.child = reconcileChildFibers(
7168 workInProgress,
7169 null,
7170 updateExpirationTime,
7171 renderExpirationTime
7172 ))
7173 : reconcileChildren(
7174 current$$1,
7175 workInProgress,
7176 updateExpirationTime,
7177 renderExpirationTime
7178 ),
7179 workInProgress.child
7180 );
7181 case 11:
7182 return (
7183 (updateExpirationTime = workInProgress.type),
7184 (renderState = workInProgress.pendingProps),
7185 (renderState =
7186 workInProgress.elementType === updateExpirationTime
7187 ? renderState
7188 : resolveDefaultProps(updateExpirationTime, renderState)),
7189 updateForwardRef(
7190 current$$1,
7191 workInProgress,
7192 updateExpirationTime,
7193 renderState,
7194 renderExpirationTime
7195 )
7196 );
7197 case 7:
7198 return (
7199 reconcileChildren(
7200 current$$1,
7201 workInProgress,
7202 workInProgress.pendingProps,
7203 renderExpirationTime
7204 ),
7205 workInProgress.child
7206 );
7207 case 8:
7208 return (
7209 reconcileChildren(
7210 current$$1,
7211 workInProgress,
7212 workInProgress.pendingProps.children,
7213 renderExpirationTime
7214 ),
7215 workInProgress.child
7216 );
7217 case 12:
7218 return (
7219 (workInProgress.effectTag |= 4),
7220 reconcileChildren(
7221 current$$1,
7222 workInProgress,
7223 workInProgress.pendingProps.children,
7224 renderExpirationTime
7225 ),
7226 workInProgress.child
7227 );
7228 case 10:
7229 a: {
7230 updateExpirationTime = workInProgress.type._context;
7231 renderState = workInProgress.pendingProps;
7232 getDerivedStateFromProps = workInProgress.memoizedProps;
7233 hasContext = renderState.value;
7234 pushProvider(workInProgress, hasContext);
7235 if (null !== getDerivedStateFromProps) {
7236 var oldValue = getDerivedStateFromProps.value;
7237 hasContext = is(oldValue, hasContext)
7238 ? 0
7239 : ("function" === typeof updateExpirationTime._calculateChangedBits
7240 ? updateExpirationTime._calculateChangedBits(
7241 oldValue,
7242 hasContext
7243 )
7244 : 1073741823) | 0;
7245 if (0 === hasContext) {
7246 if (
7247 getDerivedStateFromProps.children === renderState.children &&
7248 !didPerformWorkStackCursor.current
7249 ) {
7250 workInProgress = bailoutOnAlreadyFinishedWork(
7251 current$$1,
7252 workInProgress,
7253 renderExpirationTime
7254 );
7255 break a;
7256 }
7257 } else
7258 for (
7259 oldValue = workInProgress.child,
7260 null !== oldValue && (oldValue.return = workInProgress);
7261 null !== oldValue;
7262
7263 ) {
7264 var list = oldValue.dependencies;
7265 if (null !== list) {
7266 getDerivedStateFromProps = oldValue.child;
7267 for (
7268 var dependency = list.firstContext;
7269 null !== dependency;
7270
7271 ) {
7272 if (
7273 dependency.context === updateExpirationTime &&
7274 0 !== (dependency.observedBits & hasContext)
7275 ) {
7276 1 === oldValue.tag &&
7277 ((dependency = createUpdate(renderExpirationTime, null)),
7278 (dependency.tag = 2),
7279 enqueueUpdate(oldValue, dependency));
7280 oldValue.expirationTime < renderExpirationTime &&
7281 (oldValue.expirationTime = renderExpirationTime);
7282 dependency = oldValue.alternate;
7283 null !== dependency &&
7284 dependency.expirationTime < renderExpirationTime &&
7285 (dependency.expirationTime = renderExpirationTime);
7286 scheduleWorkOnParentPath(
7287 oldValue.return,
7288 renderExpirationTime
7289 );
7290 list.expirationTime < renderExpirationTime &&
7291 (list.expirationTime = renderExpirationTime);
7292 break;
7293 }
7294 dependency = dependency.next;
7295 }
7296 } else
7297 getDerivedStateFromProps =
7298 10 === oldValue.tag
7299 ? oldValue.type === workInProgress.type
7300 ? null
7301 : oldValue.child
7302 : oldValue.child;
7303 if (null !== getDerivedStateFromProps)
7304 getDerivedStateFromProps.return = oldValue;
7305 else
7306 for (
7307 getDerivedStateFromProps = oldValue;
7308 null !== getDerivedStateFromProps;
7309
7310 ) {
7311 if (getDerivedStateFromProps === workInProgress) {
7312 getDerivedStateFromProps = null;
7313 break;
7314 }
7315 oldValue = getDerivedStateFromProps.sibling;
7316 if (null !== oldValue) {
7317 oldValue.return = getDerivedStateFromProps.return;
7318 getDerivedStateFromProps = oldValue;
7319 break;
7320 }
7321 getDerivedStateFromProps = getDerivedStateFromProps.return;
7322 }
7323 oldValue = getDerivedStateFromProps;
7324 }
7325 }
7326 reconcileChildren(
7327 current$$1,
7328 workInProgress,
7329 renderState.children,
7330 renderExpirationTime
7331 );
7332 workInProgress = workInProgress.child;
7333 }
7334 return workInProgress;
7335 case 9:
7336 return (
7337 (renderState = workInProgress.type),
7338 (hasContext = workInProgress.pendingProps),
7339 (updateExpirationTime = hasContext.children),
7340 prepareToReadContext(workInProgress, renderExpirationTime),
7341 (renderState = readContext(
7342 renderState,
7343 hasContext.unstable_observedBits
7344 )),
7345 (updateExpirationTime = updateExpirationTime(renderState)),
7346 (workInProgress.effectTag |= 1),
7347 reconcileChildren(
7348 current$$1,
7349 workInProgress,
7350 updateExpirationTime,
7351 renderExpirationTime
7352 ),
7353 workInProgress.child
7354 );
7355 case 14:
7356 return (
7357 (renderState = workInProgress.type),
7358 (hasContext = resolveDefaultProps(
7359 renderState,
7360 workInProgress.pendingProps
7361 )),
7362 (hasContext = resolveDefaultProps(renderState.type, hasContext)),
7363 updateMemoComponent(
7364 current$$1,
7365 workInProgress,
7366 renderState,
7367 hasContext,
7368 updateExpirationTime,
7369 renderExpirationTime
7370 )
7371 );
7372 case 15:
7373 return updateSimpleMemoComponent(
7374 current$$1,
7375 workInProgress,
7376 workInProgress.type,
7377 workInProgress.pendingProps,
7378 updateExpirationTime,
7379 renderExpirationTime
7380 );
7381 case 17:
7382 return (
7383 (updateExpirationTime = workInProgress.type),
7384 (renderState = workInProgress.pendingProps),
7385 (renderState =
7386 workInProgress.elementType === updateExpirationTime
7387 ? renderState
7388 : resolveDefaultProps(updateExpirationTime, renderState)),
7389 null !== current$$1 &&
7390 ((current$$1.alternate = null),
7391 (workInProgress.alternate = null),
7392 (workInProgress.effectTag |= 2)),
7393 (workInProgress.tag = 1),
7394 isContextProvider(updateExpirationTime)
7395 ? ((current$$1 = !0), pushContextProvider(workInProgress))
7396 : (current$$1 = !1),
7397 prepareToReadContext(workInProgress, renderExpirationTime),
7398 constructClassInstance(
7399 workInProgress,
7400 updateExpirationTime,
7401 renderState,
7402 renderExpirationTime
7403 ),
7404 mountClassInstance(
7405 workInProgress,
7406 updateExpirationTime,
7407 renderState,
7408 renderExpirationTime
7409 ),
7410 finishClassComponent(
7411 null,
7412 workInProgress,
7413 updateExpirationTime,
7414 !0,
7415 current$$1,
7416 renderExpirationTime
7417 )
7418 );
7419 case 19:
7420 return updateSuspenseListComponent(
7421 current$$1,
7422 workInProgress,
7423 renderExpirationTime
7424 );
7425 }
7426 throw ReactError(
7427 Error(
7428 "Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue."
7429 )
7430 );
7431};
7432function scheduleInteractions(root, expirationTime, interactions) {
7433 if (0 < interactions.size) {
7434 var pendingInteractionMap = root.pendingInteractionMap,
7435 pendingInteractions = pendingInteractionMap.get(expirationTime);
7436 null != pendingInteractions
7437 ? interactions.forEach(function(interaction) {
7438 pendingInteractions.has(interaction) || interaction.__count++;
7439 pendingInteractions.add(interaction);
7440 })
7441 : (pendingInteractionMap.set(expirationTime, new Set(interactions)),
7442 interactions.forEach(function(interaction) {
7443 interaction.__count++;
7444 }));
7445 pendingInteractionMap = tracing.__subscriberRef.current;
7446 if (null !== pendingInteractionMap)
7447 pendingInteractionMap.onWorkScheduled(
7448 interactions,
7449 1e3 * expirationTime + root.interactionThreadID
7450 );
7451 }
7452}
7453function startWorkOnPendingInteractions(root, expirationTime) {
7454 var interactions = new Set();
7455 root.pendingInteractionMap.forEach(function(
7456 scheduledInteractions,
7457 scheduledExpirationTime
7458 ) {
7459 scheduledExpirationTime >= expirationTime &&
7460 scheduledInteractions.forEach(function(interaction) {
7461 return interactions.add(interaction);
7462 });
7463 });
7464 root.memoizedInteractions = interactions;
7465 if (0 < interactions.size) {
7466 var subscriber = tracing.__subscriberRef.current;
7467 if (null !== subscriber) {
7468 root = 1e3 * expirationTime + root.interactionThreadID;
7469 try {
7470 subscriber.onWorkStarted(interactions, root);
7471 } catch (error) {
7472 scheduleCallback(99, function() {
7473 throw error;
7474 });
7475 }
7476 }
7477 }
7478}
7479function finishPendingInteractions(root, committedExpirationTime) {
7480 var earliestRemainingTimeAfterCommit = root.firstPendingTime,
7481 subscriber = void 0;
7482 try {
7483 if (
7484 ((subscriber = tracing.__subscriberRef.current),
7485 null !== subscriber && 0 < root.memoizedInteractions.size)
7486 )
7487 subscriber.onWorkStopped(
7488 root.memoizedInteractions,
7489 1e3 * committedExpirationTime + root.interactionThreadID
7490 );
7491 } catch (error) {
7492 scheduleCallback(99, function() {
7493 throw error;
7494 });
7495 } finally {
7496 var pendingInteractionMap = root.pendingInteractionMap;
7497 pendingInteractionMap.forEach(function(
7498 scheduledInteractions,
7499 scheduledExpirationTime
7500 ) {
7501 scheduledExpirationTime > earliestRemainingTimeAfterCommit &&
7502 (pendingInteractionMap.delete(scheduledExpirationTime),
7503 scheduledInteractions.forEach(function(interaction) {
7504 interaction.__count--;
7505 if (null !== subscriber && 0 === interaction.__count)
7506 try {
7507 subscriber.onInteractionScheduledWorkCompleted(interaction);
7508 } catch (error) {
7509 scheduleCallback(99, function() {
7510 throw error;
7511 });
7512 }
7513 }));
7514 });
7515 }
7516}
7517var onCommitFiberRoot = null,
7518 onCommitFiberUnmount = null,
7519 isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
7520function injectInternals(internals) {
7521 if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
7522 var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
7523 if (hook.isDisabled || !hook.supportsFiber) return !0;
7524 try {
7525 var rendererID = hook.inject(internals);
7526 onCommitFiberRoot = function(root, expirationTime) {
7527 try {
7528 var didError = 64 === (root.current.effectTag & 64),
7529 currentTime = requestCurrentTime(),
7530 priorityLevel = inferPriorityFromExpirationTime(
7531 currentTime,
7532 expirationTime
7533 );
7534 hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
7535 } catch (err) {}
7536 };
7537 onCommitFiberUnmount = function(fiber) {
7538 try {
7539 hook.onCommitFiberUnmount(rendererID, fiber);
7540 } catch (err) {}
7541 };
7542 } catch (err) {}
7543 return !0;
7544}
7545function FiberNode(tag, pendingProps, key, mode) {
7546 this.tag = tag;
7547 this.key = key;
7548 this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
7549 this.index = 0;
7550 this.ref = null;
7551 this.pendingProps = pendingProps;
7552 this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
7553 this.mode = mode;
7554 this.effectTag = 0;
7555 this.lastEffect = this.firstEffect = this.nextEffect = null;
7556 this.childExpirationTime = this.expirationTime = 0;
7557 this.alternate = null;
7558 this.actualDuration = 0;
7559 this.actualStartTime = -1;
7560 this.treeBaseDuration = this.selfBaseDuration = 0;
7561}
7562function createFiber(tag, pendingProps, key, mode) {
7563 return new FiberNode(tag, pendingProps, key, mode);
7564}
7565function shouldConstruct(Component) {
7566 Component = Component.prototype;
7567 return !(!Component || !Component.isReactComponent);
7568}
7569function resolveLazyComponentTag(Component) {
7570 if ("function" === typeof Component)
7571 return shouldConstruct(Component) ? 1 : 0;
7572 if (void 0 !== Component && null !== Component) {
7573 Component = Component.$$typeof;
7574 if (Component === REACT_FORWARD_REF_TYPE) return 11;
7575 if (Component === REACT_MEMO_TYPE) return 14;
7576 }
7577 return 2;
7578}
7579function createWorkInProgress(current, pendingProps) {
7580 var workInProgress = current.alternate;
7581 null === workInProgress
7582 ? ((workInProgress = createFiber(
7583 current.tag,
7584 pendingProps,
7585 current.key,
7586 current.mode
7587 )),
7588 (workInProgress.elementType = current.elementType),
7589 (workInProgress.type = current.type),
7590 (workInProgress.stateNode = current.stateNode),
7591 (workInProgress.alternate = current),
7592 (current.alternate = workInProgress))
7593 : ((workInProgress.pendingProps = pendingProps),
7594 (workInProgress.effectTag = 0),
7595 (workInProgress.nextEffect = null),
7596 (workInProgress.firstEffect = null),
7597 (workInProgress.lastEffect = null),
7598 (workInProgress.actualDuration = 0),
7599 (workInProgress.actualStartTime = -1));
7600 workInProgress.childExpirationTime = current.childExpirationTime;
7601 workInProgress.expirationTime = current.expirationTime;
7602 workInProgress.child = current.child;
7603 workInProgress.memoizedProps = current.memoizedProps;
7604 workInProgress.memoizedState = current.memoizedState;
7605 workInProgress.updateQueue = current.updateQueue;
7606 pendingProps = current.dependencies;
7607 workInProgress.dependencies =
7608 null === pendingProps
7609 ? null
7610 : {
7611 expirationTime: pendingProps.expirationTime,
7612 firstContext: pendingProps.firstContext,
7613 responders: pendingProps.responders
7614 };
7615 workInProgress.sibling = current.sibling;
7616 workInProgress.index = current.index;
7617 workInProgress.ref = current.ref;
7618 workInProgress.selfBaseDuration = current.selfBaseDuration;
7619 workInProgress.treeBaseDuration = current.treeBaseDuration;
7620 return workInProgress;
7621}
7622function createFiberFromTypeAndProps(
7623 type,
7624 key,
7625 pendingProps,
7626 owner,
7627 mode,
7628 expirationTime
7629) {
7630 var fiberTag = 2;
7631 owner = type;
7632 if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
7633 else if ("string" === typeof type) fiberTag = 5;
7634 else
7635 a: switch (type) {
7636 case REACT_FRAGMENT_TYPE:
7637 return createFiberFromFragment(
7638 pendingProps.children,
7639 mode,
7640 expirationTime,
7641 key
7642 );
7643 case REACT_CONCURRENT_MODE_TYPE:
7644 fiberTag = 8;
7645 mode |= 7;
7646 break;
7647 case REACT_STRICT_MODE_TYPE:
7648 fiberTag = 8;
7649 mode |= 1;
7650 break;
7651 case REACT_PROFILER_TYPE:
7652 return (
7653 (type = createFiber(12, pendingProps, key, mode | 8)),
7654 (type.elementType = REACT_PROFILER_TYPE),
7655 (type.type = REACT_PROFILER_TYPE),
7656 (type.expirationTime = expirationTime),
7657 type
7658 );
7659 case REACT_SUSPENSE_TYPE:
7660 return (
7661 (type = createFiber(13, pendingProps, key, mode)),
7662 (type.type = REACT_SUSPENSE_TYPE),
7663 (type.elementType = REACT_SUSPENSE_TYPE),
7664 (type.expirationTime = expirationTime),
7665 type
7666 );
7667 case REACT_SUSPENSE_LIST_TYPE:
7668 return (
7669 (type = createFiber(19, pendingProps, key, mode)),
7670 (type.elementType = REACT_SUSPENSE_LIST_TYPE),
7671 (type.expirationTime = expirationTime),
7672 type
7673 );
7674 default:
7675 if ("object" === typeof type && null !== type)
7676 switch (type.$$typeof) {
7677 case REACT_PROVIDER_TYPE:
7678 fiberTag = 10;
7679 break a;
7680 case REACT_CONTEXT_TYPE:
7681 fiberTag = 9;
7682 break a;
7683 case REACT_FORWARD_REF_TYPE:
7684 fiberTag = 11;
7685 break a;
7686 case REACT_MEMO_TYPE:
7687 fiberTag = 14;
7688 break a;
7689 case REACT_LAZY_TYPE:
7690 fiberTag = 16;
7691 owner = null;
7692 break a;
7693 }
7694 throw ReactError(
7695 Error(
7696 "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
7697 (null == type ? type : typeof type) +
7698 "."
7699 )
7700 );
7701 }
7702 key = createFiber(fiberTag, pendingProps, key, mode);
7703 key.elementType = type;
7704 key.type = owner;
7705 key.expirationTime = expirationTime;
7706 return key;
7707}
7708function createFiberFromFragment(elements, mode, expirationTime, key) {
7709 elements = createFiber(7, elements, key, mode);
7710 elements.expirationTime = expirationTime;
7711 return elements;
7712}
7713function createFiberFromText(content, mode, expirationTime) {
7714 content = createFiber(6, content, null, mode);
7715 content.expirationTime = expirationTime;
7716 return content;
7717}
7718function createFiberFromPortal(portal, mode, expirationTime) {
7719 mode = createFiber(
7720 4,
7721 null !== portal.children ? portal.children : [],
7722 portal.key,
7723 mode
7724 );
7725 mode.expirationTime = expirationTime;
7726 mode.stateNode = {
7727 containerInfo: portal.containerInfo,
7728 pendingChildren: null,
7729 implementation: portal.implementation
7730 };
7731 return mode;
7732}
7733function FiberRootNode(containerInfo, tag, hydrate) {
7734 this.tag = tag;
7735 this.current = null;
7736 this.containerInfo = containerInfo;
7737 this.pingCache = this.pendingChildren = null;
7738 this.finishedExpirationTime = 0;
7739 this.finishedWork = null;
7740 this.timeoutHandle = -1;
7741 this.pendingContext = this.context = null;
7742 this.hydrate = hydrate;
7743 this.callbackNode = this.firstBatch = null;
7744 this.pingTime = this.lastPendingTime = this.firstPendingTime = this.callbackExpirationTime = 0;
7745 this.interactionThreadID = tracing.unstable_getThreadID();
7746 this.memoizedInteractions = new Set();
7747 this.pendingInteractionMap = new Map();
7748}
7749function findHostInstance(component) {
7750 var fiber = component._reactInternalFiber;
7751 if (void 0 === fiber) {
7752 if ("function" === typeof component.render)
7753 throw ReactError(Error("Unable to find node on an unmounted component."));
7754 throw ReactError(
7755 Error(
7756 "Argument appears to not be a ReactComponent. Keys: " +
7757 Object.keys(component)
7758 )
7759 );
7760 }
7761 component = findCurrentHostFiber(fiber);
7762 return null === component ? null : component.stateNode;
7763}
7764function updateContainer(element, container, parentComponent, callback) {
7765 var current$$1 = container.current,
7766 currentTime = requestCurrentTime(),
7767 suspenseConfig = ReactCurrentBatchConfig.suspense;
7768 current$$1 = computeExpirationForFiber(
7769 currentTime,
7770 current$$1,
7771 suspenseConfig
7772 );
7773 currentTime = container.current;
7774 a: if (parentComponent) {
7775 parentComponent = parentComponent._reactInternalFiber;
7776 b: {
7777 if (
7778 2 !== isFiberMountedImpl(parentComponent) ||
7779 1 !== parentComponent.tag
7780 )
7781 throw ReactError(
7782 Error(
7783 "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue."
7784 )
7785 );
7786 var parentContext = parentComponent;
7787 do {
7788 switch (parentContext.tag) {
7789 case 3:
7790 parentContext = parentContext.stateNode.context;
7791 break b;
7792 case 1:
7793 if (isContextProvider(parentContext.type)) {
7794 parentContext =
7795 parentContext.stateNode
7796 .__reactInternalMemoizedMergedChildContext;
7797 break b;
7798 }
7799 }
7800 parentContext = parentContext.return;
7801 } while (null !== parentContext);
7802 throw ReactError(
7803 Error(
7804 "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue."
7805 )
7806 );
7807 }
7808 if (1 === parentComponent.tag) {
7809 var Component = parentComponent.type;
7810 if (isContextProvider(Component)) {
7811 parentComponent = processChildContext(
7812 parentComponent,
7813 Component,
7814 parentContext
7815 );
7816 break a;
7817 }
7818 }
7819 parentComponent = parentContext;
7820 } else parentComponent = emptyContextObject;
7821 null === container.context
7822 ? (container.context = parentComponent)
7823 : (container.pendingContext = parentComponent);
7824 container = callback;
7825 suspenseConfig = createUpdate(current$$1, suspenseConfig);
7826 suspenseConfig.payload = { element: element };
7827 container = void 0 === container ? null : container;
7828 null !== container && (suspenseConfig.callback = container);
7829 enqueueUpdate(currentTime, suspenseConfig);
7830 scheduleUpdateOnFiber(currentTime, current$$1);
7831 return current$$1;
7832}
7833function createPortal(children, containerInfo, implementation) {
7834 var key =
7835 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
7836 return {
7837 $$typeof: REACT_PORTAL_TYPE,
7838 key: null == key ? null : "" + key,
7839 children: children,
7840 containerInfo: containerInfo,
7841 implementation: implementation
7842 };
7843}
7844function _inherits(subClass, superClass) {
7845 if ("function" !== typeof superClass && null !== superClass)
7846 throw new TypeError(
7847 "Super expression must either be null or a function, not " +
7848 typeof superClass
7849 );
7850 subClass.prototype = Object.create(superClass && superClass.prototype, {
7851 constructor: {
7852 value: subClass,
7853 enumerable: !1,
7854 writable: !0,
7855 configurable: !0
7856 }
7857 });
7858 superClass &&
7859 (Object.setPrototypeOf
7860 ? Object.setPrototypeOf(subClass, superClass)
7861 : (subClass.__proto__ = superClass));
7862}
7863var getInspectorDataForViewTag = void 0;
7864getInspectorDataForViewTag = function() {
7865 throw ReactError(
7866 Error("getInspectorDataForViewTag() is not available in production")
7867 );
7868};
7869function findNodeHandle(componentOrHandle) {
7870 if (null == componentOrHandle) return null;
7871 if ("number" === typeof componentOrHandle) return componentOrHandle;
7872 if (componentOrHandle._nativeTag) return componentOrHandle._nativeTag;
7873 if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag)
7874 return componentOrHandle.canonical._nativeTag;
7875 componentOrHandle = findHostInstance(componentOrHandle);
7876 return null == componentOrHandle
7877 ? componentOrHandle
7878 : componentOrHandle.canonical
7879 ? componentOrHandle.canonical._nativeTag
7880 : componentOrHandle._nativeTag;
7881}
7882batchedUpdatesImpl = function(fn, a) {
7883 var prevExecutionContext = executionContext;
7884 executionContext |= 1;
7885 try {
7886 return fn(a);
7887 } finally {
7888 (executionContext = prevExecutionContext),
7889 executionContext === NoContext && flushSyncCallbackQueue();
7890 }
7891};
7892flushDiscreteUpdatesImpl = function() {
7893 (executionContext & (1 | RenderContext | CommitContext)) === NoContext &&
7894 (flushPendingDiscreteUpdates(), flushPassiveEffects());
7895};
7896var roots = new Map(),
7897 ReactNativeRenderer = {
7898 NativeComponent: (function(findNodeHandle, findHostInstance) {
7899 return (function(_React$Component) {
7900 function ReactNativeComponent() {
7901 if (!(this instanceof ReactNativeComponent))
7902 throw new TypeError("Cannot call a class as a function");
7903 var call = _React$Component.apply(this, arguments);
7904 if (!this)
7905 throw new ReferenceError(
7906 "this hasn't been initialised - super() hasn't been called"
7907 );
7908 return !call ||
7909 ("object" !== typeof call && "function" !== typeof call)
7910 ? this
7911 : call;
7912 }
7913 _inherits(ReactNativeComponent, _React$Component);
7914 ReactNativeComponent.prototype.blur = function() {
7915 ReactNativePrivateInterface.TextInputState.blurTextInput(
7916 findNodeHandle(this)
7917 );
7918 };
7919 ReactNativeComponent.prototype.focus = function() {
7920 ReactNativePrivateInterface.TextInputState.focusTextInput(
7921 findNodeHandle(this)
7922 );
7923 };
7924 ReactNativeComponent.prototype.measure = function(callback) {
7925 var maybeInstance = void 0;
7926 try {
7927 maybeInstance = findHostInstance(this);
7928 } catch (error) {}
7929 null != maybeInstance &&
7930 (maybeInstance.canonical
7931 ? nativeFabricUIManager.measure(
7932 maybeInstance.node,
7933 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7934 )
7935 : ReactNativePrivateInterface.UIManager.measure(
7936 findNodeHandle(this),
7937 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7938 ));
7939 };
7940 ReactNativeComponent.prototype.measureInWindow = function(callback) {
7941 var maybeInstance = void 0;
7942 try {
7943 maybeInstance = findHostInstance(this);
7944 } catch (error) {}
7945 null != maybeInstance &&
7946 (maybeInstance.canonical
7947 ? nativeFabricUIManager.measureInWindow(
7948 maybeInstance.node,
7949 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7950 )
7951 : ReactNativePrivateInterface.UIManager.measureInWindow(
7952 findNodeHandle(this),
7953 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
7954 ));
7955 };
7956 ReactNativeComponent.prototype.measureLayout = function(
7957 relativeToNativeNode,
7958 onSuccess,
7959 onFail
7960 ) {
7961 var maybeInstance = void 0;
7962 try {
7963 maybeInstance = findHostInstance(this);
7964 } catch (error) {}
7965 null == maybeInstance ||
7966 maybeInstance.canonical ||
7967 ((maybeInstance = void 0),
7968 "number" === typeof relativeToNativeNode
7969 ? (maybeInstance = relativeToNativeNode)
7970 : relativeToNativeNode._nativeTag &&
7971 (maybeInstance = relativeToNativeNode._nativeTag),
7972 null != maybeInstance &&
7973 ReactNativePrivateInterface.UIManager.measureLayout(
7974 findNodeHandle(this),
7975 maybeInstance,
7976 mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
7977 mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
7978 ));
7979 };
7980 ReactNativeComponent.prototype.setNativeProps = function(nativeProps) {
7981 var maybeInstance = void 0;
7982 try {
7983 maybeInstance = findHostInstance(this);
7984 } catch (error) {}
7985 if (null != maybeInstance && !maybeInstance.canonical) {
7986 var nativeTag =
7987 maybeInstance._nativeTag || maybeInstance.canonical._nativeTag;
7988 maybeInstance =
7989 maybeInstance.viewConfig || maybeInstance.canonical.viewConfig;
7990 nativeProps = diffProperties(
7991 null,
7992 emptyObject,
7993 nativeProps,
7994 maybeInstance.validAttributes
7995 );
7996 null != nativeProps &&
7997 ReactNativePrivateInterface.UIManager.updateView(
7998 nativeTag,
7999 maybeInstance.uiViewClassName,
8000 nativeProps
8001 );
8002 }
8003 };
8004 return ReactNativeComponent;
8005 })(React.Component);
8006 })(findNodeHandle, findHostInstance),
8007 findNodeHandle: findNodeHandle,
8008 dispatchCommand: function(handle, command, args) {
8009 null != handle._nativeTag &&
8010 ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand(
8011 handle._nativeTag,
8012 command,
8013 args
8014 );
8015 },
8016 setNativeProps: function(handle, nativeProps) {
8017 null != handle._nativeTag &&
8018 ((nativeProps = diffProperties(
8019 null,
8020 emptyObject,
8021 nativeProps,
8022 handle.viewConfig.validAttributes
8023 )),
8024 null != nativeProps &&
8025 ReactNativePrivateInterface.UIManager.updateView(
8026 handle._nativeTag,
8027 handle.viewConfig.uiViewClassName,
8028 nativeProps
8029 ));
8030 },
8031 render: function(element, containerTag, callback) {
8032 var root = roots.get(containerTag);
8033 if (!root) {
8034 root = new FiberRootNode(containerTag, 0, !1);
8035 var uninitializedFiber = 0;
8036 isDevToolsPresent && (uninitializedFiber |= 8);
8037 uninitializedFiber = createFiber(3, null, null, uninitializedFiber);
8038 root.current = uninitializedFiber;
8039 uninitializedFiber.stateNode = root;
8040 roots.set(containerTag, root);
8041 }
8042 updateContainer(element, root, null, callback);
8043 a: if (((element = root.current), element.child))
8044 switch (element.child.tag) {
8045 case 5:
8046 element = element.child.stateNode;
8047 break a;
8048 default:
8049 element = element.child.stateNode;
8050 }
8051 else element = null;
8052 return element;
8053 },
8054 unmountComponentAtNode: function(containerTag) {
8055 var root = roots.get(containerTag);
8056 root &&
8057 updateContainer(null, root, null, function() {
8058 roots.delete(containerTag);
8059 });
8060 },
8061 unmountComponentAtNodeAndRemoveContainer: function(containerTag) {
8062 ReactNativeRenderer.unmountComponentAtNode(containerTag);
8063 ReactNativePrivateInterface.UIManager.removeRootView(containerTag);
8064 },
8065 createPortal: function(children, containerTag) {
8066 return createPortal(
8067 children,
8068 containerTag,
8069 null,
8070 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
8071 );
8072 },
8073 unstable_batchedUpdates: batchedUpdates,
8074 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
8075 NativeMethodsMixin: (function(findNodeHandle, findHostInstance) {
8076 return {
8077 measure: function(callback) {
8078 var maybeInstance = void 0;
8079 try {
8080 maybeInstance = findHostInstance(this);
8081 } catch (error) {}
8082 null != maybeInstance &&
8083 (maybeInstance.canonical
8084 ? nativeFabricUIManager.measure(
8085 maybeInstance.node,
8086 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
8087 )
8088 : ReactNativePrivateInterface.UIManager.measure(
8089 findNodeHandle(this),
8090 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
8091 ));
8092 },
8093 measureInWindow: function(callback) {
8094 var maybeInstance = void 0;
8095 try {
8096 maybeInstance = findHostInstance(this);
8097 } catch (error) {}
8098 null != maybeInstance &&
8099 (maybeInstance.canonical
8100 ? nativeFabricUIManager.measureInWindow(
8101 maybeInstance.node,
8102 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
8103 )
8104 : ReactNativePrivateInterface.UIManager.measureInWindow(
8105 findNodeHandle(this),
8106 mountSafeCallback_NOT_REALLY_SAFE(this, callback)
8107 ));
8108 },
8109 measureLayout: function(relativeToNativeNode, onSuccess, onFail) {
8110 var maybeInstance = void 0;
8111 try {
8112 maybeInstance = findHostInstance(this);
8113 } catch (error) {}
8114 null == maybeInstance ||
8115 maybeInstance.canonical ||
8116 ((maybeInstance = void 0),
8117 "number" === typeof relativeToNativeNode
8118 ? (maybeInstance = relativeToNativeNode)
8119 : relativeToNativeNode._nativeTag &&
8120 (maybeInstance = relativeToNativeNode._nativeTag),
8121 null != maybeInstance &&
8122 ReactNativePrivateInterface.UIManager.measureLayout(
8123 findNodeHandle(this),
8124 maybeInstance,
8125 mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
8126 mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
8127 ));
8128 },
8129 setNativeProps: function(nativeProps) {
8130 var maybeInstance = void 0;
8131 try {
8132 maybeInstance = findHostInstance(this);
8133 } catch (error) {}
8134 if (null != maybeInstance && !maybeInstance.canonical) {
8135 var nativeTag =
8136 maybeInstance._nativeTag || maybeInstance.canonical._nativeTag;
8137 maybeInstance =
8138 maybeInstance.viewConfig || maybeInstance.canonical.viewConfig;
8139 nativeProps = diffProperties(
8140 null,
8141 emptyObject,
8142 nativeProps,
8143 maybeInstance.validAttributes
8144 );
8145 null != nativeProps &&
8146 ReactNativePrivateInterface.UIManager.updateView(
8147 nativeTag,
8148 maybeInstance.uiViewClassName,
8149 nativeProps
8150 );
8151 }
8152 },
8153 focus: function() {
8154 ReactNativePrivateInterface.TextInputState.focusTextInput(
8155 findNodeHandle(this)
8156 );
8157 },
8158 blur: function() {
8159 ReactNativePrivateInterface.TextInputState.blurTextInput(
8160 findNodeHandle(this)
8161 );
8162 }
8163 };
8164 })(findNodeHandle, findHostInstance),
8165 computeComponentStackForErrorReporting: function(reactTag) {
8166 return (reactTag = getInstanceFromTag(reactTag))
8167 ? getStackByFiberInDevAndProd(reactTag)
8168 : "";
8169 }
8170 }
8171 };
8172(function(devToolsConfig) {
8173 var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
8174 return injectInternals(
8175 Object.assign({}, devToolsConfig, {
8176 overrideHookState: null,
8177 overrideProps: null,
8178 setSuspenseHandler: null,
8179 scheduleUpdate: null,
8180 currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
8181 findHostInstanceByFiber: function(fiber) {
8182 fiber = findCurrentHostFiber(fiber);
8183 return null === fiber ? null : fiber.stateNode;
8184 },
8185 findFiberByHostInstance: function(instance) {
8186 return findFiberByHostInstance
8187 ? findFiberByHostInstance(instance)
8188 : null;
8189 },
8190 findHostInstancesForRefresh: null,
8191 scheduleRefresh: null,
8192 scheduleRoot: null,
8193 setRefreshHandler: null,
8194 getCurrentFiber: null
8195 })
8196 );
8197})({
8198 findFiberByHostInstance: getInstanceFromTag,
8199 getInspectorDataForViewTag: getInspectorDataForViewTag,
8200 bundleType: 0,
8201 version: "16.8.6",
8202 rendererPackageName: "react-native-renderer"
8203});
8204var ReactNativeRenderer$2 = { default: ReactNativeRenderer },
8205 ReactNativeRenderer$3 =
8206 (ReactNativeRenderer$2 && ReactNativeRenderer) || ReactNativeRenderer$2;
8207module.exports = ReactNativeRenderer$3.default || ReactNativeRenderer$3;