@office-iss/react-native-win32 0.69.0 → 0.70.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/.eslintrc.js +0 -1
  2. package/.flowconfig +5 -1
  3. package/CHANGELOG.json +194 -32
  4. package/CHANGELOG.md +79 -19
  5. package/IntegrationTests/AsyncStorageTest.js +20 -4
  6. package/IntegrationTests/BUCK +2 -2
  7. package/IntegrationTests/LayoutEventsTest.js +4 -1
  8. package/IntegrationTests/{launchWebSocketServer.command → launchWebSocketServer.sh} +3 -9
  9. package/Libraries/Alert/Alert.js +18 -4
  10. package/Libraries/Alert/Alert.win32.js +2 -0
  11. package/Libraries/Alert/NativeAlertManager.js +1 -0
  12. package/Libraries/Animated/Animated.js +2 -2
  13. package/Libraries/Animated/AnimatedEvent.js +7 -4
  14. package/Libraries/Animated/AnimatedImplementation.js +17 -3
  15. package/Libraries/Animated/AnimatedMock.js +7 -2
  16. package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
  17. package/Libraries/Animated/NativeAnimatedModule.js +3 -0
  18. package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
  19. package/Libraries/Animated/animations/SpringAnimation.js +3 -3
  20. package/Libraries/Animated/animations/TimingAnimation.js +3 -3
  21. package/Libraries/Animated/createAnimatedComponent.js +8 -1
  22. package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
  23. package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
  24. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
  25. package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
  26. package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
  27. package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
  28. package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
  29. package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
  30. package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
  31. package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
  32. package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
  33. package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
  34. package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
  35. package/Libraries/Animated/useAnimatedProps.js +1 -0
  36. package/Libraries/AppState/AppState.js +0 -32
  37. package/Libraries/BatchedBridge/MessageQueue.js +21 -15
  38. package/Libraries/BatchedBridge/NativeModules.js +3 -4
  39. package/Libraries/Blob/FileReader.js +0 -6
  40. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
  41. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +0 -20
  42. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
  43. package/Libraries/Components/Keyboard/Keyboard.js +0 -11
  44. package/Libraries/Components/Pressable/Pressable.js +2 -0
  45. package/Libraries/Components/Pressable/Pressable.win32.js +2 -0
  46. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
  47. package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
  48. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +4 -32
  49. package/Libraries/Components/ScrollView/ScrollView.js +13 -11
  50. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
  51. package/Libraries/Components/StatusBar/StatusBar.js +10 -7
  52. package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
  53. package/Libraries/Components/TextInput/TextInput.js +12 -2
  54. package/Libraries/Components/Touchable/PooledClass.js +16 -4
  55. package/Libraries/Components/Touchable/Touchable.js +50 -1
  56. package/Libraries/Components/Touchable/Touchable.win32.js +972 -0
  57. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
  58. package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
  59. package/Libraries/Components/View/ViewPropTypes.js +3 -8
  60. package/Libraries/Components/View/ViewPropTypes.win32.js +3 -8
  61. package/Libraries/Core/ExceptionsManager.js +2 -0
  62. package/Libraries/Core/ReactNativeVersion.js +2 -2
  63. package/Libraries/Core/Timers/JSTimers.js +2 -2
  64. package/Libraries/Core/polyfillPromise.js +0 -32
  65. package/Libraries/Core/setUpBatchedBridge.js +5 -1
  66. package/Libraries/Core/setUpPerformance.js +1 -1
  67. package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
  68. package/Libraries/Image/AssetSourceResolver.js +2 -2
  69. package/Libraries/Image/Image.android.js +5 -3
  70. package/Libraries/Image/Image.ios.js +6 -3
  71. package/Libraries/Image/Image.win32.js +6 -3
  72. package/Libraries/Image/ImageSource.js +7 -5
  73. package/Libraries/Inspector/ElementBox.js +2 -2
  74. package/Libraries/Inspector/NetworkOverlay.js +13 -8
  75. package/Libraries/Interaction/PanResponder.js +16 -14
  76. package/Libraries/Linking/Linking.js +0 -11
  77. package/Libraries/Lists/FlatList.js +3 -2
  78. package/Libraries/Lists/SectionList.js +2 -0
  79. package/Libraries/Lists/ViewabilityHelper.js +7 -3
  80. package/Libraries/Lists/VirtualizeUtils.js +33 -20
  81. package/Libraries/Lists/VirtualizedList.js +93 -47
  82. package/Libraries/Lists/VirtualizedListContext.js +1 -0
  83. package/Libraries/Lists/VirtualizedSectionList.js +14 -9
  84. package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
  85. package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
  86. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  87. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  88. package/Libraries/LogBox/LogBox.js +3 -1
  89. package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
  90. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
  91. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
  92. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
  93. package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
  94. package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
  95. package/Libraries/NativeComponent/BaseViewConfig.win32.js +26 -12
  96. package/Libraries/Network/XMLHttpRequest.js +9 -11
  97. package/Libraries/Performance/PureComponentDebug.js +1 -0
  98. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
  99. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
  100. package/Libraries/Pressability/Pressability.js +26 -16
  101. package/Libraries/Pressability/Pressability.win32.js +26 -16
  102. package/Libraries/Promise.js +0 -1
  103. package/Libraries/ReactNative/AppRegistry.js +16 -13
  104. package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
  105. package/Libraries/ReactNative/PaperUIManager.js +9 -9
  106. package/Libraries/ReactNative/PaperUIManager.win32.js +7 -8
  107. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
  108. package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
  109. package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
  110. package/Libraries/ReactNative/renderApplication.js +1 -1
  111. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
  112. package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
  113. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
  114. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
  115. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
  116. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
  117. package/Libraries/Storage/AsyncStorage.js +7 -1
  118. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
  119. package/Libraries/StyleSheet/flattenStyle.js +1 -1
  120. package/Libraries/StyleSheet/processTransform.js +2 -0
  121. package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
  122. package/Libraries/Text/Text.js +15 -7
  123. package/Libraries/Types/CoreEventTypes.js +137 -11
  124. package/Libraries/Types/CoreEventTypes.win32.js +147 -22
  125. package/Libraries/Utilities/Dimensions.js +0 -13
  126. package/Libraries/Utilities/Dimensions.win32.js +0 -9
  127. package/Libraries/Utilities/HMRClient.js +3 -3
  128. package/Libraries/Utilities/Platform.ios.js +0 -7
  129. package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
  130. package/Libraries/Utilities/codegenNativeCommands.js +11 -2
  131. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
  132. package/Libraries/Utilities/stringifySafe.js +3 -1
  133. package/Libraries/Utilities/truncate.js +1 -1
  134. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
  135. package/Libraries/Vibration/Vibration.js +1 -1
  136. package/Libraries/WebSocket/WebSocket.js +1 -0
  137. package/Libraries/vendor/emitter/EventEmitter.js +105 -12
  138. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
  139. package/flow/JSITimerInternalType.js +30 -0
  140. package/jest/assetFileTransformer.js +3 -2
  141. package/jest/setup.js +4 -0
  142. package/jest.config.js +0 -1
  143. package/overrides.json +23 -16
  144. package/package.json +23 -24
  145. package/rntypes/index.d.ts +0 -1
  146. package/src/rntypes/index.d.ts +0 -1
  147. package/Libraries/vendor/emitter/EventSubscription.js +0 -19
  148. package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
  149. package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
  150. package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
  151. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
  152. package/jest/preprocessor.js +0 -40
  153. package/jest/preprocessor_DO_NOT_USE.js +0 -122
  154. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizeUtils-test.js.snap +0 -3
@@ -8,7 +8,7 @@
8
8
  * @nolint
9
9
  * @providesModule ReactNativeRenderer-profiling
10
10
  * @preventMunge
11
- * @generated SignedSource<<06200cf762f5eb0f48046de454a64107>>
11
+ * @generated SignedSource<<2bf865cebf1e47b3fc0284498b4571db>>
12
12
  */
13
13
 
14
14
 
@@ -1028,7 +1028,7 @@ eventPluginOrder = Array.prototype.slice.call([
1028
1028
  "ReactNativeBridgeEventPlugin"
1029
1029
  ]);
1030
1030
  recomputePluginOrdering();
1031
- var injectedNamesToPlugins$jscomp$inline_228 = {
1031
+ var injectedNamesToPlugins$jscomp$inline_236 = {
1032
1032
  ResponderEventPlugin: ResponderEventPlugin,
1033
1033
  ReactNativeBridgeEventPlugin: {
1034
1034
  eventTypes: {},
@@ -1074,33 +1074,33 @@ var injectedNamesToPlugins$jscomp$inline_228 = {
1074
1074
  }
1075
1075
  }
1076
1076
  },
1077
- isOrderingDirty$jscomp$inline_229 = !1,
1078
- pluginName$jscomp$inline_230;
1079
- for (pluginName$jscomp$inline_230 in injectedNamesToPlugins$jscomp$inline_228)
1077
+ isOrderingDirty$jscomp$inline_237 = !1,
1078
+ pluginName$jscomp$inline_238;
1079
+ for (pluginName$jscomp$inline_238 in injectedNamesToPlugins$jscomp$inline_236)
1080
1080
  if (
1081
- injectedNamesToPlugins$jscomp$inline_228.hasOwnProperty(
1082
- pluginName$jscomp$inline_230
1081
+ injectedNamesToPlugins$jscomp$inline_236.hasOwnProperty(
1082
+ pluginName$jscomp$inline_238
1083
1083
  )
1084
1084
  ) {
1085
- var pluginModule$jscomp$inline_231 =
1086
- injectedNamesToPlugins$jscomp$inline_228[pluginName$jscomp$inline_230];
1085
+ var pluginModule$jscomp$inline_239 =
1086
+ injectedNamesToPlugins$jscomp$inline_236[pluginName$jscomp$inline_238];
1087
1087
  if (
1088
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_230) ||
1089
- namesToPlugins[pluginName$jscomp$inline_230] !==
1090
- pluginModule$jscomp$inline_231
1088
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_238) ||
1089
+ namesToPlugins[pluginName$jscomp$inline_238] !==
1090
+ pluginModule$jscomp$inline_239
1091
1091
  ) {
1092
- if (namesToPlugins[pluginName$jscomp$inline_230])
1092
+ if (namesToPlugins[pluginName$jscomp$inline_238])
1093
1093
  throw Error(
1094
1094
  "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
1095
- (pluginName$jscomp$inline_230 + "`.")
1095
+ (pluginName$jscomp$inline_238 + "`.")
1096
1096
  );
1097
1097
  namesToPlugins[
1098
- pluginName$jscomp$inline_230
1099
- ] = pluginModule$jscomp$inline_231;
1100
- isOrderingDirty$jscomp$inline_229 = !0;
1098
+ pluginName$jscomp$inline_238
1099
+ ] = pluginModule$jscomp$inline_239;
1100
+ isOrderingDirty$jscomp$inline_237 = !0;
1101
1101
  }
1102
1102
  }
1103
- isOrderingDirty$jscomp$inline_229 && recomputePluginOrdering();
1103
+ isOrderingDirty$jscomp$inline_237 && recomputePluginOrdering();
1104
1104
  var instanceCache = new Map(),
1105
1105
  instanceProps = new Map();
