@vxrn/vendor 1.1.345 → 1.1.347

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 (36) hide show
  1. package/package.json +2 -1
  2. package/react/cjs/react-compiler-runtime.development.js +1 -18
  3. package/react/cjs/react-jsx-dev-runtime.development.js +127 -144
  4. package/react/cjs/react-jsx-dev-runtime.react-server.development.js +128 -145
  5. package/react/cjs/react-jsx-runtime.development.js +127 -144
  6. package/react/cjs/react-jsx-runtime.react-server.development.js +128 -145
  7. package/react/cjs/react.development.js +204 -230
  8. package/react/cjs/react.production.js +9 -10
  9. package/react/cjs/react.react-server.development.js +172 -199
  10. package/react/cjs/react.react-server.production.js +6 -7
  11. package/react/package.json +2 -2
  12. package/react-dom/cjs/react-dom-client.development.js +6107 -5750
  13. package/react-dom/cjs/react-dom-client.production.js +2295 -1924
  14. package/react-dom/cjs/react-dom-profiling.development.js +6134 -5777
  15. package/react-dom/cjs/react-dom-profiling.profiling.js +2572 -2247
  16. package/react-dom/cjs/react-dom-server-legacy.browser.development.js +1244 -1040
  17. package/react-dom/cjs/react-dom-server-legacy.browser.production.js +891 -761
  18. package/react-dom/cjs/react-dom-server-legacy.node.development.js +1244 -1040
  19. package/react-dom/cjs/react-dom-server-legacy.node.production.js +887 -761
  20. package/react-dom/cjs/react-dom-server.browser.development.js +1380 -1060
  21. package/react-dom/cjs/react-dom-server.browser.production.js +999 -749
  22. package/react-dom/cjs/react-dom-server.bun.development.js +1241 -1032
  23. package/react-dom/cjs/react-dom-server.bun.production.js +886 -754
  24. package/react-dom/cjs/react-dom-server.edge.development.js +1393 -1069
  25. package/react-dom/cjs/react-dom-server.edge.production.js +1007 -758
  26. package/react-dom/cjs/react-dom-server.node.development.js +1624 -1254
  27. package/react-dom/cjs/react-dom-server.node.production.js +1242 -953
  28. package/react-dom/cjs/react-dom-test-utils.development.js +1 -20
  29. package/react-dom/cjs/react-dom.development.js +34 -50
  30. package/react-dom/cjs/react-dom.production.js +4 -3
  31. package/react-dom/cjs/react-dom.react-server.development.js +48 -66
  32. package/react-dom/cjs/react-dom.react-server.production.js +6 -8
  33. package/react-dom/package.json +3 -3
  34. package/react-dom/static.browser.js +1 -0
  35. package/react-dom/static.edge.js +1 -0
  36. package/react-dom/static.node.js +1 -0
@@ -108,7 +108,21 @@ function murmurhash3_32_gc(key, seed) {
108
108
  4294967295;
109
109
  return (h1 ^ (h1 >>> 16)) >>> 0;
110
110
  }
111
- var currentView = null,
111
+ function handleErrorInNextTick(error) {
112
+ setTimeout(function () {
113
+ throw error;
114
+ });
115
+ }
116
+ var LocalPromise = Promise,
117
+ scheduleMicrotask =
118
+ "function" === typeof queueMicrotask
119
+ ? queueMicrotask
120
+ : function (callback) {
121
+ LocalPromise.resolve(null)
122
+ .then(callback)
123
+ .catch(handleErrorInNextTick);
124
+ },
125
+ currentView = null,
112
126
  writtenBytes = 0;
113
127
  function writeChunk(destination, chunk) {
114
128
  if (0 !== chunk.byteLength)
@@ -391,7 +405,7 @@ function createRenderState(
391
405
  fontPreloads: "",
392
406
  highImagePreloads: "",
393
407
  remainingCapacity:
394
- "number" === typeof maxHeadersLength ? maxHeadersLength : 2e3
408
+ 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
395
409
  }
396
410
  : null;
397
411
  onHeaders = {
@@ -454,8 +468,8 @@ function createRenderState(
454
468
  "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
455
469
  ? void 0
456
470
  : "use-credentials" === scriptConfig.crossOrigin
457
- ? "use-credentials"
458
- : ""));
471
+ ? "use-credentials"
472
+ : ""));
459
473
  scriptConfig = resumableState;
460
474
  var href = maxHeadersLength;
461
475
  scriptConfig.scriptResources[href] = null;
@@ -509,8 +523,8 @@ function createRenderState(
509
523
  null == bootstrapScriptContent.crossOrigin
510
524
  ? void 0
511
525
  : "use-credentials" === bootstrapScriptContent.crossOrigin
512
- ? "use-credentials"
513
- : "")),
526
+ ? "use-credentials"
527
+ : "")),
514
528
  (bootstrapScriptContent = resumableState),
515
529
  (scriptConfig = importMap),
516
530
  (bootstrapScriptContent.scriptResources[scriptConfig] = null),
@@ -579,8 +593,8 @@ function createRootFormatContext(namespaceURI) {
579
593
  "http://www.w3.org/2000/svg" === namespaceURI
580
594
  ? 3
581
595
  : "http://www.w3.org/1998/Math/MathML" === namespaceURI
582
- ? 4
583
- : 0,
596
+ ? 4
597
+ : 0,
584
598
  null,
585
599
  0
586
600
  );
@@ -617,12 +631,12 @@ function getChildFormatContext(parentContext, type, props) {
617
631
  return 5 <= parentContext.insertionMode
618
632
  ? createFormatContext(2, null, parentContext.tagScope)
619
633
  : 0 === parentContext.insertionMode
620
- ? "html" === type
621
- ? createFormatContext(1, null, parentContext.tagScope)
622
- : createFormatContext(2, null, parentContext.tagScope)
623
- : 1 === parentContext.insertionMode
624
- ? createFormatContext(2, null, parentContext.tagScope)
625
- : parentContext;
634
+ ? "html" === type
635
+ ? createFormatContext(1, null, parentContext.tagScope)
636
+ : createFormatContext(2, null, parentContext.tagScope)
637
+ : 1 === parentContext.insertionMode
638
+ ? createFormatContext(2, null, parentContext.tagScope)
639
+ : parentContext;
626
640
  }
627
641
  var textSeparator = stringToPrecomputedChunk("\x3c!-- --\x3e");
628
642
  function pushTextInstance(target, text, renderState, textEmbedded) {
@@ -1633,22 +1647,66 @@ function pushStartInstance(
1633
1647
  }
1634
1648
  target$jscomp$0.push(endOfStartTag);
1635
1649
  return null;
1650
+ case "object":
1651
+ target$jscomp$0.push(startChunkForTag("object"));
1652
+ var children$jscomp$5 = null,
1653
+ innerHTML$jscomp$4 = null,
1654
+ propKey$jscomp$7;
1655
+ for (propKey$jscomp$7 in props)
1656
+ if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1657
+ var propValue$jscomp$7 = props[propKey$jscomp$7];
1658
+ if (null != propValue$jscomp$7)
1659
+ switch (propKey$jscomp$7) {
1660
+ case "children":
1661
+ children$jscomp$5 = propValue$jscomp$7;
1662
+ break;
1663
+ case "dangerouslySetInnerHTML":
1664
+ innerHTML$jscomp$4 = propValue$jscomp$7;
1665
+ break;
1666
+ case "data":
1667
+ var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
1668
+ if ("" === sanitizedValue) break;
1669
+ target$jscomp$0.push(
1670
+ attributeSeparator,
1671
+ stringToChunk("data"),
1672
+ attributeAssign,
1673
+ stringToChunk(escapeTextForBrowser(sanitizedValue)),
1674
+ attributeEnd
1675
+ );
1676
+ break;
1677
+ default:
1678
+ pushAttribute(
1679
+ target$jscomp$0,
1680
+ propKey$jscomp$7,
1681
+ propValue$jscomp$7
1682
+ );
1683
+ }
1684
+ }
1685
+ target$jscomp$0.push(endOfStartTag);
1686
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1687
+ if ("string" === typeof children$jscomp$5) {
1688
+ target$jscomp$0.push(
1689
+ stringToChunk(escapeTextForBrowser(children$jscomp$5))
1690
+ );
1691
+ var JSCompiler_inline_result$jscomp$2 = null;
1692
+ } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
1693
+ return JSCompiler_inline_result$jscomp$2;
1636
1694
  case "title":
1637
1695
  if (
1638
1696
  3 === formatContext.insertionMode ||
1639
1697
  formatContext.tagScope & 1 ||
1640
1698
  null != props.itemProp
1641
1699
  )
1642
- var JSCompiler_inline_result$jscomp$2 = pushTitleImpl(
1700
+ var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
1643
1701
  target$jscomp$0,
1644
1702
  props
1645
1703
  );
1646
1704
  else
1647
1705
  isFallback
1648
- ? (JSCompiler_inline_result$jscomp$2 = null)
1706
+ ? (JSCompiler_inline_result$jscomp$3 = null)
1649
1707
  : (pushTitleImpl(renderState.hoistableChunks, props),
1650
- (JSCompiler_inline_result$jscomp$2 = void 0));
1651
- return JSCompiler_inline_result$jscomp$2;
1708
+ (JSCompiler_inline_result$jscomp$3 = void 0));
1709
+ return JSCompiler_inline_result$jscomp$3;
1652
1710
  case "link":
1653
1711
  var rel = props.rel,
1654
1712
  href = props.href,
@@ -1662,7 +1720,7 @@ function pushStartInstance(
1662
1720
  "" === href
1663
1721
  ) {
1664
1722
  pushLinkImpl(target$jscomp$0, props);
1665
- var JSCompiler_inline_result$jscomp$3 = null;
1723
+ var JSCompiler_inline_result$jscomp$4 = null;
1666
1724
  } else if ("stylesheet" === props.rel)
1667
1725
  if (
1668
1726
  "string" !== typeof precedence ||
@@ -1670,7 +1728,7 @@ function pushStartInstance(
1670
1728
  props.onLoad ||
1671
1729
  props.onError
1672
1730
  )
1673
- JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1731
+ JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1674
1732
  target$jscomp$0,
1675
1733
  props
1676
1734
  );
@@ -1713,19 +1771,19 @@ function pushStartInstance(
1713
1771
  hoistableState.stylesheets.add(resource$9);
1714
1772
  }
1715
1773
  textEmbedded && target$jscomp$0.push(textSeparator);
1716
- JSCompiler_inline_result$jscomp$3 = null;
1774
+ JSCompiler_inline_result$jscomp$4 = null;
1717
1775
  }
1718
1776
  else
1719
1777
  props.onLoad || props.onError
1720
- ? (JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1778
+ ? (JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1721
1779
  target$jscomp$0,
1722
1780
  props
1723
1781
  ))
1724
1782
  : (textEmbedded && target$jscomp$0.push(textSeparator),
1725
- (JSCompiler_inline_result$jscomp$3 = isFallback
1783
+ (JSCompiler_inline_result$jscomp$4 = isFallback
1726
1784
  ? null
1727
1785
  : pushLinkImpl(renderState.hoistableChunks, props)));
1728
- return JSCompiler_inline_result$jscomp$3;
1786
+ return JSCompiler_inline_result$jscomp$4;
1729
1787
  case "script":
1730
1788
  var asyncProp = props.async;
1731
1789
  if (
@@ -1740,7 +1798,7 @@ function pushStartInstance(
1740
1798
  formatContext.tagScope & 1 ||
1741
1799
  null != props.itemProp
1742
1800
  )
1743
- var JSCompiler_inline_result$jscomp$4 = pushScriptImpl(
1801
+ var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
1744
1802
  target$jscomp$0,
1745
1803
  props
1746
1804
  );
@@ -1770,9 +1828,9 @@ function pushStartInstance(
1770
1828
  pushScriptImpl(resource$jscomp$0, scriptProps);
1771
1829
  }
1772
1830
  textEmbedded && target$jscomp$0.push(textSeparator);
1773
- JSCompiler_inline_result$jscomp$4 = null;
1831
+ JSCompiler_inline_result$jscomp$5 = null;
1774
1832
  }
1775
- return JSCompiler_inline_result$jscomp$4;
1833
+ return JSCompiler_inline_result$jscomp$5;
1776
1834
  case "style":
1777
1835
  var precedence$jscomp$0 = props.precedence,
1778
1836
  href$jscomp$0 = props.href;
@@ -1785,34 +1843,34 @@ function pushStartInstance(
1785
1843
  "" === href$jscomp$0
1786
1844
  ) {
1787
1845
  target$jscomp$0.push(startChunkForTag("style"));
1788
- var children$jscomp$5 = null,
1789
- innerHTML$jscomp$4 = null,
1790
- propKey$jscomp$7;
1791
- for (propKey$jscomp$7 in props)
1792
- if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1793
- var propValue$jscomp$7 = props[propKey$jscomp$7];
1794
- if (null != propValue$jscomp$7)
1795
- switch (propKey$jscomp$7) {
1846
+ var children$jscomp$6 = null,
1847
+ innerHTML$jscomp$5 = null,
1848
+ propKey$jscomp$8;
1849
+ for (propKey$jscomp$8 in props)
1850
+ if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1851
+ var propValue$jscomp$8 = props[propKey$jscomp$8];
1852
+ if (null != propValue$jscomp$8)
1853
+ switch (propKey$jscomp$8) {
1796
1854
  case "children":
1797
- children$jscomp$5 = propValue$jscomp$7;
1855
+ children$jscomp$6 = propValue$jscomp$8;
1798
1856
  break;
1799
1857
  case "dangerouslySetInnerHTML":
1800
- innerHTML$jscomp$4 = propValue$jscomp$7;
1858
+ innerHTML$jscomp$5 = propValue$jscomp$8;
1801
1859
  break;
1802
1860
  default:
1803
1861
  pushAttribute(
1804
1862
  target$jscomp$0,
1805
- propKey$jscomp$7,
1806
- propValue$jscomp$7
1863
+ propKey$jscomp$8,
1864
+ propValue$jscomp$8
1807
1865
  );
1808
1866
  }
1809
1867
  }
1810
1868
  target$jscomp$0.push(endOfStartTag);
1811
- var child = Array.isArray(children$jscomp$5)
1812
- ? 2 > children$jscomp$5.length
1813
- ? children$jscomp$5[0]
1869
+ var child = Array.isArray(children$jscomp$6)
1870
+ ? 2 > children$jscomp$6.length
1871
+ ? children$jscomp$6[0]
1814
1872
  : null
1815
- : children$jscomp$5;
1873
+ : children$jscomp$6;
1816
1874
  "function" !== typeof child &&
1817
1875
  "symbol" !== typeof child &&
1818
1876
  null !== child &&
@@ -1820,9 +1878,9 @@ function pushStartInstance(
1820
1878
  target$jscomp$0.push(
1821
1879
  stringToChunk(("" + child).replace(styleRegex, styleReplacer))
1822
1880
  );
1823
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1881
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$6);
1824
1882
  target$jscomp$0.push(endChunkForTag("style"));
1825
- var JSCompiler_inline_result$jscomp$5 = null;
1883
+ var JSCompiler_inline_result$jscomp$6 = null;
1826
1884
  } else {
1827
1885
  var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
1828
1886
  if (
@@ -1846,26 +1904,26 @@ function pushStartInstance(
1846
1904
  }),
1847
1905
  renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
1848
1906
  var target = styleQueue$jscomp$0.rules,
1849
- children$jscomp$6 = null,
1850
- innerHTML$jscomp$5 = null,
1851
- propKey$jscomp$8;
1852
- for (propKey$jscomp$8 in props)
1853
- if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1854
- var propValue$jscomp$8 = props[propKey$jscomp$8];
1855
- if (null != propValue$jscomp$8)
1856
- switch (propKey$jscomp$8) {
1907
+ children$jscomp$7 = null,
1908
+ innerHTML$jscomp$6 = null,
1909
+ propKey$jscomp$9;
1910
+ for (propKey$jscomp$9 in props)
1911
+ if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1912
+ var propValue$jscomp$9 = props[propKey$jscomp$9];
1913
+ if (null != propValue$jscomp$9)
1914
+ switch (propKey$jscomp$9) {
1857
1915
  case "children":
1858
- children$jscomp$6 = propValue$jscomp$8;
1916
+ children$jscomp$7 = propValue$jscomp$9;
1859
1917
  break;
1860
1918
  case "dangerouslySetInnerHTML":
1861
- innerHTML$jscomp$5 = propValue$jscomp$8;
1919
+ innerHTML$jscomp$6 = propValue$jscomp$9;
1862
1920
  }
1863
1921
  }
1864
- var child$jscomp$0 = Array.isArray(children$jscomp$6)
1865
- ? 2 > children$jscomp$6.length
1866
- ? children$jscomp$6[0]
1922
+ var child$jscomp$0 = Array.isArray(children$jscomp$7)
1923
+ ? 2 > children$jscomp$7.length
1924
+ ? children$jscomp$7[0]
1867
1925
  : null
1868
- : children$jscomp$6;
1926
+ : children$jscomp$7;
1869
1927
  "function" !== typeof child$jscomp$0 &&
1870
1928
  "symbol" !== typeof child$jscomp$0 &&
1871
1929
  null !== child$jscomp$0 &&
@@ -1875,85 +1933,85 @@ function pushStartInstance(
1875
1933
  ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
1876
1934
  )
1877
1935
  );
1878
- pushInnerHTML(target, innerHTML$jscomp$5, children$jscomp$6);
1936
+ pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$7);
1879
1937
  }
