react-dom 19.1.0-canary-cbbe8666-20250213 → 19.1.0-canary-e670e72f-20250214

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.
@@ -5416,6 +5416,24 @@ function describeNativeComponentFrame(fn, construct) {
5416
5416
  "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
5417
5417
  return sampleLines;
5418
5418
  }
5419
+ function formatOwnerStack(error) {
5420
+ var prevPrepareStackTrace = Error.prepareStackTrace;
5421
+ Error.prepareStackTrace = void 0;
5422
+ error = error.stack;
5423
+ Error.prepareStackTrace = prevPrepareStackTrace;
5424
+ error.startsWith("Error: react-stack-top-frame\n") &&
5425
+ (error = error.slice(29));
5426
+ prevPrepareStackTrace = error.indexOf("\n");
5427
+ -1 !== prevPrepareStackTrace &&
5428
+ (error = error.slice(prevPrepareStackTrace + 1));
5429
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
5430
+ -1 !== prevPrepareStackTrace &&
5431
+ (prevPrepareStackTrace = error.lastIndexOf("\n", prevPrepareStackTrace));
5432
+ if (-1 !== prevPrepareStackTrace)
5433
+ error = error.slice(0, prevPrepareStackTrace);
5434
+ else return "";
5435
+ return error;
5436
+ }
5419
5437
  function describeComponentStackByType(type) {
5420
5438
  if ("string" === typeof type) return describeBuiltInComponentFrame(type);
5421
5439
  if ("function" === typeof type)
@@ -5455,18 +5473,6 @@ function describeComponentStackByType(type) {
5455
5473
  }
5456
5474
  return "";
5457
5475
  }
5458
- function getStackByComponentStackNode(componentStack) {
5459
- try {
5460
- var info = "";
5461
- do
5462
- (info += describeComponentStackByType(componentStack.type)),
5463
- (componentStack = componentStack.parent);
5464
- while (componentStack);
5465
- return info;
5466
- } catch (x) {
5467
- return "\nError generating stack: " + x.message + "\n" + x.stack;
5468
- }
5469
- }
5470
5476
  var callComponent = {
5471
5477
  "react-stack-bottom-frame": function (Component, props, secondArg) {
5472
5478
  return Component(props, secondArg);
@@ -5617,7 +5623,9 @@ function createRequest(
5617
5623
  null,
5618
5624
  emptyTreeContext,
5619
5625
  null,
5620
- !1
5626
+ !1,
5627
+ emptyContextObject,
5628
+ null
5621
5629
  );
5622
5630
  pushComponentStack(children);
5623
5631
  resumableState.pingedTasks.push(children);
@@ -5677,7 +5685,9 @@ function createRenderTask(
5677
5685
  context,
5678
5686
  treeContext,
5679
5687
  componentStack,
5680
- isFallback
5688
+ isFallback,
5689
+ legacyContext,
5690
+ debugTask
5681
5691
  ) {
5682
5692
  request.allPendingTasks++;
5683
5693
  null === blockedBoundary
@@ -5703,6 +5713,7 @@ function createRenderTask(
5703
5713
  thenableState: thenableState,
5704
5714
  isFallback: isFallback
5705
5715
  };
5716
+ task.debugTask = debugTask;
5706
5717
  abortSet.add(task);
5707
5718
  return task;
5708
5719
  }
@@ -5720,7 +5731,9 @@ function createReplayTask(
5720
5731
  context,
5721
5732
  treeContext,
5722
5733
  componentStack,
5723
- isFallback
5734
+ isFallback,
5735
+ legacyContext,
5736
+ debugTask
5724
5737
  ) {
5725
5738
  request.allPendingTasks++;
5726
5739
  null === blockedBoundary
@@ -5747,6 +5760,7 @@ function createReplayTask(
5747
5760
  thenableState: thenableState,
5748
5761
  isFallback: isFallback
5749
5762
  };
5763
+ task.debugTask = debugTask;
5750
5764
  abortSet.add(task);
5751
5765
  return task;
5752
5766
  }
@@ -5773,21 +5787,63 @@ function createPendingSegment(
5773
5787
  };
5774
5788
  }
5775
5789
  function getCurrentStackInDEV() {
5776
- return null === currentTaskInDEV || null === currentTaskInDEV.componentStack
5777
- ? ""
5778
- : getStackByComponentStackNode(currentTaskInDEV.componentStack);
5790
+ if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)
5791
+ return "";
5792
+ var componentStack = currentTaskInDEV.componentStack;
5793
+ try {
5794
+ var info = "";
5795
+ if ("string" === typeof componentStack.type)
5796
+ info += describeBuiltInComponentFrame(componentStack.type);
5797
+ else if ("function" === typeof componentStack.type) {
5798
+ if (!componentStack.owner) {
5799
+ var JSCompiler_temp_const = info,
5800
+ fn = componentStack.type,
5801
+ name = fn ? fn.displayName || fn.name : "";
5802
+ var JSCompiler_inline_result = name
5803
+ ? describeBuiltInComponentFrame(name)
5804
+ : "";
5805
+ info = JSCompiler_temp_const + JSCompiler_inline_result;
5806
+ }
5807
+ } else
5808
+ componentStack.owner ||
5809
+ (info += describeComponentStackByType(componentStack.type));
5810
+ for (; componentStack; )
5811
+ (JSCompiler_temp_const = null),
5812
+ null != componentStack.debugStack
5813
+ ? (JSCompiler_temp_const = formatOwnerStack(
5814
+ componentStack.debugStack
5815
+ ))
5816
+ : ((JSCompiler_inline_result = componentStack),
5817
+ null != JSCompiler_inline_result.stack &&
5818
+ (JSCompiler_temp_const =
5819
+ "string" !== typeof JSCompiler_inline_result.stack
5820
+ ? (JSCompiler_inline_result.stack = formatOwnerStack(
5821
+ JSCompiler_inline_result.stack
5822
+ ))
5823
+ : JSCompiler_inline_result.stack)),
5824
+ (componentStack = componentStack.owner) &&
5825
+ JSCompiler_temp_const &&
5826
+ (info += "\n" + JSCompiler_temp_const);
5827
+ var JSCompiler_inline_result$jscomp$0 = info;
5828
+ } catch (x) {
5829
+ JSCompiler_inline_result$jscomp$0 =
5830
+ "\nError generating stack: " + x.message + "\n" + x.stack;
5831
+ }
5832
+ return JSCompiler_inline_result$jscomp$0;
5779
5833
  }
5780
5834
  function pushServerComponentStack(task, debugInfo) {
5781
5835
  if (null != debugInfo)
5782
5836
  for (var i = 0; i < debugInfo.length; i++) {
5783
5837
  var componentInfo = debugInfo[i];
5784
5838
  "string" === typeof componentInfo.name &&
5785
- (task.componentStack = {
5839
+ void 0 !== componentInfo.debugStack &&
5840
+ ((task.componentStack = {
5786
5841
  parent: task.componentStack,
5787
5842
  type: componentInfo,
5788
5843
  owner: componentInfo.owner,
5789
- stack: null
5790
- });
5844
+ stack: componentInfo.debugStack
5845
+ }),
5846
+ (task.debugTask = componentInfo.debugTask));
5791
5847
  }
5792
5848
  }