1106
1106
  function getInstanceFromTag(tag) {
@@ -1952,6 +1952,12 @@ function getLanesToRetrySynchronouslyOnError(root) {
1952
1952
  root = root.pendingLanes & -1073741825;
1953
1953
  return 0 !== root ? root : root & 1073741824 ? 1073741824 : 0;
1954
1954
  }
1955
+ function claimNextTransitionLane() {
1956
+ var lane = nextTransitionLane;
1957
+ nextTransitionLane <<= 1;
1958
+ 0 === (nextTransitionLane & 4194240) && (nextTransitionLane = 64);
1959
+ return lane;
1960
+ }
1955
1961
  function createLaneMap(initial) {
1956
1962
  for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
1957
1963
  return laneMap;
@@ -2211,7 +2217,28 @@ function flushSyncCallbacks() {
2211
2217
  }
2212
2218
  return null;
2213
2219
  }
2214
- var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
2220
+ var forkStack = [],
2221
+ forkStackIndex = 0,
2222
+ treeForkProvider = null,
2223
+ idStack = [],
2224
+ idStackIndex = 0,
2225
+ treeContextProvider = null;
2226
+ function popTreeContext(workInProgress) {
2227
+ for (; workInProgress === treeForkProvider; )
2228
+ (treeForkProvider = forkStack[--forkStackIndex]),
2229
+ (forkStack[forkStackIndex] = null),
2230
+ --forkStackIndex,
2231
+ (forkStack[forkStackIndex] = null);
2232
+ for (; workInProgress === treeContextProvider; )
2233
+ (treeContextProvider = idStack[--idStackIndex]),
2234
+ (idStack[idStackIndex] = null),
2235
+ --idStackIndex,
2236
+ (idStack[idStackIndex] = null),
2237
+ --idStackIndex,
2238
+ (idStack[idStackIndex] = null);
2239
+ }
2240
+ var hydrationErrors = null,
2241
+ ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
2215
2242
  function shallowEqual(objA, objB) {
2216
2243
  if (objectIs(objA, objB)) return !0;
2217
2244
  if (
@@ -2368,9 +2395,7 @@ function enqueueUpdate(fiber, update) {
2368
2395
  var updateQueue = fiber.updateQueue;
2369
2396
  null !== updateQueue &&
2370
2397
  ((updateQueue = updateQueue.shared),
2371
- null !== workInProgressRoot &&
2372
- 0 !== (fiber.mode & 1) &&
2373
- 0 === (executionContext & 2)
2398
+ isInterleavedUpdate(fiber)
2374
2399
  ? ((fiber = updateQueue.interleaved),
2375
2400
  null === fiber
2376
2401
  ? ((update.next = update),
@@ -2738,26 +2763,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
2738
2763
  "function" === typeof instance.componentDidMount &&
2739
2764
  (workInProgress.flags |= 4);
2740
2765
  }
2741
- var forkStack = [],
2742
- forkStackIndex = 0,
2743
- treeForkProvider = null,
2744
- idStack = [],
2745
- idStackIndex = 0,
2746
- treeContextProvider = null;
2747
- function popTreeContext(workInProgress) {
2748
- for (; workInProgress === treeForkProvider; )
2749
- (treeForkProvider = forkStack[--forkStackIndex]),
2750
- (forkStack[forkStackIndex] = null),
2751
- --forkStackIndex,
2752
- (forkStack[forkStackIndex] = null);
2753
- for (; workInProgress === treeContextProvider; )
2754
- (treeContextProvider = idStack[--idStackIndex]),
2755
- (idStack[idStackIndex] = null),
2756
- --idStackIndex,
2757
- (idStack[idStackIndex] = null),
2758
- --idStackIndex,
2759
- (idStack[idStackIndex] = null);
2760
- }
2761
2766
  function coerceRef(returnFiber, current, element) {
2762
2767
  returnFiber = element.ref;
2763
2768
  if (
@@ -2820,6 +2825,10 @@ function throwOnInvalidObjectType(returnFiber, newChild) {
2820
2825
  "). If you meant to render a collection of children, use an array instead."
2821
2826
  );
2822
2827
  }
2828
+ function resolveLazy(lazyType) {
2829
+ var init = lazyType._init;
2830
+ return init(lazyType._payload);
2831
+ }
2823
2832
  function ChildReconciler(shouldTrackSideEffects) {
2824
2833
  function deleteChild(returnFiber, childToDelete) {
2825
2834
  if (shouldTrackSideEffects) {
@@ -2892,7 +2901,14 @@ function ChildReconciler(shouldTrackSideEffects) {
2892
2901
  lanes,
2893
2902
  element.key
2894
2903
  );
2895
- if (null !== current && current.elementType === elementType)
2904
+ if (
2905
+ null !== current &&
2906
+ (current.elementType === elementType ||
2907
+ ("object" === typeof elementType &&
2908
+ null !== elementType &&
2909
+ elementType.$$typeof === REACT_LAZY_TYPE &&
2910
+ resolveLazy(elementType) === current.type))
2911
+ )
2896
2912
  return (
2897
2913
  (lanes = useFiber(current, element.props)),
2898
2914
  (lanes.ref = coerceRef(returnFiber, current, element)),
@@ -2983,6 +2999,9 @@ function ChildReconciler(shouldTrackSideEffects) {
2983
2999
  (newChild.return = returnFiber),
2984
3000
  newChild
2985
3001
  );
3002
+ case REACT_LAZY_TYPE:
3003
+ var init = newChild._init;
3004
+ return createChild(returnFiber, init(newChild._payload), lanes);
2986
3005
  }
2987
3006
  if (isArrayImpl(newChild) || getIteratorFn(newChild))
2988
3007
  return (
@@ -3018,6 +3037,11 @@ function ChildReconciler(shouldTrackSideEffects) {
3018
3037
  return newChild.key === key
3019
3038
  ? updatePortal(returnFiber, oldFiber, newChild, lanes)
3020
3039
  : null;
3040
+ case REACT_LAZY_TYPE:
3041
+ return (
3042
+ (key = newChild._init),
3043
+ updateSlot(returnFiber, oldFiber, key(newChild._payload), lanes)
3044
+ );
3021
3045
  }
3022
3046
  if (isArrayImpl(newChild) || getIteratorFn(newChild))
3023
3047
  return null !== key
@@ -3060,6 +3084,15 @@ function ChildReconciler(shouldTrackSideEffects) {
3060
3084
  ) || null),
3061
3085
  updatePortal(returnFiber, existingChildren, newChild, lanes)
3062
3086
  );
3087
+ case REACT_LAZY_TYPE:
3088
+ var init = newChild._init;
3089
+ return updateFromMap(
3090
+ existingChildren,
3091
+ returnFiber,
3092
+ newIdx,
3093
+ init(newChild._payload),
3094
+ lanes
3095
+ );
3063
3096
  }
3064
3097
  if (isArrayImpl(newChild) || getIteratorFn(newChild))
3065
3098
  return (
@@ -3237,7 +3270,12 @@ function ChildReconciler(shouldTrackSideEffects) {
3237
3270
  });
3238
3271
  return iteratorFn;
3239
3272
  }
3240
- return function(returnFiber, currentFirstChild, newChild, lanes) {
3273
+ function reconcileChildFibers(
3274
+ returnFiber,
3275
+ currentFirstChild,
3276
+ newChild,
3277
+ lanes
3278
+ ) {
3241
3279
  "object" === typeof newChild &&
3242
3280
  null !== newChild &&
3243
3281
  newChild.type === REACT_FRAGMENT_TYPE &&
@@ -3265,7 +3303,13 @@ function ChildReconciler(shouldTrackSideEffects) {
3265
3303
  returnFiber = currentFirstChild;
3266
3304
  break a;
3267
3305
  }
3268
- } else if (child.elementType === key) {
3306
+ } else if (
3307
+ child.elementType === key ||
3308
+ ("object" === typeof key &&
3309
+ null !== key &&
3310
+ key.$$typeof === REACT_LAZY_TYPE &&
3311
+ resolveLazy(key) === child.type)
3312
+ ) {
3269
3313
  deleteRemainingChildren(returnFiber, child.sibling);
3270
3314
  currentFirstChild = useFiber(child, newChild.props);
3271
3315
  currentFirstChild.ref = coerceRef(
@@ -3346,6 +3390,16 @@ function ChildReconciler(shouldTrackSideEffects) {
3346
3390
  returnFiber = currentFirstChild;
3347
3391
  }
3348
3392
  return placeSingleChild(returnFiber);
3393
+ case REACT_LAZY_TYPE:
3394
+ return (
3395
+ (child = newChild._init),
3396
+ reconcileChildFibers(
3397
+ returnFiber,
3398
+ currentFirstChild,
3399
+ child(newChild._payload),
3400
+ lanes
3401
+ )
3402
+ );
3349
3403
  }
3350
3404
  if (isArrayImpl(newChild))
3351
3405
  return reconcileChildrenArray(
@@ -3381,7 +3435,8 @@ function ChildReconciler(shouldTrackSideEffects) {
3381
3435
  (returnFiber = currentFirstChild)),
3382
3436
  placeSingleChild(returnFiber))
3383
3437
  : deleteRemainingChildren(returnFiber, currentFirstChild);
3384
- };
3438
+ }
3439
+ return reconcileChildFibers;
3385
3440
  }
3386
3441
  var reconcileChildFibers = ChildReconciler(!0),
3387
3442
  mountChildFibers = ChildReconciler(!1),
@@ -3868,6 +3923,19 @@ function updateMemo(nextCreate, deps) {
3868
3923
  hook.memoizedState = [nextCreate, deps];
3869
3924
  return nextCreate;
3870
3925
  }
3926
+ function updateDeferredValueImpl(hook, prevValue, value) {
3927
+ if (0 === (renderLanes & 21))
3928
+ return (
3929
+ hook.baseState && ((hook.baseState = !1), (didReceiveUpdate = !0)),
3930
+ (hook.memoizedState = value)
3931
+ );
3932
+ objectIs(value, prevValue) ||
3933
+ ((value = claimNextTransitionLane()),
3934
+ (currentlyRenderingFiber$1.lanes |= value),
3935
+ (workInProgressRootSkippedLanes |= value),
3936
+ (hook.baseState = !0));
3937
+ return prevValue;
3938
+ }
3871
3939
  function startTransition(setPending, callback) {
3872
3940
  var previousPriority = currentUpdatePriority;
3873
3941
  currentUpdatePriority =
@@ -3949,9 +4017,7 @@ function enqueueRenderPhaseUpdate(queue, update) {
3949
4017
  queue.pending = update;
3950
4018
  }
3951
4019
  function enqueueUpdate$1(fiber, queue, update) {
3952
- null !== workInProgressRoot &&
3953
- 0 !== (fiber.mode & 1) &&
3954
- 0 === (executionContext & 2)
4020
+ isInterleavedUpdate(fiber)
3955
4021
  ? ((fiber = queue.interleaved),
3956
4022
  null === fiber
3957
4023
  ? ((update.next = update),
@@ -4056,29 +4122,14 @@ var ContextOnlyDispatcher = {
4056
4122
  useState: mountState,
4057
4123
  useDebugValue: mountDebugValue,
4058
4124
  useDeferredValue: function(value) {
4059
- var _mountState = mountState(value),
4060
- prevValue = _mountState[0],
4061
- setValue = _mountState[1];
4062
- mountEffect(
4063
- function() {
4064
- var prevTransition = ReactCurrentBatchConfig$1.transition;
4065
- ReactCurrentBatchConfig$1.transition = {};
4066
- try {
4067
- setValue(value);
4068
- } finally {
4069
- ReactCurrentBatchConfig$1.transition = prevTransition;
4070
- }
4071
- },
4072
- [value]
4073
- );
4074
- return prevValue;
4125
+ return (mountWorkInProgressHook().memoizedState = value);
4075
4126
  },
4076
4127
  useTransition: function() {
4077
- var _mountState2 = mountState(!1),
4078
- isPending = _mountState2[0];
4079
- _mountState2 = startTransition.bind(null, _mountState2[1]);
4080
- mountWorkInProgressHook().memoizedState = _mountState2;
4081
- return [isPending, _mountState2];
4128
+ var _mountState = mountState(!1),
4129
+ isPending = _mountState[0];
4130
+ _mountState = startTransition.bind(null, _mountState[1]);
4131
+ mountWorkInProgressHook().memoizedState = _mountState;
4132
+ return [isPending, _mountState];
4082
4133
  },
4083
4134
  useMutableSource: function() {},
4084
4135
  useSyncExternalStore: function(subscribe, getSnapshot) {
@@ -4132,22 +4183,8 @@ var ContextOnlyDispatcher = {
4132
4183
  },
4133
4184
  useDebugValue: mountDebugValue,
4134
4185
  useDeferredValue: function(value) {
4135
- var _updateState = updateReducer(basicStateReducer),
4136
- prevValue = _updateState[0],
4137
- setValue = _updateState[1];
4138
- updateEffect(
4139
- function() {
4140
- var prevTransition = ReactCurrentBatchConfig$1.transition;
4141
- ReactCurrentBatchConfig$1.transition = {};
4142
- try {
4143
- setValue(value);
4144
- } finally {
4145
- ReactCurrentBatchConfig$1.transition = prevTransition;
4146
- }
4147
- },
4148
- [value]
4149
- );
4150
- return prevValue;
4186
+ var hook = updateWorkInProgressHook();
4187
+ return updateDeferredValueImpl(hook, currentHook.memoizedState, value);
4151
4188
  },
4152
4189
  useTransition: function() {
4153
4190
  var isPending = updateReducer(basicStateReducer)[0],
@@ -4175,22 +4212,10 @@ var ContextOnlyDispatcher = {
4175
4212
  },
4176
4213
  useDebugValue: mountDebugValue,
4177
4214
  useDeferredValue: function(value) {
4178
- var _rerenderState = rerenderReducer(basicStateReducer),
4179
- prevValue = _rerenderState[0],
4180
- setValue = _rerenderState[1];
4181
- updateEffect(
4182
- function() {
4183
- var prevTransition = ReactCurrentBatchConfig$1.transition;
4184
- ReactCurrentBatchConfig$1.transition = {};
4185
- try {
4186
- setValue(value);
4187
- } finally {
4188
- ReactCurrentBatchConfig$1.transition = prevTransition;
4189
- }
4190
- },
4191
- [value]
4192
- );
4193
- return prevValue;
4215
+ var hook = updateWorkInProgressHook();
4216
+ return null === currentHook
4217
+ ? (hook.memoizedState = value)
4218
+ : updateDeferredValueImpl(hook, currentHook.memoizedState, value);
4194
4219
  },
4195
4220
  useTransition: function() {
4196
4221
  var isPending = rerenderReducer(basicStateReducer)[0],
@@ -4346,503 +4371,72 @@ function attachPingListener(root, wakeable, lanes) {
4346
4371
  isDevToolsPresent && restorePendingUpdaters(root, lanes),
4347
4372
  wakeable.then(pingCache, pingCache));
4348
4373
  }
4349
- var appendAllChildren, updateHostContainer, updateHostComponent, updateHostText;
4350
- appendAllChildren = function(parent, workInProgress) {
4351
- for (var node = workInProgress.child; null !== node; ) {
4352
- if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
4353
- else if (4 !== node.tag && null !== node.child) {
4354
- node.child.return = node;
4355
- node = node.child;
4356
- continue;
4357
- }
4358
- if (node === workInProgress) break;
4359
- for (; null === node.sibling; ) {
4360
- if (null === node.return || node.return === workInProgress) return;
4361
- node = node.return;
4362
- }
4363
- node.sibling.return = node.return;
4364
- node = node.sibling;
4365
- }
4366
- };
4367
- updateHostContainer = function() {};
4368
- updateHostComponent = function(current, workInProgress, type, newProps) {
4369
- current.memoizedProps !== newProps &&
4370
- (requiredContext(contextStackCursor$1.current),
4371
- (workInProgress.updateQueue = UPDATE_SIGNAL)) &&
4372
- (workInProgress.flags |= 4);
4373
- };
4374
- updateHostText = function(current, workInProgress, oldText, newText) {
4375
- oldText !== newText && (workInProgress.flags |= 4);
4376
- };
4377
- function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
4378
- switch (renderState.tailMode) {
4379
- case "hidden":
4380
- hasRenderedATailFallback = renderState.tail;
4381
- for (var lastTailNode = null; null !== hasRenderedATailFallback; )
4382
- null !== hasRenderedATailFallback.alternate &&
4383
- (lastTailNode = hasRenderedATailFallback),
4384
- (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
4385
- null === lastTailNode
4386
- ? (renderState.tail = null)
4387
- : (lastTailNode.sibling = null);
4388
- break;
4389
- case "collapsed":
4390
- lastTailNode = renderState.tail;
4391
- for (var lastTailNode$37 = null; null !== lastTailNode; )
4392
- null !== lastTailNode.alternate && (lastTailNode$37 = lastTailNode),
4393
- (lastTailNode = lastTailNode.sibling);
4394
- null === lastTailNode$37
4395
- ? hasRenderedATailFallback || null === renderState.tail
4396
- ? (renderState.tail = null)
4397
- : (renderState.tail.sibling = null)
4398
- : (lastTailNode$37.sibling = null);
4399
- }
4374
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
4375
+ didReceiveUpdate = !1;
4376
+ function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
4377
+ workInProgress.child =
4378
+ null === current
4379
+ ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
4380
+ : reconcileChildFibers(
4381
+ workInProgress,
4382
+ current.child,
4383
+ nextChildren,
4384
+ renderLanes
4385
+ );
4400
4386
  }
4401
- function bubbleProperties(completedWork) {
4402
- var didBailout =
4403
- null !== completedWork.alternate &&
4404
- completedWork.alternate.child === completedWork.child,
4405
- newChildLanes = 0,
4406
- subtreeFlags = 0;
4407
- if (didBailout)
4408
- if (0 !== (completedWork.mode & 2)) {
4409
- for (
4410
- var treeBaseDuration$39 = completedWork.selfBaseDuration,
4411
- child$40 = completedWork.child;
4412
- null !== child$40;
4413
-
4414
- )
4415
- (newChildLanes |= child$40.lanes | child$40.childLanes),
4416
- (subtreeFlags |= child$40.subtreeFlags & 14680064),
4417
- (subtreeFlags |= child$40.flags & 14680064),
4418
- (treeBaseDuration$39 += child$40.treeBaseDuration),
4419
- (child$40 = child$40.sibling);
4420
- completedWork.treeBaseDuration = treeBaseDuration$39;
4421
- } else
4422
- for (
4423
- treeBaseDuration$39 = completedWork.child;
4424
- null !== treeBaseDuration$39;
4425
-
4426
- )
4427
- (newChildLanes |=
4428
- treeBaseDuration$39.lanes | treeBaseDuration$39.childLanes),
4429
- (subtreeFlags |= treeBaseDuration$39.subtreeFlags & 14680064),
4430
- (subtreeFlags |= treeBaseDuration$39.flags & 14680064),
4431
- (treeBaseDuration$39.return = completedWork),
4432
- (treeBaseDuration$39 = treeBaseDuration$39.sibling);
4433
- else if (0 !== (completedWork.mode & 2)) {
4434
- treeBaseDuration$39 = completedWork.actualDuration;
4435
- child$40 = completedWork.selfBaseDuration;
4436
- for (var child = completedWork.child; null !== child; )
4437
- (newChildLanes |= child.lanes | child.childLanes),
4438
- (subtreeFlags |= child.subtreeFlags),
4439
- (subtreeFlags |= child.flags),
4440
- (treeBaseDuration$39 += child.actualDuration),
4441
- (child$40 += child.treeBaseDuration),
4442
- (child = child.sibling);
4443
- completedWork.actualDuration = treeBaseDuration$39;
4444
- completedWork.treeBaseDuration = child$40;
4445
- } else
4446
- for (
4447
- treeBaseDuration$39 = completedWork.child;
4448
- null !== treeBaseDuration$39;
4449
-
4450
- )
4451
- (newChildLanes |=
4452
- treeBaseDuration$39.lanes | treeBaseDuration$39.childLanes),
4453
- (subtreeFlags |= treeBaseDuration$39.subtreeFlags),
4454
- (subtreeFlags |= treeBaseDuration$39.flags),
4455
- (treeBaseDuration$39.return = completedWork),
4456
- (treeBaseDuration$39 = treeBaseDuration$39.sibling);
4457
- completedWork.subtreeFlags |= subtreeFlags;
4458
- completedWork.childLanes = newChildLanes;
4459
- return didBailout;
4387
+ function updateForwardRef(
4388
+ current,
4389
+ workInProgress,
4390
+ Component,
4391
+ nextProps,
4392
+ renderLanes
4393
+ ) {
4394
+ Component = Component.render;
4395
+ var ref = workInProgress.ref;
4396
+ prepareToReadContext(workInProgress, renderLanes);
4397
+ nextProps = renderWithHooks(
4398
+ current,
4399
+ workInProgress,
4400
+ Component,
4401
+ nextProps,
4402
+ ref,
4403
+ renderLanes
4404
+ );
4405
+ if (null !== current && !didReceiveUpdate)
4406
+ return (
4407
+ (workInProgress.updateQueue = current.updateQueue),
4408
+ (workInProgress.flags &= -2053),
4409
+ (current.lanes &= ~renderLanes),
4410
+ bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
4411
+ );
4412
+ workInProgress.flags |= 1;
4413
+ reconcileChildren(current, workInProgress, nextProps, renderLanes);
4414
+ return workInProgress.child;
4460
4415
  }
4461
- function completeWork(current, workInProgress, renderLanes) {
4462
- var newProps = workInProgress.pendingProps;
4463
- popTreeContext(workInProgress);
4464
- switch (workInProgress.tag) {
4465
- case 2:
4466
- case 16:
4467
- case 15:
4468
- case 0:
4469
- case 11:
4470
- case 7:
4471
- case 8:
4472
- case 12:
4473
- case 9:
4474
- case 14:
4475
- return bubbleProperties(workInProgress), null;
4476
- case 1:
4477
- return (
4478
- isContextProvider(workInProgress.type) && popContext(),
4479
- bubbleProperties(workInProgress),
4480
- null
4481
- );
4482
- case 3:
4416
+ function updateMemoComponent(
4417
+ current,
4418
+ workInProgress,
4419
+ Component,
4420
+ nextProps,
4421
+ renderLanes
4422
+ ) {
4423
+ if (null === current) {
4424
+ var type = Component.type;
4425
+ if (
4426
+ "function" === typeof type &&
4427
+ !shouldConstruct(type) &&
4428
+ void 0 === type.defaultProps &&
4429
+ null === Component.compare &&
4430
+ void 0 === Component.defaultProps
4431
+ )
4483
4432
  return (
4484
- (newProps = workInProgress.stateNode),
4485
- popHostContainer(),
4486
- pop(didPerformWorkStackCursor),
4487
- pop(contextStackCursor),
4488
- resetWorkInProgressVersions(),
4489
- newProps.pendingContext &&
4490
- ((newProps.context = newProps.pendingContext),
4491
- (newProps.pendingContext = null)),
4492
- (null !== current && null !== current.child) ||
4493
- null === current ||
4494
- (current.memoizedState.isDehydrated &&
4495
- 0 === (workInProgress.flags & 256)) ||
4496
- (workInProgress.flags |= 1024),
4497
- updateHostContainer(current, workInProgress),
4498
- bubbleProperties(workInProgress),
4499
- null
4500
- );
4501
- case 5:
4502
- popHostContext(workInProgress);
4503
- renderLanes = requiredContext(rootInstanceStackCursor.current);
4504
- var type = workInProgress.type;
4505
- if (null !== current && null != workInProgress.stateNode)
4506
- updateHostComponent(
4433
+ (workInProgress.tag = 15),
4434
+ (workInProgress.type = type),
4435
+ updateSimpleMemoComponent(
4507
4436
  current,
4508
4437
  workInProgress,
4509
4438
  type,
4510
- newProps,
4511
- renderLanes
4512
- ),
4513
- current.ref !== workInProgress.ref && (workInProgress.flags |= 512);
4514
- else {
4515
- if (!newProps) {
4516
- if (null === workInProgress.stateNode)
4517
- throw Error(
4518
- "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
4519
- );
4520
- bubbleProperties(workInProgress);
4521
- return null;
4522
- }
4523
- requiredContext(contextStackCursor$1.current);
4524
- current = allocateTag();
4525
- type = getViewConfigForType(type);
4526
- var updatePayload = diffProperties(
4527
- null,
4528
- emptyObject,
4529
- newProps,
4530
- type.validAttributes
4531
- );
4532
- ReactNativePrivateInterface.UIManager.createView(
4533
- current,
4534
- type.uiViewClassName,
4535
- renderLanes,
4536
- updatePayload
4537
- );
4538
- renderLanes = new ReactNativeFiberHostComponent(
4539
- current,
4540
- type,
4541
- workInProgress
4542
- );
4543
- instanceCache.set(current, workInProgress);
4544
- instanceProps.set(current, newProps);
4545
- appendAllChildren(renderLanes, workInProgress, !1, !1);
4546
- workInProgress.stateNode = renderLanes;
4547
- finalizeInitialChildren(renderLanes) && (workInProgress.flags |= 4);
4548
- null !== workInProgress.ref && (workInProgress.flags |= 512);
4549
- }
4550
- bubbleProperties(workInProgress);
4551
- return null;
4552
- case 6:
4553
- if (current && null != workInProgress.stateNode)
4554
- updateHostText(
4555
- current,
4556
- workInProgress,
4557
- current.memoizedProps,
4558
- newProps
4559
- );
4560
- else {
4561
- if ("string" !== typeof newProps && null === workInProgress.stateNode)
4562
- throw Error(
4563
- "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
4564
- );
4565
- current = requiredContext(rootInstanceStackCursor.current);
4566
- if (!requiredContext(contextStackCursor$1.current).isInAParentText)
4567
- throw Error(
4568
- "Text strings must be rendered within a <Text> component."
4569
- );
4570
- renderLanes = allocateTag();
4571
- ReactNativePrivateInterface.UIManager.createView(
4572
- renderLanes,
4573
- "RCTRawText",
4574
- current,
4575
- { text: newProps }
4576
- );
4577
- instanceCache.set(renderLanes, workInProgress);
4578
- workInProgress.stateNode = renderLanes;
4579
- }
4580
- bubbleProperties(workInProgress);
4581
- return null;
4582
- case 13:
4583
- pop(suspenseStackCursor);
4584
- newProps = workInProgress.memoizedState;
4585
- if (0 !== (workInProgress.flags & 128))
4586
- return (
4587
- (workInProgress.lanes = renderLanes),
4588
- 0 !== (workInProgress.mode & 2) &&
4589
- transferActualDuration(workInProgress),
4590
- workInProgress
4591
- );
4592
- newProps = null !== newProps;
4593
- renderLanes = !1;
4594
- null !== current && (renderLanes = null !== current.memoizedState);
4595
- newProps &&
4596
- !renderLanes &&
4597
- ((workInProgress.child.flags |= 8192),
4598
- 0 !== (workInProgress.mode & 1) &&
4599
- (null === current || 0 !== (suspenseStackCursor.current & 1)
4600
- ? 0 === workInProgressRootExitStatus &&
4601
- (workInProgressRootExitStatus = 3)
4602
- : renderDidSuspendDelayIfPossible()));
4603
- null !== workInProgress.updateQueue && (workInProgress.flags |= 4);
4604
- bubbleProperties(workInProgress);
4605
- 0 !== (workInProgress.mode & 2) &&
4606
- newProps &&
4607
- ((current = workInProgress.child),
4608
- null !== current &&
4609
- (workInProgress.treeBaseDuration -= current.treeBaseDuration));
4610
- return null;
4611
- case 4:
4612
- return (
4613
- popHostContainer(),
4614
- updateHostContainer(current, workInProgress),
4615
- bubbleProperties(workInProgress),
4616
- null
4617
- );
4618
- case 10:
4619
- return (
4620
- popProvider(workInProgress.type._context),
4621
- bubbleProperties(workInProgress),
4622
- null
4623
- );
4624
- case 17:
4625
- return (
4626
- isContextProvider(workInProgress.type) && popContext(),
4627
- bubbleProperties(workInProgress),
4628
- null
4629
- );
4630
- case 19:
4631
- pop(suspenseStackCursor);
4632
- type = workInProgress.memoizedState;
4633
- if (null === type) return bubbleProperties(workInProgress), null;
4634
- newProps = 0 !== (workInProgress.flags & 128);
4635
- updatePayload = type.rendering;
4636
- if (null === updatePayload)
4637
- if (newProps) cutOffTailIfNeeded(type, !1);
4638
- else {
4639
- if (
4640
- 0 !== workInProgressRootExitStatus ||
4641
- (null !== current && 0 !== (current.flags & 128))
4642
- )
4643
- for (current = workInProgress.child; null !== current; ) {
4644
- updatePayload = findFirstSuspended(current);
4645
- if (null !== updatePayload) {
4646
- workInProgress.flags |= 128;
4647
- cutOffTailIfNeeded(type, !1);
4648
- current = updatePayload.updateQueue;
4649
- null !== current &&
4650
- ((workInProgress.updateQueue = current),
4651
- (workInProgress.flags |= 4));
4652
- workInProgress.subtreeFlags = 0;
4653
- current = renderLanes;
4654
- for (newProps = workInProgress.child; null !== newProps; )
4655
- (renderLanes = newProps),
4656
- (updatePayload = current),
4657
- (renderLanes.flags &= 14680066),
4658
- (type = renderLanes.alternate),
4659
- null === type
4660
- ? ((renderLanes.childLanes = 0),
4661
- (renderLanes.lanes = updatePayload),
4662
- (renderLanes.child = null),
4663
- (renderLanes.subtreeFlags = 0),
4664
- (renderLanes.memoizedProps = null),
4665
- (renderLanes.memoizedState = null),
4666
- (renderLanes.updateQueue = null),
4667
- (renderLanes.dependencies = null),
4668
- (renderLanes.stateNode = null),
4669
- (renderLanes.selfBaseDuration = 0),
4670
- (renderLanes.treeBaseDuration = 0))
4671
- : ((renderLanes.childLanes = type.childLanes),
4672
- (renderLanes.lanes = type.lanes),
4673
- (renderLanes.child = type.child),
4674
- (renderLanes.subtreeFlags = 0),
4675
- (renderLanes.deletions = null),
4676
- (renderLanes.memoizedProps = type.memoizedProps),
4677
- (renderLanes.memoizedState = type.memoizedState),
4678
- (renderLanes.updateQueue = type.updateQueue),
4679
- (renderLanes.type = type.type),
4680
- (updatePayload = type.dependencies),
4681
- (renderLanes.dependencies =
4682
- null === updatePayload
4683
- ? null
4684
- : {
4685
- lanes: updatePayload.lanes,
4686
- firstContext: updatePayload.firstContext
4687
- }),
4688
- (renderLanes.selfBaseDuration = type.selfBaseDuration),
4689
- (renderLanes.treeBaseDuration = type.treeBaseDuration)),
4690
- (newProps = newProps.sibling);
4691
- push(
4692
- suspenseStackCursor,
4693
- (suspenseStackCursor.current & 1) | 2
4694
- );
4695
- return workInProgress.child;
4696
- }
4697
- current = current.sibling;
4698
- }
4699
- null !== type.tail &&
4700
- now() > workInProgressRootRenderTargetTime &&
4701
- ((workInProgress.flags |= 128),
4702
- (newProps = !0),
4703
- cutOffTailIfNeeded(type, !1),
4704
- (workInProgress.lanes = 4194304));
4705
- }
4706
- else {
4707
- if (!newProps)
4708
- if (
4709
- ((current = findFirstSuspended(updatePayload)), null !== current)
4710
- ) {
4711
- if (
4712
- ((workInProgress.flags |= 128),
4713
- (newProps = !0),
4714
- (current = current.updateQueue),
4715
- null !== current &&
4716
- ((workInProgress.updateQueue = current),
4717
- (workInProgress.flags |= 4)),
4718
- cutOffTailIfNeeded(type, !0),
4719
- null === type.tail &&
4720
- "hidden" === type.tailMode &&
4721
- !updatePayload.alternate)
4722
- )
4723
- return bubbleProperties(workInProgress), null;
4724
- } else
4725
- 2 * now() - type.renderingStartTime >
4726
- workInProgressRootRenderTargetTime &&
4727
- 1073741824 !== renderLanes &&
4728
- ((workInProgress.flags |= 128),
4729
- (newProps = !0),
4730
- cutOffTailIfNeeded(type, !1),
4731
- (workInProgress.lanes = 4194304));
4732
- type.isBackwards
4733
- ? ((updatePayload.sibling = workInProgress.child),
4734
- (workInProgress.child = updatePayload))
4735
- : ((current = type.last),
4736
- null !== current
4737
- ? (current.sibling = updatePayload)
4738
- : (workInProgress.child = updatePayload),
4739
- (type.last = updatePayload));
4740
- }
4741
- if (null !== type.tail)
4742
- return (
4743
- (workInProgress = type.tail),
4744
- (type.rendering = workInProgress),
4745
- (type.tail = workInProgress.sibling),
4746
- (type.renderingStartTime = now()),
4747
- (workInProgress.sibling = null),
4748
- (current = suspenseStackCursor.current),
4749
- push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),
4750
- workInProgress
4751
- );
4752
- bubbleProperties(workInProgress);
4753
- return null;
4754
- case 22:
4755
- case 23:
4756
- return (
4757
- popRenderLanes(),
4758
- (newProps = null !== workInProgress.memoizedState),
4759
- null !== current &&
4760
- (null !== current.memoizedState) !== newProps &&
4761
- (workInProgress.flags |= 8192),
4762
- newProps && 0 !== (workInProgress.mode & 1)
4763
- ? 0 !== (subtreeRenderLanes & 1073741824) &&
4764
- (bubbleProperties(workInProgress),
4765
- workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))
4766
- : bubbleProperties(workInProgress),
4767
- null
4768
- );
4769
- case 24:
4770
- return null;
4771
- case 25:
4772
- return null;
4773
- }
4774
- throw Error(
4775
- "Unknown unit of work tag (" +
4776
- workInProgress.tag +
4777
- "). This error is likely caused by a bug in React. Please file an issue."
4778
- );
4779
- }
4780
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
4781
- didReceiveUpdate = !1;
4782
- function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
4783
- workInProgress.child =
4784
- null === current
4785
- ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
4786
- : reconcileChildFibers(
4787
- workInProgress,
4788
- current.child,
4789
- nextChildren,
4790
- renderLanes
4791
- );
4792
- }
4793
- function updateForwardRef(
4794
- current,
4795
- workInProgress,
4796
- Component,
4797
- nextProps,
4798
- renderLanes
4799
- ) {
4800
- Component = Component.render;
4801
- var ref = workInProgress.ref;
4802
- prepareToReadContext(workInProgress, renderLanes);
4803
- nextProps = renderWithHooks(
4804
- current,
4805
- workInProgress,
4806
- Component,
4807
- nextProps,
4808
- ref,
4809
- renderLanes
4810
- );
4811
- if (null !== current && !didReceiveUpdate)
4812
- return (
4813
- (workInProgress.updateQueue = current.updateQueue),
4814
- (workInProgress.flags &= -2053),
4815
- (current.lanes &= ~renderLanes),
4816
- bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
4817
- );
4818
- workInProgress.flags |= 1;
4819
- reconcileChildren(current, workInProgress, nextProps, renderLanes);
4820
- return workInProgress.child;
4821
- }
4822
- function updateMemoComponent(
4823
- current,
4824
- workInProgress,
4825
- Component,
4826
- nextProps,
4827
- renderLanes
4828
- ) {
4829
- if (null === current) {
4830
- var type = Component.type;
4831
- if (
4832
- "function" === typeof type &&
4833
- !shouldConstruct(type) &&
4834
- void 0 === type.defaultProps &&
4835
- null === Component.compare &&
4836
- void 0 === Component.defaultProps
4837
- )
4838
- return (
4839
- (workInProgress.tag = 15),
4840
- (workInProgress.type = type),
4841
- updateSimpleMemoComponent(
4842
- current,
4843
- workInProgress,
4844
- type,
4845
- nextProps,
4439
+ nextProps,
4846
4440
  renderLanes
4847
4441
  )
4848
4442
  );
@@ -4879,18 +4473,24 @@ function updateSimpleMemoComponent(
4879
4473
  nextProps,
4880
4474
  renderLanes
4881
4475
  ) {
4882
- if (
4883
- null !== current &&
4884
- shallowEqual(current.memoizedProps, nextProps) &&
4885
- current.ref === workInProgress.ref
4886
- )
4887
- if (((didReceiveUpdate = !1), 0 !== (current.lanes & renderLanes)))
4888
- 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
4889
- else
4890
- return (
4891
- (workInProgress.lanes = current.lanes),
4892
- bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
4893
- );
4476
+ if (null !== current) {
4477
+ var prevProps = current.memoizedProps;
4478
+ if (
4479
+ shallowEqual(prevProps, nextProps) &&
4480
+ current.ref === workInProgress.ref
4481
+ )
4482
+ if (
4483
+ ((didReceiveUpdate = !1),
4484
+ (workInProgress.pendingProps = nextProps = prevProps),
4485
+ 0 !== (current.lanes & renderLanes))
4486
+ )
4487
+ 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
4488
+ else
4489
+ return (
4490
+ (workInProgress.lanes = current.lanes),
4491
+ bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
4492
+ );
4493
+ }
4894
4494
  return updateFunctionComponent(
4895
4495
  current,
4896
4496
  workInProgress,
@@ -4905,7 +4505,11 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
4905
4505
  prevState = null !== current ? current.memoizedState : null;
4906
4506
  if ("hidden" === nextProps.mode)
4907
4507
  if (0 === (workInProgress.mode & 1))
4908
- (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
4508
+ (workInProgress.memoizedState = {
4509
+ baseLanes: 0,
4510
+ cachePool: null,
4511
+ transitions: null
4512
+ }),
4909
4513
  push(subtreeRenderLanesCursor, subtreeRenderLanes),
4910
4514
  (subtreeRenderLanes |= renderLanes);
4911
4515
  else {
@@ -4918,14 +4522,19 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
4918
4522
  (workInProgress.lanes = workInProgress.childLanes = 1073741824),
4919
4523
  (workInProgress.memoizedState = {
4920
4524
  baseLanes: current,
4921
- cachePool: null
4525
+ cachePool: null,
4526
+ transitions: null
4922
4527
  }),
4923
4528
  (workInProgress.updateQueue = null),
4924
4529
  push(subtreeRenderLanesCursor, subtreeRenderLanes),
4925
4530
  (subtreeRenderLanes |= current),
4926
4531
  null
4927
4532
  );
4928
- workInProgress.memoizedState = { baseLanes: 0, cachePool: null };
4533
+ workInProgress.memoizedState = {
4534
+ baseLanes: 0,
4535
+ cachePool: null,
4536
+ transitions: null
4537
+ };
4929
4538
  nextProps = null !== prevState ? prevState.baseLanes : renderLanes;
4930
4539
  push(subtreeRenderLanesCursor, subtreeRenderLanes);
4931
4540
  subtreeRenderLanes |= nextProps;
@@ -4940,7 +4549,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
4940
4549
  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
4941
4550
  return workInProgress.child;
4942
4551
  }
4943
- function markRef$1(current, workInProgress) {
4552
+ function markRef(current, workInProgress) {
4944
4553
  var ref = workInProgress.ref;
4945
4554
  if (
4946
4555
  (null === current && null !== ref) ||
@@ -4992,10 +4601,7 @@ function updateClassComponent(
4992
4601
  } else hasContext = !1;
4993
4602
  prepareToReadContext(workInProgress, renderLanes);
4994
4603
  if (null === workInProgress.stateNode)
4995
- null !== current &&
4996
- ((current.alternate = null),
4997
- (workInProgress.alternate = null),
4998
- (workInProgress.flags |= 2)),
4604
+ resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
4999
4605
  constructClassInstance(workInProgress, Component, nextProps),
5000
4606
  mountClassInstance(workInProgress, Component, nextProps, renderLanes),
5001
4607
  (nextProps = !0);
@@ -5189,7 +4795,7 @@ function finishClassComponent(
5189
4795
  hasContext,
5190
4796
  renderLanes
5191
4797
  ) {
5192
- markRef$1(current, workInProgress);
4798
+ markRef(current, workInProgress);
5193
4799
  var didCaptureError = 0 !== (workInProgress.flags & 128);
5194
4800
  if (!shouldUpdate && !didCaptureError)
5195
4801
  return (
@@ -5239,14 +4845,15 @@ function pushHostRootContext(workInProgress) {
5239
4845
  }
5240
4846
  var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 };
5241
4847
  function mountSuspenseOffscreenState(renderLanes) {
5242
- return { baseLanes: renderLanes, cachePool: null };
4848
+ return { baseLanes: renderLanes, cachePool: null, transitions: null };
5243
4849
  }
5244
4850
  function updateSuspenseComponent(current, workInProgress, renderLanes) {
5245
4851
  var nextProps = workInProgress.pendingProps,
5246
4852
  suspenseContext = suspenseStackCursor.current,
5247
4853
  showFallback = !1,
4854
+ didSuspend = 0 !== (workInProgress.flags & 128),
5248
4855
  JSCompiler_temp;
5249
- (JSCompiler_temp = 0 !== (workInProgress.flags & 128)) ||
4856
+ (JSCompiler_temp = didSuspend) ||
5250
4857
  (JSCompiler_temp =
5251
4858
  null !== current && null === current.memoizedState
5252
4859
  ? !1
@@ -5256,177 +4863,307 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
5256
4863
  suspenseContext |= 1;
5257
4864
  push(suspenseStackCursor, suspenseContext & 1);
5258
4865
  if (null === current) {
5259
- suspenseContext = nextProps.children;
5260
- current = nextProps.fallback;
5261
- if (showFallback)
4866
+ current = workInProgress.memoizedState;
4867
+ if (null !== current && null !== current.dehydrated)
5262
4868
  return (
5263
- (showFallback = workInProgress.mode),
5264
- (nextProps = workInProgress.child),
5265
- (suspenseContext = { mode: "hidden", children: suspenseContext }),
5266
- 0 === (showFallback & 1) && null !== nextProps
5267
- ? ((nextProps.childLanes = 0),
5268
- (nextProps.pendingProps = suspenseContext),
4869
+ 0 === (workInProgress.mode & 1)
4870
+ ? (workInProgress.lanes = 1)
4871
+ : shim()
4872
+ ? (workInProgress.lanes = 8)
4873
+ : (workInProgress.lanes = 1073741824),
4874
+ null
4875
+ );
4876
+ didSuspend = nextProps.children;
4877
+ current = nextProps.fallback;
4878
+ return showFallback
4879
+ ? ((nextProps = workInProgress.mode),
4880
+ (showFallback = workInProgress.child),
4881
+ (didSuspend = { mode: "hidden", children: didSuspend }),
4882
+ 0 === (nextProps & 1) && null !== showFallback
4883
+ ? ((showFallback.childLanes = 0),
4884
+ (showFallback.pendingProps = didSuspend),
5269
4885
  workInProgress.mode & 2 &&
5270
- ((nextProps.actualDuration = 0),
5271
- (nextProps.actualStartTime = -1),
5272
- (nextProps.selfBaseDuration = 0),
5273
- (nextProps.treeBaseDuration = 0)))
5274
- : (nextProps = createFiberFromOffscreen(
5275
- suspenseContext,
5276
- showFallback,
4886
+ ((showFallback.actualDuration = 0),
4887
+ (showFallback.actualStartTime = -1),
4888
+ (showFallback.selfBaseDuration = 0),
4889
+ (showFallback.treeBaseDuration = 0)))
4890
+ : (showFallback = createFiberFromOffscreen(
4891
+ didSuspend,
4892
+ nextProps,
5277
4893
  0,
5278
4894
  null
5279
4895
  )),
5280
4896
  (current = createFiberFromFragment(
5281
4897
  current,
5282
- showFallback,
4898
+ nextProps,
5283
4899
  renderLanes,
5284
4900
  null
5285
4901
  )),
5286
- (nextProps.return = workInProgress),
4902
+ (showFallback.return = workInProgress),
5287
4903
  (current.return = workInProgress),
5288
- (nextProps.sibling = current),
5289
- (workInProgress.child = nextProps),
4904
+ (showFallback.sibling = current),
4905
+ (workInProgress.child = showFallback),
5290
4906
  (workInProgress.child.memoizedState = mountSuspenseOffscreenState(
5291
4907
  renderLanes
5292
4908
  )),
5293
4909
  (workInProgress.memoizedState = SUSPENDED_MARKER),
5294
- current
5295
- );
5296
- renderLanes = createFiberFromOffscreen(
5297
- { mode: "visible", children: suspenseContext },
5298
- workInProgress.mode,
5299
- 0,
5300
- null
5301
- );
5302
- renderLanes.return = workInProgress;
5303
- return (workInProgress.child = renderLanes);
4910
+ current)
4911
+ : mountSuspensePrimaryChildren(workInProgress, didSuspend);
5304
4912
  }
5305
- if (null !== current.memoizedState) {
5306
- if (showFallback)
5307
- return (
5308
- (showFallback = updateSuspenseFallbackChildren(
5309
- current,
5310
- workInProgress,
5311
- nextProps.children,
5312
- nextProps.fallback,
5313
- renderLanes
5314
- )),
5315
- (nextProps = workInProgress.child),
5316
- (suspenseContext = current.child.memoizedState),
5317
- (nextProps.memoizedState =
5318
- null === suspenseContext
5319
- ? mountSuspenseOffscreenState(renderLanes)
5320
- : {
5321
- baseLanes: suspenseContext.baseLanes | renderLanes,
5322
- cachePool: null
5323
- }),
5324
- (nextProps.childLanes = current.childLanes & ~renderLanes),
5325
- (workInProgress.memoizedState = SUSPENDED_MARKER),
5326
- showFallback
5327
- );
5328
- renderLanes = updateSuspensePrimaryChildren(
4913
+ suspenseContext = current.memoizedState;
4914
+ if (
4915
+ null !== suspenseContext &&
4916
+ ((JSCompiler_temp = suspenseContext.dehydrated), null !== JSCompiler_temp)
4917
+ )
4918
+ return updateDehydratedSuspenseComponent(
5329
4919
  current,
5330
4920
  workInProgress,
5331
- nextProps.children,
4921
+ didSuspend,
4922
+ nextProps,
4923
+ JSCompiler_temp,
4924
+ suspenseContext,
5332
4925
  renderLanes
5333
4926
  );
5334
- workInProgress.memoizedState = null;
5335
- return renderLanes;
4927
+ if (showFallback) {
4928
+ showFallback = nextProps.fallback;
4929
+ didSuspend = workInProgress.mode;
4930
+ suspenseContext = current.child;
4931
+ JSCompiler_temp = suspenseContext.sibling;
4932
+ var primaryChildProps = { mode: "hidden", children: nextProps.children };
4933
+ 0 === (didSuspend & 1) && workInProgress.child !== suspenseContext
4934
+ ? ((nextProps = workInProgress.child),
4935
+ (nextProps.childLanes = 0),
4936
+ (nextProps.pendingProps = primaryChildProps),
4937
+ workInProgress.mode & 2 &&
4938
+ ((nextProps.actualDuration = 0),
4939
+ (nextProps.actualStartTime = -1),
4940
+ (nextProps.selfBaseDuration = suspenseContext.selfBaseDuration),
4941
+ (nextProps.treeBaseDuration = suspenseContext.treeBaseDuration)),
4942
+ (workInProgress.deletions = null))
4943
+ : ((nextProps = createWorkInProgress(suspenseContext, primaryChildProps)),
4944
+ (nextProps.subtreeFlags = suspenseContext.subtreeFlags & 14680064));
4945
+ null !== JSCompiler_temp
4946
+ ? (showFallback = createWorkInProgress(JSCompiler_temp, showFallback))
4947
+ : ((showFallback = createFiberFromFragment(
4948
+ showFallback,
4949
+ didSuspend,
4950
+ renderLanes,
4951
+ null
4952
+ )),
4953
+ (showFallback.flags |= 2));
4954
+ showFallback.return = workInProgress;
4955
+ nextProps.return = workInProgress;
4956
+ nextProps.sibling = showFallback;
4957
+ workInProgress.child = nextProps;
4958
+ nextProps = showFallback;
4959
+ showFallback = workInProgress.child;
4960
+ didSuspend = current.child.memoizedState;
4961
+ didSuspend =
4962
+ null === didSuspend
4963
+ ? mountSuspenseOffscreenState(renderLanes)
4964
+ : {
4965
+ baseLanes: didSuspend.baseLanes | renderLanes,
4966
+ cachePool: null,
4967
+ transitions: didSuspend.transitions
4968
+ };
4969
+ showFallback.memoizedState = didSuspend;
4970
+ showFallback.childLanes = current.childLanes & ~renderLanes;
4971
+ workInProgress.memoizedState = SUSPENDED_MARKER;
4972
+ return nextProps;
5336
4973
  }
5337
- if (showFallback)
5338
- return (
5339
- (showFallback = updateSuspenseFallbackChildren(
5340
- current,
5341
- workInProgress,
5342
- nextProps.children,
5343
- nextProps.fallback,
5344
- renderLanes
5345
- )),
5346
- (nextProps = workInProgress.child),
5347
- (suspenseContext = current.child.memoizedState),
5348
- (nextProps.memoizedState =
5349
- null === suspenseContext
5350
- ? mountSuspenseOffscreenState(renderLanes)
5351
- : {
5352
- baseLanes: suspenseContext.baseLanes | renderLanes,
5353
- cachePool: null
5354
- }),
5355
- (nextProps.childLanes = current.childLanes & ~renderLanes),
5356
- (workInProgress.memoizedState = SUSPENDED_MARKER),
5357
- showFallback
5358
- );
5359
- renderLanes = updateSuspensePrimaryChildren(
5360
- current,
5361
- workInProgress,
5362
- nextProps.children,
5363
- renderLanes
5364
- );
5365
- workInProgress.memoizedState = null;
5366
- return renderLanes;
5367
- }
5368
- function updateSuspensePrimaryChildren(
5369
- current,
5370
- workInProgress,
5371
- primaryChildren,
5372
- renderLanes
5373
- ) {
5374
- var currentPrimaryChildFragment = current.child;
5375
- current = currentPrimaryChildFragment.sibling;
5376
- primaryChildren = createWorkInProgress(currentPrimaryChildFragment, {
4974
+ showFallback = current.child;
4975
+ current = showFallback.sibling;
4976
+ nextProps = createWorkInProgress(showFallback, {
5377
4977
  mode: "visible",
5378
- children: primaryChildren
4978
+ children: nextProps.children
5379
4979
  });
5380
- 0 === (workInProgress.mode & 1) && (primaryChildren.lanes = renderLanes);
5381
- primaryChildren.return = workInProgress;
5382
- primaryChildren.sibling = null;
4980
+ 0 === (workInProgress.mode & 1) && (nextProps.lanes = renderLanes);
4981
+ nextProps.return = workInProgress;
4982
+ nextProps.sibling = null;
5383
4983
  null !== current &&
5384
4984
  ((renderLanes = workInProgress.deletions),
5385
4985
  null === renderLanes
5386
4986
  ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))
5387
4987
  : renderLanes.push(current));
4988
+ workInProgress.child = nextProps;
4989
+ workInProgress.memoizedState = null;
4990
+ return nextProps;
4991
+ }
4992
+ function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
4993
+ primaryChildren = createFiberFromOffscreen(
4994
+ { mode: "visible", children: primaryChildren },
4995
+ workInProgress.mode,
4996
+ 0,
4997
+ null
4998
+ );
4999
+ primaryChildren.return = workInProgress;
5388
5000
  return (workInProgress.child = primaryChildren);
5389
5001
  }
5390
- function updateSuspenseFallbackChildren(
5002
+ function retrySuspenseComponentWithoutHydrating(
5003
+ current,
5004
+ workInProgress,
5005
+ renderLanes,
5006
+ recoverableError
5007
+ ) {
5008
+ null !== recoverableError &&
5009
+ (null === hydrationErrors
5010
+ ? (hydrationErrors = [recoverableError])
5011
+ : hydrationErrors.push(recoverableError));
5012
+ reconcileChildFibers(workInProgress, current.child, null, renderLanes);
5013
+ current = mountSuspensePrimaryChildren(
5014
+ workInProgress,
5015
+ workInProgress.pendingProps.children
5016
+ );
5017
+ current.flags |= 2;
5018
+ workInProgress.memoizedState = null;
5019
+ return current;
5020
+ }
5021
+ function updateDehydratedSuspenseComponent(
5391
5022
  current,
5392
5023
  workInProgress,
5393
- primaryChildren,
5394
- fallbackChildren,
5024
+ didSuspend,
5025
+ nextProps,
5026
+ suspenseInstance,
5027
+ suspenseState,
5395
5028
  renderLanes
5396
5029
  ) {
5397
- var mode = workInProgress.mode;
5398
- current = current.child;
5399
- var currentFallbackChildFragment = current.sibling,
5400
- primaryChildProps = { mode: "hidden", children: primaryChildren };
5401
- 0 === (mode & 1) && workInProgress.child !== current
5402
- ? ((primaryChildren = workInProgress.child),
5403
- (primaryChildren.childLanes = 0),
5404
- (primaryChildren.pendingProps = primaryChildProps),
5405
- workInProgress.mode & 2 &&
5406
- ((primaryChildren.actualDuration = 0),
5407
- (primaryChildren.actualStartTime = -1),
5408
- (primaryChildren.selfBaseDuration = current.selfBaseDuration),
5409
- (primaryChildren.treeBaseDuration = current.treeBaseDuration)),
5410
- (workInProgress.deletions = null))
5411
- : ((primaryChildren = createWorkInProgress(current, primaryChildProps)),
5412
- (primaryChildren.subtreeFlags = current.subtreeFlags & 14680064));
5413
- null !== currentFallbackChildFragment
5414
- ? (fallbackChildren = createWorkInProgress(
5415
- currentFallbackChildFragment,
5416
- fallbackChildren
5417
- ))
5418
- : ((fallbackChildren = createFiberFromFragment(
5419
- fallbackChildren,
5420
- mode,
5421
- renderLanes,
5030
+ if (didSuspend) {
5031
+ if (workInProgress.flags & 256)
5032
+ return (
5033
+ (workInProgress.flags &= -257),
5034
+ retrySuspenseComponentWithoutHydrating(
5035
+ current,
5036
+ workInProgress,
5037
+ renderLanes,
5038
+ Error(
5039
+ "There was an error while hydrating this Suspense boundary. Switched to client rendering."
5040
+ )
5041
+ )
5042
+ );
5043
+ if (null !== workInProgress.memoizedState)
5044
+ return (
5045
+ (workInProgress.child = current.child),
5046
+ (workInProgress.flags |= 128),
5422
5047
  null
5423
- )),
5424
- (fallbackChildren.flags |= 2));
5425
- fallbackChildren.return = workInProgress;
5426
- primaryChildren.return = workInProgress;
5427
- primaryChildren.sibling = fallbackChildren;
5428
- workInProgress.child = primaryChildren;
5429
- return fallbackChildren;
5048
+ );
5049
+ suspenseState = nextProps.fallback;
5050
+ didSuspend = workInProgress.mode;
5051
+ nextProps = createFiberFromOffscreen(
5052
+ { mode: "visible", children: nextProps.children },
5053
+ didSuspend,
5054
+ 0,
5055
+ null
5056
+ );
5057
+ suspenseState = createFiberFromFragment(
5058
+ suspenseState,
5059
+ didSuspend,
5060
+ renderLanes,
5061
+ null
5062
+ );
5063
+ suspenseState.flags |= 2;
5064
+ nextProps.return = workInProgress;
5065
+ suspenseState.return = workInProgress;
5066
+ nextProps.sibling = suspenseState;
5067
+ workInProgress.child = nextProps;
5068
+ 0 !== (workInProgress.mode & 1) &&
5069
+ reconcileChildFibers(workInProgress, current.child, null, renderLanes);
5070
+ workInProgress.child.memoizedState = mountSuspenseOffscreenState(
5071
+ renderLanes
5072
+ );
5073
+ workInProgress.memoizedState = SUSPENDED_MARKER;
5074
+ return suspenseState;
5075
+ }
5076
+ if (0 === (workInProgress.mode & 1))
5077
+ return retrySuspenseComponentWithoutHydrating(
5078
+ current,
5079
+ workInProgress,
5080
+ renderLanes,
5081
+ null
5082
+ );
5083
+ if (shim())
5084
+ return (
5085
+ (suspenseState = shim().errorMessage),
5086
+ retrySuspenseComponentWithoutHydrating(
5087
+ current,
5088
+ workInProgress,
5089
+ renderLanes,
5090
+ suspenseState
5091
+ ? Error(suspenseState)
5092
+ : Error(
5093
+ "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
5094
+ )
5095
+ )
5096
+ );
5097
+ didSuspend = 0 !== (renderLanes & current.childLanes);
5098
+ if (didReceiveUpdate || didSuspend) {
5099
+ nextProps = workInProgressRoot;
5100
+ if (null !== nextProps) {
5101
+ switch (renderLanes & -renderLanes) {
5102
+ case 4:
5103
+ didSuspend = 2;
5104
+ break;
5105
+ case 16:
5106
+ didSuspend = 8;
5107
+ break;
5108
+ case 64:
5109
+ case 128:
5110
+ case 256:
5111
+ case 512:
5112
+ case 1024:
5113
+ case 2048:
5114
+ case 4096:
5115
+ case 8192:
5116
+ case 16384:
5117
+ case 32768:
5118
+ case 65536:
5119
+ case 131072:
5120
+ case 262144:
5121
+ case 524288:
5122
+ case 1048576:
5123
+ case 2097152:
5124
+ case 4194304:
5125
+ case 8388608:
5126
+ case 16777216:
5127
+ case 33554432:
5128
+ case 67108864:
5129
+ didSuspend = 32;
5130
+ break;
5131
+ case 536870912:
5132
+ didSuspend = 268435456;
5133
+ break;
5134
+ default:
5135
+ didSuspend = 0;
5136
+ }
5137
+ nextProps =
5138
+ 0 !== (didSuspend & (nextProps.suspendedLanes | renderLanes))
5139
+ ? 0
5140
+ : didSuspend;
5141
+ 0 !== nextProps &&
5142
+ nextProps !== suspenseState.retryLane &&
5143
+ ((suspenseState.retryLane = nextProps),
5144
+ scheduleUpdateOnFiber(current, nextProps, -1));
5145
+ }
5146
+ renderDidSuspendDelayIfPossible();
5147
+ return retrySuspenseComponentWithoutHydrating(
5148
+ current,
5149
+ workInProgress,
5150
+ renderLanes,
5151
+ Error(
5152
+ "This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."
5153
+ )
5154
+ );
5155
+ }
5156
+ if (shim())
5157
+ return (
5158
+ (workInProgress.flags |= 128),
5159
+ (workInProgress.child = current.child),
5160
+ retryDehydratedSuspenseBoundary.bind(null, current),
5161
+ shim(),
5162
+ null
5163
+ );
5164
+ current = mountSuspensePrimaryChildren(workInProgress, nextProps.children);
5165
+ current.flags |= 4096;
5166
+ return current;
5430
5167
  }
5431
5168
  function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
5432
5169
  fiber.lanes |= renderLanes;
@@ -5545,6 +5282,13 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) {
5545
5282
  }
5546
5283
  return workInProgress.child;
5547
5284
  }
5285
+ function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {
5286
+ 0 === (workInProgress.mode & 1) &&
5287
+ null !== current &&
5288
+ ((current.alternate = null),
5289
+ (workInProgress.alternate = null),
5290
+ (workInProgress.flags |= 2));
5291
+ }
5548
5292
  function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
5549
5293
  null !== current && (workInProgress.dependencies = current.dependencies);
5550
5294
  profilerStartTime = -1;
@@ -5565,81 +5309,553 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
5565
5309
  (renderLanes.return = workInProgress);
5566
5310
  renderLanes.sibling = null;
5567
5311
  }
5568
- return workInProgress.child;
5312
+ return workInProgress.child;
5313
+ }
5314
+ function attemptEarlyBailoutIfNoScheduledUpdate(
5315
+ current,
5316
+ workInProgress,
5317
+ renderLanes
5318
+ ) {
5319
+ switch (workInProgress.tag) {
5320
+ case 3:
5321
+ pushHostRootContext(workInProgress);
5322
+ break;
5323
+ case 5:
5324
+ pushHostContext(workInProgress);
5325
+ break;
5326
+ case 1:
5327
+ isContextProvider(workInProgress.type) &&
5328
+ pushContextProvider(workInProgress);
5329
+ break;
5330
+ case 4:
5331
+ pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
5332
+ break;
5333
+ case 10:
5334
+ var context = workInProgress.type._context,
5335
+ nextValue = workInProgress.memoizedProps.value;
5336
+ push(valueCursor, context._currentValue);
5337
+ context._currentValue = nextValue;
5338
+ break;
5339
+ case 12:
5340
+ 0 !== (renderLanes & workInProgress.childLanes) &&
5341
+ (workInProgress.flags |= 4);
5342
+ context = workInProgress.stateNode;
5343
+ context.effectDuration = 0;
5344
+ context.passiveEffectDuration = 0;
5345
+ break;
5346
+ case 13:
5347
+ context = workInProgress.memoizedState;
5348
+ if (null !== context) {
5349
+ if (null !== context.dehydrated)
5350
+ return (
5351
+ push(suspenseStackCursor, suspenseStackCursor.current & 1),
5352
+ (workInProgress.flags |= 128),
5353
+ null
5354
+ );
5355
+ if (0 !== (renderLanes & workInProgress.child.childLanes))
5356
+ return updateSuspenseComponent(current, workInProgress, renderLanes);
5357
+ push(suspenseStackCursor, suspenseStackCursor.current & 1);
5358
+ current = bailoutOnAlreadyFinishedWork(
5359
+ current,
5360
+ workInProgress,
5361
+ renderLanes
5362
+ );
5363
+ return null !== current ? current.sibling : null;
5364
+ }
5365
+ push(suspenseStackCursor, suspenseStackCursor.current & 1);
5366
+ break;
5367
+ case 19:
5368
+ context = 0 !== (renderLanes & workInProgress.childLanes);
5369
+ if (0 !== (current.flags & 128)) {
5370
+ if (context)
5371
+ return updateSuspenseListComponent(
5372
+ current,
5373
+ workInProgress,
5374
+ renderLanes
5375
+ );
5376
+ workInProgress.flags |= 128;
5377
+ }
5378
+ nextValue = workInProgress.memoizedState;
5379
+ null !== nextValue &&
5380
+ ((nextValue.rendering = null),
5381
+ (nextValue.tail = null),
5382
+ (nextValue.lastEffect = null));
5383
+ push(suspenseStackCursor, suspenseStackCursor.current);
5384
+ if (context) break;
5385
+ else return null;
5386
+ case 22:
5387
+ case 23:
5388
+ return (
5389
+ (workInProgress.lanes = 0),
5390
+ updateOffscreenComponent(current, workInProgress, renderLanes)
5391
+ );
5392
+ }
5393
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
5394
+ }
5395
+ var appendAllChildren,
5396
+ updateHostContainer,
5397
+ updateHostComponent$1,
5398
+ updateHostText$1;
5399
+ appendAllChildren = function(parent, workInProgress) {
5400
+ for (var node = workInProgress.child; null !== node; ) {
5401
+ if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
5402
+ else if (4 !== node.tag && null !== node.child) {
5403
+ node.child.return = node;
5404
+ node = node.child;
5405
+ continue;
5406
+ }
5407
+ if (node === workInProgress) break;
5408
+ for (; null === node.sibling; ) {
5409
+ if (null === node.return || node.return === workInProgress) return;
5410
+ node = node.return;
5411
+ }
5412
+ node.sibling.return = node.return;
5413
+ node = node.sibling;
5414
+ }
5415
+ };
5416
+ updateHostContainer = function() {};
5417
+ updateHostComponent$1 = function(current, workInProgress, type, newProps) {
5418
+ current.memoizedProps !== newProps &&
5419
+ (requiredContext(contextStackCursor$1.current),
5420
+ (workInProgress.updateQueue = UPDATE_SIGNAL)) &&
5421
+ (workInProgress.flags |= 4);
5422
+ };
5423
+ updateHostText$1 = function(current, workInProgress, oldText, newText) {
5424
+ oldText !== newText && (workInProgress.flags |= 4);
5425
+ };
5426
+ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
5427
+ switch (renderState.tailMode) {
5428
+ case "hidden":
5429
+ hasRenderedATailFallback = renderState.tail;
5430
+ for (var lastTailNode = null; null !== hasRenderedATailFallback; )
5431
+ null !== hasRenderedATailFallback.alternate &&
5432
+ (lastTailNode = hasRenderedATailFallback),
5433
+ (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
5434
+ null === lastTailNode
5435
+ ? (renderState.tail = null)
5436
+ : (lastTailNode.sibling = null);
5437
+ break;
5438
+ case "collapsed":
5439
+ lastTailNode = renderState.tail;
5440
+ for (var lastTailNode$63 = null; null !== lastTailNode; )
5441
+ null !== lastTailNode.alternate && (lastTailNode$63 = lastTailNode),
5442
+ (lastTailNode = lastTailNode.sibling);
5443
+ null === lastTailNode$63
5444
+ ? hasRenderedATailFallback || null === renderState.tail
5445
+ ? (renderState.tail = null)
5446
+ : (renderState.tail.sibling = null)
5447
+ : (lastTailNode$63.sibling = null);
5448
+ }
5569
5449
  }
5570
- function attemptEarlyBailoutIfNoScheduledUpdate(
5571
- current,
5572
- workInProgress,
5573
- renderLanes
5574
- ) {
5450
+ function bubbleProperties(completedWork) {
5451
+ var didBailout =
5452
+ null !== completedWork.alternate &&
5453
+ completedWork.alternate.child === completedWork.child,
5454
+ newChildLanes = 0,
5455
+ subtreeFlags = 0;
5456
+ if (didBailout)
5457
+ if (0 !== (completedWork.mode & 2)) {
5458
+ for (
5459
+ var treeBaseDuration$65 = completedWork.selfBaseDuration,
5460
+ child$66 = completedWork.child;
5461
+ null !== child$66;
5462
+
5463
+ )
5464
+ (newChildLanes |= child$66.lanes | child$66.childLanes),
5465
+ (subtreeFlags |= child$66.subtreeFlags & 14680064),
5466
+ (subtreeFlags |= child$66.flags & 14680064),
5467
+ (treeBaseDuration$65 += child$66.treeBaseDuration),
5468
+ (child$66 = child$66.sibling);
5469
+ completedWork.treeBaseDuration = treeBaseDuration$65;
5470
+ } else
5471
+ for (
5472
+ treeBaseDuration$65 = completedWork.child;
5473
+ null !== treeBaseDuration$65;
5474
+
5475
+ )
5476
+ (newChildLanes |=
5477
+ treeBaseDuration$65.lanes | treeBaseDuration$65.childLanes),
5478
+ (subtreeFlags |= treeBaseDuration$65.subtreeFlags & 14680064),
5479
+ (subtreeFlags |= treeBaseDuration$65.flags & 14680064),
5480
+ (treeBaseDuration$65.return = completedWork),
5481
+ (treeBaseDuration$65 = treeBaseDuration$65.sibling);
5482
+ else if (0 !== (completedWork.mode & 2)) {
5483
+ treeBaseDuration$65 = completedWork.actualDuration;
5484
+ child$66 = completedWork.selfBaseDuration;
5485
+ for (var child = completedWork.child; null !== child; )
5486
+ (newChildLanes |= child.lanes | child.childLanes),
5487
+ (subtreeFlags |= child.subtreeFlags),
5488
+ (subtreeFlags |= child.flags),
5489
+ (treeBaseDuration$65 += child.actualDuration),
5490
+ (child$66 += child.treeBaseDuration),
5491
+ (child = child.sibling);
5492
+ completedWork.actualDuration = treeBaseDuration$65;
5493
+ completedWork.treeBaseDuration = child$66;
5494
+ } else
5495
+ for (
5496
+ treeBaseDuration$65 = completedWork.child;
5497
+ null !== treeBaseDuration$65;
5498
+
5499
+ )
5500
+ (newChildLanes |=
5501
+ treeBaseDuration$65.lanes | treeBaseDuration$65.childLanes),
5502
+ (subtreeFlags |= treeBaseDuration$65.subtreeFlags),
5503
+ (subtreeFlags |= treeBaseDuration$65.flags),
5504
+ (treeBaseDuration$65.return = completedWork),
5505
+ (treeBaseDuration$65 = treeBaseDuration$65.sibling);
5506
+ completedWork.subtreeFlags |= subtreeFlags;
5507
+ completedWork.childLanes = newChildLanes;
5508
+ return didBailout;
5509
+ }
5510
+ function completeWork(current, workInProgress, renderLanes) {
5511
+ var newProps = workInProgress.pendingProps;
5512
+ popTreeContext(workInProgress);
5575
5513
  switch (workInProgress.tag) {
5514
+ case 2:
5515
+ case 16:
5516
+ case 15:
5517
+ case 0:
5518
+ case 11:
5519
+ case 7:
5520
+ case 8:
5521
+ case 12:
5522
+ case 9:
5523
+ case 14:
5524
+ return bubbleProperties(workInProgress), null;
5525
+ case 1:
5526
+ return (
5527
+ isContextProvider(workInProgress.type) && popContext(),
5528
+ bubbleProperties(workInProgress),
5529
+ null
5530
+ );
5576
5531
  case 3:
5577
- pushHostRootContext(workInProgress);
5578
- break;
5532
+ return (
5533
+ (renderLanes = workInProgress.stateNode),
5534
+ popHostContainer(),
5535
+ pop(didPerformWorkStackCursor),
5536
+ pop(contextStackCursor),
5537
+ resetWorkInProgressVersions(),
5538
+ renderLanes.pendingContext &&
5539
+ ((renderLanes.context = renderLanes.pendingContext),
5540
+ (renderLanes.pendingContext = null)),
5541
+ (null !== current && null !== current.child) ||
5542
+ null === current ||
5543
+ (current.memoizedState.isDehydrated &&
5544
+ 0 === (workInProgress.flags & 256)) ||
5545
+ ((workInProgress.flags |= 1024),
5546
+ null !== hydrationErrors &&
5547
+ (queueRecoverableErrors(hydrationErrors),
5548
+ (hydrationErrors = null))),
5549
+ updateHostContainer(current, workInProgress),
5550
+ bubbleProperties(workInProgress),
5551
+ null
5552
+ );
5579
5553
  case 5:
5580
- pushHostContext(workInProgress);
5581
- break;
5582
- case 1:
5583
- isContextProvider(workInProgress.type) &&
5584
- pushContextProvider(workInProgress);
5585
- break;
5586
- case 4:
5587
- pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
5588
- break;
5589
- case 10:
5590
- var context = workInProgress.type._context,
5591
- nextValue = workInProgress.memoizedProps.value;
5592
- push(valueCursor, context._currentValue);
5593
- context._currentValue = nextValue;
5594
- break;
5595
- case 12:
5596
- 0 !== (renderLanes & workInProgress.childLanes) &&
5597
- (workInProgress.flags |= 4);
5598
- context = workInProgress.stateNode;
5599
- context.effectDuration = 0;
5600
- context.passiveEffectDuration = 0;
5601
- break;
5602
- case 13:
5603
- if (null !== workInProgress.memoizedState) {
5604
- if (0 !== (renderLanes & workInProgress.child.childLanes))
5605
- return updateSuspenseComponent(current, workInProgress, renderLanes);
5606
- push(suspenseStackCursor, suspenseStackCursor.current & 1);
5607
- current = bailoutOnAlreadyFinishedWork(
5554
+ popHostContext(workInProgress);
5555
+ renderLanes = requiredContext(rootInstanceStackCursor.current);
5556
+ var type = workInProgress.type;
5557
+ if (null !== current && null != workInProgress.stateNode)
5558
+ updateHostComponent$1(
5608
5559
  current,
5609
5560
  workInProgress,
5561
+ type,
5562
+ newProps,
5610
5563
  renderLanes
5564
+ ),
5565
+ current.ref !== workInProgress.ref && (workInProgress.flags |= 512);
5566
+ else {
5567
+ if (!newProps) {
5568
+ if (null === workInProgress.stateNode)
5569
+ throw Error(
5570
+ "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
5571
+ );
5572
+ bubbleProperties(workInProgress);
5573
+ return null;
5574
+ }
5575
+ requiredContext(contextStackCursor$1.current);
5576
+ current = allocateTag();
5577
+ type = getViewConfigForType(type);
5578
+ var updatePayload = diffProperties(
5579
+ null,
5580
+ emptyObject,
5581
+ newProps,
5582
+ type.validAttributes
5611
5583
  );
5612
- return null !== current ? current.sibling : null;
5584
+ ReactNativePrivateInterface.UIManager.createView(
5585
+ current,
5586
+ type.uiViewClassName,
5587
+ renderLanes,
5588
+ updatePayload
5589
+ );
5590
+ renderLanes = new ReactNativeFiberHostComponent(
5591
+ current,
5592
+ type,
5593
+ workInProgress
5594
+ );
5595
+ instanceCache.set(current, workInProgress);
5596
+ instanceProps.set(current, newProps);
5597
+ appendAllChildren(renderLanes, workInProgress, !1, !1);
5598
+ workInProgress.stateNode = renderLanes;
5599
+ finalizeInitialChildren(renderLanes) && (workInProgress.flags |= 4);
5600
+ null !== workInProgress.ref && (workInProgress.flags |= 512);
5613
5601
  }
5614
- push(suspenseStackCursor, suspenseStackCursor.current & 1);
5615
- break;
5602
+ bubbleProperties(workInProgress);
5603
+ return null;
5604
+ case 6:
5605
+ if (current && null != workInProgress.stateNode)
5606
+ updateHostText$1(
5607
+ current,
5608
+ workInProgress,
5609
+ current.memoizedProps,
5610
+ newProps
5611
+ );
5612
+ else {
5613
+ if ("string" !== typeof newProps && null === workInProgress.stateNode)
5614
+ throw Error(
5615
+ "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
5616
+ );
5617
+ current = requiredContext(rootInstanceStackCursor.current);
5618
+ if (!requiredContext(contextStackCursor$1.current).isInAParentText)
5619
+ throw Error(
5620
+ "Text strings must be rendered within a <Text> component."
5621
+ );
5622
+ renderLanes = allocateTag();
5623
+ ReactNativePrivateInterface.UIManager.createView(
5624
+ renderLanes,
5625
+ "RCTRawText",
5626
+ current,
5627
+ { text: newProps }
5628
+ );
5629
+ instanceCache.set(renderLanes, workInProgress);
5630
+ workInProgress.stateNode = renderLanes;
5631
+ }
5632
+ bubbleProperties(workInProgress);
5633
+ return null;
5634
+ case 13:
5635
+ pop(suspenseStackCursor);
5636
+ newProps = workInProgress.memoizedState;
5637
+ if (
5638
+ null === current ||
5639
+ (null !== current.memoizedState &&
5640
+ null !== current.memoizedState.dehydrated)
5641
+ ) {
5642
+ if (null !== newProps && null !== newProps.dehydrated) {
5643
+ if (null === current) {
5644
+ throw Error(
5645
+ "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
5646
+ );
5647
+ throw Error(
5648
+ "Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
5649
+ );
5650
+ }
5651
+ 0 === (workInProgress.flags & 128) &&
5652
+ (workInProgress.memoizedState = null);
5653
+ workInProgress.flags |= 4;
5654
+ bubbleProperties(workInProgress);
5655
+ 0 !== (workInProgress.mode & 2) &&
5656
+ null !== newProps &&
5657
+ ((type = workInProgress.child),
5658
+ null !== type &&
5659
+ (workInProgress.treeBaseDuration -= type.treeBaseDuration));
5660
+ type = !1;
5661
+ } else
5662
+ null !== hydrationErrors &&
5663
+ (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)),
5664
+ (type = !0);
5665
+ if (!type) return workInProgress.flags & 65536 ? workInProgress : null;
5666
+ }
5667
+ if (0 !== (workInProgress.flags & 128))
5668
+ return (
5669
+ (workInProgress.lanes = renderLanes),
5670
+ 0 !== (workInProgress.mode & 2) &&
5671
+ transferActualDuration(workInProgress),
5672
+ workInProgress
5673
+ );
5674
+ renderLanes = null !== newProps;
5675
+ renderLanes !== (null !== current && null !== current.memoizedState) &&
5676
+ renderLanes &&
5677
+ ((workInProgress.child.flags |= 8192),
5678
+ 0 !== (workInProgress.mode & 1) &&
5679
+ (null === current || 0 !== (suspenseStackCursor.current & 1)
5680
+ ? 0 === workInProgressRootExitStatus &&
5681
+ (workInProgressRootExitStatus = 3)
5682
+ : renderDidSuspendDelayIfPossible()));
5683
+ null !== workInProgress.updateQueue && (workInProgress.flags |= 4);
5684
+ bubbleProperties(workInProgress);
5685
+ 0 !== (workInProgress.mode & 2) &&
5686
+ renderLanes &&
5687
+ ((current = workInProgress.child),
5688
+ null !== current &&
5689
+ (workInProgress.treeBaseDuration -= current.treeBaseDuration));
5690
+ return null;
5691
+ case 4:
5692
+ return (
5693
+ popHostContainer(),
5694
+ updateHostContainer(current, workInProgress),
5695
+ bubbleProperties(workInProgress),
5696
+ null
5697
+ );
5698
+ case 10:
5699
+ return (
5700
+ popProvider(workInProgress.type._context),
5701
+ bubbleProperties(workInProgress),
5702
+ null
5703
+ );
5704
+ case 17:
5705
+ return (
5706
+ isContextProvider(workInProgress.type) && popContext(),
5707
+ bubbleProperties(workInProgress),
5708
+ null
5709
+ );
5616
5710
  case 19:
5617
- context = 0 !== (renderLanes & workInProgress.childLanes);
5618
- if (0 !== (current.flags & 128)) {
5619
- if (context)
5620
- return updateSuspenseListComponent(
5621
- current,
5622
- workInProgress,
5623
- renderLanes
5624
- );
5625
- workInProgress.flags |= 128;
5711
+ pop(suspenseStackCursor);
5712
+ type = workInProgress.memoizedState;
5713
+ if (null === type) return bubbleProperties(workInProgress), null;
5714
+ newProps = 0 !== (workInProgress.flags & 128);
5715
+ updatePayload = type.rendering;
5716
+ if (null === updatePayload)
5717
+ if (newProps) cutOffTailIfNeeded(type, !1);
5718
+ else {
5719
+ if (
5720
+ 0 !== workInProgressRootExitStatus ||
5721
+ (null !== current && 0 !== (current.flags & 128))
5722
+ )
5723
+ for (current = workInProgress.child; null !== current; ) {
5724
+ updatePayload = findFirstSuspended(current);
5725
+ if (null !== updatePayload) {
5726
+ workInProgress.flags |= 128;
5727
+ cutOffTailIfNeeded(type, !1);
5728
+ current = updatePayload.updateQueue;
5729
+ null !== current &&
5730
+ ((workInProgress.updateQueue = current),
5731
+ (workInProgress.flags |= 4));
5732
+ workInProgress.subtreeFlags = 0;
5733
+ current = renderLanes;
5734
+ for (renderLanes = workInProgress.child; null !== renderLanes; )
5735
+ (newProps = renderLanes),
5736
+ (updatePayload = current),
5737
+ (newProps.flags &= 14680066),
5738
+ (type = newProps.alternate),
5739
+ null === type
5740
+ ? ((newProps.childLanes = 0),
5741
+ (newProps.lanes = updatePayload),
5742
+ (newProps.child = null),
5743
+ (newProps.subtreeFlags = 0),
5744
+ (newProps.memoizedProps = null),
5745
+ (newProps.memoizedState = null),
5746
+ (newProps.updateQueue = null),
5747
+ (newProps.dependencies = null),
5748
+ (newProps.stateNode = null),
5749
+ (newProps.selfBaseDuration = 0),
5750
+ (newProps.treeBaseDuration = 0))
5751
+ : ((newProps.childLanes = type.childLanes),
5752
+ (newProps.lanes = type.lanes),
5753
+ (newProps.child = type.child),
5754
+ (newProps.subtreeFlags = 0),
5755
+ (newProps.deletions = null),
5756
+ (newProps.memoizedProps = type.memoizedProps),
5757
+ (newProps.memoizedState = type.memoizedState),
5758
+ (newProps.updateQueue = type.updateQueue),
5759
+ (newProps.type = type.type),
5760
+ (updatePayload = type.dependencies),
5761
+ (newProps.dependencies =
5762
+ null === updatePayload
5763
+ ? null
5764
+ : {
5765
+ lanes: updatePayload.lanes,
5766
+ firstContext: updatePayload.firstContext
5767
+ }),
5768
+ (newProps.selfBaseDuration = type.selfBaseDuration),
5769
+ (newProps.treeBaseDuration = type.treeBaseDuration)),
5770
+ (renderLanes = renderLanes.sibling);
5771
+ push(
5772
+ suspenseStackCursor,
5773
+ (suspenseStackCursor.current & 1) | 2
5774
+ );
5775
+ return workInProgress.child;
5776
+ }
5777
+ current = current.sibling;
5778
+ }
5779
+ null !== type.tail &&
5780
+ now() > workInProgressRootRenderTargetTime &&
5781
+ ((workInProgress.flags |= 128),
5782
+ (newProps = !0),
5783
+ cutOffTailIfNeeded(type, !1),
5784
+ (workInProgress.lanes = 4194304));
5785
+ }
5786
+ else {
5787
+ if (!newProps)
5788
+ if (
5789
+ ((current = findFirstSuspended(updatePayload)), null !== current)
5790
+ ) {
5791
+ if (
5792
+ ((workInProgress.flags |= 128),
5793
+ (newProps = !0),
5794
+ (current = current.updateQueue),
5795
+ null !== current &&
5796
+ ((workInProgress.updateQueue = current),
5797
+ (workInProgress.flags |= 4)),
5798
+ cutOffTailIfNeeded(type, !0),
5799
+ null === type.tail &&
5800
+ "hidden" === type.tailMode &&
5801
+ !updatePayload.alternate)
5802
+ )
5803
+ return bubbleProperties(workInProgress), null;
5804
+ } else
5805
+ 2 * now() - type.renderingStartTime >
5806
+ workInProgressRootRenderTargetTime &&
5807
+ 1073741824 !== renderLanes &&
5808
+ ((workInProgress.flags |= 128),
5809
+ (newProps = !0),
5810
+ cutOffTailIfNeeded(type, !1),
5811
+ (workInProgress.lanes = 4194304));
5812
+ type.isBackwards
5813
+ ? ((updatePayload.sibling = workInProgress.child),
5814
+ (workInProgress.child = updatePayload))
5815
+ : ((current = type.last),
5816
+ null !== current
5817
+ ? (current.sibling = updatePayload)
5818
+ : (workInProgress.child = updatePayload),
5819
+ (type.last = updatePayload));
5626
5820
  }
5627
- nextValue = workInProgress.memoizedState;
5628
- null !== nextValue &&
5629
- ((nextValue.rendering = null),
5630
- (nextValue.tail = null),
5631
- (nextValue.lastEffect = null));
5632
- push(suspenseStackCursor, suspenseStackCursor.current);
5633
- if (context) break;
5634
- else return null;
5821
+ if (null !== type.tail)
5822
+ return (
5823
+ (workInProgress = type.tail),
5824
+ (type.rendering = workInProgress),
5825
+ (type.tail = workInProgress.sibling),
5826
+ (type.renderingStartTime = now()),
5827
+ (workInProgress.sibling = null),
5828
+ (current = suspenseStackCursor.current),
5829
+ push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),
5830
+ workInProgress
5831
+ );
5832
+ bubbleProperties(workInProgress);
5833
+ return null;
5635
5834
  case 22:
5636
5835
  case 23:
5637
5836
  return (
5638
- (workInProgress.lanes = 0),
5639
- updateOffscreenComponent(current, workInProgress, renderLanes)
5837
+ popRenderLanes(),
5838
+ (renderLanes = null !== workInProgress.memoizedState),
5839
+ null !== current &&
5840
+ (null !== current.memoizedState) !== renderLanes &&
5841
+ (workInProgress.flags |= 8192),
5842
+ renderLanes && 0 !== (workInProgress.mode & 1)
5843
+ ? 0 !== (subtreeRenderLanes & 1073741824) &&
5844
+ (bubbleProperties(workInProgress),
5845
+ workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))
5846
+ : bubbleProperties(workInProgress),
5847
+ null
5640
5848
  );
5849
+ case 24:
5850
+ return null;
5851
+ case 25:
5852
+ return null;
5641
5853
  }
5642
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
5854
+ throw Error(
5855
+ "Unknown unit of work tag (" +
5856
+ workInProgress.tag +
5857
+ "). This error is likely caused by a bug in React. Please file an issue."
5858
+ );
5643
5859
  }
5644
5860
  function unwindWork(current, workInProgress) {
5645
5861
  popTreeContext(workInProgress);
@@ -5669,16 +5885,23 @@ function unwindWork(current, workInProgress) {
5669
5885
  case 5:
5670
5886
  return popHostContext(workInProgress), null;
5671
5887
  case 13:
5672
- return (
5673
- pop(suspenseStackCursor),
5674
- (current = workInProgress.flags),
5675
- current & 65536
5676
- ? ((workInProgress.flags = (current & -65537) | 128),
5677
- 0 !== (workInProgress.mode & 2) &&
5678
- transferActualDuration(workInProgress),
5679
- workInProgress)
5680
- : null
5681
- );
5888
+ pop(suspenseStackCursor);
5889
+ current = workInProgress.memoizedState;
5890
+ if (
5891
+ null !== current &&
5892
+ null !== current.dehydrated &&
5893
+ null === workInProgress.alternate
5894
+ )
5895
+ throw Error(
5896
+ "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
5897
+ );
5898
+ current = workInProgress.flags;
5899
+ return current & 65536
5900
+ ? ((workInProgress.flags = (current & -65537) | 128),
5901
+ 0 !== (workInProgress.mode & 2) &&
5902
+ transferActualDuration(workInProgress),
5903
+ workInProgress)
5904
+ : null;
5682
5905
  case 19:
5683
5906
  return pop(suspenseStackCursor), null;
5684
5907
  case 4:
@@ -5810,77 +6033,13 @@ function commitHookEffectListMount(flags, finishedWork) {
5810
6033
  var effect = (finishedWork = finishedWork.next);
5811
6034
  do {
5812
6035
  if ((effect.tag & flags) === flags) {
5813
- var create$83 = effect.create;
5814
- effect.destroy = create$83();
6036
+ var create$81 = effect.create;
6037
+ effect.destroy = create$81();
5815
6038
  }
5816
6039
  effect = effect.next;
5817
6040
  } while (effect !== finishedWork);
5818
6041
  }
5819
6042
  }
5820
- function commitUnmount(finishedRoot, current, nearestMountedAncestor) {
5821
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
5822
- try {
5823
- injectedHook.onCommitFiberUnmount(rendererID, current);
5824
- } catch (err) {}
5825
- switch (current.tag) {
5826
- case 0:
5827
- case 11:
5828
- case 14:
5829
- case 15:
5830
- finishedRoot = current.updateQueue;
5831
- if (
5832
- null !== finishedRoot &&
5833
- ((finishedRoot = finishedRoot.lastEffect), null !== finishedRoot)
5834
- ) {
5835
- var effect = (finishedRoot = finishedRoot.next);
5836
- do {
5837
- var _effect = effect,
5838
- destroy = _effect.destroy;
5839
- _effect = _effect.tag;
5840
- void 0 !== destroy &&
5841
- (0 !== (_effect & 2)
5842
- ? safelyCallDestroy(current, nearestMountedAncestor, destroy)
5843
- : 0 !== (_effect & 4) &&
5844
- (current.mode & 2
5845
- ? (startLayoutEffectTimer(),
5846
- safelyCallDestroy(current, nearestMountedAncestor, destroy),
5847
- recordLayoutEffectDuration(current))
5848
- : safelyCallDestroy(
5849
- current,
5850
- nearestMountedAncestor,
5851
- destroy
5852
- )));
5853
- effect = effect.next;
5854
- } while (effect !== finishedRoot);
5855
- }
5856
- break;
5857
- case 1:
5858
- safelyDetachRef(current, nearestMountedAncestor);
5859
- finishedRoot = current.stateNode;
5860
- if ("function" === typeof finishedRoot.componentWillUnmount)
5861
- try {
5862
- if (
5863
- ((finishedRoot.props = current.memoizedProps),
5864
- (finishedRoot.state = current.memoizedState),
5865
- current.mode & 2)
5866
- )
5867
- try {
5868
- startLayoutEffectTimer(), finishedRoot.componentWillUnmount();
5869
- } finally {
5870
- recordLayoutEffectDuration(current);
5871
- }
5872
- else finishedRoot.componentWillUnmount();
5873
- } catch (error) {
5874
- captureCommitPhaseError(current, nearestMountedAncestor, error);
5875
- }
5876
- break;
5877
- case 5:
5878
- safelyDetachRef(current, nearestMountedAncestor);
5879
- break;
5880
- case 4:
5881
- unmountHostComponents(finishedRoot, current, nearestMountedAncestor);
5882
- }
5883
- }
5884
6043
  function detachFiberAfterEffects(fiber) {
5885
6044
  var alternate = fiber.alternate;
5886
6045
  null !== alternate &&
@@ -5919,40 +6078,6 @@ function getHostSibling(fiber) {
5919
6078
  if (!(fiber.flags & 2)) return fiber.stateNode;
5920
6079
  }
5921
6080
  }
5922
- function commitPlacement(finishedWork) {
5923
- a: {
5924
- for (var parent = finishedWork.return; null !== parent; ) {
5925
- if (isHostParent(parent)) break a;
5926
- parent = parent.return;
5927
- }
5928
- throw Error(
5929
- "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
5930
- );
5931
- }
5932
- var parentFiber = parent;
5933
- switch (parentFiber.tag) {
5934
- case 5:
5935
- parent = parentFiber.stateNode;
5936
- parentFiber.flags & 32 && (parentFiber.flags &= -33);
5937
- parentFiber = getHostSibling(finishedWork);
5938
- insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
5939
- break;
5940
- case 3:
5941
- case 4:
5942
- parent = parentFiber.stateNode.containerInfo;
5943
- parentFiber = getHostSibling(finishedWork);
5944
- insertOrAppendPlacementNodeIntoContainer(
5945
- finishedWork,
5946
- parentFiber,
5947
- parent
5948
- );
5949
- break;
5950
- default:
5951
- throw Error(
5952
- "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
5953
- );
5954
- }
5955
- }
5956
6081
  function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
5957
6082
  var tag = node.tag;
5958
6083
  if (5 === tag || 6 === tag)
@@ -6033,194 +6158,171 @@ function insertOrAppendPlacementNode(node, before, parent) {
6033
6158
  )
6034
6159
  insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);
6035
6160
  }
6036
- function unmountHostComponents(
6037
- finishedRoot$jscomp$0,
6038
- current,
6039
- nearestMountedAncestor$jscomp$0
6161
+ var hostParent = null,
6162
+ hostParentIsContainer = !1;
6163
+ function recursivelyTraverseDeletionEffects(
6164
+ finishedRoot,
6165
+ nearestMountedAncestor,
6166
+ parent
6040
6167
  ) {
6041
- for (
6042
- var node = current,
6043
- currentParentIsValid = !1,
6044
- currentParent,
6045
- currentParentIsContainer;
6046
- ;
6047
-
6048
- ) {
6049
- if (!currentParentIsValid) {
6050
- currentParentIsValid = node.return;
6051
- a: for (;;) {
6052
- if (null === currentParentIsValid)
6053
- throw Error(
6054
- "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
6055
- );
6056
- currentParent = currentParentIsValid.stateNode;
6057
- switch (currentParentIsValid.tag) {
6058
- case 5:
6059
- currentParentIsContainer = !1;
6060
- break a;
6061
- case 3:
6062
- currentParent = currentParent.containerInfo;
6063
- currentParentIsContainer = !0;
6064
- break a;
6065
- case 4:
6066
- currentParent = currentParent.containerInfo;
6067
- currentParentIsContainer = !0;
6068
- break a;
6069
- }
6070
- currentParentIsValid = currentParentIsValid.return;
6071
- }
6072
- currentParentIsValid = !0;
6073
- }
6074
- if (5 === node.tag || 6 === node.tag) {
6075
- a: for (
6076
- var finishedRoot = finishedRoot$jscomp$0,
6077
- root = node,
6078
- nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
6079
- node$jscomp$0 = root;
6080
- ;
6081
-
6082
- )
6083
- if (
6084
- (commitUnmount(finishedRoot, node$jscomp$0, nearestMountedAncestor),
6085
- null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag)
6086
- )
6087
- (node$jscomp$0.child.return = node$jscomp$0),
6088
- (node$jscomp$0 = node$jscomp$0.child);
6089
- else {
6090
- if (node$jscomp$0 === root) break a;
6091
- for (; null === node$jscomp$0.sibling; ) {
6092
- if (null === node$jscomp$0.return || node$jscomp$0.return === root)
6093
- break a;
6094
- node$jscomp$0 = node$jscomp$0.return;
6095
- }
6096
- node$jscomp$0.sibling.return = node$jscomp$0.return;
6097
- node$jscomp$0 = node$jscomp$0.sibling;
6098
- }
6099
- currentParentIsContainer
6100
- ? ((finishedRoot = currentParent),
6101
- recursivelyUncacheFiberNode(node.stateNode),
6102
- ReactNativePrivateInterface.UIManager.manageChildren(
6103
- finishedRoot,
6104
- [],
6105
- [],
6106
- [],
6107
- [],
6108
- [0]
6109
- ))
6110
- : ((finishedRoot = currentParent),
6111
- (nearestMountedAncestor = node.stateNode),
6112
- recursivelyUncacheFiberNode(nearestMountedAncestor),
6113
- (root = finishedRoot._children),
6114
- (nearestMountedAncestor = root.indexOf(nearestMountedAncestor)),
6115
- root.splice(nearestMountedAncestor, 1),
6116
- ReactNativePrivateInterface.UIManager.manageChildren(
6117
- finishedRoot._nativeTag,
6118
- [],
6119
- [],
6120
- [],
6121
- [],
6122
- [nearestMountedAncestor]
6123
- ));
6124
- } else if (4 === node.tag) {
6125
- if (null !== node.child) {
6126
- currentParent = node.stateNode.containerInfo;
6127
- currentParentIsContainer = !0;
6128
- node.child.return = node;
6129
- node = node.child;
6130
- continue;
6131
- }
6132
- } else if (
6133
- (commitUnmount(
6134
- finishedRoot$jscomp$0,
6135
- node,
6136
- nearestMountedAncestor$jscomp$0
6137
- ),
6138
- null !== node.child)
6139
- ) {
6140
- node.child.return = node;
6141
- node = node.child;
6142
- continue;
6143
- }
6144
- if (node === current) break;
6145
- for (; null === node.sibling; ) {
6146
- if (null === node.return || node.return === current) return;
6147
- node = node.return;
6148
- 4 === node.tag && (currentParentIsValid = !1);
6149
- }
6150
- node.sibling.return = node.return;
6151
- node = node.sibling;
6152
- }
6153
- }
6154
- function commitWork(current, finishedWork) {
6155
- switch (finishedWork.tag) {
6168
+ for (parent = parent.child; null !== parent; )
6169
+ commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),
6170
+ (parent = parent.sibling);
6171
+ }
6172
+ function commitDeletionEffectsOnFiber(
6173
+ finishedRoot,
6174
+ nearestMountedAncestor,
6175
+ deletedFiber
6176
+ ) {
6177
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
6178
+ try {
6179
+ injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
6180
+ } catch (err) {}
6181
+ switch (deletedFiber.tag) {
6182
+ case 5:
6183
+ safelyDetachRef(deletedFiber, nearestMountedAncestor);
6184
+ case 6:
6185
+ var prevHostParent = hostParent,
6186
+ prevHostParentIsContainer = hostParentIsContainer;
6187
+ hostParent = null;
6188
+ recursivelyTraverseDeletionEffects(
6189
+ finishedRoot,
6190
+ nearestMountedAncestor,
6191
+ deletedFiber
6192
+ );
6193
+ hostParent = prevHostParent;
6194
+ hostParentIsContainer = prevHostParentIsContainer;
6195
+ null !== hostParent &&
6196
+ (hostParentIsContainer
6197
+ ? ((finishedRoot = hostParent),
6198
+ recursivelyUncacheFiberNode(deletedFiber.stateNode),
6199
+ ReactNativePrivateInterface.UIManager.manageChildren(
6200
+ finishedRoot,
6201
+ [],
6202
+ [],
6203
+ [],
6204
+ [],
6205
+ [0]
6206
+ ))
6207
+ : ((finishedRoot = hostParent),
6208
+ (nearestMountedAncestor = deletedFiber.stateNode),
6209
+ recursivelyUncacheFiberNode(nearestMountedAncestor),
6210
+ (deletedFiber = finishedRoot._children),
6211
+ (nearestMountedAncestor = deletedFiber.indexOf(
6212
+ nearestMountedAncestor
6213
+ )),
6214
+ deletedFiber.splice(nearestMountedAncestor, 1),
6215
+ ReactNativePrivateInterface.UIManager.manageChildren(
6216
+ finishedRoot._nativeTag,
6217
+ [],
6218
+ [],
6219
+ [],
6220
+ [],
6221
+ [nearestMountedAncestor]
6222
+ )));
6223
+ break;
6224
+ case 18:
6225
+ null !== hostParent && shim(hostParent, deletedFiber.stateNode);
6226
+ break;
6227
+ case 4:
6228
+ prevHostParent = hostParent;
6229
+ prevHostParentIsContainer = hostParentIsContainer;
6230
+ hostParent = deletedFiber.stateNode.containerInfo;
6231
+ hostParentIsContainer = !0;
6232
+ recursivelyTraverseDeletionEffects(
6233
+ finishedRoot,
6234
+ nearestMountedAncestor,
6235
+ deletedFiber
6236
+ );
6237
+ hostParent = prevHostParent;
6238
+ hostParentIsContainer = prevHostParentIsContainer;
6239
+ break;
6156
6240
  case 0:
6157
6241
  case 11:
6158
6242
  case 14:
6159
6243
  case 15:
6160
- commitHookEffectListUnmount(3, finishedWork, finishedWork.return);
6161
- commitHookEffectListMount(3, finishedWork);
6162
- if (finishedWork.mode & 2)
6244
+ prevHostParent = deletedFiber.updateQueue;
6245
+ if (
6246
+ null !== prevHostParent &&
6247
+ ((prevHostParent = prevHostParent.lastEffect), null !== prevHostParent)
6248
+ ) {
6249
+ prevHostParentIsContainer = prevHostParent = prevHostParent.next;
6250
+ do {
6251
+ var _effect = prevHostParentIsContainer,
6252
+ destroy = _effect.destroy;
6253
+ _effect = _effect.tag;
6254
+ void 0 !== destroy &&
6255
+ (0 !== (_effect & 2)
6256
+ ? safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy)
6257
+ : 0 !== (_effect & 4) &&
6258
+ (deletedFiber.mode & 2
6259
+ ? (startLayoutEffectTimer(),
6260
+ safelyCallDestroy(
6261
+ deletedFiber,
6262
+ nearestMountedAncestor,
6263
+ destroy
6264
+ ),
6265
+ recordLayoutEffectDuration(deletedFiber))
6266
+ : safelyCallDestroy(
6267
+ deletedFiber,
6268
+ nearestMountedAncestor,
6269
+ destroy
6270
+ )));
6271
+ prevHostParentIsContainer = prevHostParentIsContainer.next;
6272
+ } while (prevHostParentIsContainer !== prevHostParent);
6273
+ }
6274
+ recursivelyTraverseDeletionEffects(
6275
+ finishedRoot,
6276
+ nearestMountedAncestor,
6277
+ deletedFiber
6278
+ );
6279
+ break;
6280
+ case 1:
6281
+ safelyDetachRef(deletedFiber, nearestMountedAncestor);
6282
+ prevHostParent = deletedFiber.stateNode;
6283
+ if ("function" === typeof prevHostParent.componentWillUnmount)
6163
6284
  try {
6164
- startLayoutEffectTimer(),
6165
- commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
6166
- } finally {
6167
- recordLayoutEffectDuration(finishedWork);
6285
+ if (
6286
+ ((prevHostParent.props = deletedFiber.memoizedProps),
6287
+ (prevHostParent.state = deletedFiber.memoizedState),
6288
+ deletedFiber.mode & 2)
6289
+ )
6290
+ try {
6291
+ startLayoutEffectTimer(), prevHostParent.componentWillUnmount();
6292
+ } finally {
6293
+ recordLayoutEffectDuration(deletedFiber);
6294
+ }
6295
+ else prevHostParent.componentWillUnmount();
6296
+ } catch (error) {
6297
+ captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error);
6168
6298
  }
6169
- else commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
6170
- return;
6171
- case 1:
6172
- return;
6173
- case 5:
6174
- var instance = finishedWork.stateNode;
6175
- if (null != instance) {
6176
- var newProps = finishedWork.memoizedProps;
6177
- current = null !== current ? current.memoizedProps : newProps;
6178
- var updatePayload = finishedWork.updateQueue;
6179
- finishedWork.updateQueue = null;
6180
- null !== updatePayload &&
6181
- ((finishedWork = instance.viewConfig),
6182
- instanceProps.set(instance._nativeTag, newProps),
6183
- (newProps = diffProperties(
6184
- null,
6185
- current,
6186
- newProps,
6187
- finishedWork.validAttributes
6188
- )),
6189
- null != newProps &&
6190
- ReactNativePrivateInterface.UIManager.updateView(
6191
- instance._nativeTag,
6192
- finishedWork.uiViewClassName,
6193
- newProps
6194
- ));
6195
- }
6196
- return;
6197
- case 6:
6198
- if (null === finishedWork.stateNode)
6199
- throw Error(
6200
- "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
6201
- );
6202
- ReactNativePrivateInterface.UIManager.updateView(
6203
- finishedWork.stateNode,
6204
- "RCTRawText",
6205
- { text: finishedWork.memoizedProps }
6299
+ recursivelyTraverseDeletionEffects(
6300
+ finishedRoot,
6301
+ nearestMountedAncestor,
6302
+ deletedFiber
6303
+ );
6304
+ break;
6305
+ case 21:
6306
+ recursivelyTraverseDeletionEffects(
6307
+ finishedRoot,
6308
+ nearestMountedAncestor,
6309
+ deletedFiber
6310
+ );
6311
+ break;
6312
+ case 22:
6313
+ recursivelyTraverseDeletionEffects(
6314
+ finishedRoot,
6315
+ nearestMountedAncestor,
6316
+ deletedFiber
6317
+ );
6318
+ break;
6319
+ default:
6320
+ recursivelyTraverseDeletionEffects(
6321
+ finishedRoot,
6322
+ nearestMountedAncestor,
6323
+ deletedFiber
6206
6324
  );
6207
- return;
6208
- case 3:
6209
- return;
6210
- case 12:
6211
- return;
6212
- case 13:
6213
- attachSuspenseRetryListeners(finishedWork);
6214
- return;
6215
- case 19:
6216
- attachSuspenseRetryListeners(finishedWork);
6217
- return;
6218
- case 17:
6219
- return;
6220
6325
  }
6221
- throw Error(
6222
- "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
6223
- );
6224
6326
  }
6225
6327
  function attachSuspenseRetryListeners(finishedWork) {
6226
6328
  var wakeables = finishedWork.updateQueue;
@@ -6245,163 +6347,330 @@ function attachSuspenseRetryListeners(finishedWork) {
6245
6347
  });
6246
6348
  }
6247
6349
  }
6248
- function commitMutationEffects(root, firstChild, committedLanes) {
6350
+ function commitMutationEffects(root, finishedWork, committedLanes) {
6249
6351
  inProgressLanes = committedLanes;
6250
6352
  inProgressRoot = root;
6251
- for (nextEffect = firstChild; null !== nextEffect; ) {
6252
- firstChild = nextEffect;
6253
- committedLanes = firstChild.deletions;
6254
- if (null !== committedLanes)
6255
- for (var i = 0; i < committedLanes.length; i++) {
6256
- var childToDelete = committedLanes[i];
6353
+ commitMutationEffectsOnFiber(finishedWork, root);
6354
+ inProgressRoot = inProgressLanes = null;
6355
+ }
6356
+ function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
6357
+ var deletions = parentFiber.deletions;
6358
+ if (null !== deletions)
6359
+ for (var i = 0; i < deletions.length; i++) {
6360
+ var childToDelete = deletions[i];
6361
+ try {
6362
+ var root = root$jscomp$0,
6363
+ returnFiber = parentFiber,
6364
+ parent = returnFiber;
6365
+ a: for (; null !== parent; ) {
6366
+ switch (parent.tag) {
6367
+ case 5:
6368
+ hostParent = parent.stateNode;
6369
+ hostParentIsContainer = !1;
6370
+ break a;
6371
+ case 3:
6372
+ hostParent = parent.stateNode.containerInfo;
6373
+ hostParentIsContainer = !0;
6374
+ break a;
6375
+ case 4:
6376
+ hostParent = parent.stateNode.containerInfo;
6377
+ hostParentIsContainer = !0;
6378
+ break a;
6379
+ }
6380
+ parent = parent.return;
6381
+ }
6382
+ if (null === hostParent)
6383
+ throw Error(
6384
+ "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
6385
+ );
6386
+ commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);
6387
+ hostParent = null;
6388
+ hostParentIsContainer = !1;
6389
+ var alternate = childToDelete.alternate;
6390
+ null !== alternate && (alternate.return = null);
6391
+ childToDelete.return = null;
6392
+ } catch (error) {
6393
+ captureCommitPhaseError(childToDelete, parentFiber, error);
6394
+ }
6395
+ }
6396
+ if (parentFiber.subtreeFlags & 12854)
6397
+ for (parentFiber = parentFiber.child; null !== parentFiber; )
6398
+ commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
6399
+ (parentFiber = parentFiber.sibling);
6400
+ }
6401
+ function commitMutationEffectsOnFiber(finishedWork, root) {
6402
+ var current = finishedWork.alternate,
6403
+ flags = finishedWork.flags;
6404
+ switch (finishedWork.tag) {
6405
+ case 0:
6406
+ case 11:
6407
+ case 14:
6408
+ case 15:
6409
+ recursivelyTraverseMutationEffects(root, finishedWork);
6410
+ commitReconciliationEffects(finishedWork);
6411
+ if (flags & 4) {
6257
6412
  try {
6258
- unmountHostComponents(root, childToDelete, firstChild);
6259
- var alternate = childToDelete.alternate;
6260
- null !== alternate && (alternate.return = null);
6261
- childToDelete.return = null;
6413
+ commitHookEffectListUnmount(3, finishedWork, finishedWork.return),
6414
+ commitHookEffectListMount(3, finishedWork);
6262
6415
  } catch (error) {
6263
- captureCommitPhaseError(childToDelete, firstChild, error);
6416
+ captureCommitPhaseError(finishedWork, finishedWork.return, error);
6264
6417
  }
6418
+ if (finishedWork.mode & 2) {
6419
+ try {
6420
+ startLayoutEffectTimer(),
6421
+ commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
6422
+ } catch (error$93) {
6423
+ captureCommitPhaseError(
6424
+ finishedWork,
6425
+ finishedWork.return,
6426
+ error$93
6427
+ );
6428
+ }
6429
+ recordLayoutEffectDuration(finishedWork);
6430
+ } else
6431
+ try {
6432
+ commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
6433
+ } catch (error$94) {
6434
+ captureCommitPhaseError(
6435
+ finishedWork,
6436
+ finishedWork.return,
6437
+ error$94
6438
+ );
6439
+ }
6265
6440
  }
6266
- committedLanes = firstChild.child;
6267
- if (0 !== (firstChild.subtreeFlags & 12854) && null !== committedLanes)
6268
- (committedLanes.return = firstChild), (nextEffect = committedLanes);
6269
- else
6270
- for (; null !== nextEffect; ) {
6271
- firstChild = nextEffect;
6272
- try {
6273
- var flags = firstChild.flags;
6274
- if (flags & 512) {
6275
- var current = firstChild.alternate;
6276
- if (null !== current) {
6277
- committedLanes = current;
6278
- var currentRef = committedLanes.ref;
6279
- if (null !== currentRef)
6280
- if ("function" === typeof currentRef)
6281
- if (committedLanes.mode & 2)
6282
- try {
6283
- startLayoutEffectTimer(), currentRef(null);
6284
- } finally {
6285
- recordLayoutEffectDuration(committedLanes);
6286
- }
6287
- else currentRef(null);
6288
- else currentRef.current = null;
6441
+ break;
6442
+ case 1:
6443
+ recursivelyTraverseMutationEffects(root, finishedWork);
6444
+ commitReconciliationEffects(finishedWork);
6445
+ flags & 512 &&
6446
+ null !== current &&
6447
+ safelyDetachRef(current, current.return);
6448
+ break;
6449
+ case 5:
6450
+ recursivelyTraverseMutationEffects(root, finishedWork);
6451
+ commitReconciliationEffects(finishedWork);
6452
+ flags & 512 &&
6453
+ null !== current &&
6454
+ safelyDetachRef(current, current.return);
6455
+ if (flags & 4) {
6456
+ var instance$96 = finishedWork.stateNode;
6457
+ if (null != instance$96) {
6458
+ var newProps = finishedWork.memoizedProps,
6459
+ oldProps = null !== current ? current.memoizedProps : newProps,
6460
+ updatePayload = finishedWork.updateQueue;
6461
+ finishedWork.updateQueue = null;
6462
+ if (null !== updatePayload)
6463
+ try {
6464
+ var viewConfig = instance$96.viewConfig;
6465
+ instanceProps.set(instance$96._nativeTag, newProps);
6466
+ var updatePayload$jscomp$0 = diffProperties(
6467
+ null,
6468
+ oldProps,
6469
+ newProps,
6470
+ viewConfig.validAttributes
6471
+ );
6472
+ null != updatePayload$jscomp$0 &&
6473
+ ReactNativePrivateInterface.UIManager.updateView(
6474
+ instance$96._nativeTag,
6475
+ viewConfig.uiViewClassName,
6476
+ updatePayload$jscomp$0
6477
+ );
6478
+ } catch (error$97) {
6479
+ captureCommitPhaseError(
6480
+ finishedWork,
6481
+ finishedWork.return,
6482
+ error$97
6483
+ );
6289
6484
  }
6290
- }
6291
- if (flags & 8192)
6292
- switch (firstChild.tag) {
6293
- case 13:
6294
- if (null !== firstChild.memoizedState) {
6295
- var current$92 = firstChild.alternate;
6296
- if (null === current$92 || null === current$92.memoizedState)
6297
- globalMostRecentFallbackTime = now();
6298
- }
6299
- break;
6300
- case 22:
6301
- a: {
6302
- committedLanes = firstChild;
6303
- var isHidden = null !== firstChild.memoizedState;
6304
- i = null;
6305
- for (childToDelete = committedLanes; ; ) {
6306
- if (5 === childToDelete.tag) {
6307
- if (null === i) {
6308
- i = childToDelete;
6309
- var instance = childToDelete.stateNode;
6310
- if (isHidden) {
6311
- var instance$jscomp$0 = instance,
6312
- viewConfig = instance$jscomp$0.viewConfig;
6313
- var updatePayload = diffProperties(
6314
- null,
6315
- emptyObject,
6316
- { style: { display: "none" } },
6317
- viewConfig.validAttributes
6318
- );
6319
- ReactNativePrivateInterface.UIManager.updateView(
6320
- instance$jscomp$0._nativeTag,
6321
- viewConfig.uiViewClassName,
6322
- updatePayload
6323
- );
6324
- } else {
6325
- var instance$jscomp$1 = childToDelete.stateNode,
6326
- props = childToDelete.memoizedProps,
6327
- viewConfig$jscomp$0 = instance$jscomp$1.viewConfig,
6328
- prevProps = assign({}, props, {
6329
- style: [props.style, { display: "none" }]
6330
- });
6331
- var updatePayload$jscomp$0 = diffProperties(
6332
- null,
6333
- prevProps,
6334
- props,
6335
- viewConfig$jscomp$0.validAttributes
6336
- );
6337
- ReactNativePrivateInterface.UIManager.updateView(
6338
- instance$jscomp$1._nativeTag,
6339
- viewConfig$jscomp$0.uiViewClassName,
6340
- updatePayload$jscomp$0
6341
- );
6342
- }
6343
- }
6344
- } else if (6 === childToDelete.tag) {
6345
- if (null === i) throw Error("Not yet implemented.");
6346
- } else if (
6347
- ((22 !== childToDelete.tag && 23 !== childToDelete.tag) ||
6348
- null === childToDelete.memoizedState ||
6349
- childToDelete === committedLanes) &&
6350
- null !== childToDelete.child
6351
- ) {
6352
- childToDelete.child.return = childToDelete;
6353
- childToDelete = childToDelete.child;
6354
- continue;
6355
- }
6356
- if (childToDelete === committedLanes) break;
6357
- for (; null === childToDelete.sibling; ) {
6358
- if (
6359
- null === childToDelete.return ||
6360
- childToDelete.return === committedLanes
6361
- )
6362
- break a;
6363
- i === childToDelete && (i = null);
6364
- childToDelete = childToDelete.return;
6365
- }
6366
- i === childToDelete && (i = null);
6367
- childToDelete.sibling.return = childToDelete.return;
6368
- childToDelete = childToDelete.sibling;
6369
- }
6485
+ }
6486
+ }
6487
+ break;
6488
+ case 6:
6489
+ recursivelyTraverseMutationEffects(root, finishedWork);
6490
+ commitReconciliationEffects(finishedWork);
6491
+ if (flags & 4) {
6492
+ if (null === finishedWork.stateNode)
6493
+ throw Error(
6494
+ "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
6495
+ );
6496
+ viewConfig = finishedWork.stateNode;
6497
+ updatePayload$jscomp$0 = finishedWork.memoizedProps;
6498
+ try {
6499
+ ReactNativePrivateInterface.UIManager.updateView(
6500
+ viewConfig,
6501
+ "RCTRawText",
6502
+ { text: updatePayload$jscomp$0 }
6503
+ );
6504
+ } catch (error$98) {
6505
+ captureCommitPhaseError(finishedWork, finishedWork.return, error$98);
6506
+ }
6507
+ }
6508
+ break;
6509
+ case 3:
6510
+ recursivelyTraverseMutationEffects(root, finishedWork);
6511
+ commitReconciliationEffects(finishedWork);
6512
+ break;
6513
+ case 4:
6514
+ recursivelyTraverseMutationEffects(root, finishedWork);
6515
+ commitReconciliationEffects(finishedWork);
6516
+ break;
6517
+ case 13:
6518
+ recursivelyTraverseMutationEffects(root, finishedWork);
6519
+ commitReconciliationEffects(finishedWork);
6520
+ viewConfig = finishedWork.child;
6521
+ viewConfig.flags & 8192 &&
6522
+ null !== viewConfig.memoizedState &&
6523
+ (null === viewConfig.alternate ||
6524
+ null === viewConfig.alternate.memoizedState) &&
6525
+ (globalMostRecentFallbackTime = now());
6526
+ flags & 4 && attachSuspenseRetryListeners(finishedWork);
6527
+ break;
6528
+ case 22:
6529
+ recursivelyTraverseMutationEffects(root, finishedWork);
6530
+ commitReconciliationEffects(finishedWork);
6531
+ if (flags & 8192)
6532
+ a: for (
6533
+ viewConfig = null !== finishedWork.memoizedState,
6534
+ updatePayload$jscomp$0 = null,
6535
+ current = finishedWork;
6536
+ ;
6537
+
6538
+ ) {
6539
+ if (5 === current.tag) {
6540
+ if (null === updatePayload$jscomp$0) {
6541
+ updatePayload$jscomp$0 = current;
6542
+ try {
6543
+ if (((instance$96 = current.stateNode), viewConfig))
6544
+ (newProps = instance$96.viewConfig),
6545
+ (oldProps = diffProperties(
6546
+ null,
6547
+ emptyObject,
6548
+ { style: { display: "none" } },
6549
+ newProps.validAttributes
6550
+ )),
6551
+ ReactNativePrivateInterface.UIManager.updateView(
6552
+ instance$96._nativeTag,
6553
+ newProps.uiViewClassName,
6554
+ oldProps
6555
+ );
6556
+ else {
6557
+ updatePayload = current.stateNode;
6558
+ var props = current.memoizedProps,
6559
+ viewConfig$jscomp$0 = updatePayload.viewConfig,
6560
+ prevProps = assign({}, props, {
6561
+ style: [props.style, { display: "none" }]
6562
+ });
6563
+ var updatePayload$jscomp$1 = diffProperties(
6564
+ null,
6565
+ prevProps,
6566
+ props,
6567
+ viewConfig$jscomp$0.validAttributes
6568
+ );
6569
+ ReactNativePrivateInterface.UIManager.updateView(
6570
+ updatePayload._nativeTag,
6571
+ viewConfig$jscomp$0.uiViewClassName,
6572
+ updatePayload$jscomp$1
6573
+ );
6370
6574
  }
6575
+ } catch (error) {
6576
+ captureCommitPhaseError(
6577
+ finishedWork,
6578
+ finishedWork.return,
6579
+ error
6580
+ );
6581
+ }
6371
6582
  }
6372
- switch (flags & 4102) {
6373
- case 2:
6374
- commitPlacement(firstChild);
6375
- firstChild.flags &= -3;
6376
- break;
6377
- case 6:
6378
- commitPlacement(firstChild);
6379
- firstChild.flags &= -3;
6380
- commitWork(firstChild.alternate, firstChild);
6381
- break;
6382
- case 4096:
6383
- firstChild.flags &= -4097;
6384
- break;
6385
- case 4100:
6386
- firstChild.flags &= -4097;
6387
- commitWork(firstChild.alternate, firstChild);
6388
- break;
6389
- case 4:
6390
- commitWork(firstChild.alternate, firstChild);
6583
+ } else if (6 === current.tag) {
6584
+ if (null === updatePayload$jscomp$0)
6585
+ try {
6586
+ throw Error("Not yet implemented.");
6587
+ } catch (error$88) {
6588
+ captureCommitPhaseError(
6589
+ finishedWork,
6590
+ finishedWork.return,
6591
+ error$88
6592
+ );
6593
+ }
6594
+ } else if (
6595
+ ((22 !== current.tag && 23 !== current.tag) ||
6596
+ null === current.memoizedState ||
6597
+ current === finishedWork) &&
6598
+ null !== current.child
6599
+ ) {
6600
+ current.child.return = current;
6601
+ current = current.child;
6602
+ continue;
6391
6603
  }
6392
- } catch (error) {
6393
- captureCommitPhaseError(firstChild, firstChild.return, error);
6604
+ if (current === finishedWork) break a;
6605
+ for (; null === current.sibling; ) {
6606
+ if (null === current.return || current.return === finishedWork)
6607
+ break a;
6608
+ updatePayload$jscomp$0 === current &&
6609
+ (updatePayload$jscomp$0 = null);
6610
+ current = current.return;
6611
+ }
6612
+ updatePayload$jscomp$0 === current && (updatePayload$jscomp$0 = null);
6613
+ current.sibling.return = current.return;
6614
+ current = current.sibling;
6394
6615
  }
6395
- committedLanes = firstChild.sibling;
6396
- if (null !== committedLanes) {
6397
- committedLanes.return = firstChild.return;
6398
- nextEffect = committedLanes;
6399
- break;
6616
+ break;
6617
+ case 19:
6618
+ recursivelyTraverseMutationEffects(root, finishedWork);
6619
+ commitReconciliationEffects(finishedWork);
6620
+ flags & 4 && attachSuspenseRetryListeners(finishedWork);
6621
+ break;
6622
+ case 21:
6623
+ break;
6624
+ default:
6625
+ recursivelyTraverseMutationEffects(root, finishedWork),
6626
+ commitReconciliationEffects(finishedWork);
6627
+ }
6628
+ }
6629
+ function commitReconciliationEffects(finishedWork) {
6630
+ var flags = finishedWork.flags;
6631
+ if (flags & 2) {
6632
+ try {
6633
+ a: {
6634
+ for (var parent = finishedWork.return; null !== parent; ) {
6635
+ if (isHostParent(parent)) {
6636
+ var JSCompiler_inline_result = parent;
6637
+ break a;
6638
+ }
6639
+ parent = parent.return;
6400
6640
  }
6401
- nextEffect = firstChild.return;
6641
+ throw Error(
6642
+ "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
6643
+ );
6644
+ }
6645
+ switch (JSCompiler_inline_result.tag) {
6646
+ case 5:
6647
+ var parent$jscomp$0 = JSCompiler_inline_result.stateNode;
6648
+ JSCompiler_inline_result.flags & 32 &&
6649
+ (JSCompiler_inline_result.flags &= -33);
6650
+ var before = getHostSibling(finishedWork);
6651
+ insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0);
6652
+ break;
6653
+ case 3:
6654
+ case 4:
6655
+ var parent$89 = JSCompiler_inline_result.stateNode.containerInfo,
6656
+ before$90 = getHostSibling(finishedWork);
6657
+ insertOrAppendPlacementNodeIntoContainer(
6658
+ finishedWork,
6659
+ before$90,
6660
+ parent$89
6661
+ );
6662
+ break;
6663
+ default:
6664
+ throw Error(
6665
+ "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
6666
+ );
6402
6667
  }
6668
+ } catch (error) {
6669
+ captureCommitPhaseError(finishedWork, finishedWork.return, error);
6670
+ }
6671
+ finishedWork.flags &= -3;
6403
6672
  }
6404
- inProgressRoot = inProgressLanes = null;
6673
+ flags & 4096 && (finishedWork.flags &= -4097);
6405
6674
  }
6406
6675
  function commitLayoutEffects(finishedWork, root, committedLanes) {
6407
6676
  inProgressLanes = committedLanes;
@@ -6477,21 +6746,21 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
6477
6746
  commitUpdateQueue(committedLanes, updateQueue, instance);
6478
6747
  break;
6479
6748
  case 3:
6480
- var updateQueue$85 = committedLanes.updateQueue;
6481
- if (null !== updateQueue$85) {
6482
- var instance$86 = null;
6749
+ var updateQueue$83 = committedLanes.updateQueue;
6750
+ if (null !== updateQueue$83) {
6751
+ var instance$84 = null;
6483
6752
  if (null !== committedLanes.child)
6484
6753
  switch (committedLanes.child.tag) {
6485
6754
  case 5:
6486
- instance$86 = committedLanes.child.stateNode;
6755
+ instance$84 = committedLanes.child.stateNode;
6487
6756
  break;
6488
6757
  case 1:
6489
- instance$86 = committedLanes.child.stateNode;
6758
+ instance$84 = committedLanes.child.stateNode;
6490
6759
  }
6491
6760
  commitUpdateQueue(
6492
6761
  committedLanes,
6493
- updateQueue$85,
6494
- instance$86
6762
+ updateQueue$83,
6763
+ instance$84
6495
6764
  );
6496
6765
  }
6497
6766
  break;
@@ -6506,7 +6775,7 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
6506
6775
  onCommit = _finishedWork$memoize2.onCommit,
6507
6776
  onRender = _finishedWork$memoize2.onRender,
6508
6777
  effectDuration = committedLanes.stateNode.effectDuration;
6509
- instance$86 = commitTime;
6778
+ instance$84 = commitTime;
6510
6779
  current = null === current ? "mount" : "update";
6511
6780
  currentUpdateIsNested && (current = "nested-update");
6512
6781
  "function" === typeof onRender &&
@@ -6516,14 +6785,14 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
6516
6785
  committedLanes.actualDuration,
6517
6786
  committedLanes.treeBaseDuration,
6518
6787
  committedLanes.actualStartTime,
6519
- instance$86
6788
+ instance$84
6520
6789
  );
6521
6790
  "function" === typeof onCommit &&
6522
6791
  onCommit(
6523
6792
  committedLanes.memoizedProps.id,
6524
6793
  current,
6525
6794
  effectDuration,
6526
- instance$86
6795
+ instance$84
6527
6796
  );
6528
6797
  enqueuePendingPassiveProfilerEffect(committedLanes);
6529
6798
  var parentFiber = committedLanes.return;
@@ -6546,6 +6815,7 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
6546
6815
  case 21:
6547
6816
  case 22:
6548
6817
  case 23:
6818
+ case 25:
6549
6819
  break;
6550
6820
  default:
6551
6821
  throw Error(
@@ -6553,27 +6823,27 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
6553
6823
  );
6554
6824
  }
6555
6825
  if (committedLanes.flags & 512) {
6556
- instance$86 = void 0;
6826
+ instance$84 = void 0;
6557
6827
  current = committedLanes;
6558
6828
  var ref = current.ref;
6559
6829
  if (null !== ref) {
6560
6830
  var instance$jscomp$0 = current.stateNode;
6561
6831
  switch (current.tag) {
6562
6832
  case 5:
6563
- instance$86 = instance$jscomp$0;
6833
+ instance$84 = instance$jscomp$0;
6564
6834
  break;
6565
6835
  default:
6566
- instance$86 = instance$jscomp$0;
6836
+ instance$84 = instance$jscomp$0;
6567
6837
  }
6568
6838
  if ("function" === typeof ref)
6569
6839
  if (current.mode & 2)
6570
6840
  try {
6571
- startLayoutEffectTimer(), ref(instance$86);
6841
+ startLayoutEffectTimer(), ref(instance$84);
6572
6842
  } finally {
6573
6843
  recordLayoutEffectDuration(current);
6574
6844
  }
6575
- else ref(instance$86);
6576
- else ref.current = instance$86;
6845
+ else ref(instance$84);
6846
+ else ref.current = instance$84;
6577
6847
  }
6578
6848
  }
6579
6849
  } catch (error) {
@@ -6588,10 +6858,10 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
6588
6858
  nextEffect = null;
6589
6859
  break;
6590
6860
  }
6591
- instance$86 = committedLanes.sibling;
6592
- if (null !== instance$86) {
6593
- instance$86.return = committedLanes.return;
6594
- nextEffect = instance$86;
6861
+ instance$84 = committedLanes.sibling;
6862
+ if (null !== instance$84) {
6863
+ instance$84.return = committedLanes.return;
6864
+ nextEffect = instance$84;
6595
6865
  break;
6596
6866
  }
6597
6867
  nextEffect = committedLanes.return;
@@ -6617,6 +6887,7 @@ var ceil = Math.ceil,
6617
6887
  workInProgressRootRecoverableErrors = null,
6618
6888
  globalMostRecentFallbackTime = 0,
6619
6889
  workInProgressRootRenderTargetTime = Infinity,
6890
+ workInProgressTransitions = null,
6620
6891
  hasUncaughtError = !1,
6621
6892
  firstUncaughtError = null,
6622
6893
  legacyErrorBoundariesThatAlreadyFailed = null,
@@ -6642,10 +6913,7 @@ function requestUpdateLane(fiber) {
6642
6913
  if (null !== ReactCurrentBatchConfig.transition)
6643
6914
  return (
6644
6915
  0 === currentEventTransitionLane &&
6645
- ((fiber = nextTransitionLane),
6646
- (nextTransitionLane <<= 1),
6647
- 0 === (nextTransitionLane & 4194240) && (nextTransitionLane = 64),
6648
- (currentEventTransitionLane = fiber)),
6916
+ (currentEventTransitionLane = claimNextTransitionLane()),
6649
6917
  currentEventTransitionLane
6650
6918
  );
6651
6919
  fiber = currentUpdatePriority;
@@ -6689,6 +6957,13 @@ function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
6689
6957
  (sourceFiber = sourceFiber.return);
6690
6958
  return 3 === alternate.tag ? alternate.stateNode : null;
6691
6959
  }
6960
+ function isInterleavedUpdate(fiber) {
6961
+ return (
6962
+ (null !== workInProgressRoot || null !== interleavedQueues) &&
6963
+ 0 !== (fiber.mode & 1) &&
6964
+ 0 === (executionContext & 2)
6965
+ );
6966
+ }
6692
6967
  function ensureRootIsScheduled(root, currentTime) {
6693
6968
  for (
6694
6969
  var existingCallbackNode = root.callbackNode,
@@ -6792,6 +7067,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
6792
7067
  memoizedUpdaters.clear());
6793
7068
  movePendingFibersToMemoized(root, didTimeout);
6794
7069
  }
7070
+ workInProgressTransitions = null;
6795
7071
  workInProgressRootRenderTargetTime = now() + 500;
6796
7072
  prepareFreshStack(root, didTimeout);
6797
7073
  }
@@ -6850,7 +7126,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
6850
7126
  case 1:
6851
7127
  throw Error("Root did not complete. This is a bug in React.");
6852
7128
  case 2:
6853
- commitRoot(root, workInProgressRootRecoverableErrors);
7129
+ commitRoot(
7130
+ root,
7131
+ workInProgressRootRecoverableErrors,
7132
+ workInProgressTransitions
7133
+ );
6854
7134
  break;
6855
7135
  case 3:
6856
7136
  markRootSuspended$1(root, lanes);
@@ -6867,12 +7147,21 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
6867
7147
  break;
6868
7148
  }
6869
7149
  root.timeoutHandle = scheduleTimeout(
6870
- commitRoot.bind(null, root, workInProgressRootRecoverableErrors),
7150
+ commitRoot.bind(
7151
+ null,
7152
+ root,
7153
+ workInProgressRootRecoverableErrors,
7154
+ workInProgressTransitions
7155
+ ),
6871
7156
  didTimeout
6872
7157
  );
6873
7158
  break;
6874
7159
  }
6875
- commitRoot(root, workInProgressRootRecoverableErrors);
7160
+ commitRoot(
7161
+ root,
7162
+ workInProgressRootRecoverableErrors,
7163
+ workInProgressTransitions
7164
+ );
6876
7165
  break;
6877
7166
  case 4:
6878
7167
  markRootSuspended$1(root, lanes);
@@ -6903,15 +7192,28 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
6903
7192
  : 1960 * ceil(lanes / 1960)) - lanes;
6904
7193
  if (10 < lanes) {
6905
7194
  root.timeoutHandle = scheduleTimeout(
6906
- commitRoot.bind(null, root, workInProgressRootRecoverableErrors),
7195
+ commitRoot.bind(
7196
+ null,
7197
+ root,
7198
+ workInProgressRootRecoverableErrors,
7199
+ workInProgressTransitions
7200
+ ),
6907
7201
  lanes
6908
7202
  );
6909
7203
  break;
6910
7204
  }
6911
- commitRoot(root, workInProgressRootRecoverableErrors);
7205
+ commitRoot(
7206
+ root,
7207
+ workInProgressRootRecoverableErrors,
7208
+ workInProgressTransitions
7209
+ );
6912
7210
  break;
6913
7211
  case 5:
6914
- commitRoot(root, workInProgressRootRecoverableErrors);
7212
+ commitRoot(
7213
+ root,
7214
+ workInProgressRootRecoverableErrors,
7215
+ workInProgressTransitions
7216
+ );
6915
7217
  break;
6916
7218
  default:
6917
7219
  throw Error("Unknown root exit status.");
@@ -6931,15 +7233,17 @@ function recoverFromConcurrentError(root, errorRetryLanes) {
6931
7233
  2 !== root &&
6932
7234
  ((errorRetryLanes = workInProgressRootRecoverableErrors),
6933
7235
  (workInProgressRootRecoverableErrors = errorsFromFirstAttempt),
6934
- null !== errorRetryLanes &&
6935
- (null === workInProgressRootRecoverableErrors
6936
- ? (workInProgressRootRecoverableErrors = errorRetryLanes)
6937
- : workInProgressRootRecoverableErrors.push.apply(
6938
- workInProgressRootRecoverableErrors,
6939
- errorRetryLanes
6940
- )));
7236
+ null !== errorRetryLanes && queueRecoverableErrors(errorRetryLanes));
6941
7237
  return root;
6942
7238
  }
7239
+ function queueRecoverableErrors(errors) {
7240
+ null === workInProgressRootRecoverableErrors
7241
+ ? (workInProgressRootRecoverableErrors = errors)
7242
+ : workInProgressRootRecoverableErrors.push.apply(
7243
+ workInProgressRootRecoverableErrors,
7244
+ errors
7245
+ );
7246
+ }
6943
7247
  function isRenderConsistentWithExternalStores(finishedWork) {
6944
7248
  for (var node = finishedWork; ; ) {
6945
7249
  if (node.flags & 16384) {
@@ -7011,7 +7315,11 @@ function performSyncWorkOnRoot(root) {
7011
7315
  throw Error("Root did not complete. This is a bug in React.");
7012
7316
  root.finishedWork = root.current.alternate;
7013
7317
  root.finishedLanes = lanes;
7014
- commitRoot(root, workInProgressRootRecoverableErrors);
7318
+ commitRoot(
7319
+ root,
7320
+ workInProgressRootRecoverableErrors,
7321
+ workInProgressTransitions
7322
+ );
7015
7323
  ensureRootIsScheduled(root, now());
7016
7324
  return null;
7017
7325
  }
@@ -7250,12 +7558,12 @@ function handleError(root$jscomp$0, thrownValue) {
7250
7558
  root.flags |= 65536;
7251
7559
  thrownValue &= -thrownValue;
7252
7560
  root.lanes |= thrownValue;
7253
- var update$35 = createClassErrorUpdate(
7561
+ var update$36 = createClassErrorUpdate(
7254
7562
  root,
7255
7563
  wakeable,
7256
7564
  thrownValue
7257
7565
  );
7258
- enqueueCapturedUpdate(root, update$35);
7566
+ enqueueCapturedUpdate(root, update$36);
7259
7567
  break a;
7260
7568
  }
7261
7569
  }
@@ -7302,6 +7610,7 @@ function renderRootSync(root, lanes) {
7302
7610
  memoizedUpdaters.clear());
7303
7611
  movePendingFibersToMemoized(root, lanes);
7304
7612
  }
7613
+ workInProgressTransitions = null;
7305
7614
  prepareFreshStack(root, lanes);
7306
7615
  }
7307
7616
  do
@@ -7396,50 +7705,60 @@ function completeUnitOfWork(unitOfWork) {
7396
7705
  } while (null !== completedWork);
7397
7706
  0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
7398
7707
  }
7399
- function commitRoot(root, recoverableErrors) {
7708
+ function commitRoot(root, recoverableErrors, transitions) {
7400
7709
  var previousUpdateLanePriority = currentUpdatePriority,
7401
7710
  prevTransition = ReactCurrentBatchConfig$2.transition;
7402
7711
  try {
7403
7712
  (ReactCurrentBatchConfig$2.transition = null),
7404
7713
  (currentUpdatePriority = 1),
7405
- commitRootImpl(root, recoverableErrors, previousUpdateLanePriority);
7714
+ commitRootImpl(
7715
+ root,
7716
+ recoverableErrors,
7717
+ transitions,
7718
+ previousUpdateLanePriority
7719
+ );
7406
7720
  } finally {
7407
7721
  (ReactCurrentBatchConfig$2.transition = prevTransition),
7408
7722
  (currentUpdatePriority = previousUpdateLanePriority);
7409
7723
  }
7410
7724
  return null;
7411
7725
  }
7412
- function commitRootImpl(root, recoverableErrors, renderPriorityLevel) {
7726
+ function commitRootImpl(
7727
+ root,
7728
+ recoverableErrors,
7729
+ transitions,
7730
+ renderPriorityLevel
7731
+ ) {
7413
7732
  do flushPassiveEffects();
7414
7733
  while (null !== rootWithPendingPassiveEffects);
7415
7734
  if (0 !== (executionContext & 6))
7416
7735
  throw Error("Should not already be working.");
7417
- var finishedWork = root.finishedWork,
7418
- lanes = root.finishedLanes;
7419
- if (null === finishedWork) return null;
7736
+ transitions = root.finishedWork;
7737
+ var lanes = root.finishedLanes;
7738
+ if (null === transitions) return null;
7420
7739
  root.finishedWork = null;
7421
7740
  root.finishedLanes = 0;
7422
- if (finishedWork === root.current)
7741
+ if (transitions === root.current)
7423
7742
  throw Error(
7424
7743
  "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
7425
7744
  );
7426
7745
  root.callbackNode = null;
7427
7746
  root.callbackPriority = 0;
7428
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
7747
+ var remainingLanes = transitions.lanes | transitions.childLanes;
7429
7748
  markRootFinished(root, remainingLanes);
7430
7749
  root === workInProgressRoot &&
7431
7750
  ((workInProgress = workInProgressRoot = null),
7432
7751
  (workInProgressRootRenderLanes = 0));
7433
- (0 === (finishedWork.subtreeFlags & 2064) &&
7434
- 0 === (finishedWork.flags & 2064)) ||
7752
+ (0 === (transitions.subtreeFlags & 2064) &&
7753
+ 0 === (transitions.flags & 2064)) ||
7435
7754
  rootDoesHavePassiveEffects ||
7436
7755
  ((rootDoesHavePassiveEffects = !0),
7437
7756
  scheduleCallback$1(NormalPriority, function() {
7438
7757
  flushPassiveEffects();
7439
7758
  return null;
7440
7759
  }));
7441
- remainingLanes = 0 !== (finishedWork.flags & 15990);
7442
- if (0 !== (finishedWork.subtreeFlags & 15990) || remainingLanes) {
7760
+ remainingLanes = 0 !== (transitions.flags & 15990);
7761
+ if (0 !== (transitions.subtreeFlags & 15990) || remainingLanes) {
7443
7762
  remainingLanes = ReactCurrentBatchConfig$2.transition;
7444
7763
  ReactCurrentBatchConfig$2.transition = null;
7445
7764
  var previousPriority = currentUpdatePriority;
@@ -7447,32 +7766,32 @@ function commitRootImpl(root, recoverableErrors, renderPriorityLevel) {
7447
7766
  var prevExecutionContext = executionContext;
7448
7767
  executionContext |= 4;
7449
7768
  ReactCurrentOwner$2.current = null;
7450
- commitBeforeMutationEffects(root, finishedWork);
7769
+ commitBeforeMutationEffects(root, transitions);
7451
7770
  commitTime = now$1();
7452
- commitMutationEffects(root, finishedWork, lanes);
7453
- root.current = finishedWork;
7454
- commitLayoutEffects(finishedWork, root, lanes);
7771
+ commitMutationEffects(root, transitions, lanes);
7772
+ root.current = transitions;
7773
+ commitLayoutEffects(transitions, root, lanes);
7455
7774
  requestPaint();
7456
7775
  executionContext = prevExecutionContext;
7457
7776
  currentUpdatePriority = previousPriority;
7458
7777
  ReactCurrentBatchConfig$2.transition = remainingLanes;
7459
- } else (root.current = finishedWork), (commitTime = now$1());
7778
+ } else (root.current = transitions), (commitTime = now$1());
7460
7779
  rootDoesHavePassiveEffects &&
7461
7780
  ((rootDoesHavePassiveEffects = !1),
7462
7781
  (rootWithPendingPassiveEffects = root),
7463
7782
  (pendingPassiveEffectsLanes = lanes));
7464
7783
  remainingLanes = root.pendingLanes;
7465
7784
  0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
7466
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
7785
+ onCommitRoot(transitions.stateNode, renderPriorityLevel);
7467
7786
  isDevToolsPresent && root.memoizedUpdaters.clear();
7468
7787
  ensureRootIsScheduled(root, now());
7469
7788
  if (null !== recoverableErrors)
7470
7789
  for (
7471
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
7472
- finishedWork < recoverableErrors.length;
7473
- finishedWork++
7790
+ renderPriorityLevel = root.onRecoverableError, transitions = 0;
7791
+ transitions < recoverableErrors.length;
7792
+ transitions++
7474
7793
  )
7475
- renderPriorityLevel(recoverableErrors[finishedWork]);
7794
+ renderPriorityLevel(recoverableErrors[transitions]);
7476
7795
  if (hasUncaughtError)
7477
7796
  throw ((hasUncaughtError = !1),
7478
7797
  (root = firstUncaughtError),
@@ -7773,21 +8092,43 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) {
7773
8092
  : (workInProgressRootPingedLanes |= pingedLanes));
7774
8093
  ensureRootIsScheduled(root, wakeable);
7775
8094
  }
7776
- function resolveRetryWakeable(boundaryFiber, wakeable) {
7777
- var retryCache = boundaryFiber.stateNode;
7778
- null !== retryCache && retryCache.delete(wakeable);
7779
- wakeable = 0;
7780
- 0 === wakeable &&
8095
+ function retryTimedOutBoundary(boundaryFiber, retryLane) {
8096
+ 0 === retryLane &&
7781
8097
  (0 === (boundaryFiber.mode & 1)
7782
- ? (wakeable = 1)
7783
- : ((wakeable = nextRetryLane),
8098
+ ? (retryLane = 1)
8099
+ : ((retryLane = nextRetryLane),
7784
8100
  (nextRetryLane <<= 1),
7785
8101
  0 === (nextRetryLane & 130023424) && (nextRetryLane = 4194304)));
7786
- retryCache = requestEventTime();
7787
- boundaryFiber = markUpdateLaneFromFiberToRoot(boundaryFiber, wakeable);
8102
+ var eventTime = requestEventTime();
8103
+ boundaryFiber = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);
7788
8104
  null !== boundaryFiber &&
7789
- (markRootUpdated(boundaryFiber, wakeable, retryCache),
7790
- ensureRootIsScheduled(boundaryFiber, retryCache));
8105
+ (markRootUpdated(boundaryFiber, retryLane, eventTime),
8106
+ ensureRootIsScheduled(boundaryFiber, eventTime));
8107
+ }
8108
+ function retryDehydratedSuspenseBoundary(boundaryFiber) {
8109
+ var suspenseState = boundaryFiber.memoizedState,
8110
+ retryLane = 0;
8111
+ null !== suspenseState && (retryLane = suspenseState.retryLane);
8112
+ retryTimedOutBoundary(boundaryFiber, retryLane);
8113
+ }
8114
+ function resolveRetryWakeable(boundaryFiber, wakeable) {
8115
+ var retryLane = 0;
8116
+ switch (boundaryFiber.tag) {
8117
+ case 13:
8118
+ var retryCache = boundaryFiber.stateNode;
8119
+ var suspenseState = boundaryFiber.memoizedState;
8120
+ null !== suspenseState && (retryLane = suspenseState.retryLane);
8121
+ break;
8122
+ case 19:
8123
+ retryCache = boundaryFiber.stateNode;
8124
+ break;
8125
+ default:
8126
+ throw Error(
8127
+ "Pinged unknown suspense boundary type. This is probably a bug in React."
8128
+ );
8129
+ }
8130
+ null !== retryCache && retryCache.delete(wakeable);
8131
+ retryTimedOutBoundary(boundaryFiber, retryLane);
7791
8132
  }
7792
8133
  var beginWork$1;
7793
8134
  beginWork$1 = function(current, workInProgress, renderLanes) {
@@ -7817,10 +8158,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7817
8158
  switch (workInProgress.tag) {
7818
8159
  case 2:
7819
8160
  var Component = workInProgress.type;
7820
- null !== current &&
7821
- ((current.alternate = null),
7822
- (workInProgress.alternate = null),
7823
- (workInProgress.flags |= 2));
8161
+ resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
7824
8162
  current = workInProgress.pendingProps;
7825
8163
  var context = getMaskedContext(
7826
8164
  workInProgress,
@@ -7874,10 +8212,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7874
8212
  case 16:
7875
8213
  Component = workInProgress.elementType;
7876
8214
  a: {
7877
- null !== current &&
7878
- ((current.alternate = null),
7879
- (workInProgress.alternate = null),
7880
- (workInProgress.flags |= 2));
8215
+ resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
7881
8216
  current = workInProgress.pendingProps;
7882
8217
  context = Component._init;
7883
8218
  Component = context(Component._payload);
@@ -7983,7 +8318,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
7983
8318
  return (
7984
8319
  pushHostContext(workInProgress),
7985
8320
  (Component = workInProgress.pendingProps.children),
7986
- markRef$1(current, workInProgress),
8321
+ markRef(current, workInProgress),
7987
8322
  reconcileChildren(current, workInProgress, Component, renderLanes),
7988
8323
  workInProgress.child
7989
8324
  );
@@ -8081,24 +8416,24 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
8081
8416
  }
8082
8417
  } else
8083
8418
  for (
8084
- newValue = workInProgress.child,
8085
- null !== newValue && (newValue.return = workInProgress);
8086
- null !== newValue;
8419
+ hasContext = workInProgress.child,
8420
+ null !== hasContext && (hasContext.return = workInProgress);
8421
+ null !== hasContext;
8087
8422
 
8088
8423
  ) {
8089
- var list = newValue.dependencies;
8424
+ var list = hasContext.dependencies;
8090
8425
  if (null !== list) {
8091
- hasContext = newValue.child;
8426
+ newValue = hasContext.child;
8092
8427
  for (
8093
8428
  var dependency = list.firstContext;
8094
8429
  null !== dependency;
8095
8430
 
8096
8431
  ) {
8097
8432
  if (dependency.context === Component) {
8098
- if (1 === newValue.tag) {
8433
+ if (1 === hasContext.tag) {
8099
8434
  dependency = createUpdate(-1, renderLanes & -renderLanes);
8100
8435
  dependency.tag = 2;
8101
- var updateQueue = newValue.updateQueue;
8436
+ var updateQueue = hasContext.updateQueue;
8102
8437
  if (null !== updateQueue) {
8103
8438
  updateQueue = updateQueue.shared;
8104
8439
  var pending = updateQueue.pending;
@@ -8109,11 +8444,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
8109
8444
  updateQueue.pending = dependency;
8110
8445
  }
8111
8446
  }
8112
- newValue.lanes |= renderLanes;
8113
- dependency = newValue.alternate;
8447
+ hasContext.lanes |= renderLanes;
8448
+ dependency = hasContext.alternate;
8114
8449
  null !== dependency && (dependency.lanes |= renderLanes);
8115
8450
  scheduleContextWorkOnParentPath(
8116
- newValue.return,
8451
+ hasContext.return,
8117
8452
  renderLanes,
8118
8453
  workInProgress
8119
8454
  );
@@ -8122,29 +8457,43 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
8122
8457
  }
8123
8458
  dependency = dependency.next;
8124
8459
  }
8125
- } else
8126
- hasContext =
8127
- 10 === newValue.tag
8128
- ? newValue.type === workInProgress.type
8129
- ? null
8130
- : newValue.child
8131
- : newValue.child;
8132
- if (null !== hasContext) hasContext.return = newValue;
8460
+ } else if (10 === hasContext.tag)
8461
+ newValue =
8462
+ hasContext.type === workInProgress.type
8463
+ ? null
8464
+ : hasContext.child;
8465
+ else if (18 === hasContext.tag) {
8466
+ newValue = hasContext.return;
8467
+ if (null === newValue)
8468
+ throw Error(
8469
+ "We just came from a parent so we must have had a parent. This is a bug in React."
8470
+ );
8471
+ newValue.lanes |= renderLanes;
8472
+ list = newValue.alternate;
8473
+ null !== list && (list.lanes |= renderLanes);
8474
+ scheduleContextWorkOnParentPath(
8475
+ newValue,
8476
+ renderLanes,
8477
+ workInProgress
8478
+ );
8479
+ newValue = hasContext.sibling;
8480
+ } else newValue = hasContext.child;
8481
+ if (null !== newValue) newValue.return = hasContext;
8133
8482
  else
8134
- for (hasContext = newValue; null !== hasContext; ) {
8135
- if (hasContext === workInProgress) {
8136
- hasContext = null;
8483
+ for (newValue = hasContext; null !== newValue; ) {
8484
+ if (newValue === workInProgress) {
8485
+ newValue = null;
8137
8486
  break;
8138
8487
  }
8139
- newValue = hasContext.sibling;
8140
- if (null !== newValue) {
8141
- newValue.return = hasContext.return;
8142
- hasContext = newValue;
8488
+ hasContext = newValue.sibling;
8489
+ if (null !== hasContext) {
8490
+ hasContext.return = newValue.return;
8491
+ newValue = hasContext;
8143
8492
  break;
8144
8493
  }
8145
- hasContext = hasContext.return;
8494
+ newValue = newValue.return;
8146
8495
  }
8147
- newValue = hasContext;
8496
+ hasContext = newValue;
8148
8497
  }
8149
8498
  reconcileChildren(
8150
8499
  current,
@@ -8195,10 +8544,7 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
8195
8544
  workInProgress.elementType === Component
8196
8545
  ? context
8197
8546
  : resolveDefaultProps(Component, context)),
8198
- null !== current &&
8199
- ((current.alternate = null),
8200
- (workInProgress.alternate = null),
8201
- (workInProgress.flags |= 2)),
8547
+ resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
8202
8548
  (workInProgress.tag = 1),
8203
8549
  isContextProvider(Component)
8204
8550
  ? ((current = !0), pushContextProvider(workInProgress))
@@ -8563,10 +8909,10 @@ batchedUpdatesImpl = function(fn, a) {
8563
8909
  }
8564
8910
  };
8565
8911
  var roots = new Map(),
8566
- devToolsConfig$jscomp$inline_1003 = {
8912
+ devToolsConfig$jscomp$inline_1010 = {
8567
8913
  findFiberByHostInstance: getInstanceFromTag,
8568
8914
  bundleType: 0,
8569
- version: "18.0.0-experimental-34aa5cfe0-20220329",
8915
+ version: "18.2.0-next-d300cebde-20220601",
8570
8916
  rendererPackageName: "react-native-renderer",
8571
8917
  rendererConfig: {
8572
8918
  getInspectorDataForViewTag: function() {
@@ -8581,11 +8927,11 @@ var roots = new Map(),
8581
8927
  }.bind(null, findNodeHandle)
8582
8928
  }
8583
8929
  };
8584
- var internals$jscomp$inline_1277 = {
8585
- bundleType: devToolsConfig$jscomp$inline_1003.bundleType,
8586
- version: devToolsConfig$jscomp$inline_1003.version,
8587
- rendererPackageName: devToolsConfig$jscomp$inline_1003.rendererPackageName,
8588
- rendererConfig: devToolsConfig$jscomp$inline_1003.rendererConfig,
8930
+ var internals$jscomp$inline_1302 = {
8931
+ bundleType: devToolsConfig$jscomp$inline_1010.bundleType,
8932
+ version: devToolsConfig$jscomp$inline_1010.version,
8933
+ rendererPackageName: devToolsConfig$jscomp$inline_1010.rendererPackageName,
8934
+ rendererConfig: devToolsConfig$jscomp$inline_1010.rendererConfig,
8589
8935
  overrideHookState: null,
8590
8936
  overrideHookStateDeletePath: null,
8591
8937
  overrideHookStateRenamePath: null,
@@ -8601,26 +8947,26 @@ var internals$jscomp$inline_1277 = {
8601
8947
  return null === fiber ? null : fiber.stateNode;
8602
8948
  },
8603
8949
  findFiberByHostInstance:
8604
- devToolsConfig$jscomp$inline_1003.findFiberByHostInstance ||
8950
+ devToolsConfig$jscomp$inline_1010.findFiberByHostInstance ||
8605
8951
  emptyFindFiberByHostInstance,
8606
8952
  findHostInstancesForRefresh: null,
8607
8953
  scheduleRefresh: null,
8608
8954
  scheduleRoot: null,
8609
8955
  setRefreshHandler: null,
8610
8956
  getCurrentFiber: null,
8611
- reconcilerVersion: "18.0.0-experimental-34aa5cfe0-20220329"
8957
+ reconcilerVersion: "18.2.0-next-d300cebde-20220601"
8612
8958
  };
8613
8959
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
8614
- var hook$jscomp$inline_1278 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
8960
+ var hook$jscomp$inline_1303 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
8615
8961
  if (
8616
- !hook$jscomp$inline_1278.isDisabled &&
8617
- hook$jscomp$inline_1278.supportsFiber
8962
+ !hook$jscomp$inline_1303.isDisabled &&
8963
+ hook$jscomp$inline_1303.supportsFiber
8618
8964
  )
8619
8965
  try {
8620
- (rendererID = hook$jscomp$inline_1278.inject(
8621
- internals$jscomp$inline_1277
8966
+ (rendererID = hook$jscomp$inline_1303.inject(
8967
+ internals$jscomp$inline_1302
8622
8968
  )),
8623
- (injectedHook = hook$jscomp$inline_1278);
8969
+ (injectedHook = hook$jscomp$inline_1303);
8624
8970
  } catch (err) {}
8625
8971
  }
8626
8972
  exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
@@ -8682,7 +9028,8 @@ exports.render = function(element, containerTag, callback) {
8682
9028
  element: null,
8683
9029
  isDehydrated: !1,
8684
9030
  cache: null,
8685
- transitions: null
9031
+ transitions: null,
9032
+ pendingSuspenseBoundaries: null
8686
9033
  };
8687
9034
  initializeUpdateQueue(JSCompiler_inline_result);
8688
9035
  roots.set(containerTag, root);