1880
1938
  styleQueue$jscomp$0 &&
1881
1939
  hoistableState &&
1882
1940
  hoistableState.styles.add(styleQueue$jscomp$0);
1883
1941
  textEmbedded && target$jscomp$0.push(textSeparator);
1884
- JSCompiler_inline_result$jscomp$5 = void 0;
1942
+ JSCompiler_inline_result$jscomp$6 = void 0;
1885
1943
  }
1886
- return JSCompiler_inline_result$jscomp$5;
1944
+ return JSCompiler_inline_result$jscomp$6;
1887
1945
  case "meta":
1888
1946
  if (
1889
1947
  3 === formatContext.insertionMode ||
1890
1948
  formatContext.tagScope & 1 ||
1891
1949
  null != props.itemProp
1892
1950
  )
1893
- var JSCompiler_inline_result$jscomp$6 = pushSelfClosing(
1951
+ var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
1894
1952
  target$jscomp$0,
1895
1953
  props,
1896
1954
  "meta"
1897
1955
  );
1898
1956
  else
1899
1957
  textEmbedded && target$jscomp$0.push(textSeparator),
1900
- (JSCompiler_inline_result$jscomp$6 = isFallback
1958
+ (JSCompiler_inline_result$jscomp$7 = isFallback
1901
1959
  ? null
1902
1960
  : "string" === typeof props.charSet
1903
- ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1904
- : "viewport" === props.name
1905
- ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1906
- : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1907
- return JSCompiler_inline_result$jscomp$6;
1961
+ ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1962
+ : "viewport" === props.name
1963
+ ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1964
+ : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1965
+ return JSCompiler_inline_result$jscomp$7;
1908
1966
  case "listing":
1909
1967
  case "pre":
1910
1968
  target$jscomp$0.push(startChunkForTag(type));
1911
- var children$jscomp$7 = null,
1912
- innerHTML$jscomp$6 = null,
1913
- propKey$jscomp$9;
1914
- for (propKey$jscomp$9 in props)
1915
- if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1916
- var propValue$jscomp$9 = props[propKey$jscomp$9];
1917
- if (null != propValue$jscomp$9)
1918
- switch (propKey$jscomp$9) {
1969
+ var children$jscomp$8 = null,
1970
+ innerHTML$jscomp$7 = null,
1971
+ propKey$jscomp$10;
1972
+ for (propKey$jscomp$10 in props)
1973
+ if (hasOwnProperty.call(props, propKey$jscomp$10)) {
1974
+ var propValue$jscomp$10 = props[propKey$jscomp$10];
1975
+ if (null != propValue$jscomp$10)
1976
+ switch (propKey$jscomp$10) {
1919
1977
  case "children":
1920
- children$jscomp$7 = propValue$jscomp$9;
1978
+ children$jscomp$8 = propValue$jscomp$10;
1921
1979
  break;
1922
1980
  case "dangerouslySetInnerHTML":
1923
- innerHTML$jscomp$6 = propValue$jscomp$9;
1981
+ innerHTML$jscomp$7 = propValue$jscomp$10;
1924
1982
  break;
1925
1983
  default:
1926
1984
  pushAttribute(
1927
1985
  target$jscomp$0,
1928
- propKey$jscomp$9,
1929
- propValue$jscomp$9
1986
+ propKey$jscomp$10,
1987
+ propValue$jscomp$10
1930
1988
  );
1931
1989
  }
1932
1990
  }
1933
1991
  target$jscomp$0.push(endOfStartTag);
1934
- if (null != innerHTML$jscomp$6) {
1935
- if (null != children$jscomp$7)
1992
+ if (null != innerHTML$jscomp$7) {
1993
+ if (null != children$jscomp$8)
1936
1994
  throw Error(
1937
1995
  "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
1938
1996
  );
1939
1997
  if (
1940
- "object" !== typeof innerHTML$jscomp$6 ||
1941
- !("__html" in innerHTML$jscomp$6)
1998
+ "object" !== typeof innerHTML$jscomp$7 ||
1999
+ !("__html" in innerHTML$jscomp$7)
1942
2000
  )
1943
2001
  throw Error(
1944
2002
  "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
1945
2003
  );
1946
- var html = innerHTML$jscomp$6.__html;
2004
+ var html = innerHTML$jscomp$7.__html;
1947
2005
  null !== html &&
1948
2006
  void 0 !== html &&
1949
2007
  ("string" === typeof html && 0 < html.length && "\n" === html[0]
1950
2008
  ? target$jscomp$0.push(leadingNewline, stringToChunk(html))
1951
2009
  : target$jscomp$0.push(stringToChunk("" + html)));
1952
2010
  }
1953
- "string" === typeof children$jscomp$7 &&
1954
- "\n" === children$jscomp$7[0] &&
2011
+ "string" === typeof children$jscomp$8 &&
2012
+ "\n" === children$jscomp$8[0] &&
1955
2013
  target$jscomp$0.push(leadingNewline);
1956
- return children$jscomp$7;
2014
+ return children$jscomp$8;
1957
2015
  case "img":
1958
2016
  var src = props.src,
1959
2017
  srcSet = props.srcSet;
@@ -1995,7 +2053,7 @@ function pushStartInstance(
1995
2053
  ) {
1996
2054
  resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
1997
2055
  var input = props.crossOrigin;
1998
- var JSCompiler_inline_result$jscomp$7 =
2056
+ var JSCompiler_inline_result$jscomp$8 =
1999
2057
  "string" === typeof input
2000
2058
  ? "use-credentials" === input
2001
2059
  ? input
@@ -2010,14 +2068,14 @@ function pushStartInstance(
2010
2068
  ((header = getPreloadAsHeader(src, "image", {
2011
2069
  imageSrcSet: props.srcSet,
2012
2070
  imageSizes: props.sizes,
2013
- crossOrigin: JSCompiler_inline_result$jscomp$7,
2071
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
2014
2072
  integrity: props.integrity,
2015
2073
  nonce: props.nonce,
2016
2074
  type: props.type,
2017
2075
  fetchPriority: props.fetchPriority,
2018
2076
  referrerPolicy: props.refererPolicy
2019
2077
  })),
2020
- 2 <= (headers.remainingCapacity -= header.length))
2078
+ 0 <= (headers.remainingCapacity -= header.length + 2))
2021
2079
  ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
2022
2080
  headers.highImagePreloads && (headers.highImagePreloads += ", "),
2023
2081
  (headers.highImagePreloads += header))
@@ -2028,7 +2086,7 @@ function pushStartInstance(
2028
2086
  href: srcSet ? void 0 : src,
2029
2087
  imageSrcSet: srcSet,
2030
2088
  imageSizes: sizes,
2031
- crossOrigin: JSCompiler_inline_result$jscomp$7,
2089
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
2032
2090
  integrity: props.integrity,
2033
2091
  type: props.type,
2034
2092
  fetchPriority: props.fetchPriority,
@@ -2066,56 +2124,56 @@ function pushStartInstance(
2066
2124
  case "head":
2067
2125
  if (2 > formatContext.insertionMode && null === renderState.headChunks) {
2068
2126
  renderState.headChunks = [];
2069
- var JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
2127
+ var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2070
2128
  renderState.headChunks,
2071
2129
  props,
2072
2130
  "head"
2073
2131
  );
2074
2132
  } else
2075
- JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
2133
+ JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2076
2134
  target$jscomp$0,
2077
2135
  props,
2078
2136
  "head"
2079
2137
  );
2080
- return JSCompiler_inline_result$jscomp$8;
2138
+ return JSCompiler_inline_result$jscomp$9;
2081
2139
  case "html":
2082
2140
  if (
2083
2141
  0 === formatContext.insertionMode &&
2084
2142
  null === renderState.htmlChunks
2085
2143
  ) {
2086
2144
  renderState.htmlChunks = [doctypeChunk];
2087
- var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2145
+ var JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
2088
2146
  renderState.htmlChunks,
2089
2147
  props,
2090
2148
  "html"
2091
2149
  );
2092
2150
  } else
2093
- JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2151
+ JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
2094
2152
  target$jscomp$0,
2095
2153
  props,
2096
2154
  "html"
2097
2155
  );
2098
- return JSCompiler_inline_result$jscomp$9;
2156
+ return JSCompiler_inline_result$jscomp$10;
2099
2157
  default:
2100
2158
  if (-1 !== type.indexOf("-")) {
2101
2159
  target$jscomp$0.push(startChunkForTag(type));
2102
- var children$jscomp$8 = null,
2103
- innerHTML$jscomp$7 = null,
2104
- propKey$jscomp$10;
2105
- for (propKey$jscomp$10 in props)
2106
- if (hasOwnProperty.call(props, propKey$jscomp$10)) {
2107
- var propValue$jscomp$10 = props[propKey$jscomp$10];
2108
- if (null != propValue$jscomp$10) {
2109
- var attributeName = propKey$jscomp$10;
2110
- switch (propKey$jscomp$10) {
2160
+ var children$jscomp$9 = null,
2161
+ innerHTML$jscomp$8 = null,
2162
+ propKey$jscomp$11;
2163
+ for (propKey$jscomp$11 in props)
2164
+ if (hasOwnProperty.call(props, propKey$jscomp$11)) {
2165
+ var propValue$jscomp$11 = props[propKey$jscomp$11];
2166
+ if (null != propValue$jscomp$11) {
2167
+ var attributeName = propKey$jscomp$11;
2168
+ switch (propKey$jscomp$11) {
2111
2169
  case "children":
2112
- children$jscomp$8 = propValue$jscomp$10;
2170
+ children$jscomp$9 = propValue$jscomp$11;
2113
2171
  break;
2114
2172
  case "dangerouslySetInnerHTML":
2115
- innerHTML$jscomp$7 = propValue$jscomp$10;
2173
+ innerHTML$jscomp$8 = propValue$jscomp$11;
2116
2174
  break;
2117
2175
  case "style":
2118
- pushStyleAttribute(target$jscomp$0, propValue$jscomp$10);
2176
+ pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
2119
2177
  break;
2120
2178
  case "suppressContentEditableWarning":
2121
2179
  case "suppressHydrationWarning":
@@ -2125,18 +2183,18 @@ function pushStartInstance(
2125
2183
  attributeName = "class";
2126
2184
  default:
2127
2185
  if (
2128
- isAttributeNameSafe(propKey$jscomp$10) &&
2129
- "function" !== typeof propValue$jscomp$10 &&
2130
- "symbol" !== typeof propValue$jscomp$10 &&
2131
- !1 !== propValue$jscomp$10
2186
+ isAttributeNameSafe(propKey$jscomp$11) &&
2187
+ "function" !== typeof propValue$jscomp$11 &&
2188
+ "symbol" !== typeof propValue$jscomp$11 &&
2189
+ !1 !== propValue$jscomp$11
2132
2190
  ) {
2133
- if (!0 === propValue$jscomp$10) propValue$jscomp$10 = "";
2134
- else if ("object" === typeof propValue$jscomp$10) continue;
2191
+ if (!0 === propValue$jscomp$11) propValue$jscomp$11 = "";
2192
+ else if ("object" === typeof propValue$jscomp$11) continue;
2135
2193
  target$jscomp$0.push(
2136
2194
  attributeSeparator,
2137
2195
  stringToChunk(attributeName),
2138
2196
  attributeAssign,
2139
- stringToChunk(escapeTextForBrowser(propValue$jscomp$10)),
2197
+ stringToChunk(escapeTextForBrowser(propValue$jscomp$11)),
2140
2198
  attributeEnd
2141
2199
  );
2142
2200
  }
@@ -2144,8 +2202,8 @@ function pushStartInstance(
2144
2202
  }
2145
2203
  }
2146
2204
  target$jscomp$0.push(endOfStartTag);
2147
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$7, children$jscomp$8);
2148
- return children$jscomp$8;
2205
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$9);
2206
+ return children$jscomp$9;
2149
2207
  }
2150
2208
  }
2151
2209
  return pushStartGenericElement(target$jscomp$0, props, type);
@@ -2642,7 +2700,7 @@ function prefetchDNS(href) {
2642
2700
  escapeHrefForLinkHeaderURLContextReplacer
2643
2701
  ) +
2644
2702
  ">; rel=dns-prefetch"),
2645
- 2 <= (resumableState.remainingCapacity -= header.length));
2703
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2646
2704
  JSCompiler_temp
2647
2705
  ? ((renderState.resets.dns[href] = null),
2648
2706
  resumableState.preconnects && (resumableState.preconnects += ", "),
@@ -2665,8 +2723,8 @@ function preconnect(href, crossOrigin) {
2665
2723
  "use-credentials" === crossOrigin
2666
2724
  ? "credentials"
2667
2725
  : "string" === typeof crossOrigin
2668
- ? "anonymous"
2669
- : "default";
2726
+ ? "anonymous"
2727
+ : "default";
2670
2728
  if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
2671
2729
  resumableState.connectResources[bucket][href] = null;
2672
2730
  resumableState = renderState.headers;
@@ -2691,7 +2749,7 @@ function preconnect(href, crossOrigin) {
2691
2749
  }
2692
2750
  JSCompiler_temp =
2693
2751
  ((header = JSCompiler_temp),
2694
- 2 <= (resumableState.remainingCapacity -= header.length));
2752
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2695
2753
  }
2696
2754
  JSCompiler_temp
2697
2755
  ? ((renderState.resets.connect[bucket][href] = null),
@@ -2733,7 +2791,7 @@ function preload(href, as, options) {
2733
2791
  0 < resumableState.remainingCapacity &&
2734
2792
  "high" === fetchPriority &&
2735
2793
  ((header = getPreloadAsHeader(href, as, options)),
2736
- 2 <= (resumableState.remainingCapacity -= header.length))
2794
+ 0 <= (resumableState.remainingCapacity -= header.length + 2))
2737
2795
  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
2738
2796
  resumableState.highImagePreloads &&
2739
2797
  (resumableState.highImagePreloads += ", "),
@@ -2799,7 +2857,7 @@ function preload(href, as, options) {
2799
2857
  0 < resumableState.remainingCapacity &&
2800
2858
  "font" === as &&
2801
2859
  ((key = getPreloadAsHeader(href, as, options)),
2802
- 2 <= (resumableState.remainingCapacity -= key.length))
2860
+ 0 <= (resumableState.remainingCapacity -= key.length + 2))
2803
2861
  )
2804
2862
  (renderState.resets.font[href] = PRELOAD_NO_CREDS),
2805
2863
  resumableState.fontPreloads &&
@@ -3022,7 +3080,8 @@ function hoistStyleQueueDependency(styleQueue) {
3022
3080
  function hoistStylesheetDependency(stylesheet) {
3023
3081
  this.stylesheets.add(stylesheet);
3024
3082
  }
3025
- var supportsRequestStorage = "function" === typeof AsyncLocalStorage,
3083
+ var bind = Function.prototype.bind,
3084
+ supportsRequestStorage = "function" === typeof AsyncLocalStorage,
3026
3085
  requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null,
3027
3086
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
3028
3087
  function getComponentNameFromType(type) {
@@ -3135,12 +3194,12 @@ function switchContext(newSnapshot) {
3135
3194
  (null === prev
3136
3195
  ? pushAllNext(newSnapshot)
3137
3196
  : null === newSnapshot
3138
- ? popAllPrevious(prev)
3139
- : prev.depth === newSnapshot.depth
3140
- ? popToNearestCommonAncestor(prev, newSnapshot)
3141
- : prev.depth > newSnapshot.depth
3142
- ? popPreviousToCommonLevel(prev, newSnapshot)
3143
- : popNextToCommonLevel(prev, newSnapshot),
3197
+ ? popAllPrevious(prev)
3198
+ : prev.depth === newSnapshot.depth
3199
+ ? popToNearestCommonAncestor(prev, newSnapshot)
3200
+ : prev.depth > newSnapshot.depth
3201
+ ? popPreviousToCommonLevel(prev, newSnapshot)
3202
+ : popNextToCommonLevel(prev, newSnapshot),
3144
3203
  (currentActiveSnapshot = newSnapshot));
3145
3204
  }
3146
3205
  var classComponentUpdater = {
@@ -3287,9 +3346,9 @@ function createWorkInProgressHook() {
3287
3346
  (firstWorkInProgressHook = workInProgressHook = createHook()))
3288
3347
  : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
3289
3348
  : null === workInProgressHook.next
3290
- ? ((isReRender = !1),
3291
- (workInProgressHook = workInProgressHook.next = createHook()))
3292
- : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
3349
+ ? ((isReRender = !1),
3350
+ (workInProgressHook = workInProgressHook.next = createHook()))
3351
+ : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
3293
3352
  return workInProgressHook;
3294
3353
  }
3295
3354
  function getThenableStateAfterSuspending() {
@@ -3336,8 +3395,8 @@ function useReducer(reducer, initialArg, init) {
3336
3395
  ? initialArg()
3337
3396
  : initialArg
3338
3397
  : void 0 !== init
3339
- ? init(initialArg)
3340
- : initialArg;
3398
+ ? init(initialArg)
3399
+ : initialArg;
3341
3400
  workInProgressHook.memoizedState = reducer;
3342
3401
  reducer = workInProgressHook.queue = { last: null, dispatch: null };
3343
3402
  reducer = reducer.dispatch = dispatchAction.bind(
@@ -3566,8 +3625,14 @@ var currentResumableState = null,
3566
3625
  getCacheForType: function () {
3567
3626
  throw Error("Not implemented.");
3568
3627
  }
3569
- },
3570
- prefix;
3628
+ };
3629
+ function prepareStackTrace(error, structuredStackTrace) {
3630
+ error = (error.name || "Error") + ": " + (error.message || "");
3631
+ for (var i = 0; i < structuredStackTrace.length; i++)
3632
+ error += "\n at " + structuredStackTrace[i].toString();
3633
+ return error;
3634
+ }
3635
+ var prefix, suffix;
3571
3636
  function describeBuiltInComponentFrame(name) {
3572
3637
  if (void 0 === prefix)
3573
3638
  try {
@@ -3575,71 +3640,79 @@ function describeBuiltInComponentFrame(name) {
3575
3640
  } catch (x) {
3576
3641
  var match = x.stack.trim().match(/\n( *(at )?)/);
3577
3642
  prefix = (match && match[1]) || "";
3643
+ suffix =
3644
+ -1 < x.stack.indexOf("\n at")
3645
+ ? " (<anonymous>)"
3646
+ : -1 < x.stack.indexOf("@")
3647
+ ? "@unknown:0:0"
3648
+ : "";
3578
3649
  }
3579
- return "\n" + prefix + name;
3650
+ return "\n" + prefix + name + suffix;
3580
3651
  }
3581
3652
  var reentry = !1;
3582
3653
  function describeNativeComponentFrame(fn, construct) {
3583
3654
  if (!fn || reentry) return "";
3584
3655
  reentry = !0;
3585
3656
  var previousPrepareStackTrace = Error.prepareStackTrace;
3586
- Error.prepareStackTrace = void 0;
3587
- var RunInRootFrame = {
3588
- DetermineComponentFrameRoot: function () {
3589
- try {
3590
- if (construct) {
3591
- var Fake = function () {
3592
- throw Error();
3593
- };
3594
- Object.defineProperty(Fake.prototype, "props", {
3595
- set: function () {
3657
+ Error.prepareStackTrace = prepareStackTrace;
3658
+ try {
3659
+ var RunInRootFrame = {
3660
+ DetermineComponentFrameRoot: function () {
3661
+ try {
3662
+ if (construct) {
3663
+ var Fake = function () {
3596
3664
  throw Error();
3665
+ };
3666
+ Object.defineProperty(Fake.prototype, "props", {
3667
+ set: function () {
3668
+ throw Error();
3669
+ }
3670
+ });
3671
+ if ("object" === typeof Reflect && Reflect.construct) {
3672
+ try {
3673
+ Reflect.construct(Fake, []);
3674
+ } catch (x) {
3675
+ var control = x;
3676
+ }
3677
+ Reflect.construct(fn, [], Fake);
3678
+ } else {
3679
+ try {
3680
+ Fake.call();
3681
+ } catch (x$24) {
3682
+ control = x$24;
3683
+ }
3684
+ fn.call(Fake.prototype);
3597
3685
  }
3598
- });
3599
- if ("object" === typeof Reflect && Reflect.construct) {
3600
- try {
3601
- Reflect.construct(Fake, []);
3602
- } catch (x) {
3603
- var control = x;
3604
- }
3605
- Reflect.construct(fn, [], Fake);
3606
3686
  } else {
3607
3687
  try {
3608
- Fake.call();
3609
- } catch (x$24) {
3610
- control = x$24;
3688
+ throw Error();
3689
+ } catch (x$25) {
3690
+ control = x$25;
3611
3691
  }
3612
- fn.call(Fake.prototype);
3692
+ (Fake = fn()) &&
3693
+ "function" === typeof Fake.catch &&
3694
+ Fake.catch(function () {});
3613
3695
  }
3614
- } else {
3615
- try {
3616
- throw Error();
3617
- } catch (x$25) {
3618
- control = x$25;
3619
- }
3620
- (Fake = fn()) &&
3621
- "function" === typeof Fake.catch &&
3622
- Fake.catch(function () {});
3696
+ } catch (sample) {
3697
+ if (sample && control && "string" === typeof sample.stack)
3698
+ return [sample.stack, control.stack];
3623
3699
  }
3624
- } catch (sample) {
3625
- if (sample && control && "string" === typeof sample.stack)
3626
- return [sample.stack, control.stack];
3700
+ return [null, null];
3627
3701
  }
3628
- return [null, null];
3629
- }
3630
- };
3631
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
3632
- "DetermineComponentFrameRoot";
3633
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
3634
- RunInRootFrame.DetermineComponentFrameRoot,
3635
- "name"
3636
- );
3637
- namePropDescriptor &&
3638
- namePropDescriptor.configurable &&
3639
- Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
3640
- value: "DetermineComponentFrameRoot"
3641
- });
3642
- try {
3702
+ };
3703
+ RunInRootFrame.DetermineComponentFrameRoot.displayName =
3704
+ "DetermineComponentFrameRoot";
3705
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(
3706
+ RunInRootFrame.DetermineComponentFrameRoot,
3707
+ "name"
3708
+ );
3709
+ namePropDescriptor &&
3710
+ namePropDescriptor.configurable &&
3711
+ Object.defineProperty(
3712
+ RunInRootFrame.DetermineComponentFrameRoot,
3713
+ "name",
3714
+ { value: "DetermineComponentFrameRoot" }
3715
+ );
3643
3716
  var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
3644
3717
  sampleStack = _RunInRootFrame$Deter[0],
3645
3718
  controlStack = _RunInRootFrame$Deter[1];
@@ -3710,13 +3783,78 @@ function describeNativeComponentFrame(fn, construct) {
3710
3783
  ? describeBuiltInComponentFrame(previousPrepareStackTrace)
3711
3784
  : "";
3712
3785
  }
3786
+ function describeComponentStackByType(type) {
3787
+ if ("string" === typeof type) return describeBuiltInComponentFrame(type);
3788
+ if ("function" === typeof type)
3789
+ return type.prototype && type.prototype.isReactComponent
3790
+ ? ((type = describeNativeComponentFrame(type, !0)), type)
3791
+ : describeNativeComponentFrame(type, !1);
3792
+ if ("object" === typeof type && null !== type) {
3793
+ switch (type.$$typeof) {
3794
+ case REACT_FORWARD_REF_TYPE:
3795
+ return describeNativeComponentFrame(type.render, !1);
3796
+ case REACT_MEMO_TYPE:
3797
+ return describeNativeComponentFrame(type.type, !1);
3798
+ case REACT_LAZY_TYPE:
3799
+ var lazyComponent = type,
3800
+ payload = lazyComponent._payload;
3801
+ lazyComponent = lazyComponent._init;
3802
+ try {
3803
+ type = lazyComponent(payload);
3804
+ } catch (x) {
3805
+ return describeBuiltInComponentFrame("Lazy");
3806
+ }
3807
+ return describeComponentStackByType(type);
3808
+ }
3809
+ if ("string" === typeof type.name)
3810
+ return (
3811
+ (payload = type.env),
3812
+ describeBuiltInComponentFrame(
3813
+ type.name + (payload ? " [" + payload + "]" : "")
3814
+ )
3815
+ );
3816
+ }
3817
+ switch (type) {
3818
+ case REACT_SUSPENSE_LIST_TYPE:
3819
+ return describeBuiltInComponentFrame("SuspenseList");
3820
+ case REACT_SUSPENSE_TYPE:
3821
+ return describeBuiltInComponentFrame("Suspense");
3822
+ }
3823
+ return "";
3824
+ }
3713
3825
  function defaultErrorHandler(error) {
3714
- console.error(error);
3826
+ if (
3827
+ "object" === typeof error &&
3828
+ null !== error &&
3829
+ "string" === typeof error.environmentName
3830
+ ) {
3831
+ var JSCompiler_inline_result = error.environmentName;
3832
+ error = [error].slice(0);
3833
+ "string" === typeof error[0]
3834
+ ? error.splice(
3835
+ 0,
3836
+ 1,
3837
+ "\u001b[0m\u001b[7m%c%s\u001b[0m%c " + error[0],
3838
+ "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
3839
+ " " + JSCompiler_inline_result + " ",
3840
+ ""
3841
+ )
3842
+ : error.splice(
3843
+ 0,
3844
+ 0,
3845
+ "\u001b[0m\u001b[7m%c%s\u001b[0m%c ",
3846
+ "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
3847
+ " " + JSCompiler_inline_result + " ",
3848
+ ""
3849
+ );
3850
+ error.unshift(console);
3851
+ JSCompiler_inline_result = bind.apply(console.error, error);
3852
+ JSCompiler_inline_result();
3853
+ } else console.error(error);
3715
3854
  return null;
3716
3855
  }
3717
3856
  function noop() {}
3718
3857
  function RequestInstance(
3719
- children,
3720
3858
  resumableState,
3721
3859
  renderState,
3722
3860
  rootFormatContext,
@@ -3729,8 +3867,7 @@ function RequestInstance(
3729
3867
  onPostpone,
3730
3868
  formState
3731
3869
  ) {
3732
- var pingedTasks = [],
3733
- abortSet = new Set();
3870
+ var abortSet = new Set();
3734
3871
  this.destination = null;
3735
3872
  this.flushScheduled = !1;
3736
3873
  this.resumableState = resumableState;
@@ -3738,12 +3875,12 @@ function RequestInstance(
3738
3875
  this.rootFormatContext = rootFormatContext;
3739
3876
  this.progressiveChunkSize =
3740
3877
  void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
3741
- this.status = 0;
3878
+ this.status = 10;
3742
3879
  this.fatalError = null;
3743
3880
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
3744
3881
  this.completedRootSegment = null;
3745
3882
  this.abortableTasks = abortSet;
3746
- this.pingedTasks = pingedTasks;
3883
+ this.pingedTasks = [];
3747
3884
  this.clientRenderedBoundaries = [];
3748
3885
  this.completedBoundaries = [];
3749
3886
  this.partialBoundaries = [];
@@ -3755,35 +3892,64 @@ function RequestInstance(
3755
3892
  this.onShellError = void 0 === onShellError ? noop : onShellError;
3756
3893
  this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
3757
3894
  this.formState = void 0 === formState ? null : formState;
3758
- resumableState = createPendingSegment(
3759
- this,
3895
+ }
3896
+ function createRequest(
3897
+ children,
3898
+ resumableState,
3899
+ renderState,
3900
+ rootFormatContext,
3901
+ progressiveChunkSize,
3902
+ onError,
3903
+ onAllReady,
3904
+ onShellReady,
3905
+ onShellError,
3906
+ onFatalError,
3907
+ onPostpone,
3908
+ formState
3909
+ ) {
3910
+ resumableState = new RequestInstance(
3911
+ resumableState,
3912
+ renderState,
3913
+ rootFormatContext,
3914
+ progressiveChunkSize,
3915
+ onError,
3916
+ onAllReady,
3917
+ onShellReady,
3918
+ onShellError,
3919
+ onFatalError,
3920
+ onPostpone,
3921
+ formState
3922
+ );
3923
+ renderState = createPendingSegment(
3924
+ resumableState,
3760
3925
  0,
3761
3926
  null,
3762
3927
  rootFormatContext,
3763
3928
  !1,
3764
3929
  !1
3765
3930
  );
3766
- resumableState.parentFlushed = !0;
3931
+ renderState.parentFlushed = !0;
3767
3932
  children = createRenderTask(
3768
- this,
3933
+ resumableState,
3769
3934
  null,
3770
3935
  children,
3771
3936
  -1,
3772
3937
  null,
3773
- resumableState,
3938
+ renderState,
3774
3939
  null,
3775
- abortSet,
3940
+ resumableState.abortableTasks,
3776
3941
  null,
3777
3942
  rootFormatContext,
3778
- emptyContextObject,
3779
3943
  null,
3780
3944
  emptyTreeContext,
3781
3945
  null,
3782
3946
  !1
3783
3947
  );
3784
- pingedTasks.push(children);
3948
+ pushComponentStack(children);
3949
+ resumableState.pingedTasks.push(children);
3950
+ return resumableState;
3785
3951
  }
3786
- function createRequest(
3952
+ function createPrerenderRequest(
3787
3953
  children,
3788
3954
  resumableState,
3789
3955
  renderState,
@@ -3794,10 +3960,9 @@ function createRequest(
3794
3960
  onShellReady,
3795
3961
  onShellError,
3796
3962
  onFatalError,
3797
- onPostpone,
3798
- formState
3963
+ onPostpone
3799
3964
  ) {
3800
- return new RequestInstance(
3965
+ children = createRequest(
3801
3966
  children,
3802
3967
  resumableState,
3803
3968
  renderState,
@@ -3809,8 +3974,14 @@ function createRequest(
3809
3974
  onShellError,
3810
3975
  onFatalError,
3811
3976
  onPostpone,
3812
- formState
3977
+ void 0
3813
3978
  );
3979
+ children.trackedPostpones = {
3980
+ workingMap: new Map(),
3981
+ rootNodes: [],
3982
+ rootSlots: null
3983
+ };
3984
+ return children;
3814
3985
  }
3815
3986
  var currentRequest = null;
3816
3987
  function resolveRequest() {
@@ -3825,9 +3996,13 @@ function pingTask(request, task) {
3825
3996
  request.pingedTasks.push(task);
3826
3997
  1 === request.pingedTasks.length &&
3827
3998
  ((request.flushScheduled = null !== request.destination),
3828
- setTimeout(function () {
3829
- return performWork(request);
3830
- }, 0));
3999
+ null !== request.trackedPostpones || 10 === request.status
4000
+ ? scheduleMicrotask(function () {
4001
+ return performWork(request);
4002
+ })
4003
+ : setTimeout(function () {
4004
+ return performWork(request);
4005
+ }, 0));
3831
4006
  }
3832
4007
  function createSuspenseBoundary(request, fallbackAbortableTasks) {
3833
4008
  return {
@@ -3856,7 +4031,6 @@ function createRenderTask(
3856
4031
  abortSet,
3857
4032
  keyPath,
3858
4033
  formatContext,
3859
- legacyContext,
3860
4034
  context,
3861
4035
  treeContext,
3862
4036
  componentStack,
@@ -3879,7 +4053,6 @@ function createRenderTask(
3879
4053
  abortSet: abortSet,
3880
4054
  keyPath: keyPath,
3881
4055
  formatContext: formatContext,
3882
- legacyContext: legacyContext,
3883
4056
  context: context,
3884
4057
  treeContext: treeContext,
3885
4058
  componentStack: componentStack,
@@ -3900,7 +4073,6 @@ function createReplayTask(
3900
4073
  abortSet,
3901
4074
  keyPath,
3902
4075
  formatContext,
3903
- legacyContext,
3904
4076
  context,
3905
4077
  treeContext,
3906
4078
  componentStack,
@@ -3924,7 +4096,6 @@ function createReplayTask(
3924
4096
  abortSet: abortSet,
3925
4097
  keyPath: keyPath,
3926
4098
  formatContext: formatContext,
3927
- legacyContext: legacyContext,
3928
4099
  context: context,
3929
4100
  treeContext: treeContext,
3930
4101
  componentStack: componentStack,
@@ -3955,47 +4126,54 @@ function createPendingSegment(
3955
4126
  textEmbedded: textEmbedded
3956
4127
  };
3957
4128
  }
3958
- function createBuiltInComponentStack(task, type) {
3959
- return { tag: 0, parent: task.componentStack, type: type };
4129
+ function pushComponentStack(task) {
4130
+ var node = task.node;
4131
+ if ("object" === typeof node && null !== node)
4132
+ switch (node.$$typeof) {
4133
+ case REACT_ELEMENT_TYPE:
4134
+ task.componentStack = { parent: task.componentStack, type: node.type };
4135
+ }
3960
4136
  }
3961
- function getThrownInfo(request, node) {
3962
- if (node && null !== request.trackedPostpones) {
3963
- try {
3964
- request = "";
3965
- do {
3966
- switch (node.tag) {
3967
- case 0:
3968
- request += describeBuiltInComponentFrame(node.type);
3969
- break;
3970
- case 1:
3971
- request += describeNativeComponentFrame(node.type, !1);
3972
- break;
3973
- case 2:
3974
- request += describeNativeComponentFrame(node.type, !0);
4137
+ function getThrownInfo(node$jscomp$0) {
4138
+ var errorInfo = {};
4139
+ node$jscomp$0 &&
4140
+ Object.defineProperty(errorInfo, "componentStack", {
4141
+ configurable: !0,
4142
+ enumerable: !0,
4143
+ get: function () {
4144
+ try {
4145
+ var info = "",
4146
+ node = node$jscomp$0;
4147
+ do
4148
+ (info += describeComponentStackByType(node.type)),
4149
+ (node = node.parent);
4150
+ while (node);
4151
+ var JSCompiler_inline_result = info;
4152
+ } catch (x) {
4153
+ JSCompiler_inline_result =
4154
+ "\nError generating stack: " + x.message + "\n" + x.stack;
3975
4155
  }
3976
- node = node.parent;
3977
- } while (node);
3978
- var JSCompiler_temp = request;
3979
- } catch (x) {
3980
- JSCompiler_temp =
3981
- "\nError generating stack: " + x.message + "\n" + x.stack;
3982
- }
3983
- JSCompiler_temp = { componentStack: JSCompiler_temp };
3984
- } else JSCompiler_temp = {};
3985
- return JSCompiler_temp;
4156
+ Object.defineProperty(errorInfo, "componentStack", {
4157
+ value: JSCompiler_inline_result
4158
+ });
4159
+ return JSCompiler_inline_result;
4160
+ }
4161
+ });
4162
+ return errorInfo;
3986
4163
  }
3987
4164
  function logRecoverableError(request, error, errorInfo) {
3988
- request = request.onError(error, errorInfo);
3989
- if (null == request || "string" === typeof request) return request;
4165
+ request = request.onError;
4166
+ error = request(error, errorInfo);
4167
+ if (null == error || "string" === typeof error) return error;
3990
4168
  }
3991
4169
  function fatalError(request, error) {
3992
- var onShellError = request.onShellError;
3993
- onShellError(error);
3994
- onShellError = request.onFatalError;
4170
+ var onShellError = request.onShellError,
4171
+ onFatalError = request.onFatalError;
3995
4172
  onShellError(error);
4173
+ onFatalError(error);
3996
4174
  null !== request.destination
3997
- ? ((request.status = 2), closeWithError(request.destination, error))
3998
- : ((request.status = 1), (request.fatalError = error));
4175
+ ? ((request.status = 14), closeWithError(request.destination, error))
4176
+ : ((request.status = 13), (request.fatalError = error));
3999
4177
  }
4000
4178
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
4001
4179
  var prevThenableState = task.thenableState;
@@ -4048,171 +4226,148 @@ function finishFunctionComponent(
4048
4226
  renderNode(request, task, children, -1),
4049
4227
  (task.treeContext = keyPath))
4050
4228
  : didEmitActionStateMarkers
4051
- ? renderNode(request, task, children, -1)
4052
- : renderNodeDestructive(request, task, children, -1);
4229
+ ? renderNode(request, task, children, -1)
4230
+ : renderNodeDestructive(request, task, children, -1);
4053
4231
  task.keyPath = actionStateCount;
4054
4232
  }
4055
4233
  function renderElement(request, task, keyPath, type, props, ref) {
4056
4234
  if ("function" === typeof type)
4057
4235
  if (type.prototype && type.prototype.isReactComponent) {
4058
- var JSCompiler_inline_result = props;
4236
+ var newProps = props;
4059
4237
  if ("ref" in props) {
4060
- JSCompiler_inline_result = {};
4238
+ newProps = {};
4061
4239
  for (var propName in props)
4062
- "ref" !== propName &&
4063
- (JSCompiler_inline_result[propName] = props[propName]);
4240
+ "ref" !== propName && (newProps[propName] = props[propName]);
4064
4241
  }
4065
4242
  var defaultProps = type.defaultProps;
4066
4243
  if (defaultProps) {
4067
- JSCompiler_inline_result === props &&
4068
- (JSCompiler_inline_result = assign(
4069
- {},
4070
- JSCompiler_inline_result,
4071
- props
4072
- ));
4073
- for (var propName$31 in defaultProps)
4074
- void 0 === JSCompiler_inline_result[propName$31] &&
4075
- (JSCompiler_inline_result[propName$31] = defaultProps[propName$31]);
4244
+ newProps === props && (newProps = assign({}, newProps, props));
4245
+ for (var propName$33 in defaultProps)
4246
+ void 0 === newProps[propName$33] &&
4247
+ (newProps[propName$33] = defaultProps[propName$33]);
4076
4248
  }
4077
- props = task.componentStack;
4078
- task.componentStack = { tag: 2, parent: task.componentStack, type: type };
4079
- defaultProps = emptyContextObject;
4249
+ props = newProps;
4250
+ newProps = emptyContextObject;
4251
+ defaultProps = type.contextType;
4252
+ "object" === typeof defaultProps &&
4253
+ null !== defaultProps &&
4254
+ (newProps = defaultProps._currentValue);
4255
+ newProps = new type(props, newProps);
4256
+ var initialState = void 0 !== newProps.state ? newProps.state : null;
4257
+ newProps.updater = classComponentUpdater;
4258
+ newProps.props = props;
4259
+ newProps.state = initialState;
4260
+ defaultProps = { queue: [], replace: !1 };
4261
+ newProps._reactInternals = defaultProps;
4080
4262
  ref = type.contextType;
4081
- "object" === typeof ref &&
4082
- null !== ref &&
4083
- (defaultProps = ref._currentValue);
4084
- defaultProps = new type(JSCompiler_inline_result, defaultProps);
4085
- propName$31 = void 0 !== defaultProps.state ? defaultProps.state : null;
4086
- defaultProps.updater = classComponentUpdater;
4087
- defaultProps.props = JSCompiler_inline_result;
4088
- defaultProps.state = propName$31;
4089
- ref = { queue: [], replace: !1 };
4090
- defaultProps._reactInternals = ref;
4091
- var contextType = type.contextType;
4092
- defaultProps.context =
4093
- "object" === typeof contextType && null !== contextType
4094
- ? contextType._currentValue
4263
+ newProps.context =
4264
+ "object" === typeof ref && null !== ref
4265
+ ? ref._currentValue
4095
4266
  : emptyContextObject;
4096
- contextType = type.getDerivedStateFromProps;
4097
- "function" === typeof contextType &&
4098
- ((contextType = contextType(JSCompiler_inline_result, propName$31)),
4099
- (propName$31 =
4100
- null === contextType || void 0 === contextType
4101
- ? propName$31
4102
- : assign({}, propName$31, contextType)),
4103
- (defaultProps.state = propName$31));
4267
+ ref = type.getDerivedStateFromProps;
4268
+ "function" === typeof ref &&
4269
+ ((ref = ref(props, initialState)),
4270
+ (initialState =
4271
+ null === ref || void 0 === ref
4272
+ ? initialState
4273
+ : assign({}, initialState, ref)),
4274
+ (newProps.state = initialState));
4104
4275
  if (
4105
4276
  "function" !== typeof type.getDerivedStateFromProps &&
4106
- "function" !== typeof defaultProps.getSnapshotBeforeUpdate &&
4107
- ("function" === typeof defaultProps.UNSAFE_componentWillMount ||
4108
- "function" === typeof defaultProps.componentWillMount)
4277
+ "function" !== typeof newProps.getSnapshotBeforeUpdate &&
4278
+ ("function" === typeof newProps.UNSAFE_componentWillMount ||
4279
+ "function" === typeof newProps.componentWillMount)
4109
4280
  )
4110
4281
  if (
4111
- ((type = defaultProps.state),
4112
- "function" === typeof defaultProps.componentWillMount &&
4113
- defaultProps.componentWillMount(),
4114
- "function" === typeof defaultProps.UNSAFE_componentWillMount &&
4115
- defaultProps.UNSAFE_componentWillMount(),
4116
- type !== defaultProps.state &&
4282
+ ((type = newProps.state),
4283
+ "function" === typeof newProps.componentWillMount &&
4284
+ newProps.componentWillMount(),
4285
+ "function" === typeof newProps.UNSAFE_componentWillMount &&
4286
+ newProps.UNSAFE_componentWillMount(),
4287
+ type !== newProps.state &&
4117
4288
  classComponentUpdater.enqueueReplaceState(
4118
- defaultProps,
4119
- defaultProps.state,
4289
+ newProps,
4290
+ newProps.state,
4120
4291
  null
4121
4292
  ),
4122
- null !== ref.queue && 0 < ref.queue.length)
4293
+ null !== defaultProps.queue && 0 < defaultProps.queue.length)
4123
4294
  )
4124
4295
  if (
4125
- ((type = ref.queue),
4126
- (contextType = ref.replace),
4127
- (ref.queue = null),
4128
- (ref.replace = !1),
4129
- contextType && 1 === type.length)
4296
+ ((type = defaultProps.queue),
4297
+ (ref = defaultProps.replace),
4298
+ (defaultProps.queue = null),
4299
+ (defaultProps.replace = !1),
4300
+ ref && 1 === type.length)
4130
4301
  )
4131
- defaultProps.state = type[0];
4302
+ newProps.state = type[0];
4132
4303
  else {
4133
- ref = contextType ? type[0] : defaultProps.state;
4134
- propName$31 = !0;
4135
- for (
4136
- contextType = contextType ? 1 : 0;
4137
- contextType < type.length;
4138
- contextType++
4139
- )
4140
- (propName = type[contextType]),
4141
- (propName =
4142
- "function" === typeof propName
4143
- ? propName.call(
4144
- defaultProps,
4145
- ref,
4146
- JSCompiler_inline_result,
4147
- void 0
4148
- )
4149
- : propName),
4150
- null != propName &&
4151
- (propName$31
4152
- ? ((propName$31 = !1), (ref = assign({}, ref, propName)))
4153
- : assign(ref, propName));
4154
- defaultProps.state = ref;
4304
+ defaultProps = ref ? type[0] : newProps.state;
4305
+ initialState = !0;
4306
+ for (ref = ref ? 1 : 0; ref < type.length; ref++)
4307
+ (propName$33 = type[ref]),
4308
+ (propName$33 =
4309
+ "function" === typeof propName$33
4310
+ ? propName$33.call(newProps, defaultProps, props, void 0)
4311
+ : propName$33),
4312
+ null != propName$33 &&
4313
+ (initialState
4314
+ ? ((initialState = !1),
4315
+ (defaultProps = assign({}, defaultProps, propName$33)))
4316
+ : assign(defaultProps, propName$33));
4317
+ newProps.state = defaultProps;
4155
4318
  }
4156
- else ref.queue = null;
4157
- type = defaultProps.render();
4158
- JSCompiler_inline_result = task.keyPath;
4319
+ else defaultProps.queue = null;
4320
+ type = newProps.render();
4321
+ if (12 === request.status) throw null;
4322
+ props = task.keyPath;
4159
4323
  task.keyPath = keyPath;
4160
4324
  renderNodeDestructive(request, task, type, -1);
4161
- task.keyPath = JSCompiler_inline_result;
4162
- task.componentStack = props;
4163
- } else
4164
- (JSCompiler_inline_result = task.componentStack),
4165
- (task.componentStack = {
4166
- tag: 1,
4167
- parent: task.componentStack,
4168
- type: type
4169
- }),
4170
- (type = renderWithHooks(request, task, keyPath, type, props, void 0)),
4171
- finishFunctionComponent(
4172
- request,
4173
- task,
4174
- keyPath,
4175
- type,
4176
- 0 !== localIdCounter,
4177
- actionStateCounter,
4178
- actionStateMatchingIndex
4179
- ),
4180
- (task.componentStack = JSCompiler_inline_result);
4181
- else if ("string" === typeof type) {
4182
- JSCompiler_inline_result = task.componentStack;
4183
- task.componentStack = createBuiltInComponentStack(task, type);
4184
- defaultProps = task.blockedSegment;
4185
- if (null === defaultProps)
4186
- (defaultProps = props.children),
4187
- (ref = task.formatContext),
4188
- (propName$31 = task.keyPath),
4189
- (task.formatContext = getChildFormatContext(ref, type, props)),
4325
+ task.keyPath = props;
4326
+ } else {
4327
+ type = renderWithHooks(request, task, keyPath, type, props, void 0);
4328
+ if (12 === request.status) throw null;
4329
+ finishFunctionComponent(
4330
+ request,
4331
+ task,
4332
+ keyPath,
4333
+ type,
4334
+ 0 !== localIdCounter,
4335
+ actionStateCounter,
4336
+ actionStateMatchingIndex
4337
+ );
4338
+ }
4339
+ else if ("string" === typeof type)
4340
+ if (((newProps = task.blockedSegment), null === newProps))
4341
+ (newProps = props.children),
4342
+ (defaultProps = task.formatContext),
4343
+ (initialState = task.keyPath),
4344
+ (task.formatContext = getChildFormatContext(defaultProps, type, props)),
4190
4345
  (task.keyPath = keyPath),
4191
- renderNode(request, task, defaultProps, -1),
4192
- (task.formatContext = ref),
4193
- (task.keyPath = propName$31);
4346
+ renderNode(request, task, newProps, -1),
4347
+ (task.formatContext = defaultProps),
4348
+ (task.keyPath = initialState);
4194
4349
  else {
4195
- propName$31 = pushStartInstance(
4196
- defaultProps.chunks,
4350
+ initialState = pushStartInstance(
4351
+ newProps.chunks,
4197
4352
  type,
4198
4353
  props,
4199
4354
  request.resumableState,
4200
4355
  request.renderState,
4201
4356
  task.hoistableState,
4202
4357
  task.formatContext,
4203
- defaultProps.lastPushedText,
4358
+ newProps.lastPushedText,
4204
4359
  task.isFallback
4205
4360
  );
4206
- defaultProps.lastPushedText = !1;
4207
- ref = task.formatContext;
4208
- contextType = task.keyPath;
4209
- task.formatContext = getChildFormatContext(ref, type, props);
4361
+ newProps.lastPushedText = !1;
4362
+ defaultProps = task.formatContext;
4363
+ ref = task.keyPath;
4364
+ task.formatContext = getChildFormatContext(defaultProps, type, props);
4210
4365
  task.keyPath = keyPath;
4211
- renderNode(request, task, propName$31, -1);
4212
- task.formatContext = ref;
4213
- task.keyPath = contextType;
4366
+ renderNode(request, task, initialState, -1);
4367
+ task.formatContext = defaultProps;
4368
+ task.keyPath = ref;
4214
4369
  a: {
4215
- keyPath = defaultProps.chunks;
4370
+ task = newProps.chunks;
4216
4371
  request = request.resumableState;
4217
4372
  switch (type) {
4218
4373
  case "title":
@@ -4235,23 +4390,22 @@ function renderElement(request, task, keyPath, type, props, ref) {
4235
4390
  case "wbr":
4236
4391
  break a;
4237
4392
  case "body":
4238
- if (1 >= ref.insertionMode) {
4393
+ if (1 >= defaultProps.insertionMode) {
4239
4394
  request.hasBody = !0;
4240
4395
  break a;
4241
4396
  }
4242
4397
  break;
4243
4398
  case "html":
4244
- if (0 === ref.insertionMode) {
4399
+ if (0 === defaultProps.insertionMode) {
4245
4400
  request.hasHtml = !0;
4246
4401
  break a;
4247
4402
  }
4248
4403
  }
4249
- keyPath.push(endChunkForTag(type));
4404
+ task.push(endChunkForTag(type));
4250
4405
  }
4251
- defaultProps.lastPushedText = !1;
4406
+ newProps.lastPushedText = !1;
4252
4407
  }
4253
- task.componentStack = JSCompiler_inline_result;
4254
- } else {
4408
+ else {
4255
4409
  switch (type) {
4256
4410
  case REACT_LEGACY_HIDDEN_TYPE:
4257
4411
  case REACT_DEBUG_TRACING_MODE_TYPE:
@@ -4271,13 +4425,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4271
4425
  (task.keyPath = type));
4272
4426
  return;
4273
4427
  case REACT_SUSPENSE_LIST_TYPE:
4274
- type = task.componentStack;
4275
- task.componentStack = createBuiltInComponentStack(task, "SuspenseList");
4276
- JSCompiler_inline_result = task.keyPath;
4428
+ type = task.keyPath;
4277
4429
  task.keyPath = keyPath;
4278
4430
  renderNodeDestructive(request, task, props.children, -1);
4279
- task.keyPath = JSCompiler_inline_result;
4280
- task.componentStack = type;
4431
+ task.keyPath = type;
4281
4432
  return;
4282
4433
  case REACT_SCOPE_TYPE:
4283
4434
  throw Error("ReactDOMServer does not yet support scope components.");
@@ -4292,31 +4443,26 @@ function renderElement(request, task, keyPath, type, props, ref) {
4292
4443
  task.keyPath = type;
4293
4444
  }
4294
4445
  } else {
4295
- var previousComponentStack = task.componentStack;
4296
- type = task.componentStack = createBuiltInComponentStack(
4297
- task,
4298
- "Suspense"
4299
- );
4300
- var prevKeyPath = task.keyPath;
4301
- ref = task.blockedBoundary;
4302
- var parentHoistableState = task.hoistableState,
4303
- parentSegment = task.blockedSegment;
4304
- propName$31 = props.fallback;
4305
- var content = props.children;
4306
- props = new Set();
4307
- contextType = createSuspenseBoundary(request, props);
4446
+ type = task.keyPath;
4447
+ var parentBoundary = task.blockedBoundary,
4448
+ parentHoistableState = task.hoistableState;
4449
+ ref = task.blockedSegment;
4450
+ propName$33 = props.fallback;
4451
+ props = props.children;
4452
+ var fallbackAbortSet = new Set();
4453
+ propName = createSuspenseBoundary(request, fallbackAbortSet);
4308
4454
  null !== request.trackedPostpones &&
4309
- (contextType.trackedContentKeyPath = keyPath);
4310
- propName = createPendingSegment(
4455
+ (propName.trackedContentKeyPath = keyPath);
4456
+ var boundarySegment = createPendingSegment(
4311
4457
  request,
4312
- parentSegment.chunks.length,
4313
- contextType,
4458
+ ref.chunks.length,
4459
+ propName,
4314
4460
  task.formatContext,
4315
4461
  !1,
4316
4462
  !1
4317
4463
  );
4318
- parentSegment.children.push(propName);
4319
- parentSegment.lastPushedText = !1;
4464
+ ref.children.push(boundarySegment);
4465
+ ref.lastPushedText = !1;
4320
4466
  var contentRootSegment = createPendingSegment(
4321
4467
  request,
4322
4468
  0,
@@ -4326,107 +4472,122 @@ function renderElement(request, task, keyPath, type, props, ref) {
4326
4472
  !1
4327
4473
  );
4328
4474
  contentRootSegment.parentFlushed = !0;
4329
- task.blockedBoundary = contextType;
4330
- task.hoistableState = contextType.contentState;
4331
- task.blockedSegment = contentRootSegment;
4332
- task.keyPath = keyPath;
4333
- try {
4334
- if (
4335
- (renderNode(request, task, content, -1),
4336
- contentRootSegment.lastPushedText &&
4337
- contentRootSegment.textEmbedded &&
4338
- contentRootSegment.chunks.push(textSeparator),
4339
- (contentRootSegment.status = 1),
4340
- queueCompletedSegment(contextType, contentRootSegment),
4341
- 0 === contextType.pendingTasks && 0 === contextType.status)
4342
- ) {
4343
- contextType.status = 1;
4344
- task.componentStack = previousComponentStack;
4345
- break a;
4475
+ if (null !== request.trackedPostpones) {
4476
+ newProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
4477
+ defaultProps = [newProps[1], newProps[2], [], null];
4478
+ request.trackedPostpones.workingMap.set(newProps, defaultProps);
4479
+ propName.trackedFallbackNode = defaultProps;
4480
+ task.blockedSegment = boundarySegment;
4481
+ task.keyPath = newProps;
4482
+ boundarySegment.status = 6;
4483
+ try {
4484
+ renderNode(request, task, propName$33, -1),
4485
+ boundarySegment.lastPushedText &&
4486
+ boundarySegment.textEmbedded &&
4487
+ boundarySegment.chunks.push(textSeparator),
4488
+ (boundarySegment.status = 1);
4489
+ } catch (thrownValue) {
4490
+ throw (
4491
+ ((boundarySegment.status = 12 === request.status ? 3 : 4),
4492
+ thrownValue)
4493
+ );
4494
+ } finally {
4495
+ (task.blockedSegment = ref), (task.keyPath = type);
4346
4496
  }
4347
- } catch (error) {
4348
- (contentRootSegment.status = 4),
4349
- (contextType.status = 4),
4350
- (JSCompiler_inline_result = getThrownInfo(
4351
- request,
4352
- task.componentStack
4353
- )),
4354
- (defaultProps = logRecoverableError(
4355
- request,
4356
- error,
4357
- JSCompiler_inline_result
4358
- )),
4359
- (contextType.errorDigest = defaultProps),
4360
- untrackBoundary(request, contextType);
4361
- } finally {
4362
- (task.blockedBoundary = ref),
4363
- (task.hoistableState = parentHoistableState),
4364
- (task.blockedSegment = parentSegment),
4365
- (task.keyPath = prevKeyPath),
4366
- (task.componentStack = previousComponentStack);
4497
+ task = createRenderTask(
4498
+ request,
4499
+ null,
4500
+ props,
4501
+ -1,
4502
+ propName,
4503
+ contentRootSegment,
4504
+ propName.contentState,
4505
+ task.abortSet,
4506
+ keyPath,
4507
+ task.formatContext,
4508
+ task.context,
4509
+ task.treeContext,
4510
+ task.componentStack,
4511
+ task.isFallback
4512
+ );
4513
+ pushComponentStack(task);
4514
+ request.pingedTasks.push(task);
4515
+ } else {
4516
+ task.blockedBoundary = propName;
4517
+ task.hoistableState = propName.contentState;
4518
+ task.blockedSegment = contentRootSegment;
4519
+ task.keyPath = keyPath;
4520
+ contentRootSegment.status = 6;
4521
+ try {
4522
+ if (
4523
+ (renderNode(request, task, props, -1),
4524
+ contentRootSegment.lastPushedText &&
4525
+ contentRootSegment.textEmbedded &&
4526
+ contentRootSegment.chunks.push(textSeparator),
4527
+ (contentRootSegment.status = 1),
4528
+ queueCompletedSegment(propName, contentRootSegment),
4529
+ 0 === propName.pendingTasks && 0 === propName.status)
4530
+ ) {
4531
+ propName.status = 1;
4532
+ break a;
4533
+ }
4534
+ } catch (thrownValue$28) {
4535
+ (propName.status = 4),
4536
+ 12 === request.status
4537
+ ? ((contentRootSegment.status = 3),
4538
+ (newProps = request.fatalError))
4539
+ : ((contentRootSegment.status = 4),
4540
+ (newProps = thrownValue$28)),
4541
+ (defaultProps = getThrownInfo(task.componentStack)),
4542
+ (initialState = logRecoverableError(
4543
+ request,
4544
+ newProps,
4545
+ defaultProps
4546
+ )),
4547
+ (propName.errorDigest = initialState),
4548
+ untrackBoundary(request, propName);
4549
+ } finally {
4550
+ (task.blockedBoundary = parentBoundary),
4551
+ (task.hoistableState = parentHoistableState),
4552
+ (task.blockedSegment = ref),
4553
+ (task.keyPath = type);
4554
+ }
4555
+ task = createRenderTask(
4556
+ request,
4557
+ null,
4558
+ propName$33,
4559
+ -1,
4560
+ parentBoundary,
4561
+ boundarySegment,
4562
+ propName.fallbackState,
4563
+ fallbackAbortSet,
4564
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
4565
+ task.formatContext,
4566
+ task.context,
4567
+ task.treeContext,
4568
+ task.componentStack,
4569
+ !0
4570
+ );
4571
+ pushComponentStack(task);
4572
+ request.pingedTasks.push(task);
4367
4573
  }
4368
- JSCompiler_inline_result = [
4369
- keyPath[0],
4370
- "Suspense Fallback",
4371
- keyPath[2]
4372
- ];
4373
- defaultProps = request.trackedPostpones;
4374
- null !== defaultProps &&
4375
- ((previousComponentStack = [
4376
- JSCompiler_inline_result[1],
4377
- JSCompiler_inline_result[2],
4378
- [],
4379
- null
4380
- ]),
4381
- defaultProps.workingMap.set(
4382
- JSCompiler_inline_result,
4383
- previousComponentStack
4384
- ),
4385
- 5 === contextType.status
4386
- ? (defaultProps.workingMap.get(keyPath)[4] =
4387
- previousComponentStack)
4388
- : (contextType.trackedFallbackNode = previousComponentStack));
4389
- task = createRenderTask(
4390
- request,
4391
- null,
4392
- propName$31,
4393
- -1,
4394
- ref,
4395
- propName,
4396
- contextType.fallbackState,
4397
- props,
4398
- JSCompiler_inline_result,
4399
- task.formatContext,
4400
- task.legacyContext,
4401
- task.context,
4402
- task.treeContext,
4403
- type,
4404
- !0
4405
- );
4406
- request.pingedTasks.push(task);
4407
4574
  }
4408
4575
  return;
4409
4576
  }
4410
4577
  if ("object" === typeof type && null !== type)
4411
4578
  switch (type.$$typeof) {
4412
4579
  case REACT_FORWARD_REF_TYPE:
4413
- JSCompiler_inline_result = task.componentStack;
4414
- task.componentStack = {
4415
- tag: 1,
4416
- parent: task.componentStack,
4417
- type: type.render
4418
- };
4419
4580
  if ("ref" in props)
4420
- for (contextType in ((defaultProps = {}), props))
4421
- "ref" !== contextType &&
4422
- (defaultProps[contextType] = props[contextType]);
4423
- else defaultProps = props;
4581
+ for (boundarySegment in ((newProps = {}), props))
4582
+ "ref" !== boundarySegment &&
4583
+ (newProps[boundarySegment] = props[boundarySegment]);
4584
+ else newProps = props;
4424
4585
  type = renderWithHooks(
4425
4586
  request,
4426
4587
  task,
4427
4588
  keyPath,
4428
4589
  type.render,
4429
- defaultProps,
4590
+ newProps,
4430
4591
  ref
4431
4592
  );
4432
4593
  finishFunctionComponent(
@@ -4438,7 +4599,6 @@ function renderElement(request, task, keyPath, type, props, ref) {
4438
4599
  actionStateCounter,
4439
4600
  actionStateMatchingIndex
4440
4601
  );
4441
- task.componentStack = JSCompiler_inline_result;
4442
4602
  return;
4443
4603
  case REACT_MEMO_TYPE:
4444
4604
  renderElement(request, task, keyPath, type.type, props, ref);
@@ -4446,16 +4606,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4446
4606
  case REACT_PROVIDER_TYPE:
4447
4607
  case REACT_CONTEXT_TYPE:
4448
4608
  defaultProps = props.children;
4449
- JSCompiler_inline_result = task.keyPath;
4609
+ newProps = task.keyPath;
4450
4610
  props = props.value;
4451
- ref = type._currentValue;
4611
+ initialState = type._currentValue;
4452
4612
  type._currentValue = props;
4453
- propName$31 = currentActiveSnapshot;
4613
+ ref = currentActiveSnapshot;
4454
4614
  currentActiveSnapshot = type = {
4455
- parent: propName$31,
4456
- depth: null === propName$31 ? 0 : propName$31.depth + 1,
4615
+ parent: ref,
4616
+ depth: null === ref ? 0 : ref.depth + 1,
4457
4617
  context: type,
4458
- parentValue: ref,
4618
+ parentValue: initialState,
4459
4619
  value: props
4460
4620
  };
4461
4621
  task.context = type;
@@ -4469,7 +4629,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4469
4629
  request.context._currentValue = request.parentValue;
4470
4630
  request = currentActiveSnapshot = request.parent;
4471
4631
  task.context = request;
4472
- task.keyPath = JSCompiler_inline_result;
4632
+ task.keyPath = newProps;
4473
4633
  return;
4474
4634
  case REACT_CONSUMER_TYPE:
4475
4635
  props = props.children;
@@ -4480,12 +4640,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4480
4640
  task.keyPath = props;
4481
4641
  return;
4482
4642
  case REACT_LAZY_TYPE:
4483
- JSCompiler_inline_result = task.componentStack;
4484
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4485
- defaultProps = type._init;
4486
- type = defaultProps(type._payload);
4487
- renderElement(request, task, keyPath, type, props, void 0);
4488
- task.componentStack = JSCompiler_inline_result;
4643
+ newProps = type._init;
4644
+ type = newProps(type._payload);
4645
+ if (12 === request.status) throw null;
4646
+ renderElement(request, task, keyPath, type, props, ref);
4489
4647
  return;
4490
4648
  }
4491
4649
  throw Error(
@@ -4521,23 +4679,29 @@ function resumeNode(request, task, segmentId, node, childIndex) {
4521
4679
  (task.replay = prevReplay), (task.blockedSegment = null);
4522
4680
  }
4523
4681
  }
4524
- function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4525
- if (null !== task.replay && "number" === typeof task.replay.slots)
4526
- resumeNode(request, task, task.replay.slots, node$jscomp$0, childIndex);
4527
- else if (
4528
- ((task.node = node$jscomp$0),
4529
- (task.childIndex = childIndex),
4530
- null !== node$jscomp$0)
4531
- ) {
4532
- if ("object" === typeof node$jscomp$0) {
4533
- switch (node$jscomp$0.$$typeof) {
4682
+ function renderNodeDestructive(request, task, node, childIndex) {
4683
+ null !== task.replay && "number" === typeof task.replay.slots
4684
+ ? resumeNode(request, task, task.replay.slots, node, childIndex)
4685
+ : ((task.node = node),
4686
+ (task.childIndex = childIndex),
4687
+ (node = task.componentStack),
4688
+ pushComponentStack(task),
4689
+ retryNode(request, task),
4690
+ (task.componentStack = node));
4691
+ }
4692
+ function retryNode(request, task) {
4693
+ var node = task.node,
4694
+ childIndex = task.childIndex;
4695
+ if (null !== node) {
4696
+ if ("object" === typeof node) {
4697
+ switch (node.$$typeof) {
4534
4698
  case REACT_ELEMENT_TYPE:
4535
- var type = node$jscomp$0.type,
4536
- key = node$jscomp$0.key,
4537
- props = node$jscomp$0.props;
4538
- node$jscomp$0 = props.ref;
4539
- var ref = void 0 !== node$jscomp$0 ? node$jscomp$0 : null;
4540
- var name = getComponentNameFromType(type),
4699
+ var type = node.type,
4700
+ key = node.key,
4701
+ props = node.props;
4702
+ node = props.ref;
4703
+ var ref = void 0 !== node ? node : null,
4704
+ name = getComponentNameFromType(type),
4541
4705
  keyOrIndex =
4542
4706
  null == key ? (-1 === childIndex ? 0 : childIndex) : key;
4543
4707
  key = [task.keyPath, name, keyOrIndex];
@@ -4545,24 +4709,20 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4545
4709
  a: {
4546
4710
  var replay = task.replay;
4547
4711
  childIndex = replay.nodes;
4548
- for (
4549
- node$jscomp$0 = 0;
4550
- node$jscomp$0 < childIndex.length;
4551
- node$jscomp$0++
4552
- ) {
4553
- var node = childIndex[node$jscomp$0];
4554
- if (keyOrIndex === node[1]) {
4555
- if (4 === node.length) {
4556
- if (null !== name && name !== node[0])
4712
+ for (node = 0; node < childIndex.length; node++) {
4713
+ var node$jscomp$0 = childIndex[node];
4714
+ if (keyOrIndex === node$jscomp$0[1]) {
4715
+ if (4 === node$jscomp$0.length) {
4716
+ if (null !== name && name !== node$jscomp$0[0])
4557
4717
  throw Error(
4558
4718
  "Expected the resume to render <" +
4559
- node[0] +
4719
+ node$jscomp$0[0] +
4560
4720
  "> in this slot but instead it rendered <" +
4561
4721
  name +
4562
4722
  ">. The tree doesn't match so React will fallback to client rendering."
4563
4723
  );
4564
- var childNodes = node[2];
4565
- name = node[3];
4724
+ var childNodes = node$jscomp$0[2];
4725
+ name = node$jscomp$0[3];
4566
4726
  keyOrIndex = task.node;
4567
4727
  task.replay = {
4568
4728
  nodes: childNodes,
@@ -4591,14 +4751,13 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4591
4751
  x)
4592
4752
  );
4593
4753
  task.replay.pendingTasks--;
4594
- props = getThrownInfo(request, task.componentStack);
4595
- key = request;
4596
- request = task.blockedBoundary;
4754
+ props = getThrownInfo(task.componentStack);
4755
+ key = task.blockedBoundary;
4597
4756
  type = x;
4598
- props = logRecoverableError(key, type, props);
4757
+ props = logRecoverableError(request, type, props);
4599
4758
  abortRemainingReplayNodes(
4600
- key,
4601
4759
  request,
4760
+ key,
4602
4761
  childNodes,
4603
4762
  name,
4604
4763
  type,
@@ -4615,15 +4774,14 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4615
4774
  );
4616
4775
  b: {
4617
4776
  replay = void 0;
4618
- type = node[5];
4619
- ref = node[2];
4620
- name = node[3];
4621
- keyOrIndex = null === node[4] ? [] : node[4][2];
4622
- node = null === node[4] ? null : node[4][3];
4623
- var previousComponentStack = task.componentStack,
4624
- suspenseComponentStack = (task.componentStack =
4625
- createBuiltInComponentStack(task, "Suspense")),
4626
- prevKeyPath = task.keyPath,
4777
+ type = node$jscomp$0[5];
4778
+ ref = node$jscomp$0[2];
4779
+ name = node$jscomp$0[3];
4780
+ keyOrIndex =
4781
+ null === node$jscomp$0[4] ? [] : node$jscomp$0[4][2];
4782
+ node$jscomp$0 =
4783
+ null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4784
+ var prevKeyPath = task.keyPath,
4627
4785
  previousReplaySet = task.replay,
4628
4786
  parentBoundary = task.blockedBoundary,
4629
4787
  parentHoistableState = task.hoistableState,
@@ -4638,6 +4796,7 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4638
4796
  resumedBoundary.rootSegmentID = type;
4639
4797
  task.blockedBoundary = resumedBoundary;
4640
4798
  task.hoistableState = resumedBoundary.contentState;
4799
+ task.keyPath = key;
4641
4800
  task.replay = {
4642
4801
  nodes: ref,
4643
4802
  slots: name,
@@ -4663,10 +4822,7 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4663
4822
  }
4664
4823
  } catch (error) {
4665
4824
  (resumedBoundary.status = 4),
4666
- (childNodes = getThrownInfo(
4667
- request,
4668
- task.componentStack
4669
- )),
4825
+ (childNodes = getThrownInfo(task.componentStack)),
4670
4826
  (replay = logRecoverableError(
4671
4827
  request,
4672
4828
  error,
@@ -4681,13 +4837,16 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4681
4837
  (task.blockedBoundary = parentBoundary),
4682
4838
  (task.hoistableState = parentHoistableState),
4683
4839
  (task.replay = previousReplaySet),
4684
- (task.keyPath = prevKeyPath),
4685
- (task.componentStack = previousComponentStack);
4840
+ (task.keyPath = prevKeyPath);
4686
4841
  }
4687
4842
  task = createReplayTask(
4688
4843
  request,
4689
4844
  null,
4690
- { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
4845
+ {
4846
+ nodes: keyOrIndex,
4847
+ slots: node$jscomp$0,
4848
+ pendingTasks: 0
4849
+ },
4691
4850
  props,
4692
4851
  -1,
4693
4852
  parentBoundary,
@@ -4695,16 +4854,16 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4695
4854
  fallbackAbortSet,
4696
4855
  [key[0], "Suspense Fallback", key[2]],
4697
4856
  task.formatContext,
4698
- task.legacyContext,
4699
4857
  task.context,
4700
4858
  task.treeContext,
4701
- suspenseComponentStack,
4859
+ task.componentStack,
4702
4860
  !0
4703
4861
  );
4862
+ pushComponentStack(task);
4704
4863
  request.pingedTasks.push(task);
4705
4864
  }
4706
4865
  }
4707
- childIndex.splice(node$jscomp$0, 1);
4866
+ childIndex.splice(node, 1);
4708
4867
  break a;
4709
4868
  }
4710
4869
  }
@@ -4716,80 +4875,68 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4716
4875
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
4717
4876
  );
4718
4877
  case REACT_LAZY_TYPE:
4719
- childNodes = task.componentStack;
4720
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4721
- props = node$jscomp$0._init;
4722
- node$jscomp$0 = props(node$jscomp$0._payload);
4723
- task.componentStack = childNodes;
4724
- renderNodeDestructive(request, task, node$jscomp$0, childIndex);
4878
+ childNodes = node._init;
4879
+ node = childNodes(node._payload);
4880
+ if (12 === request.status) throw null;
4881
+ renderNodeDestructive(request, task, node, childIndex);
4725
4882
  return;
4726
4883
  }
4727
- if (isArrayImpl(node$jscomp$0)) {
4728
- renderChildrenArray(request, task, node$jscomp$0, childIndex);
4884
+ if (isArrayImpl(node)) {
4885
+ renderChildrenArray(request, task, node, childIndex);
4729
4886
  return;
4730
4887
  }
4731
- null === node$jscomp$0 || "object" !== typeof node$jscomp$0
4888
+ null === node || "object" !== typeof node
4732
4889
  ? (childNodes = null)
4733
4890
  : ((childNodes =
4734
- (MAYBE_ITERATOR_SYMBOL && node$jscomp$0[MAYBE_ITERATOR_SYMBOL]) ||
4735
- node$jscomp$0["@@iterator"]),
4891
+ (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
4892
+ node["@@iterator"]),
4736
4893
  (childNodes = "function" === typeof childNodes ? childNodes : null));
4737
- if (childNodes && (childNodes = childNodes.call(node$jscomp$0))) {
4738
- node$jscomp$0 = childNodes.next();
4739
- if (!node$jscomp$0.done) {
4894
+ if (childNodes && (childNodes = childNodes.call(node))) {
4895
+ node = childNodes.next();
4896
+ if (!node.done) {
4740
4897
  props = [];
4741
- do
4742
- props.push(node$jscomp$0.value),
4743
- (node$jscomp$0 = childNodes.next());
4744
- while (!node$jscomp$0.done);
4898
+ do props.push(node.value), (node = childNodes.next());
4899
+ while (!node.done);
4745
4900
  renderChildrenArray(request, task, props, childIndex);
4746
4901
  }
4747
4902
  return;
4748
4903
  }
4749
- if ("function" === typeof node$jscomp$0.then)
4904
+ if ("function" === typeof node.then)
4750
4905
  return (
4751
4906
  (task.thenableState = null),
4752
- renderNodeDestructive(
4753
- request,
4754
- task,
4755
- unwrapThenable(node$jscomp$0),
4756
- childIndex
4757
- )
4907
+ renderNodeDestructive(request, task, unwrapThenable(node), childIndex)
4758
4908
  );
4759
- if (node$jscomp$0.$$typeof === REACT_CONTEXT_TYPE)
4909
+ if (node.$$typeof === REACT_CONTEXT_TYPE)
4760
4910
  return renderNodeDestructive(
4761
4911
  request,
4762
4912
  task,
4763
- node$jscomp$0._currentValue,
4913
+ node._currentValue,
4764
4914
  childIndex
4765
4915
  );
4766
- childIndex = Object.prototype.toString.call(node$jscomp$0);
4916
+ childIndex = Object.prototype.toString.call(node);
4767
4917
  throw Error(
4768
4918
  "Objects are not valid as a React child (found: " +
4769
4919
  ("[object Object]" === childIndex
4770
- ? "object with keys {" + Object.keys(node$jscomp$0).join(", ") + "}"
4920
+ ? "object with keys {" + Object.keys(node).join(", ") + "}"
4771
4921
  : childIndex) +
4772
4922
  "). If you meant to render a collection of children, use an array instead."
4773
4923
  );
4774
4924
  }
4775
- if ("string" === typeof node$jscomp$0)
4925
+ if ("string" === typeof node)
4776
4926
  (childIndex = task.blockedSegment),
4777
4927
  null !== childIndex &&
4778
4928
  (childIndex.lastPushedText = pushTextInstance(
4779
4929
  childIndex.chunks,
4780
- node$jscomp$0,
4930
+ node,
4781
4931
  request.renderState,
4782
4932
  childIndex.lastPushedText
4783
4933
  ));
4784
- else if (
4785
- "number" === typeof node$jscomp$0 ||
4786
- "bigint" === typeof node$jscomp$0
4787
- )
4934
+ else if ("number" === typeof node || "bigint" === typeof node)
4788
4935
  (childIndex = task.blockedSegment),
4789
4936
  null !== childIndex &&
4790
4937
  (childIndex.lastPushedText = pushTextInstance(
4791
4938
  childIndex.chunks,
4792
- "" + node$jscomp$0,
4939
+ "" + node,
4793
4940
  request.renderState,
4794
4941
  childIndex.lastPushedText
4795
4942
  ));
@@ -4827,7 +4974,7 @@ function renderChildrenArray(request, task, children, childIndex) {
4827
4974
  )
4828
4975
  throw x;
4829
4976
  task.replay.pendingTasks--;
4830
- children = getThrownInfo(request, task.componentStack);
4977
+ children = getThrownInfo(task.componentStack);
4831
4978
  var boundary = task.blockedBoundary,
4832
4979
  error = x;
4833
4980
  children = logRecoverableError(request, error, children);
@@ -4882,9 +5029,55 @@ function untrackBoundary(request, boundary) {
4882
5029
  void 0 !== boundary &&
4883
5030
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
4884
5031
  }
5032
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
5033
+ return createReplayTask(
5034
+ request,
5035
+ thenableState,
5036
+ task.replay,
5037
+ task.node,
5038
+ task.childIndex,
5039
+ task.blockedBoundary,
5040
+ task.hoistableState,
5041
+ task.abortSet,
5042
+ task.keyPath,
5043
+ task.formatContext,
5044
+ task.context,
5045
+ task.treeContext,
5046
+ task.componentStack,
5047
+ task.isFallback
5048
+ );
5049
+ }
5050
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
5051
+ var segment = task.blockedSegment,
5052
+ newSegment = createPendingSegment(
5053
+ request,
5054
+ segment.chunks.length,
5055
+ null,
5056
+ task.formatContext,
5057
+ segment.lastPushedText,
5058
+ !0
5059
+ );
5060
+ segment.children.push(newSegment);
5061
+ segment.lastPushedText = !1;
5062
+ return createRenderTask(
5063
+ request,
5064
+ thenableState,
5065
+ task.node,
5066
+ task.childIndex,
5067
+ task.blockedBoundary,
5068
+ newSegment,
5069
+ task.hoistableState,
5070
+ task.abortSet,
5071
+ task.keyPath,
5072
+ task.formatContext,
5073
+ task.context,
5074
+ task.treeContext,
5075
+ task.componentStack,
5076
+ task.isFallback
5077
+ );
5078
+ }
4885
5079
  function renderNode(request, task, node, childIndex) {
4886
5080
  var previousFormatContext = task.formatContext,
4887
- previousLegacyContext = task.legacyContext,
4888
5081
  previousContext = task.context,
4889
5082
  previousKeyPath = task.keyPath,
4890
5083
  previousTreeContext = task.treeContext,
@@ -4900,37 +5093,32 @@ function renderNode(request, task, node, childIndex) {
4900
5093
  thrownValue === SuspenseException
4901
5094
  ? getSuspendedThenable()
4902
5095
  : thrownValue),
4903
- "object" === typeof node &&
4904
- null !== node &&
4905
- "function" === typeof node.then)
5096
+ "object" === typeof node && null !== node)
4906
5097
  ) {
4907
- childIndex = getThenableStateAfterSuspending();
4908
- request = createReplayTask(
4909
- request,
4910
- childIndex,
4911
- task.replay,
4912
- task.node,
4913
- task.childIndex,
4914
- task.blockedBoundary,
4915
- task.hoistableState,
4916
- task.abortSet,
4917
- task.keyPath,
4918
- task.formatContext,
4919
- task.legacyContext,
4920
- task.context,
4921
- task.treeContext,
4922
- null !== task.componentStack ? task.componentStack.parent : null,
4923
- task.isFallback
4924
- ).ping;
4925
- node.then(request, request);
4926
- task.formatContext = previousFormatContext;
4927
- task.legacyContext = previousLegacyContext;
4928
- task.context = previousContext;
4929
- task.keyPath = previousKeyPath;
4930
- task.treeContext = previousTreeContext;
4931
- task.componentStack = previousComponentStack;
4932
- switchContext(previousContext);
4933
- return;
5098
+ if ("function" === typeof node.then) {
5099
+ childIndex = getThenableStateAfterSuspending();
5100
+ request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
5101
+ node.then(request, request);
5102
+ task.formatContext = previousFormatContext;
5103
+ task.context = previousContext;
5104
+ task.keyPath = previousKeyPath;
5105
+ task.treeContext = previousTreeContext;
5106
+ task.componentStack = previousComponentStack;
5107
+ switchContext(previousContext);
5108
+ return;
5109
+ }
5110
+ if ("Maximum call stack size exceeded" === node.message) {
5111
+ node = getThenableStateAfterSuspending();
5112
+ node = spawnNewSuspendedReplayTask(request, task, node);
5113
+ request.pingedTasks.push(node);
5114
+ task.formatContext = previousFormatContext;
5115
+ task.context = previousContext;
5116
+ task.keyPath = previousKeyPath;
5117
+ task.treeContext = previousTreeContext;
5118
+ task.componentStack = previousComponentStack;
5119
+ switchContext(previousContext);
5120
+ return;
5121
+ }
4934
5122
  }
4935
5123
  }
4936
5124
  else {
@@ -4938,62 +5126,45 @@ function renderNode(request, task, node, childIndex) {
4938
5126
  chunkLength = segment.chunks.length;
4939
5127
  try {
4940
5128
  return renderNodeDestructive(request, task, node, childIndex);
4941
- } catch (thrownValue$40) {
5129
+ } catch (thrownValue$48) {
4942
5130
  if (
4943
5131
  (resetHooksState(),
4944
5132
  (segment.children.length = childrenLength),
4945
5133
  (segment.chunks.length = chunkLength),
4946
5134
  (node =
4947
- thrownValue$40 === SuspenseException
5135
+ thrownValue$48 === SuspenseException
4948
5136
  ? getSuspendedThenable()
4949
- : thrownValue$40),
4950
- "object" === typeof node &&
4951
- null !== node &&
4952
- "function" === typeof node.then)
5137
+ : thrownValue$48),
5138
+ "object" === typeof node && null !== node)
4953
5139
  ) {
4954
- childIndex = getThenableStateAfterSuspending();
4955
- segment = task.blockedSegment;
4956
- childrenLength = createPendingSegment(
4957
- request,
4958
- segment.chunks.length,
4959
- null,
4960
- task.formatContext,
4961
- segment.lastPushedText,
4962
- !0
4963
- );
4964
- segment.children.push(childrenLength);
4965
- segment.lastPushedText = !1;
4966
- request = createRenderTask(
4967
- request,
4968
- childIndex,
4969
- task.node,
4970
- task.childIndex,
4971
- task.blockedBoundary,
4972
- childrenLength,
4973
- task.hoistableState,
4974
- task.abortSet,
4975
- task.keyPath,
4976
- task.formatContext,
4977
- task.legacyContext,
4978
- task.context,
4979
- task.treeContext,
4980
- null !== task.componentStack ? task.componentStack.parent : null,
4981
- task.isFallback
4982
- ).ping;
4983
- node.then(request, request);
4984
- task.formatContext = previousFormatContext;
4985
- task.legacyContext = previousLegacyContext;
4986
- task.context = previousContext;
4987
- task.keyPath = previousKeyPath;
4988
- task.treeContext = previousTreeContext;
4989
- task.componentStack = previousComponentStack;
4990
- switchContext(previousContext);
4991
- return;
5140
+ if ("function" === typeof node.then) {
5141
+ childIndex = getThenableStateAfterSuspending();
5142
+ request = spawnNewSuspendedRenderTask(request, task, childIndex).ping;
5143
+ node.then(request, request);
5144
+ task.formatContext = previousFormatContext;
5145
+ task.context = previousContext;
5146
+ task.keyPath = previousKeyPath;
5147
+ task.treeContext = previousTreeContext;
5148
+ task.componentStack = previousComponentStack;
5149
+ switchContext(previousContext);
5150
+ return;
5151
+ }
5152
+ if ("Maximum call stack size exceeded" === node.message) {
5153
+ node = getThenableStateAfterSuspending();
5154
+ node = spawnNewSuspendedRenderTask(request, task, node);
5155
+ request.pingedTasks.push(node);
5156
+ task.formatContext = previousFormatContext;
5157
+ task.context = previousContext;
5158
+ task.keyPath = previousKeyPath;
5159
+ task.treeContext = previousTreeContext;
5160
+ task.componentStack = previousComponentStack;
5161
+ switchContext(previousContext);
5162
+ return;
5163
+ }
4992
5164
  }
4993
5165
  }
4994
5166
  }
4995
5167
  task.formatContext = previousFormatContext;
4996
- task.legacyContext = previousLegacyContext;
4997
5168
  task.context = previousContext;
4998
5169
  task.keyPath = previousKeyPath;
4999
5170
  task.treeContext = previousTreeContext;
@@ -5054,26 +5225,30 @@ function abortRemainingReplayNodes(
5054
5225
  function abortTask(task, request, error) {
5055
5226
  var boundary = task.blockedBoundary,
5056
5227
  segment = task.blockedSegment;
5057
- null !== segment && (segment.status = 3);
5228
+ if (null !== segment) {
5229
+ if (6 === segment.status) return;
5230
+ segment.status = 3;
5231
+ }
5232
+ segment = getThrownInfo(task.componentStack);
5058
5233
  if (null === boundary) {
5059
- if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
5060
- task = task.replay;
5061
- if (null === task) {
5062
- logRecoverableError(request, error, boundary);
5234
+ if (13 !== request.status && 14 !== request.status) {
5235
+ boundary = task.replay;
5236
+ if (null === boundary) {
5237
+ logRecoverableError(request, error, segment);
5063
5238
  fatalError(request, error);
5064
5239
  return;
5065
5240
  }
5066
- task.pendingTasks--;
5067
- 0 === task.pendingTasks &&
5068
- 0 < task.nodes.length &&
5069
- ((boundary = logRecoverableError(request, error, boundary)),
5241
+ boundary.pendingTasks--;
5242
+ 0 === boundary.pendingTasks &&
5243
+ 0 < boundary.nodes.length &&
5244
+ ((task = logRecoverableError(request, error, segment)),
5070
5245
  abortRemainingReplayNodes(
5071
5246
  request,
5072
5247
  null,
5073
- task.nodes,
5074
- task.slots,
5248
+ boundary.nodes,
5249
+ boundary.slots,
5075
5250
  error,
5076
- boundary
5251
+ task
5077
5252
  ));
5078
5253
  request.pendingRootTasks--;
5079
5254
  0 === request.pendingRootTasks && completeShell(request);
@@ -5082,8 +5257,8 @@ function abortTask(task, request, error) {
5082
5257
  boundary.pendingTasks--,
5083
5258
  4 !== boundary.status &&
5084
5259
  ((boundary.status = 4),
5085
- (task = getThrownInfo(request, task.componentStack)),
5086
- (task = logRecoverableError(request, error, task)),
5260
+ (task = logRecoverableError(request, error, segment)),
5261
+ (boundary.status = 4),
5087
5262
  (boundary.errorDigest = task),
5088
5263
  untrackBoundary(request, boundary),
5089
5264
  boundary.parentFlushed &&
@@ -5137,7 +5312,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
5137
5312
  referrerPolicy: props$jscomp$0.referrerPolicy,
5138
5313
  media: props$jscomp$0.media
5139
5314
  });
5140
- if (2 <= (headers.remainingCapacity -= header.length))
5315
+ if (0 <= (headers.remainingCapacity -= header.length + 2))
5141
5316
  (renderState.resets.style[key] = PRELOAD_NO_CREDS),
5142
5317
  linkHeader && (linkHeader += ", "),
5143
5318
  (linkHeader += header),
@@ -5222,7 +5397,7 @@ function finishedTask(request, boundary, segment) {
5222
5397
  0 === request.allPendingTasks && completeAll(request);
5223
5398
  }
5224
5399
  function performWork(request$jscomp$2) {
5225
- if (2 !== request$jscomp$2.status) {
5400
+ if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
5226
5401
  var prevContext = currentActiveSnapshot,
5227
5402
  prevDispatcher = ReactSharedInternals.H;
5228
5403
  ReactSharedInternals.H = HooksDispatcher;
@@ -5244,12 +5419,15 @@ function performWork(request$jscomp$2) {
5244
5419
  if (0 !== task.replay.pendingTasks) {
5245
5420
  switchContext(task.context);
5246
5421
  try {
5247
- renderNodeDestructive(
5248
- request$jscomp$0,
5249
- task,
5250
- task.node,
5251
- task.childIndex
5252
- );
5422
+ "number" === typeof task.replay.slots
5423
+ ? resumeNode(
5424
+ request$jscomp$0,
5425
+ task,
5426
+ task.replay.slots,
5427
+ task.node,
5428
+ task.childIndex
5429
+ )
5430
+ : retryNode(request$jscomp$0, task);
5253
5431
  if (
5254
5432
  1 === task.replay.pendingTasks &&
5255
5433
  0 < task.replay.nodes.length
@@ -5274,19 +5452,17 @@ function performWork(request$jscomp$2) {
5274
5452
  var ping = task.ping;
5275
5453
  x.then(ping, ping);
5276
5454
  task.thenableState = getThenableStateAfterSuspending();
5277
- null !== task.componentStack &&
5278
- (task.componentStack = task.componentStack.parent);
5279
5455
  } else {
5280
5456
  task.replay.pendingTasks--;
5281
5457
  task.abortSet.delete(task);
5282
- var errorInfo = getThrownInfo(
5283
- request$jscomp$0,
5284
- task.componentStack
5285
- );
5458
+ var errorInfo = getThrownInfo(task.componentStack);
5286
5459
  request = void 0;
5287
5460
  var request$jscomp$1 = request$jscomp$0,
5288
5461
  boundary = task.blockedBoundary,
5289
- error$jscomp$0 = x,
5462
+ error$jscomp$0 =
5463
+ 12 === request$jscomp$0.status
5464
+ ? request$jscomp$0.fatalError
5465
+ : x,
5290
5466
  replayNodes = task.replay.nodes,
5291
5467
  resumeSlots = task.replay.slots;
5292
5468
  request = logRecoverableError(
@@ -5317,11 +5493,12 @@ function performWork(request$jscomp$2) {
5317
5493
  (request$jscomp$1 = segment),
5318
5494
  0 === request$jscomp$1.status)
5319
5495
  ) {
5496
+ request$jscomp$1.status = 6;
5320
5497
  switchContext(task.context);
5321
5498
  var childrenLength = request$jscomp$1.children.length,
5322
5499
  chunkLength = request$jscomp$1.chunks.length;
5323
5500
  try {
5324
- renderNodeDestructive(request, task, task.node, task.childIndex),
5501
+ retryNode(request, task),
5325
5502
  request$jscomp$1.lastPushedText &&
5326
5503
  request$jscomp$1.textEmbedded &&
5327
5504
  request$jscomp$1.chunks.push(textSeparator),
@@ -5335,22 +5512,20 @@ function performWork(request$jscomp$2) {
5335
5512
  var x$jscomp$0 =
5336
5513
  thrownValue === SuspenseException
5337
5514
  ? getSuspendedThenable()
5338
- : thrownValue;
5515
+ : 12 === request.status
5516
+ ? request.fatalError
5517
+ : thrownValue;
5339
5518
  if (
5340
5519
  "object" === typeof x$jscomp$0 &&
5341
5520
  null !== x$jscomp$0 &&
5342
5521
  "function" === typeof x$jscomp$0.then
5343
5522
  ) {
5523
+ request$jscomp$1.status = 0;
5524
+ task.thenableState = getThenableStateAfterSuspending();
5344
5525
  var ping$jscomp$0 = task.ping;
5345
5526
  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
5346
- task.thenableState = getThenableStateAfterSuspending();
5347
- null !== task.componentStack &&
5348
- (task.componentStack = task.componentStack.parent);
5349
5527
  } else {
5350
- var errorInfo$jscomp$0 = getThrownInfo(
5351
- request,
5352
- task.componentStack
5353
- );
5528
+ var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
5354
5529
  task.abortSet.delete(task);
5355
5530
  request$jscomp$1.status = 4;
5356
5531
  var boundary$jscomp$0 = task.blockedBoundary;
@@ -5530,13 +5705,13 @@ function flushCompletedBoundary(request, destination, boundary) {
5530
5705
  ? ((completedSegments.instructions |= 10),
5531
5706
  writeChunk(destination, completeBoundaryWithStylesScript1FullBoth))
5532
5707
  : 0 === (completedSegments.instructions & 8)
5533
- ? ((completedSegments.instructions |= 8),
5534
- writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5535
- : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5708
+ ? ((completedSegments.instructions |= 8),
5709
+ writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5710
+ : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5536
5711
  : 0 === (completedSegments.instructions & 2)
5537
- ? ((completedSegments.instructions |= 2),
5538
- writeChunk(destination, completeBoundaryScript1Full))
5539
- : writeChunk(destination, completeBoundaryScript1Partial);
5712
+ ? ((completedSegments.instructions |= 2),
5713
+ writeChunk(destination, completeBoundaryScript1Full))
5714
+ : writeChunk(destination, completeBoundaryScript1Partial);
5540
5715
  completedSegments = stringToChunk(i.toString(16));
5541
5716
  writeChunk(destination, request.boundaryPrefix);
5542
5717
  writeChunk(destination, completedSegments);
@@ -5735,11 +5910,11 @@ function flushCompletedQueues(request, destination) {
5735
5910
  writtenBytes = 0;
5736
5911
  var partialBoundaries = request.partialBoundaries;
5737
5912
  for (i = 0; i < partialBoundaries.length; i++) {
5738
- var boundary$44 = partialBoundaries[i];
5913
+ var boundary$51 = partialBoundaries[i];
5739
5914
  a: {
5740
5915
  clientRenderedBoundaries = request;
5741
5916
  boundary = destination;
5742
- var completedSegments = boundary$44.completedSegments;
5917
+ var completedSegments = boundary$51.completedSegments;
5743
5918
  for (
5744
5919
  JSCompiler_inline_result = 0;
5745
5920
  JSCompiler_inline_result < completedSegments.length;
@@ -5749,7 +5924,7 @@ function flushCompletedQueues(request, destination) {
5749
5924
  !flushPartiallyCompletedSegment(
5750
5925
  clientRenderedBoundaries,
5751
5926
  boundary,
5752
- boundary$44,
5927
+ boundary$51,
5753
5928
  completedSegments[JSCompiler_inline_result]
5754
5929
  )
5755
5930
  ) {
@@ -5761,7 +5936,7 @@ function flushCompletedQueues(request, destination) {
5761
5936
  completedSegments.splice(0, JSCompiler_inline_result);
5762
5937
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5763
5938
  boundary,
5764
- boundary$44.contentState,
5939
+ boundary$51.contentState,
5765
5940
  clientRenderedBoundaries.renderState
5766
5941
  );
5767
5942
  }
@@ -5793,6 +5968,7 @@ function flushCompletedQueues(request, destination) {
5793
5968
  i.hasBody && writeChunk(destination, endChunkForTag("body")),
5794
5969
  i.hasHtml && writeChunk(destination, endChunkForTag("html")),
5795
5970
  completeWriting(destination),
5971
+ (request.status = 14),
5796
5972
  destination.close(),
5797
5973
  (request.destination = null))
5798
5974
  : completeWriting(destination);
@@ -5801,24 +5977,23 @@ function flushCompletedQueues(request, destination) {
5801
5977
  function startWork(request) {
5802
5978
  request.flushScheduled = null !== request.destination;
5803
5979
  supportsRequestStorage
5804
- ? setTimeout(function () {
5980
+ ? scheduleMicrotask(function () {
5805
5981
  return requestStorage.run(request, performWork, request);
5806
- }, 0)
5807
- : setTimeout(function () {
5982
+ })
5983
+ : scheduleMicrotask(function () {
5808
5984
  return performWork(request);
5809
- }, 0);
5810
- null === request.trackedPostpones &&
5811
- (supportsRequestStorage
5812
- ? setTimeout(function () {
5813
- return requestStorage.run(
5985
+ });
5986
+ setTimeout(function () {
5987
+ 10 === request.status && (request.status = 11);
5988
+ null === request.trackedPostpones &&
5989
+ (supportsRequestStorage
5990
+ ? requestStorage.run(
5814
5991
  request,
5815
5992
  enqueueEarlyPreloadsAfterInitialWork,
5816
5993
  request
5817
- );
5818
- }, 0)
5819
- : setTimeout(function () {
5820
- return enqueueEarlyPreloadsAfterInitialWork(request);
5821
- }, 0));
5994
+ )
5995
+ : enqueueEarlyPreloadsAfterInitialWork(request));
5996
+ }, 0);
5822
5997
  }
5823
5998
  function enqueueEarlyPreloadsAfterInitialWork(request) {
5824
5999
  safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
@@ -5835,14 +6010,32 @@ function enqueueFlush(request) {
5835
6010
  : (request.flushScheduled = !1);
5836
6011
  }, 0));
5837
6012
  }
6013
+ function startFlowing(request, destination) {
6014
+ if (13 === request.status)
6015
+ (request.status = 14), closeWithError(destination, request.fatalError);
6016
+ else if (14 !== request.status && null === request.destination) {
6017
+ request.destination = destination;
6018
+ try {
6019
+ flushCompletedQueues(request, destination);
6020
+ } catch (error) {
6021
+ logRecoverableError(request, error, {}), fatalError(request, error);
6022
+ }
6023
+ }
6024
+ }
5838
6025
  function abort(request, reason) {
6026
+ if (11 === request.status || 10 === request.status) request.status = 12;
5839
6027
  try {
5840
6028
  var abortableTasks = request.abortableTasks;
5841
6029
  if (0 < abortableTasks.size) {
5842
6030
  var error =
5843
6031
  void 0 === reason
5844
6032
  ? Error("The render was aborted by the server without a reason.")
5845
- : reason;
6033
+ : "object" === typeof reason &&
6034
+ null !== reason &&
6035
+ "function" === typeof reason.then
6036
+ ? Error("The render was aborted by the server with a promise.")
6037
+ : reason;
6038
+ request.fatalError = error;
5846
6039
  abortableTasks.forEach(function (task) {
5847
6040
  return abortTask(task, request, error);
5848
6041
  });
@@ -5850,20 +6043,87 @@ function abort(request, reason) {
5850
6043
  }
5851
6044
  null !== request.destination &&
5852
6045
  flushCompletedQueues(request, request.destination);
5853
- } catch (error$46) {
5854
- logRecoverableError(request, error$46, {}), fatalError(request, error$46);
6046
+ } catch (error$53) {
6047
+ logRecoverableError(request, error$53, {}), fatalError(request, error$53);
5855
6048
  }
5856
6049
  }
5857
- var isomorphicReactPackageVersion$jscomp$inline_728 = React.version;
5858
- if (
5859
- "19.0.0-rc-fb9a90fa48-20240614" !==
5860
- isomorphicReactPackageVersion$jscomp$inline_728
5861
- )
5862
- throw Error(
5863
- 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
5864
- (isomorphicReactPackageVersion$jscomp$inline_728 +
5865
- "\n - react-dom: 19.0.0-rc-fb9a90fa48-20240614\nLearn more: https://react.dev/warnings/version-mismatch")
5866
- );
6050
+ function ensureCorrectIsomorphicReactVersion() {
6051
+ var isomorphicReactPackageVersion = React.version;
6052
+ if ("19.0.0" !== isomorphicReactPackageVersion)
6053
+ throw Error(
6054
+ 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
6055
+ (isomorphicReactPackageVersion +
6056
+ "\n - react-dom: 19.0.0\nLearn more: https://react.dev/warnings/version-mismatch")
6057
+ );
6058
+ }
6059
+ ensureCorrectIsomorphicReactVersion();
6060
+ ensureCorrectIsomorphicReactVersion();
6061
+ exports.prerender = function (children, options) {
6062
+ return new Promise(function (resolve, reject) {
6063
+ var onHeaders = options ? options.onHeaders : void 0,
6064
+ onHeadersImpl;
6065
+ onHeaders &&
6066
+ (onHeadersImpl = function (headersDescriptor) {
6067
+ onHeaders(new Headers(headersDescriptor));
6068
+ });
6069
+ var resources = createResumableState(
6070
+ options ? options.identifierPrefix : void 0,
6071
+ options ? options.unstable_externalRuntimeSrc : void 0,
6072
+ options ? options.bootstrapScriptContent : void 0,
6073
+ options ? options.bootstrapScripts : void 0,
6074
+ options ? options.bootstrapModules : void 0
6075
+ ),
6076
+ request = createPrerenderRequest(
6077
+ children,
6078
+ resources,
6079
+ createRenderState(
6080
+ resources,
6081
+ void 0,
6082
+ options ? options.unstable_externalRuntimeSrc : void 0,
6083
+ options ? options.importMap : void 0,
6084
+ onHeadersImpl,
6085
+ options ? options.maxHeadersLength : void 0
6086
+ ),
6087
+ createRootFormatContext(options ? options.namespaceURI : void 0),
6088
+ options ? options.progressiveChunkSize : void 0,
6089
+ options ? options.onError : void 0,
6090
+ function () {
6091
+ var result = {
6092
+ prelude: new ReadableStream(
6093
+ {
6094
+ type: "bytes",
6095
+ pull: function (controller) {
6096
+ startFlowing(request, controller);
6097
+ },
6098
+ cancel: function (reason) {
6099
+ request.destination = null;
6100
+ abort(request, reason);
6101
+ }
6102
+ },
6103
+ { highWaterMark: 0 }
6104
+ )
6105
+ };
6106
+ resolve(result);
6107
+ },
6108
+ void 0,
6109
+ void 0,
6110
+ reject,
6111
+ options ? options.onPostpone : void 0
6112
+ );
6113
+ if (options && options.signal) {
6114
+ var signal = options.signal;
6115
+ if (signal.aborted) abort(request, signal.reason);
6116
+ else {
6117
+ var listener = function () {
6118
+ abort(request, signal.reason);
6119
+ signal.removeEventListener("abort", listener);
6120
+ };
6121
+ signal.addEventListener("abort", listener);
6122
+ }
6123
+ }
6124
+ startWork(request);
6125
+ });
6126
+ };
5867
6127
  exports.renderToReadableStream = function (children, options) {
5868
6128
  return new Promise(function (resolve, reject) {
5869
6129
  var onFatalError,
@@ -5905,18 +6165,7 @@ exports.renderToReadableStream = function (children, options) {
5905
6165
  {
5906
6166
  type: "bytes",
5907
6167
  pull: function (controller) {
5908
- if (1 === request.status)
5909
- (request.status = 2),
5910
- closeWithError(controller, request.fatalError);
5911
- else if (2 !== request.status && null === request.destination) {
5912
- request.destination = controller;
5913
- try {
5914
- flushCompletedQueues(request, controller);
5915
- } catch (error) {
5916
- logRecoverableError(request, error, {}),
5917
- fatalError(request, error);
5918
- }
5919
- }
6168
+ startFlowing(request, controller);
5920
6169
  },
5921
6170
  cancel: function (reason) {
5922
6171
  request.destination = null;
@@ -5950,4 +6199,4 @@ exports.renderToReadableStream = function (children, options) {
5950
6199
  startWork(request);
5951
6200
  });
5952
6201
  };
5953
- exports.version = "19.0.0-rc-fb9a90fa48-20240614";
6202
+ exports.version = "19.0.0";