5793
5849
  function pushComponentStack(task) {
@@ -5796,13 +5852,15 @@ function pushComponentStack(task) {
5796
5852
  switch (node.$$typeof) {
5797
5853
  case REACT_ELEMENT_TYPE:
5798
5854
  var type = node.type,
5799
- owner = node._owner;
5855
+ owner = node._owner,
5856
+ stack = node._debugStack;
5800
5857
  pushServerComponentStack(task, node._debugInfo);
5858
+ task.debugTask = node._debugTask;
5801
5859
  task.componentStack = {
5802
5860
  parent: task.componentStack,
5803
5861
  type: type,
5804
5862
  owner: owner,
5805
- stack: null
5863
+ stack: stack
5806
5864
  };
5807
5865
  break;
5808
5866
  case REACT_LAZY_TYPE:
@@ -5813,14 +5871,24 @@ function pushComponentStack(task) {
5813
5871
  pushServerComponentStack(task, node._debugInfo);
5814
5872
  }
5815
5873
  }
5816
- function getThrownInfo(node) {
5874
+ function getThrownInfo(node$jscomp$0) {
5817
5875
  var errorInfo = {};
5818
- node &&
5876
+ node$jscomp$0 &&
5819
5877
  Object.defineProperty(errorInfo, "componentStack", {
5820
5878
  configurable: !0,
5821
5879
  enumerable: !0,
5822
5880
  get: function () {
5823
- var stack = getStackByComponentStackNode(node);
5881
+ try {
5882
+ var info = "",
5883
+ node = node$jscomp$0;
5884
+ do
5885
+ (info += describeComponentStackByType(node.type)),
5886
+ (node = node.parent);
5887
+ while (node);
5888
+ var stack = info;
5889
+ } catch (x) {
5890
+ stack = "\nError generating stack: " + x.message + "\n" + x.stack;
5891
+ }
5824
5892
  Object.defineProperty(errorInfo, "componentStack", { value: stack });
5825
5893
  return stack;
5826
5894
  }
@@ -5849,9 +5917,11 @@ function encodeErrorForBoundary(
5849
5917
  boundary.errorStack = null !== error ? wasAborted + error : null;
5850
5918
  boundary.errorComponentStack = thrownInfo.componentStack;
5851
5919
  }
5852
- function logRecoverableError(request, error, errorInfo) {
5920
+ function logRecoverableError(request, error, errorInfo, debugTask) {
5853
5921
  request = request.onError;
5854
- error = request(error, errorInfo);
5922
+ error = debugTask
5923
+ ? debugTask.run(request.bind(null, error, errorInfo))
5924
+ : request(error, errorInfo);
5855
5925
  if (null != error && "string" !== typeof error)
5856
5926
  console.error(
5857
5927
  'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',
@@ -5859,11 +5929,13 @@ function logRecoverableError(request, error, errorInfo) {
5859
5929
  );
5860
5930
  else return error;
5861
5931
  }
5862
- function fatalError(request, error) {
5863
- var onShellError = request.onShellError,
5864
- onFatalError = request.onFatalError;
5865
- onShellError(error);
5866
- onFatalError(error);
5932
+ function fatalError(request, error, errorInfo, debugTask) {
5933
+ errorInfo = request.onShellError;
5934
+ var onFatalError = request.onFatalError;
5935
+ debugTask
5936
+ ? (debugTask.run(errorInfo.bind(null, error)),
5937
+ debugTask.run(onFatalError.bind(null, error)))
5938
+ : (errorInfo(error), onFatalError(error));
5867
5939
  null !== request.destination
5868
5940
  ? ((request.status = CLOSED), closeWithError(request.destination, error))
5869
5941
  : ((request.status = 13), (request.fatalError = error));
@@ -6404,7 +6476,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
6404
6476
  task.context,
6405
6477
  task.treeContext,
6406
6478
  task.componentStack,
6407
- task.isFallback
6479
+ task.isFallback,
6480
+ emptyContextObject,
6481
+ task.debugTask
6408
6482
  );
6409
6483
  pushComponentStack(preambleTask);
6410
6484
  request.pingedTasks.push(preambleTask);
@@ -6578,7 +6652,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
6578
6652
  task.context,
6579
6653
  task.treeContext,
6580
6654
  task.componentStack,
6581
- task.isFallback
6655
+ task.isFallback,
6656
+ emptyContextObject,
6657
+ task.debugTask
6582
6658
  );
6583
6659
  pushComponentStack(suspendedPrimaryTask);
6584
6660
  request.pingedTasks.push(suspendedPrimaryTask);
@@ -6613,7 +6689,12 @@ function renderElement(request, task, keyPath, type, props, ref) {
6613
6689
  var error = request.fatalError;
6614
6690
  } else (contentRootSegment.status = 4), (error = thrownValue$2);
6615
6691
  var thrownInfo = getThrownInfo(task.componentStack);
6616
- var errorDigest = logRecoverableError(request, error, thrownInfo);
6692
+ var errorDigest = logRecoverableError(
6693
+ request,
6694
+ error,
6695
+ thrownInfo,
6696
+ task.debugTask
6697
+ );
6617
6698
  encodeErrorForBoundary(
6618
6699
  newBoundary,
6619
6700
  errorDigest,
@@ -6644,7 +6725,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
6644
6725
  task.context,
6645
6726
  task.treeContext,
6646
6727
  task.componentStack,
6647
- !0
6728
+ !0,
6729
+ emptyContextObject,
6730
+ task.debugTask
6648
6731
  );
6649
6732
  pushComponentStack(suspendedFallbackTask);
6650
6733
  request.pingedTasks.push(suspendedFallbackTask);
@@ -6796,15 +6879,172 @@ function resumeNode(request, task, segmentId, node, childIndex) {
6796
6879
  (task.replay = prevReplay), (task.blockedSegment = null);
6797
6880
  }
6798
6881
  }
6882
+ function replayElement(
6883
+ request,
6884
+ task,
6885
+ keyPath,
6886
+ name,
6887
+ keyOrIndex,
6888
+ childIndex,
6889
+ type,
6890
+ props,
6891
+ ref,
6892
+ replay
6893
+ ) {
6894
+ childIndex = replay.nodes;
6895
+ for (var i = 0; i < childIndex.length; i++) {
6896
+ var node = childIndex[i];
6897
+ if (keyOrIndex === node[1]) {
6898
+ if (4 === node.length) {
6899
+ if (null !== name && name !== node[0])
6900
+ throw Error(
6901
+ "Expected the resume to render <" +
6902
+ node[0] +
6903
+ "> in this slot but instead it rendered <" +
6904
+ name +
6905
+ ">. The tree doesn't match so React will fallback to client rendering."
6906
+ );
6907
+ var childNodes = node[2];
6908
+ node = node[3];
6909
+ name = task.node;
6910
+ task.replay = { nodes: childNodes, slots: node, pendingTasks: 1 };
6911
+ try {
6912
+ renderElement(request, task, keyPath, type, props, ref);
6913
+ if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
6914
+ throw Error(
6915
+ "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
6916
+ );
6917
+ task.replay.pendingTasks--;
6918
+ } catch (x) {
6919
+ if (
6920
+ "object" === typeof x &&
6921
+ null !== x &&
6922
+ (x === SuspenseException || "function" === typeof x.then)
6923
+ )
6924
+ throw (task.node === name && (task.replay = replay), x);
6925
+ task.replay.pendingTasks--;
6926
+ type = getThrownInfo(task.componentStack);
6927
+ props = request;
6928
+ request = task.blockedBoundary;
6929
+ keyPath = x;
6930
+ ref = node;
6931
+ node = logRecoverableError(props, keyPath, type, task.debugTask);
6932
+ abortRemainingReplayNodes(
6933
+ props,
6934
+ request,
6935
+ childNodes,
6936
+ ref,
6937
+ keyPath,
6938
+ node,
6939
+ type,
6940
+ !1
6941
+ );
6942
+ }
6943
+ task.replay = replay;
6944
+ } else {
6945
+ if (type !== REACT_SUSPENSE_TYPE)
6946
+ throw Error(
6947
+ "Expected the resume to render <Suspense> in this slot but instead it rendered <" +
6948
+ (getComponentNameFromType(type) || "Unknown") +
6949
+ ">. The tree doesn't match so React will fallback to client rendering."
6950
+ );
6951
+ a: {
6952
+ replay = void 0;
6953
+ type = node[5];
6954
+ ref = node[2];
6955
+ name = node[3];
6956
+ keyOrIndex = null === node[4] ? [] : node[4][2];
6957
+ node = null === node[4] ? null : node[4][3];
6958
+ var prevKeyPath = task.keyPath,
6959
+ previousReplaySet = task.replay,
6960
+ parentBoundary = task.blockedBoundary,
6961
+ parentHoistableState = task.hoistableState,
6962
+ content = props.children,
6963
+ fallback = props.fallback,
6964
+ fallbackAbortSet = new Set();
6965
+ props =
6966
+ task.formatContext.insertionMode < HTML_MODE
6967
+ ? createSuspenseBoundary(
6968
+ request,
6969
+ fallbackAbortSet,
6970
+ createPreambleState(),
6971
+ createPreambleState()
6972
+ )
6973
+ : createSuspenseBoundary(request, fallbackAbortSet, null, null);
6974
+ props.parentFlushed = !0;
6975
+ props.rootSegmentID = type;
6976
+ task.blockedBoundary = props;
6977
+ task.hoistableState = props.contentState;
6978
+ task.keyPath = keyPath;
6979
+ task.replay = { nodes: ref, slots: name, pendingTasks: 1 };
6980
+ try {
6981
+ renderNode(request, task, content, -1);
6982
+ if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
6983
+ throw Error(
6984
+ "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
6985
+ );
6986
+ task.replay.pendingTasks--;
6987
+ if (0 === props.pendingTasks && props.status === PENDING) {
6988
+ props.status = COMPLETED;
6989
+ request.completedBoundaries.push(props);
6990
+ break a;
6991
+ }
6992
+ } catch (error) {
6993
+ (props.status = CLIENT_RENDERED),
6994
+ (childNodes = getThrownInfo(task.componentStack)),
6995
+ (replay = logRecoverableError(
6996
+ request,
6997
+ error,
6998
+ childNodes,
6999
+ task.debugTask
7000
+ )),
7001
+ encodeErrorForBoundary(props, replay, error, childNodes, !1),
7002
+ task.replay.pendingTasks--,
7003
+ request.clientRenderedBoundaries.push(props);
7004
+ } finally {
7005
+ (task.blockedBoundary = parentBoundary),
7006
+ (task.hoistableState = parentHoistableState),
7007
+ (task.replay = previousReplaySet),
7008
+ (task.keyPath = prevKeyPath);
7009
+ }
7010
+ props = createReplayTask(
7011
+ request,
7012
+ null,
7013
+ { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
7014
+ fallback,
7015
+ -1,
7016
+ parentBoundary,
7017
+ props.fallbackState,
7018
+ fallbackAbortSet,
7019
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
7020
+ task.formatContext,
7021
+ task.context,
7022
+ task.treeContext,
7023
+ task.componentStack,
7024
+ !0,
7025
+ emptyContextObject,
7026
+ task.debugTask
7027
+ );
7028
+ pushComponentStack(props);
7029
+ request.pingedTasks.push(props);
7030
+ }
7031
+ }
7032
+ childIndex.splice(i, 1);
7033
+ break;
7034
+ }
7035
+ }
7036
+ }
6799
7037
  function renderNodeDestructive(request, task, node, childIndex) {
6800
7038
  null !== task.replay && "number" === typeof task.replay.slots
6801
7039
  ? resumeNode(request, task, task.replay.slots, node, childIndex)
6802
7040
  : ((task.node = node),
6803
7041
  (task.childIndex = childIndex),
6804
7042
  (node = task.componentStack),
7043
+ (childIndex = task.debugTask),
6805
7044
  pushComponentStack(task),
6806
7045
  retryNode(request, task),
6807
- (task.componentStack = node));
7046
+ (task.componentStack = node),
7047
+ (task.debugTask = childIndex));
6808
7048
  }
6809
7049
  function retryNode(request, task) {
6810
7050
  var node = task.node,
@@ -6814,175 +7054,56 @@ function retryNode(request, task) {
6814
7054
  switch (node.$$typeof) {
6815
7055
  case REACT_ELEMENT_TYPE:
6816
7056
  var type = node.type,
6817
- key = node.key,
6818
- props = node.props;
6819
- node = props.ref;
6820
- var ref = void 0 !== node ? node : null,
6821
- name = getComponentNameFromType(type),
6822
- keyOrIndex =
6823
- null == key ? (-1 === childIndex ? 0 : childIndex) : key,
6824
- keyPath = [task.keyPath, name, keyOrIndex];
6825
- if (null !== task.replay) {
6826
- var replay = task.replay;
6827
- childIndex = replay.nodes;
6828
- for (node = 0; node < childIndex.length; node++)
6829
- if (((key = childIndex[node]), keyOrIndex === key[1])) {
6830
- if (4 === key.length) {
6831
- if (null !== name && name !== key[0])
6832
- throw Error(
6833
- "Expected the resume to render <" +
6834
- key[0] +
6835
- "> in this slot but instead it rendered <" +
6836
- name +
6837
- ">. The tree doesn't match so React will fallback to client rendering."
6838
- );
6839
- var childNodes = key[2];
6840
- key = key[3];
6841
- name = task.node;
6842
- task.replay = {
6843
- nodes: childNodes,
6844
- slots: key,
6845
- pendingTasks: 1
6846
- };
6847
- try {
6848
- renderElement(request, task, keyPath, type, props, ref);
6849
- if (
6850
- 1 === task.replay.pendingTasks &&
6851
- 0 < task.replay.nodes.length
6852
- )
6853
- throw Error(
6854
- "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
6855
- );
6856
- task.replay.pendingTasks--;
6857
- } catch (x) {
6858
- if (
6859
- "object" === typeof x &&
6860
- null !== x &&
6861
- (x === SuspenseException || "function" === typeof x.then)
6862
- )
6863
- throw (task.node === name && (task.replay = replay), x);
6864
- task.replay.pendingTasks--;
6865
- props = getThrownInfo(task.componentStack);
6866
- erroredReplay(
6867
- request,
6868
- task.blockedBoundary,
6869
- x,
6870
- props,
6871
- childNodes,
6872
- key
6873
- );
6874
- }
6875
- task.replay = replay;
6876
- } else {
6877
- if (type !== REACT_SUSPENSE_TYPE)
6878
- throw Error(
6879
- "Expected the resume to render <Suspense> in this slot but instead it rendered <" +
6880
- (getComponentNameFromType(type) || "Unknown") +
6881
- ">. The tree doesn't match so React will fallback to client rendering."
6882
- );
6883
- a: {
6884
- type = void 0;
6885
- ref = key[5];
6886
- replay = key[2];
6887
- name = key[3];
6888
- keyOrIndex = null === key[4] ? [] : key[4][2];
6889
- key = null === key[4] ? null : key[4][3];
6890
- var prevKeyPath = task.keyPath,
6891
- previousReplaySet = task.replay,
6892
- parentBoundary = task.blockedBoundary,
6893
- parentHoistableState = task.hoistableState,
6894
- content = props.children,
6895
- fallback = props.fallback,
6896
- fallbackAbortSet = new Set();
6897
- props =
6898
- task.formatContext.insertionMode < HTML_MODE
6899
- ? createSuspenseBoundary(
6900
- request,
6901
- fallbackAbortSet,
6902
- createPreambleState(),
6903
- createPreambleState()
6904
- )
6905
- : createSuspenseBoundary(
6906
- request,
6907
- fallbackAbortSet,
6908
- null,
6909
- null
6910
- );
6911
- props.parentFlushed = !0;
6912
- props.rootSegmentID = ref;
6913
- task.blockedBoundary = props;
6914
- task.hoistableState = props.contentState;
6915
- task.keyPath = keyPath;
6916
- task.replay = {
6917
- nodes: replay,
6918
- slots: name,
6919
- pendingTasks: 1
6920
- };
6921
- try {
6922
- renderNode(request, task, content, -1);
6923
- if (
6924
- 1 === task.replay.pendingTasks &&
6925
- 0 < task.replay.nodes.length
6926
- )
6927
- throw Error(
6928
- "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
6929
- );
6930
- task.replay.pendingTasks--;
6931
- if (
6932
- 0 === props.pendingTasks &&
6933
- props.status === PENDING
6934
- ) {
6935
- props.status = COMPLETED;
6936
- request.completedBoundaries.push(props);
6937
- break a;
6938
- }
6939
- } catch (error) {
6940
- (props.status = CLIENT_RENDERED),
6941
- (childNodes = getThrownInfo(task.componentStack)),
6942
- (type = logRecoverableError(
6943
- request,
6944
- error,
6945
- childNodes
6946
- )),
6947
- encodeErrorForBoundary(
6948
- props,
6949
- type,
6950
- error,
6951
- childNodes,
6952
- !1
6953
- ),
6954
- task.replay.pendingTasks--,
6955
- request.clientRenderedBoundaries.push(props);
6956
- } finally {
6957
- (task.blockedBoundary = parentBoundary),
6958
- (task.hoistableState = parentHoistableState),
6959
- (task.replay = previousReplaySet),
6960
- (task.keyPath = prevKeyPath);
6961
- }
6962
- childNodes = createReplayTask(
6963
- request,
6964
- null,
6965
- { nodes: keyOrIndex, slots: key, pendingTasks: 0 },
6966
- fallback,
6967
- -1,
6968
- parentBoundary,
6969
- props.fallbackState,
6970
- fallbackAbortSet,
6971
- [keyPath[0], "Suspense Fallback", keyPath[2]],
6972
- task.formatContext,
6973
- task.context,
6974
- task.treeContext,
6975
- task.componentStack,
6976
- !0
6977
- );
6978
- pushComponentStack(childNodes);
6979
- request.pingedTasks.push(childNodes);
6980
- }
6981
- }
6982
- childIndex.splice(node, 1);
6983
- break;
6984
- }
6985
- } else renderElement(request, task, keyPath, type, props, ref);
7057
+ key = node.key;
7058
+ node = node.props;
7059
+ var refProp = node.ref;
7060
+ refProp = void 0 !== refProp ? refProp : null;
7061
+ var debugTask = task.debugTask,
7062
+ name = getComponentNameFromType(type);
7063
+ key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;
7064
+ var keyPath = [task.keyPath, name, key];
7065
+ null !== task.replay
7066
+ ? debugTask
7067
+ ? debugTask.run(
7068
+ replayElement.bind(
7069
+ null,
7070
+ request,
7071
+ task,
7072
+ keyPath,
7073
+ name,
7074
+ key,
7075
+ childIndex,
7076
+ type,
7077
+ node,
7078
+ refProp,
7079
+ task.replay
7080
+ )
7081
+ )
7082
+ : replayElement(
7083
+ request,
7084
+ task,
7085
+ keyPath,
7086
+ name,
7087
+ key,
7088
+ childIndex,
7089
+ type,
7090
+ node,
7091
+ refProp,
7092
+ task.replay
7093
+ )
7094
+ : debugTask
7095
+ ? debugTask.run(
7096
+ renderElement.bind(
7097
+ null,
7098
+ request,
7099
+ task,
7100
+ keyPath,
7101
+ type,
7102
+ node,
7103
+ refProp
7104
+ )
7105
+ )
7106
+ : renderElement(request, task, keyPath, type, node, refProp);
6986
7107
  return;
6987
7108
  case REACT_PORTAL_TYPE:
6988
7109
  throw Error(
@@ -6999,20 +7120,20 @@ function retryNode(request, task) {
6999
7120
  return;
7000
7121
  }
7001
7122
  null === node || "object" !== typeof node
7002
- ? (props = null)
7003
- : ((childNodes =
7123
+ ? (key = null)
7124
+ : ((type =
7004
7125
  (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
7005
7126
  node["@@iterator"]),
7006
- (props = "function" === typeof childNodes ? childNodes : null));
7007
- if (props && (childNodes = props.call(node))) {
7008
- if (childNodes === node) {
7127
+ (key = "function" === typeof type ? type : null));
7128
+ if (key && (type = key.call(node))) {
7129
+ if (type === node) {
7009
7130
  if (
7010
7131
  -1 !== childIndex ||
7011
7132
  null === task.componentStack ||
7012
7133
  "function" !== typeof task.componentStack.type ||
7013
7134
  "[object GeneratorFunction]" !==
7014
7135
  Object.prototype.toString.call(task.componentStack.type) ||
7015
- "[object Generator]" !== Object.prototype.toString.call(childNodes)
7136
+ "[object Generator]" !== Object.prototype.toString.call(type)
7016
7137
  )
7017
7138
  didWarnAboutGenerators ||
7018
7139
  console.error(
@@ -7020,18 +7141,18 @@ function retryNode(request, task) {
7020
7141
  ),
7021
7142
  (didWarnAboutGenerators = !0);
7022
7143
  } else
7023
- node.entries !== props ||
7144
+ node.entries !== key ||
7024
7145
  didWarnAboutMaps ||
7025
7146
  (console.error(
7026
7147
  "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
7027
7148
  ),
7028
7149
  (didWarnAboutMaps = !0));
7029
- node = childNodes.next();
7150
+ node = type.next();
7030
7151
  if (!node.done) {
7031
- props = [];
7032
- do props.push(node.value), (node = childNodes.next());
7152
+ key = [];
7153
+ do key.push(node.value), (node = type.next());
7033
7154
  while (!node.done);
7034
- renderChildrenArray(request, task, props, childIndex);
7155
+ renderChildrenArray(request, task, key, childIndex);
7035
7156
  }
7036
7157
  return;
7037
7158
  }
@@ -7047,39 +7168,39 @@ function retryNode(request, task) {
7047
7168
  node._currentValue,
7048
7169
  childIndex
7049
7170
  );
7050
- childIndex = Object.prototype.toString.call(node);
7171
+ request = Object.prototype.toString.call(node);
7051
7172
  throw Error(
7052
7173
  "Objects are not valid as a React child (found: " +
7053
- ("[object Object]" === childIndex
7174
+ ("[object Object]" === request
7054
7175
  ? "object with keys {" + Object.keys(node).join(", ") + "}"
7055
- : childIndex) +
7176
+ : request) +
7056
7177
  "). If you meant to render a collection of children, use an array instead."
7057
7178
  );
7058
7179
  }
7059
7180
  "string" === typeof node
7060
- ? ((childIndex = task.blockedSegment),
7061
- null !== childIndex &&
7062
- (childIndex.lastPushedText = pushTextInstance(
7063
- childIndex.chunks,
7181
+ ? ((task = task.blockedSegment),
7182
+ null !== task &&
7183
+ (task.lastPushedText = pushTextInstance(
7184
+ task.chunks,
7064
7185
  node,
7065
7186
  request.renderState,
7066
- childIndex.lastPushedText
7187
+ task.lastPushedText
7067
7188
  )))
7068
7189
  : "number" === typeof node || "bigint" === typeof node
7069
- ? ((childIndex = task.blockedSegment),
7070
- null !== childIndex &&
7071
- (childIndex.lastPushedText = pushTextInstance(
7072
- childIndex.chunks,
7190
+ ? ((task = task.blockedSegment),
7191
+ null !== task &&
7192
+ (task.lastPushedText = pushTextInstance(
7193
+ task.chunks,
7073
7194
  "" + node,
7074
7195
  request.renderState,
7075
- childIndex.lastPushedText
7196
+ task.lastPushedText
7076
7197
  )))
7077
7198
  : ("function" === typeof node &&
7078
- ((childIndex = node.displayName || node.name || "Component"),
7199
+ ((request = node.displayName || node.name || "Component"),
7079
7200
  console.error(
7080
7201
  "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",
7081
- childIndex,
7082
- childIndex
7202
+ request,
7203
+ request
7083
7204
  )),
7084
7205
  "symbol" === typeof node &&
7085
7206
  console.error(
@@ -7088,9 +7209,10 @@ function retryNode(request, task) {
7088
7209
  ));
7089
7210
  }
7090
7211
  }
7091
- function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
7212
+ function renderChildrenArray(request, task, children, childIndex) {
7092
7213
  var prevKeyPath = task.keyPath,
7093
7214
  previousComponentStack = task.componentStack;
7215
+ var previousDebugTask = task.debugTask;
7094
7216
  pushServerComponentStack(task, task.node._debugInfo);
7095
7217
  if (
7096
7218
  -1 !== childIndex &&
@@ -7108,7 +7230,7 @@ function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
7108
7230
  node = node[3];
7109
7231
  task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
7110
7232
  try {
7111
- renderChildrenArray(request$jscomp$0, task, children, -1);
7233
+ renderChildrenArray(request, task, children, -1);
7112
7234
  if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
7113
7235
  throw Error(
7114
7236
  "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
@@ -7122,14 +7244,25 @@ function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
7122
7244
  )
7123
7245
  throw x;
7124
7246
  task.replay.pendingTasks--;
7125
- children = getThrownInfo(task.componentStack);
7126
- erroredReplay(
7127
- request$jscomp$0,
7128
- task.blockedBoundary,
7129
- x,
7247
+ var thrownInfo = getThrownInfo(task.componentStack);
7248
+ children = task.blockedBoundary;
7249
+ var error = x,
7250
+ resumeSlots = node;
7251
+ node = logRecoverableError(
7252
+ request,
7253
+ error,
7254
+ thrownInfo,
7255
+ task.debugTask
7256
+ );
7257
+ abortRemainingReplayNodes(
7258
+ request,
7130
7259
  children,
7131
7260
  childIndex,
7132
- node
7261
+ resumeSlots,
7262
+ error,
7263
+ node,
7264
+ thrownInfo,
7265
+ !1
7133
7266
  );
7134
7267
  }
7135
7268
  task.replay = replay;
@@ -7139,6 +7272,7 @@ function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
7139
7272
  }
7140
7273
  task.keyPath = prevKeyPath;
7141
7274
  task.componentStack = previousComponentStack;
7275
+ task.debugTask = previousDebugTask;
7142
7276
  return;
7143
7277
  }
7144
7278
  replay = task.treeContext;
@@ -7147,97 +7281,93 @@ function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
7147
7281
  null !== task.replay &&
7148
7282
  ((j = task.replay.slots), null !== j && "object" === typeof j)
7149
7283
  ) {
7150
- for (childIndex = 0; childIndex < replayNodes; childIndex++) {
7151
- node = children[childIndex];
7152
- task.treeContext = pushTreeContext(replay, replayNodes, childIndex);
7153
- var resumeSegmentID = j[childIndex];
7154
- "number" === typeof resumeSegmentID
7155
- ? (resumeNode(
7156
- request$jscomp$0,
7157
- task,
7158
- resumeSegmentID,
7159
- node,
7160
- childIndex
7161
- ),
7162
- delete j[childIndex])
7163
- : renderNode(request$jscomp$0, task, node, childIndex);
7164
- }
7284
+ for (childIndex = 0; childIndex < replayNodes; childIndex++)
7285
+ (node = children[childIndex]),
7286
+ (task.treeContext = pushTreeContext(replay, replayNodes, childIndex)),
7287
+ (error = j[childIndex]),
7288
+ "number" === typeof error
7289
+ ? (resumeNode(request, task, error, node, childIndex),
7290
+ delete j[childIndex])
7291
+ : renderNode(request, task, node, childIndex);
7165
7292
  task.treeContext = replay;
7166
7293
  task.keyPath = prevKeyPath;
7167
7294
  task.componentStack = previousComponentStack;
7295
+ task.debugTask = previousDebugTask;
7168
7296
  return;
7169
7297
  }
7170
7298
  for (j = 0; j < replayNodes; j++) {
7171
7299
  childIndex = children[j];
7172
- var request = request$jscomp$0;
7300
+ resumeSlots = request;
7173
7301
  node = task;
7174
- resumeSegmentID = childIndex;
7302
+ error = childIndex;
7175
7303
  if (
7176
- null !== resumeSegmentID &&
7177
- "object" === typeof resumeSegmentID &&
7178
- (resumeSegmentID.$$typeof === REACT_ELEMENT_TYPE ||
7179
- resumeSegmentID.$$typeof === REACT_PORTAL_TYPE) &&
7180
- resumeSegmentID._store &&
7181
- ((!resumeSegmentID._store.validated && null == resumeSegmentID.key) ||
7182
- 2 === resumeSegmentID._store.validated)
7304
+ null !== error &&
7305
+ "object" === typeof error &&
7306
+ (error.$$typeof === REACT_ELEMENT_TYPE ||
7307
+ error.$$typeof === REACT_PORTAL_TYPE) &&
7308
+ error._store &&
7309
+ ((!error._store.validated && null == error.key) ||
7310
+ 2 === error._store.validated)
7183
7311
  ) {
7184
- if ("object" !== typeof resumeSegmentID._store)
7312
+ if ("object" !== typeof error._store)
7185
7313
  throw Error(
7186
7314
  "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
7187
7315
  );
7188
- resumeSegmentID._store.validated = 1;
7189
- var didWarnForKey = request.didWarnForKey;
7190
- null == didWarnForKey &&
7191
- (didWarnForKey = request.didWarnForKey = new WeakSet());
7192
- request = node.componentStack;
7193
- if (null !== request && !didWarnForKey.has(request)) {
7194
- didWarnForKey.add(request);
7195
- var componentName = getComponentNameFromType(resumeSegmentID.type);
7196
- didWarnForKey = resumeSegmentID._owner;
7197
- var parentOwner = request.owner;
7198
- request = "";
7316
+ error._store.validated = 1;
7317
+ thrownInfo = resumeSlots.didWarnForKey;
7318
+ null == thrownInfo &&
7319
+ (thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
7320
+ resumeSlots = node.componentStack;
7321
+ if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
7322
+ thrownInfo.add(resumeSlots);
7323
+ var componentName = getComponentNameFromType(error.type);
7324
+ thrownInfo = error._owner;
7325
+ var parentOwner = resumeSlots.owner;
7326
+ resumeSlots = "";
7199
7327
  if (parentOwner && "undefined" !== typeof parentOwner.type) {
7200
7328
  var name = getComponentNameFromType(parentOwner.type);
7201
- name && (request = "\n\nCheck the render method of `" + name + "`.");
7329
+ name &&
7330
+ (resumeSlots = "\n\nCheck the render method of `" + name + "`.");
7202
7331
  }
7203
- request ||
7332
+ resumeSlots ||
7204
7333
  (componentName &&
7205
- (request =
7334
+ (resumeSlots =
7206
7335
  "\n\nCheck the top-level render call using <" +
7207
7336
  componentName +
7208
7337
  ">."));
7209
7338
  componentName = "";
7210
- null != didWarnForKey &&
7211
- parentOwner !== didWarnForKey &&
7339
+ null != thrownInfo &&
7340
+ parentOwner !== thrownInfo &&
7212
7341
  ((parentOwner = null),
7213
- "undefined" !== typeof didWarnForKey.type
7214
- ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
7215
- : "string" === typeof didWarnForKey.name &&
7216
- (parentOwner = didWarnForKey.name),
7342
+ "undefined" !== typeof thrownInfo.type
7343
+ ? (parentOwner = getComponentNameFromType(thrownInfo.type))
7344
+ : "string" === typeof thrownInfo.name &&
7345
+ (parentOwner = thrownInfo.name),
7217
7346
  parentOwner &&
7218
7347
  (componentName =
7219
7348
  " It was passed a child from " + parentOwner + "."));
7220
- didWarnForKey = node.componentStack;
7349
+ thrownInfo = node.componentStack;
7221
7350
  node.componentStack = {
7222
7351
  parent: node.componentStack,
7223
- type: resumeSegmentID.type,
7224
- owner: resumeSegmentID._owner,
7225
- stack: null
7352
+ type: error.type,
7353
+ owner: error._owner,
7354
+ stack: error._debugStack
7226
7355
  };
7227
7356
  console.error(
7228
7357
  'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
7229
- request,
7358
+ resumeSlots,
7230
7359
  componentName
7231
7360
  );
7232
- node.componentStack = didWarnForKey;
7361
+ node.componentStack = thrownInfo;
7233
7362
  }
7234
7363
  }
7235
7364
  task.treeContext = pushTreeContext(replay, replayNodes, j);
7236
- renderNode(request$jscomp$0, task, childIndex, j);
7365
+ renderNode(request, task, childIndex, j);
7237
7366
  }
7238
7367
  task.treeContext = replay;
7239
7368
  task.keyPath = prevKeyPath;
7240
7369
  task.componentStack = previousComponentStack;
7370
+ task.debugTask = previousDebugTask;
7241
7371
  }
7242
7372
  function untrackBoundary(request, boundary) {
7243
7373
  request = request.trackedPostpones;
@@ -7263,7 +7393,9 @@ function spawnNewSuspendedReplayTask(request, task, thenableState) {
7263
7393
  task.context,
7264
7394
  task.treeContext,
7265
7395
  task.componentStack,
7266
- task.isFallback
7396
+ task.isFallback,
7397
+ emptyContextObject,
7398
+ task.debugTask
7267
7399
  );
7268
7400
  }
7269
7401
  function spawnNewSuspendedRenderTask(request, task, thenableState) {
@@ -7293,7 +7425,9 @@ function spawnNewSuspendedRenderTask(request, task, thenableState) {
7293
7425
  task.context,
7294
7426
  task.treeContext,
7295
7427
  task.componentStack,
7296
- task.isFallback
7428
+ task.isFallback,
7429
+ emptyContextObject,
7430
+ task.debugTask
7297
7431
  );
7298
7432
  }
7299
7433
  function renderNode(request, task, node, childIndex) {
@@ -7302,6 +7436,7 @@ function renderNode(request, task, node, childIndex) {
7302
7436
  previousKeyPath = task.keyPath,
7303
7437
  previousTreeContext = task.treeContext,
7304
7438
  previousComponentStack = task.componentStack,
7439
+ previousDebugTask = task.debugTask,
7305
7440
  segment = task.blockedSegment;
7306
7441
  if (null === segment)
7307
7442
  try {
@@ -7324,6 +7459,7 @@ function renderNode(request, task, node, childIndex) {
7324
7459
  task.keyPath = previousKeyPath;
7325
7460
  task.treeContext = previousTreeContext;
7326
7461
  task.componentStack = previousComponentStack;
7462
+ task.debugTask = previousDebugTask;
7327
7463
  switchContext(previousContext);
7328
7464
  return;
7329
7465
  }
@@ -7336,6 +7472,7 @@ function renderNode(request, task, node, childIndex) {
7336
7472
  task.keyPath = previousKeyPath;
7337
7473
  task.treeContext = previousTreeContext;
7338
7474
  task.componentStack = previousComponentStack;
7475
+ task.debugTask = previousDebugTask;
7339
7476
  switchContext(previousContext);
7340
7477
  return;
7341
7478
  }
@@ -7366,6 +7503,7 @@ function renderNode(request, task, node, childIndex) {
7366
7503
  task.keyPath = previousKeyPath;
7367
7504
  task.treeContext = previousTreeContext;
7368
7505
  task.componentStack = previousComponentStack;
7506
+ task.debugTask = previousDebugTask;
7369
7507
  switchContext(previousContext);
7370
7508
  return;
7371
7509
  }
@@ -7378,6 +7516,7 @@ function renderNode(request, task, node, childIndex) {
7378
7516
  task.keyPath = previousKeyPath;
7379
7517
  task.treeContext = previousTreeContext;
7380
7518
  task.componentStack = previousComponentStack;
7519
+ task.debugTask = previousDebugTask;
7381
7520
  switchContext(previousContext);
7382
7521
  return;
7383
7522
  }
@@ -7391,26 +7530,6 @@ function renderNode(request, task, node, childIndex) {
7391
7530
  switchContext(previousContext);
7392
7531
  throw node;
7393
7532
  }
7394
- function erroredReplay(
7395
- request,
7396
- boundary,
7397
- error,
7398
- errorInfo,
7399
- replayNodes,
7400
- resumeSlots
7401
- ) {
7402
- var errorDigest = logRecoverableError(request, error, errorInfo);
7403
- abortRemainingReplayNodes(
7404
- request,
7405
- boundary,
7406
- replayNodes,
7407
- resumeSlots,
7408
- error,
7409
- errorDigest,
7410
- errorInfo,
7411
- !1
7412
- );
7413
- }
7414
7533
  function abortTaskSoft(task) {
7415
7534
  var boundary = task.blockedBoundary;
7416
7535
  task = task.blockedSegment;
@@ -7498,14 +7617,14 @@ function abortTask(task, request, error) {
7498
7617
  if (13 !== request.status && request.status !== CLOSED) {
7499
7618
  boundary = task.replay;
7500
7619
  if (null === boundary) {
7501
- logRecoverableError(request, error, segment);
7502
- fatalError(request, error);
7620
+ logRecoverableError(request, error, segment, null);
7621
+ fatalError(request, error, segment, null);
7503
7622
  return;
7504
7623
  }
7505
7624
  boundary.pendingTasks--;
7506
7625
  0 === boundary.pendingTasks &&
7507
7626
  0 < boundary.nodes.length &&
7508
- ((task = logRecoverableError(request, error, segment)),
7627
+ ((task = logRecoverableError(request, error, segment, null)),
7509
7628
  abortRemainingReplayNodes(
7510
7629
  request,
7511
7630
  null,
@@ -7523,7 +7642,7 @@ function abortTask(task, request, error) {
7523
7642
  boundary.pendingTasks--,
7524
7643
  boundary.status !== CLIENT_RENDERED &&
7525
7644
  ((boundary.status = CLIENT_RENDERED),
7526
- (task = logRecoverableError(request, error, segment)),
7645
+ (task = logRecoverableError(request, error, segment, null)),
7527
7646
  (boundary.status = CLIENT_RENDERED),
7528
7647
  encodeErrorForBoundary(boundary, task, error, segment, !0),
7529
7648
  untrackBoundary(request, boundary),
@@ -7594,7 +7713,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
7594
7713
  }
7595
7714
  }
7596
7715
  } catch (error) {
7597
- logRecoverableError(request, error, {});
7716
+ logRecoverableError(request, error, {}, null);
7598
7717
  }
7599
7718
  }
7600
7719
  function completeShell(request) {
@@ -7669,24 +7788,24 @@ function finishedTask(request, boundary, segment) {
7669
7788
  request.allPendingTasks--;
7670
7789
  0 === request.allPendingTasks && completeAll(request);
7671
7790
  }
7672
- function performWork(request$jscomp$1) {
7673
- if (request$jscomp$1.status !== CLOSED && 13 !== request$jscomp$1.status) {
7791
+ function performWork(request$jscomp$2) {
7792
+ if (request$jscomp$2.status !== CLOSED && 13 !== request$jscomp$2.status) {
7674
7793
  var prevContext = currentActiveSnapshot,
7675
7794
  prevDispatcher = ReactSharedInternals.H;
7676
7795
  ReactSharedInternals.H = HooksDispatcher;
7677
7796
  var prevAsyncDispatcher = ReactSharedInternals.A;
7678
7797
  ReactSharedInternals.A = DefaultAsyncDispatcher;
7679
7798
  var prevRequest = currentRequest;
7680
- currentRequest = request$jscomp$1;
7799
+ currentRequest = request$jscomp$2;
7681
7800
  var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
7682
7801
  ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
7683
7802
  var prevResumableState = currentResumableState;
7684
- currentResumableState = request$jscomp$1.resumableState;
7803
+ currentResumableState = request$jscomp$2.resumableState;
7685
7804
  try {
7686
- var pingedTasks = request$jscomp$1.pingedTasks,
7805
+ var pingedTasks = request$jscomp$2.pingedTasks,
7687
7806
  i;
7688
7807
  for (i = 0; i < pingedTasks.length; i++) {
7689
- var request = request$jscomp$1,
7808
+ var request = request$jscomp$2,
7690
7809
  task = pingedTasks[i],
7691
7810
  segment = task.blockedSegment;
7692
7811
  if (null === segment) {
@@ -7734,16 +7853,32 @@ function performWork(request$jscomp$1) {
7734
7853
  } else {
7735
7854
  request.replay.pendingTasks--;
7736
7855
  request.abortSet.delete(request);
7737
- var errorInfo = getThrownInfo(request.componentStack);
7738
- erroredReplay(
7739
- request$jscomp$0,
7740
- request.blockedBoundary,
7741
- 12 === request$jscomp$0.status
7742
- ? request$jscomp$0.fatalError
7743
- : x,
7744
- errorInfo,
7745
- request.replay.nodes,
7746
- request.replay.slots
7856
+ var errorInfo = getThrownInfo(request.componentStack),
7857
+ errorDigest = void 0,
7858
+ request$jscomp$1 = request$jscomp$0,
7859
+ boundary = request.blockedBoundary,
7860
+ error$jscomp$0 =
7861
+ 12 === request$jscomp$0.status
7862
+ ? request$jscomp$0.fatalError
7863
+ : x,
7864
+ errorInfo$jscomp$0 = errorInfo,
7865
+ replayNodes = request.replay.nodes,
7866
+ resumeSlots = request.replay.slots;
7867
+ errorDigest = logRecoverableError(
7868
+ request$jscomp$1,
7869
+ error$jscomp$0,
7870
+ errorInfo$jscomp$0,
7871
+ request.debugTask
7872
+ );
7873
+ abortRemainingReplayNodes(
7874
+ request$jscomp$1,
7875
+ boundary,
7876
+ replayNodes,
7877
+ resumeSlots,
7878
+ error$jscomp$0,
7879
+ errorDigest,
7880
+ errorInfo$jscomp$0,
7881
+ !1
7747
7882
  );
7748
7883
  request$jscomp$0.pendingRootTasks--;
7749
7884
  0 === request$jscomp$0.pendingRootTasks &&
@@ -7756,94 +7891,97 @@ function performWork(request$jscomp$1) {
7756
7891
  currentTaskInDEV = prevTaskInDEV;
7757
7892
  }
7758
7893
  }
7759
- } else {
7760
- request$jscomp$0 = prevTaskInDEV = void 0;
7761
- var task$jscomp$0 = task,
7762
- segment$jscomp$0 = segment;
7763
- if (segment$jscomp$0.status === PENDING) {
7764
- segment$jscomp$0.status = 6;
7765
- switchContext(task$jscomp$0.context);
7766
- request$jscomp$0 = currentTaskInDEV;
7767
- currentTaskInDEV = task$jscomp$0;
7768
- var childrenLength = segment$jscomp$0.children.length,
7769
- chunkLength = segment$jscomp$0.chunks.length;
7770
- try {
7771
- retryNode(request, task$jscomp$0),
7772
- segment$jscomp$0.lastPushedText &&
7773
- segment$jscomp$0.textEmbedded &&
7774
- segment$jscomp$0.chunks.push("\x3c!-- --\x3e"),
7775
- task$jscomp$0.abortSet.delete(task$jscomp$0),
7776
- (segment$jscomp$0.status = COMPLETED),
7777
- finishedTask(
7778
- request,
7779
- task$jscomp$0.blockedBoundary,
7780
- segment$jscomp$0
7781
- );
7782
- } catch (thrownValue) {
7783
- resetHooksState();
7784
- segment$jscomp$0.children.length = childrenLength;
7785
- segment$jscomp$0.chunks.length = chunkLength;
7786
- var x$jscomp$0 =
7787
- thrownValue === SuspenseException
7788
- ? getSuspendedThenable()
7789
- : 12 === request.status
7790
- ? request.fatalError
7791
- : thrownValue;
7792
- if (
7793
- "object" === typeof x$jscomp$0 &&
7794
- null !== x$jscomp$0 &&
7795
- "function" === typeof x$jscomp$0.then
7796
- ) {
7797
- segment$jscomp$0.status = PENDING;
7798
- task$jscomp$0.thenableState = getThenableStateAfterSuspending();
7799
- var ping$jscomp$0 = task$jscomp$0.ping;
7800
- x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
7801
- } else {
7802
- var errorInfo$jscomp$0 = getThrownInfo(
7803
- task$jscomp$0.componentStack
7804
- );
7805
- task$jscomp$0.abortSet.delete(task$jscomp$0);
7806
- segment$jscomp$0.status = 4;
7807
- var boundary = task$jscomp$0.blockedBoundary;
7808
- prevTaskInDEV = logRecoverableError(
7809
- request,
7810
- x$jscomp$0,
7811
- errorInfo$jscomp$0
7812
- );
7813
- null === boundary
7814
- ? fatalError(request, x$jscomp$0)
7815
- : (boundary.pendingTasks--,
7816
- boundary.status !== CLIENT_RENDERED &&
7817
- ((boundary.status = CLIENT_RENDERED),
7818
- encodeErrorForBoundary(
7819
- boundary,
7820
- prevTaskInDEV,
7821
- x$jscomp$0,
7822
- errorInfo$jscomp$0,
7823
- !1
7824
- ),
7825
- untrackBoundary(request, boundary),
7826
- boundary.parentFlushed &&
7827
- request.clientRenderedBoundaries.push(boundary),
7828
- 0 === request.pendingRootTasks &&
7829
- null === request.trackedPostpones &&
7830
- null !== boundary.contentPreamble &&
7831
- preparePreamble(request)));
7832
- request.allPendingTasks--;
7833
- 0 === request.allPendingTasks && completeAll(request);
7834
- }
7835
- } finally {
7836
- currentTaskInDEV = request$jscomp$0;
7894
+ } else if (
7895
+ ((request$jscomp$0 = prevTaskInDEV = void 0),
7896
+ (errorDigest = task),
7897
+ (request$jscomp$1 = segment),
7898
+ request$jscomp$1.status === PENDING)
7899
+ ) {
7900
+ request$jscomp$1.status = 6;
7901
+ switchContext(errorDigest.context);
7902
+ request$jscomp$0 = currentTaskInDEV;
7903
+ currentTaskInDEV = errorDigest;
7904
+ var childrenLength = request$jscomp$1.children.length,
7905
+ chunkLength = request$jscomp$1.chunks.length;
7906
+ try {
7907
+ retryNode(request, errorDigest),
7908
+ request$jscomp$1.lastPushedText &&
7909
+ request$jscomp$1.textEmbedded &&
7910
+ request$jscomp$1.chunks.push("\x3c!-- --\x3e"),
7911
+ errorDigest.abortSet.delete(errorDigest),
7912
+ (request$jscomp$1.status = COMPLETED),
7913
+ finishedTask(
7914
+ request,
7915
+ errorDigest.blockedBoundary,
7916
+ request$jscomp$1
7917
+ );
7918
+ } catch (thrownValue) {
7919
+ resetHooksState();
7920
+ request$jscomp$1.children.length = childrenLength;
7921
+ request$jscomp$1.chunks.length = chunkLength;
7922
+ var x$jscomp$0 =
7923
+ thrownValue === SuspenseException
7924
+ ? getSuspendedThenable()
7925
+ : 12 === request.status
7926
+ ? request.fatalError
7927
+ : thrownValue;
7928
+ if (
7929
+ "object" === typeof x$jscomp$0 &&
7930
+ null !== x$jscomp$0 &&
7931
+ "function" === typeof x$jscomp$0.then
7932
+ ) {
7933
+ request$jscomp$1.status = PENDING;
7934
+ errorDigest.thenableState = getThenableStateAfterSuspending();
7935
+ var ping$jscomp$0 = errorDigest.ping;
7936
+ x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
7937
+ } else {
7938
+ var errorInfo$jscomp$1 = getThrownInfo(
7939
+ errorDigest.componentStack
7940
+ );
7941
+ errorDigest.abortSet.delete(errorDigest);
7942
+ request$jscomp$1.status = 4;
7943
+ var boundary$jscomp$0 = errorDigest.blockedBoundary,
7944
+ debugTask = errorDigest.debugTask;
7945
+ prevTaskInDEV = logRecoverableError(
7946
+ request,
7947
+ x$jscomp$0,
7948
+ errorInfo$jscomp$1,
7949
+ debugTask
7950
+ );
7951
+ null === boundary$jscomp$0
7952
+ ? fatalError(request, x$jscomp$0, errorInfo$jscomp$1, debugTask)
7953
+ : (boundary$jscomp$0.pendingTasks--,
7954
+ boundary$jscomp$0.status !== CLIENT_RENDERED &&
7955
+ ((boundary$jscomp$0.status = CLIENT_RENDERED),
7956
+ encodeErrorForBoundary(
7957
+ boundary$jscomp$0,
7958
+ prevTaskInDEV,
7959
+ x$jscomp$0,
7960
+ errorInfo$jscomp$1,
7961
+ !1
7962
+ ),
7963
+ untrackBoundary(request, boundary$jscomp$0),
7964
+ boundary$jscomp$0.parentFlushed &&
7965
+ request.clientRenderedBoundaries.push(boundary$jscomp$0),
7966
+ 0 === request.pendingRootTasks &&
7967
+ null === request.trackedPostpones &&
7968
+ null !== boundary$jscomp$0.contentPreamble &&
7969
+ preparePreamble(request)));
7970
+ request.allPendingTasks--;
7971
+ 0 === request.allPendingTasks && completeAll(request);
7837
7972
  }
7973
+ } finally {
7974
+ currentTaskInDEV = request$jscomp$0;
7838
7975
  }
7839
7976
  }
7840
7977
  }
7841
7978
  pingedTasks.splice(0, i);
7842
- null !== request$jscomp$1.destination &&
7843
- flushCompletedQueues(request$jscomp$1, request$jscomp$1.destination);
7979
+ null !== request$jscomp$2.destination &&
7980
+ flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
7844
7981
  } catch (error) {
7845
- logRecoverableError(request$jscomp$1, error, {}),
7846
- fatalError(request$jscomp$1, error);
7982
+ (pingedTasks = {}),
7983
+ logRecoverableError(request$jscomp$2, error, pingedTasks, null),
7984
+ fatalError(request$jscomp$2, error, pingedTasks, null);
7847
7985
  } finally {
7848
7986
  (currentResumableState = prevResumableState),
7849
7987
  (ReactSharedInternals.H = prevDispatcher),
@@ -8471,18 +8609,20 @@ function abort(request, reason) {
8471
8609
  null !== request.destination &&
8472
8610
  flushCompletedQueues(request, request.destination);
8473
8611
  } catch (error$4) {
8474
- logRecoverableError(request, error$4, {}), fatalError(request, error$4);
8612
+ (reason = {}),
8613
+ logRecoverableError(request, error$4, reason, null),
8614
+ fatalError(request, error$4, reason, null);
8475
8615
  }
8476
8616
  }
8477
- var isomorphicReactPackageVersion$jscomp$inline_732 = React.version;
8617
+ var isomorphicReactPackageVersion$jscomp$inline_740 = React.version;
8478
8618
  if (
8479
- "19.1.0-canary-cbbe8666-20250213" !==
8480
- isomorphicReactPackageVersion$jscomp$inline_732
8619
+ "19.1.0-canary-e670e72f-20250214" !==
8620
+ isomorphicReactPackageVersion$jscomp$inline_740
8481
8621
  )
8482
8622
  throw Error(
8483
8623
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
8484
- (isomorphicReactPackageVersion$jscomp$inline_732 +
8485
- "\n - react-dom: 19.1.0-canary-cbbe8666-20250213\nLearn more: https://react.dev/warnings/version-mismatch")
8624
+ (isomorphicReactPackageVersion$jscomp$inline_740 +
8625
+ "\n - react-dom: 19.1.0-canary-e670e72f-20250214\nLearn more: https://react.dev/warnings/version-mismatch")
8486
8626
  );
8487
8627
  exports.renderToReadableStream = function (children, options) {
8488
8628
  return new Promise(function (resolve, reject) {
@@ -8537,8 +8677,9 @@ exports.renderToReadableStream = function (children, options) {
8537
8677
  try {
8538
8678
  flushCompletedQueues(request, controller);
8539
8679
  } catch (error) {
8540
- logRecoverableError(request, error, {}),
8541
- fatalError(request, error);
8680
+ (controller = {}),
8681
+ logRecoverableError(request, error, controller, null),
8682
+ fatalError(request, error, controller, null);
8542
8683
  }
8543
8684
  }
8544
8685
  },
@@ -8574,4 +8715,4 @@ exports.renderToReadableStream = function (children, options) {
8574
8715
  startWork(request$jscomp$0);
8575
8716
  });
8576
8717
  };
8577
- exports.version = "19.1.0-canary-cbbe8666-20250213";
8718
+ exports.version = "19.1.0-canary-e670e72f-20250214";