@expo/cli 1.0.0-canary-20250404-87e2506 → 1.0.0-canary-20250630-547cd82

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 (182) hide show
  1. package/README.md +33 -24
  2. package/build/bin/cli +1 -1
  3. package/build/metro-require/require.js +6 -4
  4. package/build/src/api/user/actions.js +25 -11
  5. package/build/src/api/user/actions.js.map +1 -1
  6. package/build/src/customize/templates.js +15 -1
  7. package/build/src/customize/templates.js.map +1 -1
  8. package/build/src/export/exportApp.js +26 -14
  9. package/build/src/export/exportApp.js.map +1 -1
  10. package/build/src/export/exportAsync.js +6 -0
  11. package/build/src/export/exportAsync.js.map +1 -1
  12. package/build/src/export/exportHermes.js +2 -2
  13. package/build/src/export/exportHermes.js.map +1 -1
  14. package/build/src/export/persistMetroAssets.js.map +1 -1
  15. package/build/src/install/checkPackages.js +22 -4
  16. package/build/src/install/checkPackages.js.map +1 -1
  17. package/build/src/install/index.js +3 -1
  18. package/build/src/install/index.js.map +1 -1
  19. package/build/src/install/resolveOptions.js +7 -2
  20. package/build/src/install/resolveOptions.js.map +1 -1
  21. package/build/src/install/utils/checkPackagesCompatibility.js +1 -1
  22. package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
  23. package/build/src/lint/ESlintPrerequisite.js +32 -48
  24. package/build/src/lint/ESlintPrerequisite.js.map +1 -1
  25. package/build/src/lint/index.js +45 -47
  26. package/build/src/lint/index.js.map +1 -1
  27. package/build/src/lint/lintAsync.js +150 -4
  28. package/build/src/lint/lintAsync.js.map +1 -1
  29. package/build/src/lint/resolveOptions.js +115 -0
  30. package/build/src/lint/resolveOptions.js.map +1 -0
  31. package/build/src/prebuild/renameTemplateAppName.js +4 -1
  32. package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
  33. package/build/src/prebuild/resolveTemplate.js +4 -4
  34. package/build/src/prebuild/resolveTemplate.js.map +1 -1
  35. package/build/src/prebuild/updatePackageJson.js +19 -9
  36. package/build/src/prebuild/updatePackageJson.js.map +1 -1
  37. package/build/src/run/android/resolveOptions.js +13 -1
  38. package/build/src/run/android/resolveOptions.js.map +1 -1
  39. package/build/src/run/android/runAndroidAsync.js +39 -17
  40. package/build/src/run/android/runAndroidAsync.js.map +1 -1
  41. package/build/src/run/ios/XcodeBuild.js +3 -3
  42. package/build/src/run/ios/XcodeBuild.js.map +1 -1
  43. package/build/src/run/ios/options/resolveOptions.js +13 -1
  44. package/build/src/run/ios/options/resolveOptions.js.map +1 -1
  45. package/build/src/run/ios/runIosAsync.js +38 -7
  46. package/build/src/run/ios/runIosAsync.js.map +1 -1
  47. package/build/src/start/doctor/SecurityBinPrerequisite.js +1 -1
  48. package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
  49. package/build/src/start/doctor/apple/XcodePrerequisite.js +1 -1
  50. package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
  51. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +1 -1
  52. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
  53. package/build/src/start/doctor/dependencies/resolvePackages.js +1 -1
  54. package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
  55. package/build/src/start/doctor/ngrok/ExternalModule.js +1 -1
  56. package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
  57. package/build/src/start/index.js +1 -1
  58. package/build/src/start/index.js.map +1 -1
  59. package/build/src/start/platforms/PlatformManager.js +1 -1
  60. package/build/src/start/platforms/PlatformManager.js.map +1 -1
  61. package/build/src/start/platforms/android/AndroidPlatformManager.js +1 -1
  62. package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
  63. package/build/src/start/platforms/android/getDevices.js +1 -1
  64. package/build/src/start/platforms/android/getDevices.js.map +1 -1
  65. package/build/src/start/platforms/ios/AppleDeviceManager.js +1 -1
  66. package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
  67. package/build/src/start/platforms/ios/xcrun.js +1 -1
  68. package/build/src/start/platforms/ios/xcrun.js.map +1 -1
  69. package/build/src/start/project/dotExpo.js +5 -0
  70. package/build/src/start/project/dotExpo.js.map +1 -1
  71. package/build/src/start/resolveOptions.js +3 -0
  72. package/build/src/start/resolveOptions.js.map +1 -1
  73. package/build/src/start/server/metro/MetroBundlerDevServer.js +38 -26
  74. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  75. package/build/src/start/server/metro/MetroTerminalReporter.js +29 -2
  76. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  77. package/build/src/start/server/metro/createExpoFallbackResolver.js +6 -4
  78. package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
  79. package/build/src/start/server/metro/createJResolver.js +2 -2
  80. package/build/src/start/server/metro/createJResolver.js.map +1 -1
  81. package/build/src/start/server/metro/createServerComponentsMiddleware.js +16 -5
  82. package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
  83. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +19 -19
  84. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  85. package/build/src/start/server/metro/externals.js +1 -1
  86. package/build/src/start/server/metro/externals.js.map +1 -1
  87. package/build/src/start/server/metro/instantiateMetro.js +13 -8
  88. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  89. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +21 -2
  90. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  91. package/build/src/start/server/metro/log-box/formatProjectFilePath.js +15 -12
  92. package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
  93. package/build/src/start/server/metro/metroErrorInterface.js +19 -8
  94. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  95. package/build/src/start/server/metro/runServer-fork.js +1 -1
  96. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  97. package/build/src/start/server/metro/withMetroMultiPlatform.js +8 -2
  98. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  99. package/build/src/start/server/middleware/CorsMiddleware.js +1 -1
  100. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
  101. package/build/src/start/server/middleware/ManifestMiddleware.js +4 -8
  102. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  103. package/build/src/start/server/middleware/inspector/JsInspector.js +2 -25
  104. package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
  105. package/build/src/start/server/middleware/metroOptions.js +2 -26
  106. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  107. package/build/src/utils/build-cache-providers/helpers.js +61 -0
  108. package/build/src/utils/build-cache-providers/helpers.js.map +1 -0
  109. package/build/src/utils/build-cache-providers/index.js +283 -0
  110. package/build/src/utils/build-cache-providers/index.js.map +1 -0
  111. package/build/src/utils/codesigning.js +14 -2
  112. package/build/src/utils/codesigning.js.map +1 -1
  113. package/build/src/utils/exit.js +0 -1
  114. package/build/src/utils/exit.js.map +1 -1
  115. package/build/src/utils/ip.js +7 -104
  116. package/build/src/utils/ip.js.map +1 -1
  117. package/build/src/utils/modifyConfigAsync.js +1 -1
  118. package/build/src/utils/modifyConfigAsync.js.map +1 -1
  119. package/build/src/utils/resolveArgs.js +8 -0
  120. package/build/src/utils/resolveArgs.js.map +1 -1
  121. package/build/src/utils/scheme.js +1 -1
  122. package/build/src/utils/scheme.js.map +1 -1
  123. package/build/src/utils/telemetry/clients/FetchClient.js +2 -2
  124. package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
  125. package/build/src/utils/telemetry/utils/context.js +1 -1
  126. package/build/src/utils/tsconfig/evaluateTsConfig.js +7 -2
  127. package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
  128. package/build/src/utils/variadic.js +63 -6
  129. package/build/src/utils/variadic.js.map +1 -1
  130. package/package.json +20 -20
  131. package/static/canary/react-is/cjs/react-is.development.js +118 -185
  132. package/static/canary/react-is/cjs/react-is.production.js +2 -2
  133. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +16582 -26565
  134. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +3495 -3357
  135. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +3929 -3801
  136. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16869 -27032
  137. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3535 -3428
  138. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4198 -4095
  139. package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +387 -684
  140. package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +0 -9
  141. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +137 -195
  142. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +0 -5
  143. package/static/canary/scheduler/cjs/scheduler.development.js +339 -600
  144. package/static/canary/scheduler/cjs/scheduler.native.development.js +324 -512
  145. package/static/canary/scheduler/cjs/scheduler.native.production.js +6 -5
  146. package/static/canary/scheduler/cjs/scheduler.production.js +16 -17
  147. package/static/canary-full/react/cjs/react-compiler-runtime.development.js +13 -68
  148. package/static/canary-full/react/cjs/react-jsx-dev-runtime.development.js +317 -1251
  149. package/static/canary-full/react/cjs/react-jsx-dev-runtime.react-server.development.js +353 -1286
  150. package/static/canary-full/react/cjs/react-jsx-runtime.development.js +326 -1279
  151. package/static/canary-full/react/cjs/react-jsx-runtime.react-server.development.js +353 -1286
  152. package/static/canary-full/react/cjs/react.development.js +1204 -2771
  153. package/static/canary-full/react/cjs/react.production.js +25 -20
  154. package/static/canary-full/react/cjs/react.react-server.development.js +783 -2162
  155. package/static/canary-full/react/cjs/react.react-server.production.js +13 -63
  156. package/static/canary-full/react/package.json +1 -1
  157. package/static/canary-full/react-dom/cjs/react-dom-client.development.js +24847 -37099
  158. package/static/canary-full/react-dom/cjs/react-dom-client.production.js +8261 -7475
  159. package/static/canary-full/react-dom/cjs/react-dom-profiling.development.js +25252 -37571
  160. package/static/canary-full/react-dom/cjs/react-dom-profiling.profiling.js +9442 -8662
  161. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.development.js +8944 -11568
  162. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.production.js +1378 -944
  163. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.development.js +8944 -11568
  164. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.production.js +1386 -954
  165. package/static/canary-full/react-dom/cjs/react-dom-server.browser.development.js +9344 -11600
  166. package/static/canary-full/react-dom/cjs/react-dom-server.browser.production.js +1545 -954
  167. package/static/canary-full/react-dom/cjs/react-dom-server.bun.development.js +8286 -11064
  168. package/static/canary-full/react-dom/cjs/react-dom-server.bun.production.js +1437 -976
  169. package/static/canary-full/react-dom/cjs/react-dom-server.edge.development.js +9356 -11609
  170. package/static/canary-full/react-dom/cjs/react-dom-server.edge.production.js +1542 -970
  171. package/static/canary-full/react-dom/cjs/react-dom-server.node.development.js +9227 -11571
  172. package/static/canary-full/react-dom/cjs/react-dom-server.node.production.js +1787 -1183
  173. package/static/canary-full/react-dom/cjs/react-dom-test-utils.development.js +13 -59
  174. package/static/canary-full/react-dom/cjs/react-dom.development.js +402 -604
  175. package/static/canary-full/react-dom/cjs/react-dom.production.js +4 -3
  176. package/static/canary-full/react-dom/cjs/react-dom.react-server.development.js +322 -382
  177. package/static/canary-full/react-dom/cjs/react-dom.react-server.production.js +6 -7
  178. package/static/canary-full/react-dom/package.json +5 -5
  179. package/static/canary-full/react-dom/static.browser.js +1 -0
  180. package/static/canary-full/react-dom/static.edge.js +1 -0
  181. package/static/canary-full/react-dom/static.node.js +1 -0
  182. package/static/template/eslint.config.js +10 -0
@@ -14,6 +14,7 @@ var util = require("util"),
14
14
  async_hooks = require("async_hooks"),
15
15
  React = require("react"),
16
16
  ReactDOM = require("react-dom"),
17
+ stream = require("stream"),
17
18
  REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
18
19
  REACT_PORTAL_TYPE = Symbol.for("react.portal"),
19
20
  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
@@ -28,11 +29,13 @@ var util = require("util"),
28
29
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
29
30
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
30
31
  REACT_SCOPE_TYPE = Symbol.for("react.scope"),
31
- REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode"),
32
- REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
32
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
33
33
  REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
34
+ REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
35
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
34
36
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
35
- isArrayImpl = Array.isArray;
37
+ isArrayImpl = Array.isArray,
38
+ scheduleMicrotask = queueMicrotask;
36
39
  function flushBuffered(destination) {
37
40
  "function" === typeof destination.flush && destination.flush();
38
41
  }
@@ -50,7 +53,7 @@ function writeChunk(destination, chunk) {
50
53
  ),
51
54
  (currentView = new Uint8Array(2048)),
52
55
  (writtenBytes = 0)),
53
- writeToDestination(destination, textEncoder.encode(chunk));
56
+ writeToDestination(destination, chunk);
54
57
  else {
55
58
  var target = currentView;
56
59
  0 < writtenBytes && (target = currentView.subarray(writtenBytes));
@@ -312,6 +315,221 @@ var importMapScriptStart = stringToPrecomputedChunk(
312
315
  '<script type="importmap">'
313
316
  ),
314
317
  importMapScriptEnd = stringToPrecomputedChunk("\x3c/script>");
318
+ function createRenderState(
319
+ resumableState,
320
+ nonce,
321
+ externalRuntimeConfig,
322
+ importMap,
323
+ onHeaders,
324
+ maxHeadersLength
325
+ ) {
326
+ var inlineScriptWithNonce =
327
+ void 0 === nonce
328
+ ? startInlineScript
329
+ : stringToPrecomputedChunk(
330
+ '<script nonce="' + escapeTextForBrowser(nonce) + '">'
331
+ ),
332
+ idPrefix = resumableState.idPrefix;
333
+ externalRuntimeConfig = [];
334
+ var bootstrapScriptContent = resumableState.bootstrapScriptContent,
335
+ bootstrapScripts = resumableState.bootstrapScripts,
336
+ bootstrapModules = resumableState.bootstrapModules;
337
+ void 0 !== bootstrapScriptContent &&
338
+ externalRuntimeConfig.push(
339
+ inlineScriptWithNonce,
340
+ ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
341
+ endInlineScript
342
+ );
343
+ bootstrapScriptContent = [];
344
+ void 0 !== importMap &&
345
+ (bootstrapScriptContent.push(importMapScriptStart),
346
+ bootstrapScriptContent.push(
347
+ ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
348
+ ),
349
+ bootstrapScriptContent.push(importMapScriptEnd));
350
+ importMap = onHeaders
351
+ ? {
352
+ preconnects: "",
353
+ fontPreloads: "",
354
+ highImagePreloads: "",
355
+ remainingCapacity:
356
+ 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
357
+ }
358
+ : null;
359
+ onHeaders = {
360
+ placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
361
+ segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
362
+ boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
363
+ startInlineScript: inlineScriptWithNonce,
364
+ preamble: createPreambleState(),
365
+ externalRuntimeScript: null,
366
+ bootstrapChunks: externalRuntimeConfig,
367
+ importMapChunks: bootstrapScriptContent,
368
+ onHeaders: onHeaders,
369
+ headers: importMap,
370
+ resets: {
371
+ font: {},
372
+ dns: {},
373
+ connect: { default: {}, anonymous: {}, credentials: {} },
374
+ image: {},
375
+ style: {}
376
+ },
377
+ charsetChunks: [],
378
+ viewportChunks: [],
379
+ hoistableChunks: [],
380
+ preconnects: new Set(),
381
+ fontPreloads: new Set(),
382
+ highImagePreloads: new Set(),
383
+ styles: new Map(),
384
+ bootstrapScripts: new Set(),
385
+ scripts: new Set(),
386
+ bulkPreloads: new Set(),
387
+ preloads: {
388
+ images: new Map(),
389
+ stylesheets: new Map(),
390
+ scripts: new Map(),
391
+ moduleScripts: new Map()
392
+ },
393
+ nonce: nonce,
394
+ hoistableState: null,
395
+ stylesToHoist: !1
396
+ };
397
+ if (void 0 !== bootstrapScripts)
398
+ for (importMap = 0; importMap < bootstrapScripts.length; importMap++) {
399
+ var scriptConfig = bootstrapScripts[importMap];
400
+ idPrefix = inlineScriptWithNonce = void 0;
401
+ bootstrapScriptContent = {
402
+ rel: "preload",
403
+ as: "script",
404
+ fetchPriority: "low",
405
+ nonce: nonce
406
+ };
407
+ "string" === typeof scriptConfig
408
+ ? (bootstrapScriptContent.href = maxHeadersLength = scriptConfig)
409
+ : ((bootstrapScriptContent.href = maxHeadersLength = scriptConfig.src),
410
+ (bootstrapScriptContent.integrity = idPrefix =
411
+ "string" === typeof scriptConfig.integrity
412
+ ? scriptConfig.integrity
413
+ : void 0),
414
+ (bootstrapScriptContent.crossOrigin = inlineScriptWithNonce =
415
+ "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
416
+ ? void 0
417
+ : "use-credentials" === scriptConfig.crossOrigin
418
+ ? "use-credentials"
419
+ : ""));
420
+ scriptConfig = resumableState;
421
+ var href = maxHeadersLength;
422
+ scriptConfig.scriptResources[href] = null;
423
+ scriptConfig.moduleScriptResources[href] = null;
424
+ scriptConfig = [];
425
+ pushLinkImpl(scriptConfig, bootstrapScriptContent);
426
+ onHeaders.bootstrapScripts.add(scriptConfig);
427
+ externalRuntimeConfig.push(
428
+ startScriptSrc,
429
+ escapeTextForBrowser(maxHeadersLength)
430
+ );
431
+ nonce &&
432
+ externalRuntimeConfig.push(scriptNonce, escapeTextForBrowser(nonce));
433
+ "string" === typeof idPrefix &&
434
+ externalRuntimeConfig.push(
435
+ scriptIntegirty,
436
+ escapeTextForBrowser(idPrefix)
437
+ );
438
+ "string" === typeof inlineScriptWithNonce &&
439
+ externalRuntimeConfig.push(
440
+ scriptCrossOrigin,
441
+ escapeTextForBrowser(inlineScriptWithNonce)
442
+ );
443
+ externalRuntimeConfig.push(endAsyncScript);
444
+ }
445
+ if (void 0 !== bootstrapModules)
446
+ for (
447
+ bootstrapScripts = 0;
448
+ bootstrapScripts < bootstrapModules.length;
449
+ bootstrapScripts++
450
+ )
451
+ (bootstrapScriptContent = bootstrapModules[bootstrapScripts]),
452
+ (inlineScriptWithNonce = maxHeadersLength = void 0),
453
+ (idPrefix = {
454
+ rel: "modulepreload",
455
+ fetchPriority: "low",
456
+ nonce: nonce
457
+ }),
458
+ "string" === typeof bootstrapScriptContent
459
+ ? (idPrefix.href = importMap = bootstrapScriptContent)
460
+ : ((idPrefix.href = importMap = bootstrapScriptContent.src),
461
+ (idPrefix.integrity = inlineScriptWithNonce =
462
+ "string" === typeof bootstrapScriptContent.integrity
463
+ ? bootstrapScriptContent.integrity
464
+ : void 0),
465
+ (idPrefix.crossOrigin = maxHeadersLength =
466
+ "string" === typeof bootstrapScriptContent ||
467
+ null == bootstrapScriptContent.crossOrigin
468
+ ? void 0
469
+ : "use-credentials" === bootstrapScriptContent.crossOrigin
470
+ ? "use-credentials"
471
+ : "")),
472
+ (bootstrapScriptContent = resumableState),
473
+ (scriptConfig = importMap),
474
+ (bootstrapScriptContent.scriptResources[scriptConfig] = null),
475
+ (bootstrapScriptContent.moduleScriptResources[scriptConfig] = null),
476
+ (bootstrapScriptContent = []),
477
+ pushLinkImpl(bootstrapScriptContent, idPrefix),
478
+ onHeaders.bootstrapScripts.add(bootstrapScriptContent),
479
+ externalRuntimeConfig.push(
480
+ startModuleSrc,
481
+ escapeTextForBrowser(importMap)
482
+ ),
483
+ nonce &&
484
+ externalRuntimeConfig.push(scriptNonce, escapeTextForBrowser(nonce)),
485
+ "string" === typeof inlineScriptWithNonce &&
486
+ externalRuntimeConfig.push(
487
+ scriptIntegirty,
488
+ escapeTextForBrowser(inlineScriptWithNonce)
489
+ ),
490
+ "string" === typeof maxHeadersLength &&
491
+ externalRuntimeConfig.push(
492
+ scriptCrossOrigin,
493
+ escapeTextForBrowser(maxHeadersLength)
494
+ ),
495
+ externalRuntimeConfig.push(endAsyncScript);
496
+ return onHeaders;
497
+ }
498
+ function createResumableState(
499
+ identifierPrefix,
500
+ externalRuntimeConfig,
501
+ bootstrapScriptContent,
502
+ bootstrapScripts,
503
+ bootstrapModules
504
+ ) {
505
+ return {
506
+ idPrefix: void 0 === identifierPrefix ? "" : identifierPrefix,
507
+ nextFormID: 0,
508
+ streamingFormat: 0,
509
+ bootstrapScriptContent: bootstrapScriptContent,
510
+ bootstrapScripts: bootstrapScripts,
511
+ bootstrapModules: bootstrapModules,
512
+ instructions: 0,
513
+ hasBody: !1,
514
+ hasHtml: !1,
515
+ unknownResources: {},
516
+ dnsResources: {},
517
+ connectResources: { default: {}, anonymous: {}, credentials: {} },
518
+ imageResources: {},
519
+ styleResources: {},
520
+ scriptResources: {},
521
+ moduleUnknownResources: {},
522
+ moduleScriptResources: {}
523
+ };
524
+ }
525
+ function createPreambleState() {
526
+ return {
527
+ htmlChunks: null,
528
+ headChunks: null,
529
+ bodyChunks: null,
530
+ contribution: 0
531
+ };
532
+ }
315
533
  function createFormatContext(insertionMode, selectedValue, tagScope) {
316
534
  return {
317
535
  insertionMode: insertionMode,
@@ -319,6 +537,17 @@ function createFormatContext(insertionMode, selectedValue, tagScope) {
319
537
  tagScope: tagScope
320
538
  };
321
539
  }
540
+ function createRootFormatContext(namespaceURI) {
541
+ return createFormatContext(
542
+ "http://www.w3.org/2000/svg" === namespaceURI
543
+ ? 4
544
+ : "http://www.w3.org/1998/Math/MathML" === namespaceURI
545
+ ? 5
546
+ : 0,
547
+ null,
548
+ 0
549
+ );
550
+ }
322
551
  function getChildFormatContext(parentContext, type, props) {
323
552
  switch (type) {
324
553
  case "noscript":
@@ -330,31 +559,32 @@ function getChildFormatContext(parentContext, type, props) {
330
559
  parentContext.tagScope
331
560
  );
332
561
  case "svg":
333
- return createFormatContext(3, null, parentContext.tagScope);
562
+ return createFormatContext(4, null, parentContext.tagScope);
334
563
  case "picture":
335
564
  return createFormatContext(2, null, parentContext.tagScope | 2);
336
565
  case "math":
337
- return createFormatContext(4, null, parentContext.tagScope);
566
+ return createFormatContext(5, null, parentContext.tagScope);
338
567
  case "foreignObject":
339
568
  return createFormatContext(2, null, parentContext.tagScope);
340
569
  case "table":
341
- return createFormatContext(5, null, parentContext.tagScope);
570
+ return createFormatContext(6, null, parentContext.tagScope);
342
571
  case "thead":
343
572
  case "tbody":
344
573
  case "tfoot":
345
- return createFormatContext(6, null, parentContext.tagScope);
574
+ return createFormatContext(7, null, parentContext.tagScope);
346
575
  case "colgroup":
347
- return createFormatContext(8, null, parentContext.tagScope);
576
+ return createFormatContext(9, null, parentContext.tagScope);
348
577
  case "tr":
349
- return createFormatContext(7, null, parentContext.tagScope);
578
+ return createFormatContext(8, null, parentContext.tagScope);
579
+ case "head":
580
+ if (2 > parentContext.insertionMode)
581
+ return createFormatContext(3, null, parentContext.tagScope);
582
+ break;
583
+ case "html":
584
+ if (0 === parentContext.insertionMode)
585
+ return createFormatContext(1, null, parentContext.tagScope);
350
586
  }
351
- return 5 <= parentContext.insertionMode
352
- ? createFormatContext(2, null, parentContext.tagScope)
353
- : 0 === parentContext.insertionMode
354
- ? "html" === type
355
- ? createFormatContext(1, null, parentContext.tagScope)
356
- : createFormatContext(2, null, parentContext.tagScope)
357
- : 1 === parentContext.insertionMode
587
+ return 6 <= parentContext.insertionMode || 2 > parentContext.insertionMode
358
588
  ? createFormatContext(2, null, parentContext.tagScope)
359
589
  : parentContext;
360
590
  }
@@ -448,20 +678,28 @@ var actionJavaScriptURL = stringToPrecomputedChunk(
448
678
  startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"');
449
679
  function pushAdditionalFormField(value, key) {
450
680
  this.push(startHiddenInputChunk);
451
- if ("string" !== typeof value)
452
- throw Error(
453
- "File/Blob fields are not yet supported in progressive forms. It probably means you are closing over binary data or FormData in a Server Action."
454
- );
681
+ validateAdditionalFormField(value);
455
682
  pushStringAttribute(this, "name", key);
456
683
  pushStringAttribute(this, "value", value);
457
684
  this.push(endOfStartTagSelfClosing);
458
685
  }
686
+ function validateAdditionalFormField(value) {
687
+ if ("string" !== typeof value)
688
+ throw Error(
689
+ "File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration."
690
+ );
691
+ }
459
692
  function getCustomFormFields(resumableState, formAction) {
460
693
  if ("function" === typeof formAction.$$FORM_ACTION) {
461
694
  var id = resumableState.nextFormID++;
462
695
  resumableState = resumableState.idPrefix + id;
463
696
  try {
464
- return formAction.$$FORM_ACTION(resumableState);
697
+ var customFields = formAction.$$FORM_ACTION(resumableState);
698
+ if (customFields) {
699
+ var formData = customFields.data;
700
+ null != formData && formData.forEach(validateAdditionalFormField);
701
+ }
702
+ return customFields;
465
703
  } catch (x) {
466
704
  if ("object" === typeof x && null !== x && "function" === typeof x.then)
467
705
  throw x;
@@ -858,6 +1096,29 @@ function pushScriptImpl(target, props) {
858
1096
  target.push(endChunkForTag("script"));
859
1097
  return null;
860
1098
  }
1099
+ function pushStartSingletonElement(target, props, tag) {
1100
+ target.push(startChunkForTag(tag));
1101
+ var innerHTML = (tag = null),
1102
+ propKey;
1103
+ for (propKey in props)
1104
+ if (hasOwnProperty.call(props, propKey)) {
1105
+ var propValue = props[propKey];
1106
+ if (null != propValue)
1107
+ switch (propKey) {
1108
+ case "children":
1109
+ tag = propValue;
1110
+ break;
1111
+ case "dangerouslySetInnerHTML":
1112
+ innerHTML = propValue;
1113
+ break;
1114
+ default:
1115
+ pushAttribute(target, propKey, propValue);
1116
+ }
1117
+ }
1118
+ target.push(endOfStartTag);
1119
+ pushInnerHTML(target, innerHTML, tag);
1120
+ return tag;
1121
+ }
861
1122
  function pushStartGenericElement(target, props, tag) {
862
1123
  target.push(startChunkForTag(tag));
863
1124
  var innerHTML = (tag = null),
@@ -902,6 +1163,7 @@ function pushStartInstance(
902
1163
  props,
903
1164
  resumableState,
904
1165
  renderState,
1166
+ preambleState,
905
1167
  hoistableState,
906
1168
  formatContext,
907
1169
  textEmbedded,
@@ -1337,28 +1599,70 @@ function pushStartInstance(
1337
1599
  }
1338
1600
  target$jscomp$0.push(endOfStartTag);
1339
1601
  return null;
1602
+ case "object":
1603
+ target$jscomp$0.push(startChunkForTag("object"));
1604
+ var children$jscomp$5 = null,
1605
+ innerHTML$jscomp$4 = null,
1606
+ propKey$jscomp$7;
1607
+ for (propKey$jscomp$7 in props)
1608
+ if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1609
+ var propValue$jscomp$7 = props[propKey$jscomp$7];
1610
+ if (null != propValue$jscomp$7)
1611
+ switch (propKey$jscomp$7) {
1612
+ case "children":
1613
+ children$jscomp$5 = propValue$jscomp$7;
1614
+ break;
1615
+ case "dangerouslySetInnerHTML":
1616
+ innerHTML$jscomp$4 = propValue$jscomp$7;
1617
+ break;
1618
+ case "data":
1619
+ var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
1620
+ if ("" === sanitizedValue) break;
1621
+ target$jscomp$0.push(
1622
+ attributeSeparator,
1623
+ "data",
1624
+ attributeAssign,
1625
+ escapeTextForBrowser(sanitizedValue),
1626
+ attributeEnd
1627
+ );
1628
+ break;
1629
+ default:
1630
+ pushAttribute(
1631
+ target$jscomp$0,
1632
+ propKey$jscomp$7,
1633
+ propValue$jscomp$7
1634
+ );
1635
+ }
1636
+ }
1637
+ target$jscomp$0.push(endOfStartTag);
1638
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1639
+ if ("string" === typeof children$jscomp$5) {
1640
+ target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));
1641
+ var JSCompiler_inline_result$jscomp$2 = null;
1642
+ } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
1643
+ return JSCompiler_inline_result$jscomp$2;
1340
1644
  case "title":
1341
1645
  if (
1342
- 3 === formatContext.insertionMode ||
1646
+ 4 === formatContext.insertionMode ||
1343
1647
  formatContext.tagScope & 1 ||
1344
1648
  null != props.itemProp
1345
1649
  )
1346
- var JSCompiler_inline_result$jscomp$2 = pushTitleImpl(
1650
+ var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
1347
1651
  target$jscomp$0,
1348
1652
  props
1349
1653
  );
1350
1654
  else
1351
1655
  isFallback
1352
- ? (JSCompiler_inline_result$jscomp$2 = null)
1656
+ ? (JSCompiler_inline_result$jscomp$3 = null)
1353
1657
  : (pushTitleImpl(renderState.hoistableChunks, props),
1354
- (JSCompiler_inline_result$jscomp$2 = void 0));
1355
- return JSCompiler_inline_result$jscomp$2;
1658
+ (JSCompiler_inline_result$jscomp$3 = void 0));
1659
+ return JSCompiler_inline_result$jscomp$3;
1356
1660
  case "link":
1357
1661
  var rel = props.rel,
1358
1662
  href = props.href,
1359
1663
  precedence = props.precedence;
1360
1664
  if (
1361
- 3 === formatContext.insertionMode ||
1665
+ 4 === formatContext.insertionMode ||
1362
1666
  formatContext.tagScope & 1 ||
1363
1667
  null != props.itemProp ||
1364
1668
  "string" !== typeof rel ||
@@ -1366,7 +1670,7 @@ function pushStartInstance(
1366
1670
  "" === href
1367
1671
  ) {
1368
1672
  pushLinkImpl(target$jscomp$0, props);
1369
- var JSCompiler_inline_result$jscomp$3 = null;
1673
+ var JSCompiler_inline_result$jscomp$4 = null;
1370
1674
  } else if ("stylesheet" === props.rel)
1371
1675
  if (
1372
1676
  "string" !== typeof precedence ||
@@ -1374,7 +1678,7 @@ function pushStartInstance(
1374
1678
  props.onLoad ||
1375
1679
  props.onError
1376
1680
  )
1377
- JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1681
+ JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1378
1682
  target$jscomp$0,
1379
1683
  props
1380
1684
  );
@@ -1417,19 +1721,19 @@ function pushStartInstance(
1417
1721
  hoistableState.stylesheets.add(resource$9);
1418
1722
  }
1419
1723
  textEmbedded && target$jscomp$0.push(textSeparator);
1420
- JSCompiler_inline_result$jscomp$3 = null;
1724
+ JSCompiler_inline_result$jscomp$4 = null;
1421
1725
  }
1422
1726
  else
1423
1727
  props.onLoad || props.onError
1424
- ? (JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1728
+ ? (JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1425
1729
  target$jscomp$0,
1426
1730
  props
1427
1731
  ))
1428
1732
  : (textEmbedded && target$jscomp$0.push(textSeparator),
1429
- (JSCompiler_inline_result$jscomp$3 = isFallback
1733
+ (JSCompiler_inline_result$jscomp$4 = isFallback
1430
1734
  ? null
1431
1735
  : pushLinkImpl(renderState.hoistableChunks, props)));
1432
- return JSCompiler_inline_result$jscomp$3;
1736
+ return JSCompiler_inline_result$jscomp$4;
1433
1737
  case "script":
1434
1738
  var asyncProp = props.async;
1435
1739
  if (
@@ -1440,11 +1744,11 @@ function pushStartInstance(
1440
1744
  "symbol" === typeof asyncProp ||
1441
1745
  props.onLoad ||
1442
1746
  props.onError ||
1443
- 3 === formatContext.insertionMode ||
1747
+ 4 === formatContext.insertionMode ||
1444
1748
  formatContext.tagScope & 1 ||
1445
1749
  null != props.itemProp
1446
1750
  )
1447
- var JSCompiler_inline_result$jscomp$4 = pushScriptImpl(
1751
+ var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
1448
1752
  target$jscomp$0,
1449
1753
  props
1450
1754
  );
@@ -1474,14 +1778,14 @@ function pushStartInstance(
1474
1778
  pushScriptImpl(resource$jscomp$0, scriptProps);
1475
1779
  }
1476
1780
  textEmbedded && target$jscomp$0.push(textSeparator);
1477
- JSCompiler_inline_result$jscomp$4 = null;
1781
+ JSCompiler_inline_result$jscomp$5 = null;
1478
1782
  }
1479
- return JSCompiler_inline_result$jscomp$4;
1783
+ return JSCompiler_inline_result$jscomp$5;
1480
1784
  case "style":
1481
1785
  var precedence$jscomp$0 = props.precedence,
1482
1786
  href$jscomp$0 = props.href;
1483
1787
  if (
1484
- 3 === formatContext.insertionMode ||
1788
+ 4 === formatContext.insertionMode ||
1485
1789
  formatContext.tagScope & 1 ||
1486
1790
  null != props.itemProp ||
1487
1791
  "string" !== typeof precedence$jscomp$0 ||
@@ -1489,42 +1793,42 @@ function pushStartInstance(
1489
1793
  "" === href$jscomp$0
1490
1794
  ) {
1491
1795
  target$jscomp$0.push(startChunkForTag("style"));
1492
- var children$jscomp$5 = null,
1493
- innerHTML$jscomp$4 = null,
1494
- propKey$jscomp$7;
1495
- for (propKey$jscomp$7 in props)
1496
- if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1497
- var propValue$jscomp$7 = props[propKey$jscomp$7];
1498
- if (null != propValue$jscomp$7)
1499
- switch (propKey$jscomp$7) {
1796
+ var children$jscomp$6 = null,
1797
+ innerHTML$jscomp$5 = null,
1798
+ propKey$jscomp$8;
1799
+ for (propKey$jscomp$8 in props)
1800
+ if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1801
+ var propValue$jscomp$8 = props[propKey$jscomp$8];
1802
+ if (null != propValue$jscomp$8)
1803
+ switch (propKey$jscomp$8) {
1500
1804
  case "children":
1501
- children$jscomp$5 = propValue$jscomp$7;
1805
+ children$jscomp$6 = propValue$jscomp$8;
1502
1806
  break;
1503
1807
  case "dangerouslySetInnerHTML":
1504
- innerHTML$jscomp$4 = propValue$jscomp$7;
1808
+ innerHTML$jscomp$5 = propValue$jscomp$8;
1505
1809
  break;
1506
1810
  default:
1507
1811
  pushAttribute(
1508
1812
  target$jscomp$0,
1509
- propKey$jscomp$7,
1510
- propValue$jscomp$7
1813
+ propKey$jscomp$8,
1814
+ propValue$jscomp$8
1511
1815
  );
1512
1816
  }
1513
1817
  }
1514
1818
  target$jscomp$0.push(endOfStartTag);
1515
- var child = Array.isArray(children$jscomp$5)
1516
- ? 2 > children$jscomp$5.length
1517
- ? children$jscomp$5[0]
1819
+ var child = Array.isArray(children$jscomp$6)
1820
+ ? 2 > children$jscomp$6.length
1821
+ ? children$jscomp$6[0]
1518
1822
  : null
1519
- : children$jscomp$5;
1823
+ : children$jscomp$6;
1520
1824
  "function" !== typeof child &&
1521
1825
  "symbol" !== typeof child &&
1522
1826
  null !== child &&
1523
1827
  void 0 !== child &&
1524
1828
  target$jscomp$0.push(("" + child).replace(styleRegex, styleReplacer));
1525
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1829
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$6);
1526
1830
  target$jscomp$0.push(endChunkForTag("style"));
1527
- var JSCompiler_inline_result$jscomp$5 = null;
1831
+ var JSCompiler_inline_result$jscomp$6 = null;
1528
1832
  } else {
1529
1833
  var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
1530
1834
  if (
@@ -1546,26 +1850,26 @@ function pushStartInstance(
1546
1850
  }),
1547
1851
  renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
1548
1852
  var target = styleQueue$jscomp$0.rules,
1549
- children$jscomp$6 = null,
1550
- innerHTML$jscomp$5 = null,
1551
- propKey$jscomp$8;
1552
- for (propKey$jscomp$8 in props)
1553
- if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1554
- var propValue$jscomp$8 = props[propKey$jscomp$8];
1555
- if (null != propValue$jscomp$8)
1556
- switch (propKey$jscomp$8) {
1853
+ children$jscomp$7 = null,
1854
+ innerHTML$jscomp$6 = null,
1855
+ propKey$jscomp$9;
1856
+ for (propKey$jscomp$9 in props)
1857
+ if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1858
+ var propValue$jscomp$9 = props[propKey$jscomp$9];
1859
+ if (null != propValue$jscomp$9)
1860
+ switch (propKey$jscomp$9) {
1557
1861
  case "children":
1558
- children$jscomp$6 = propValue$jscomp$8;
1862
+ children$jscomp$7 = propValue$jscomp$9;
1559
1863
  break;
1560
1864
  case "dangerouslySetInnerHTML":
1561
- innerHTML$jscomp$5 = propValue$jscomp$8;
1865
+ innerHTML$jscomp$6 = propValue$jscomp$9;
1562
1866
  }
1563
1867
  }
1564
- var child$jscomp$0 = Array.isArray(children$jscomp$6)
1565
- ? 2 > children$jscomp$6.length
1566
- ? children$jscomp$6[0]
1868
+ var child$jscomp$0 = Array.isArray(children$jscomp$7)
1869
+ ? 2 > children$jscomp$7.length
1870
+ ? children$jscomp$7[0]
1567
1871
  : null
1568
- : children$jscomp$6;
1872
+ : children$jscomp$7;
1569
1873
  "function" !== typeof child$jscomp$0 &&
1570
1874
  "symbol" !== typeof child$jscomp$0 &&
1571
1875
  null !== child$jscomp$0 &&
@@ -1573,85 +1877,85 @@ function pushStartInstance(
1573
1877
  target.push(
1574
1878
  ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
1575
1879
  );
1576
- pushInnerHTML(target, innerHTML$jscomp$5, children$jscomp$6);
1880
+ pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$7);
1577
1881
  }
1578
1882
  styleQueue$jscomp$0 &&
1579
1883
  hoistableState &&
1580
1884
  hoistableState.styles.add(styleQueue$jscomp$0);
1581
1885
  textEmbedded && target$jscomp$0.push(textSeparator);
1582
- JSCompiler_inline_result$jscomp$5 = void 0;
1886
+ JSCompiler_inline_result$jscomp$6 = void 0;
1583
1887
  }
1584
- return JSCompiler_inline_result$jscomp$5;
1888
+ return JSCompiler_inline_result$jscomp$6;
1585
1889
  case "meta":
1586
1890
  if (
1587
- 3 === formatContext.insertionMode ||
1891
+ 4 === formatContext.insertionMode ||
1588
1892
  formatContext.tagScope & 1 ||
1589
1893
  null != props.itemProp
1590
1894
  )
1591
- var JSCompiler_inline_result$jscomp$6 = pushSelfClosing(
1895
+ var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
1592
1896
  target$jscomp$0,
1593
1897
  props,
1594
1898
  "meta"
1595
1899
  );
1596
1900
  else
1597
1901
  textEmbedded && target$jscomp$0.push(textSeparator),
1598
- (JSCompiler_inline_result$jscomp$6 = isFallback
1902
+ (JSCompiler_inline_result$jscomp$7 = isFallback
1599
1903
  ? null
1600
1904
  : "string" === typeof props.charSet
1601
- ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1602
- : "viewport" === props.name
1603
- ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1604
- : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1605
- return JSCompiler_inline_result$jscomp$6;
1905
+ ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1906
+ : "viewport" === props.name
1907
+ ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1908
+ : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1909
+ return JSCompiler_inline_result$jscomp$7;
1606
1910
  case "listing":
1607
1911
  case "pre":
1608
1912
  target$jscomp$0.push(startChunkForTag(type));
1609
- var children$jscomp$7 = null,
1610
- innerHTML$jscomp$6 = null,
1611
- propKey$jscomp$9;
1612
- for (propKey$jscomp$9 in props)
1613
- if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1614
- var propValue$jscomp$9 = props[propKey$jscomp$9];
1615
- if (null != propValue$jscomp$9)
1616
- switch (propKey$jscomp$9) {
1913
+ var children$jscomp$8 = null,
1914
+ innerHTML$jscomp$7 = null,
1915
+ propKey$jscomp$10;
1916
+ for (propKey$jscomp$10 in props)
1917
+ if (hasOwnProperty.call(props, propKey$jscomp$10)) {
1918
+ var propValue$jscomp$10 = props[propKey$jscomp$10];
1919
+ if (null != propValue$jscomp$10)
1920
+ switch (propKey$jscomp$10) {
1617
1921
  case "children":
1618
- children$jscomp$7 = propValue$jscomp$9;
1922
+ children$jscomp$8 = propValue$jscomp$10;
1619
1923
  break;
1620
1924
  case "dangerouslySetInnerHTML":
1621
- innerHTML$jscomp$6 = propValue$jscomp$9;
1925
+ innerHTML$jscomp$7 = propValue$jscomp$10;
1622
1926
  break;
1623
1927
  default:
1624
1928
  pushAttribute(
1625
1929
  target$jscomp$0,
1626
- propKey$jscomp$9,
1627
- propValue$jscomp$9
1930
+ propKey$jscomp$10,
1931
+ propValue$jscomp$10
1628
1932
  );
1629
1933
  }
1630
1934
  }
1631
1935
  target$jscomp$0.push(endOfStartTag);
1632
- if (null != innerHTML$jscomp$6) {
1633
- if (null != children$jscomp$7)
1936
+ if (null != innerHTML$jscomp$7) {
1937
+ if (null != children$jscomp$8)
1634
1938
  throw Error(
1635
1939
  "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
1636
1940
  );
1637
1941
  if (
1638
- "object" !== typeof innerHTML$jscomp$6 ||
1639
- !("__html" in innerHTML$jscomp$6)
1942
+ "object" !== typeof innerHTML$jscomp$7 ||
1943
+ !("__html" in innerHTML$jscomp$7)
1640
1944
  )
1641
1945
  throw Error(
1642
1946
  "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
1643
1947
  );
1644
- var html = innerHTML$jscomp$6.__html;
1948
+ var html = innerHTML$jscomp$7.__html;
1645
1949
  null !== html &&
1646
1950
  void 0 !== html &&
1647
1951
  ("string" === typeof html && 0 < html.length && "\n" === html[0]
1648
1952
  ? target$jscomp$0.push(leadingNewline, html)
1649
1953
  : target$jscomp$0.push("" + html));
1650
1954
  }
1651
- "string" === typeof children$jscomp$7 &&
1652
- "\n" === children$jscomp$7[0] &&
1955
+ "string" === typeof children$jscomp$8 &&
1956
+ "\n" === children$jscomp$8[0] &&
1653
1957
  target$jscomp$0.push(leadingNewline);
1654
- return children$jscomp$7;
1958
+ return children$jscomp$8;
1655
1959
  case "img":
1656
1960
  var src = props.src,
1657
1961
  srcSet = props.srcSet;
@@ -1693,7 +1997,7 @@ function pushStartInstance(
1693
1997
  ) {
1694
1998
  resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
1695
1999
  var input = props.crossOrigin;
1696
- var JSCompiler_inline_result$jscomp$7 =
2000
+ var JSCompiler_inline_result$jscomp$8 =
1697
2001
  "string" === typeof input
1698
2002
  ? "use-credentials" === input
1699
2003
  ? input
@@ -1703,19 +2007,20 @@ function pushStartInstance(
1703
2007
  header;
1704
2008
  headers &&
1705
2009
  0 < headers.remainingCapacity &&
2010
+ "string" !== typeof props.srcSet &&
1706
2011
  ("high" === props.fetchPriority ||
1707
2012
  500 > headers.highImagePreloads.length) &&
1708
2013
  ((header = getPreloadAsHeader(src, "image", {
1709
2014
  imageSrcSet: props.srcSet,
1710
2015
  imageSizes: props.sizes,
1711
- crossOrigin: JSCompiler_inline_result$jscomp$7,
2016
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
1712
2017
  integrity: props.integrity,
1713
2018
  nonce: props.nonce,
1714
2019
  type: props.type,
1715
2020
  fetchPriority: props.fetchPriority,
1716
2021
  referrerPolicy: props.refererPolicy
1717
2022
  })),
1718
- 2 <= (headers.remainingCapacity -= header.length))
2023
+ 0 <= (headers.remainingCapacity -= header.length + 2))
1719
2024
  ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
1720
2025
  headers.highImagePreloads && (headers.highImagePreloads += ", "),
1721
2026
  (headers.highImagePreloads += header))
@@ -1726,7 +2031,7 @@ function pushStartInstance(
1726
2031
  href: srcSet ? void 0 : src,
1727
2032
  imageSrcSet: srcSet,
1728
2033
  imageSizes: sizes,
1729
- crossOrigin: JSCompiler_inline_result$jscomp$7,
2034
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
1730
2035
  integrity: props.integrity,
1731
2036
  type: props.type,
1732
2037
  fetchPriority: props.fetchPriority,
@@ -1762,58 +2067,79 @@ function pushStartInstance(
1762
2067
  case "missing-glyph":
1763
2068
  break;
1764
2069
  case "head":
1765
- if (2 > formatContext.insertionMode && null === renderState.headChunks) {
1766
- renderState.headChunks = [];
1767
- var JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
1768
- renderState.headChunks,
2070
+ if (2 > formatContext.insertionMode) {
2071
+ var preamble = preambleState || renderState.preamble;
2072
+ if (preamble.headChunks)
2073
+ throw Error("The `<head>` tag may only be rendered once.");
2074
+ preamble.headChunks = [];
2075
+ var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(
2076
+ preamble.headChunks,
1769
2077
  props,
1770
2078
  "head"
1771
2079
  );
1772
2080
  } else
1773
- JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
2081
+ JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1774
2082
  target$jscomp$0,
1775
2083
  props,
1776
2084
  "head"
1777
2085
  );
1778
- return JSCompiler_inline_result$jscomp$8;
2086
+ return JSCompiler_inline_result$jscomp$9;
2087
+ case "body":
2088
+ if (2 > formatContext.insertionMode) {
2089
+ var preamble$jscomp$0 = preambleState || renderState.preamble;
2090
+ if (preamble$jscomp$0.bodyChunks)
2091
+ throw Error("The `<body>` tag may only be rendered once.");
2092
+ preamble$jscomp$0.bodyChunks = [];
2093
+ var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(
2094
+ preamble$jscomp$0.bodyChunks,
2095
+ props,
2096
+ "body"
2097
+ );
2098
+ } else
2099
+ JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
2100
+ target$jscomp$0,
2101
+ props,
2102
+ "body"
2103
+ );
2104
+ return JSCompiler_inline_result$jscomp$10;
1779
2105
  case "html":
1780
- if (
1781
- 0 === formatContext.insertionMode &&
1782
- null === renderState.htmlChunks
1783
- ) {
1784
- renderState.htmlChunks = [doctypeChunk];
1785
- var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1786
- renderState.htmlChunks,
2106
+ if (0 === formatContext.insertionMode) {
2107
+ var preamble$jscomp$1 = preambleState || renderState.preamble;
2108
+ if (preamble$jscomp$1.htmlChunks)
2109
+ throw Error("The `<html>` tag may only be rendered once.");
2110
+ preamble$jscomp$1.htmlChunks = [doctypeChunk];
2111
+ var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(
2112
+ preamble$jscomp$1.htmlChunks,
1787
2113
  props,
1788
2114
  "html"
1789
2115
  );
1790
2116
  } else
1791
- JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2117
+ JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
1792
2118
  target$jscomp$0,
1793
2119
  props,
1794
2120
  "html"
1795
2121
  );
1796
- return JSCompiler_inline_result$jscomp$9;
2122
+ return JSCompiler_inline_result$jscomp$11;
1797
2123
  default:
1798
2124
  if (-1 !== type.indexOf("-")) {
1799
2125
  target$jscomp$0.push(startChunkForTag(type));
1800
- var children$jscomp$8 = null,
1801
- innerHTML$jscomp$7 = null,
1802
- propKey$jscomp$10;
1803
- for (propKey$jscomp$10 in props)
1804
- if (hasOwnProperty.call(props, propKey$jscomp$10)) {
1805
- var propValue$jscomp$10 = props[propKey$jscomp$10];
1806
- if (null != propValue$jscomp$10) {
1807
- var attributeName = propKey$jscomp$10;
1808
- switch (propKey$jscomp$10) {
2126
+ var children$jscomp$9 = null,
2127
+ innerHTML$jscomp$8 = null,
2128
+ propKey$jscomp$11;
2129
+ for (propKey$jscomp$11 in props)
2130
+ if (hasOwnProperty.call(props, propKey$jscomp$11)) {
2131
+ var propValue$jscomp$11 = props[propKey$jscomp$11];
2132
+ if (null != propValue$jscomp$11) {
2133
+ var attributeName = propKey$jscomp$11;
2134
+ switch (propKey$jscomp$11) {
1809
2135
  case "children":
1810
- children$jscomp$8 = propValue$jscomp$10;
2136
+ children$jscomp$9 = propValue$jscomp$11;
1811
2137
  break;
1812
2138
  case "dangerouslySetInnerHTML":
1813
- innerHTML$jscomp$7 = propValue$jscomp$10;
2139
+ innerHTML$jscomp$8 = propValue$jscomp$11;
1814
2140
  break;
1815
2141
  case "style":
1816
- pushStyleAttribute(target$jscomp$0, propValue$jscomp$10);
2142
+ pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
1817
2143
  break;
1818
2144
  case "suppressContentEditableWarning":
1819
2145
  case "suppressHydrationWarning":
@@ -1823,18 +2149,18 @@ function pushStartInstance(
1823
2149
  attributeName = "class";
1824
2150
  default:
1825
2151
  if (
1826
- isAttributeNameSafe(propKey$jscomp$10) &&
1827
- "function" !== typeof propValue$jscomp$10 &&
1828
- "symbol" !== typeof propValue$jscomp$10 &&
1829
- !1 !== propValue$jscomp$10
2152
+ isAttributeNameSafe(propKey$jscomp$11) &&
2153
+ "function" !== typeof propValue$jscomp$11 &&
2154
+ "symbol" !== typeof propValue$jscomp$11 &&
2155
+ !1 !== propValue$jscomp$11
1830
2156
  ) {
1831
- if (!0 === propValue$jscomp$10) propValue$jscomp$10 = "";
1832
- else if ("object" === typeof propValue$jscomp$10) continue;
2157
+ if (!0 === propValue$jscomp$11) propValue$jscomp$11 = "";
2158
+ else if ("object" === typeof propValue$jscomp$11) continue;
1833
2159
  target$jscomp$0.push(
1834
2160
  attributeSeparator,
1835
2161
  attributeName,
1836
2162
  attributeAssign,
1837
- escapeTextForBrowser(propValue$jscomp$10),
2163
+ escapeTextForBrowser(propValue$jscomp$11),
1838
2164
  attributeEnd
1839
2165
  );
1840
2166
  }
@@ -1842,8 +2168,8 @@ function pushStartInstance(
1842
2168
  }
1843
2169
  }
1844
2170
  target$jscomp$0.push(endOfStartTag);
1845
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$7, children$jscomp$8);
1846
- return children$jscomp$8;
2171
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$9);
2172
+ return children$jscomp$9;
1847
2173
  }
1848
2174
  }
1849
2175
  return pushStartGenericElement(target$jscomp$0, props, type);
@@ -1856,6 +2182,21 @@ function endChunkForTag(tag) {
1856
2182
  endTagCache.set(tag, chunk));
1857
2183
  return chunk;
1858
2184
  }
2185
+ function hoistPreambleState(renderState, preambleState) {
2186
+ renderState = renderState.preamble;
2187
+ null === renderState.htmlChunks &&
2188
+ preambleState.htmlChunks &&
2189
+ ((renderState.htmlChunks = preambleState.htmlChunks),
2190
+ (preambleState.contribution |= 1));
2191
+ null === renderState.headChunks &&
2192
+ preambleState.headChunks &&
2193
+ ((renderState.headChunks = preambleState.headChunks),
2194
+ (preambleState.contribution |= 4));
2195
+ null === renderState.bodyChunks &&
2196
+ preambleState.bodyChunks &&
2197
+ ((renderState.bodyChunks = preambleState.bodyChunks),
2198
+ (preambleState.contribution |= 2));
2199
+ }
1859
2200
  function writeBootstrap(destination, renderState) {
1860
2201
  renderState = renderState.bootstrapChunks;
1861
2202
  for (var i = 0; i < renderState.length - 1; i++)
@@ -1896,6 +2237,16 @@ function writeStartPendingSuspenseBoundary(destination, renderState, id) {
1896
2237
  writeChunk(destination, id.toString(16));
1897
2238
  return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);
1898
2239
  }
2240
+ var boundaryPreambleContributionChunkStart =
2241
+ stringToPrecomputedChunk("\x3c!--"),
2242
+ boundaryPreambleContributionChunkEnd = stringToPrecomputedChunk("--\x3e");
2243
+ function writePreambleContribution(destination, preambleState) {
2244
+ preambleState = preambleState.contribution;
2245
+ 0 !== preambleState &&
2246
+ (writeChunk(destination, boundaryPreambleContributionChunkStart),
2247
+ writeChunk(destination, "" + preambleState),
2248
+ writeChunk(destination, boundaryPreambleContributionChunkEnd));
2249
+ }
1899
2250
  var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'),
1900
2251
  startSegmentHTML2 = stringToPrecomputedChunk('">'),
1901
2252
  endSegmentHTML = stringToPrecomputedChunk("</div>"),
@@ -1927,6 +2278,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
1927
2278
  switch (formatContext.insertionMode) {
1928
2279
  case 0:
1929
2280
  case 1:
2281
+ case 3:
1930
2282
  case 2:
1931
2283
  return (
1932
2284
  writeChunk(destination, startSegmentHTML),
@@ -1934,42 +2286,42 @@ function writeStartSegment(destination, renderState, formatContext, id) {
1934
2286
  writeChunk(destination, id.toString(16)),
1935
2287
  writeChunkAndReturn(destination, startSegmentHTML2)
1936
2288
  );
1937
- case 3:
2289
+ case 4:
1938
2290
  return (
1939
2291
  writeChunk(destination, startSegmentSVG),
1940
2292
  writeChunk(destination, renderState.segmentPrefix),
1941
2293
  writeChunk(destination, id.toString(16)),
1942
2294
  writeChunkAndReturn(destination, startSegmentSVG2)
1943
2295
  );
1944
- case 4:
2296
+ case 5:
1945
2297
  return (
1946
2298
  writeChunk(destination, startSegmentMathML),
1947
2299
  writeChunk(destination, renderState.segmentPrefix),
1948
2300
  writeChunk(destination, id.toString(16)),
1949
2301
  writeChunkAndReturn(destination, startSegmentMathML2)
1950
2302
  );
1951
- case 5:
2303
+ case 6:
1952
2304
  return (
1953
2305
  writeChunk(destination, startSegmentTable),
1954
2306
  writeChunk(destination, renderState.segmentPrefix),
1955
2307
  writeChunk(destination, id.toString(16)),
1956
2308
  writeChunkAndReturn(destination, startSegmentTable2)
1957
2309
  );
1958
- case 6:
2310
+ case 7:
1959
2311
  return (
1960
2312
  writeChunk(destination, startSegmentTableBody),
1961
2313
  writeChunk(destination, renderState.segmentPrefix),
1962
2314
  writeChunk(destination, id.toString(16)),
1963
2315
  writeChunkAndReturn(destination, startSegmentTableBody2)
1964
2316
  );
1965
- case 7:
2317
+ case 8:
1966
2318
  return (
1967
2319
  writeChunk(destination, startSegmentTableRow),
1968
2320
  writeChunk(destination, renderState.segmentPrefix),
1969
2321
  writeChunk(destination, id.toString(16)),
1970
2322
  writeChunkAndReturn(destination, startSegmentTableRow2)
1971
2323
  );
1972
- case 8:
2324
+ case 9:
1973
2325
  return (
1974
2326
  writeChunk(destination, startSegmentColGroup),
1975
2327
  writeChunk(destination, renderState.segmentPrefix),
@@ -1984,19 +2336,20 @@ function writeEndSegment(destination, formatContext) {
1984
2336
  switch (formatContext.insertionMode) {
1985
2337
  case 0:
1986
2338
  case 1:
2339
+ case 3:
1987
2340
  case 2:
1988
2341
  return writeChunkAndReturn(destination, endSegmentHTML);
1989
- case 3:
1990
- return writeChunkAndReturn(destination, endSegmentSVG);
1991
2342
  case 4:
1992
- return writeChunkAndReturn(destination, endSegmentMathML);
2343
+ return writeChunkAndReturn(destination, endSegmentSVG);
1993
2344
  case 5:
1994
- return writeChunkAndReturn(destination, endSegmentTable);
2345
+ return writeChunkAndReturn(destination, endSegmentMathML);
1995
2346
  case 6:
1996
- return writeChunkAndReturn(destination, endSegmentTableBody);
2347
+ return writeChunkAndReturn(destination, endSegmentTable);
1997
2348
  case 7:
1998
- return writeChunkAndReturn(destination, endSegmentTableRow);
2349
+ return writeChunkAndReturn(destination, endSegmentTableBody);
1999
2350
  case 8:
2351
+ return writeChunkAndReturn(destination, endSegmentTableRow);
2352
+ case 9:
2000
2353
  return writeChunkAndReturn(destination, endSegmentColGroup);
2001
2354
  default:
2002
2355
  throw Error("Unknown insertion mode. This is a bug in React.");
@@ -2015,10 +2368,10 @@ var completeBoundaryScript1Full = stringToPrecomputedChunk(
2015
2368
  ),
2016
2369
  completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
2017
2370
  completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(
2018
- '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
2371
+ '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(t,u,y){function v(n){this._p=null;n()}for(var w=$RC,p=$RM,q=new Map,r=document,g,b,h=r.querySelectorAll("link[data-precedence],style[data-precedence]"),x=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?x.push(b):("LINK"===b.tagName&&p.set(b.getAttribute("href"),b),q.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var e=y[b++];if(!e){k=!1;b=0;continue}var c=!1,m=0;var d=e[m++];if(a=p.get(d)){var f=a._p;c=!0}else{a=r.createElement("link");a.href=\nd;a.rel="stylesheet";for(a.dataset.precedence=l=e[m++];f=e[m++];)a.setAttribute(f,e[m++]);f=a._p=new Promise(function(n,z){a.onload=v.bind(a,n);a.onerror=v.bind(a,z)});p.set(d,a)}d=a.getAttribute("media");!f||d&&!matchMedia(d).matches||h.push(f);if(c)continue}else{a=x[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=q.get(l)||g;c===g&&(g=a);q.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=r.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(w.bind(null,\nt,u,""),w.bind(null,t,u,"Resource failed to load"))};$RR("'
2019
2372
  ),
2020
2373
  completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
2021
- '$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
2374
+ '$RM=new Map;\n$RR=function(t,u,y){function v(n){this._p=null;n()}for(var w=$RC,p=$RM,q=new Map,r=document,g,b,h=r.querySelectorAll("link[data-precedence],style[data-precedence]"),x=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?x.push(b):("LINK"===b.tagName&&p.set(b.getAttribute("href"),b),q.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var e=y[b++];if(!e){k=!1;b=0;continue}var c=!1,m=0;var d=e[m++];if(a=p.get(d)){var f=a._p;c=!0}else{a=r.createElement("link");a.href=\nd;a.rel="stylesheet";for(a.dataset.precedence=l=e[m++];f=e[m++];)a.setAttribute(f,e[m++]);f=a._p=new Promise(function(n,z){a.onload=v.bind(a,n);a.onerror=v.bind(a,z)});p.set(d,a)}d=a.getAttribute("media");!f||d&&!matchMedia(d).matches||h.push(f);if(c)continue}else{a=x[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=q.get(l)||g;c===g&&(g=a);q.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=r.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(w.bind(null,\nt,u,""),w.bind(null,t,u,"Resource failed to load"))};$RR("'
2022
2375
  ),
2023
2376
  completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'),
2024
2377
  completeBoundaryScript2 = stringToPrecomputedChunk('","'),
@@ -2332,7 +2685,7 @@ function prefetchDNS(href) {
2332
2685
  escapeHrefForLinkHeaderURLContextReplacer
2333
2686
  ) +
2334
2687
  ">; rel=dns-prefetch"),
2335
- 2 <= (resumableState.remainingCapacity -= header.length));
2688
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2336
2689
  JSCompiler_temp
2337
2690
  ? ((renderState.resets.dns[href] = null),
2338
2691
  resumableState.preconnects && (resumableState.preconnects += ", "),
@@ -2355,8 +2708,8 @@ function preconnect(href, crossOrigin) {
2355
2708
  "use-credentials" === crossOrigin
2356
2709
  ? "credentials"
2357
2710
  : "string" === typeof crossOrigin
2358
- ? "anonymous"
2359
- : "default";
2711
+ ? "anonymous"
2712
+ : "default";
2360
2713
  if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
2361
2714
  resumableState.connectResources[bucket][href] = null;
2362
2715
  resumableState = renderState.headers;
@@ -2381,7 +2734,7 @@ function preconnect(href, crossOrigin) {
2381
2734
  }
2382
2735
  JSCompiler_temp =
2383
2736
  ((header = JSCompiler_temp),
2384
- 2 <= (resumableState.remainingCapacity -= header.length));
2737
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2385
2738
  }
2386
2739
  JSCompiler_temp
2387
2740
  ? ((renderState.resets.connect[bucket][href] = null),
@@ -2421,9 +2774,10 @@ function preload(href, as, options) {
2421
2774
  var header;
2422
2775
  resumableState &&
2423
2776
  0 < resumableState.remainingCapacity &&
2777
+ "string" !== typeof imageSrcSet &&
2424
2778
  "high" === fetchPriority &&
2425
2779
  ((header = getPreloadAsHeader(href, as, options)),
2426
- 2 <= (resumableState.remainingCapacity -= header.length))
2780
+ 0 <= (resumableState.remainingCapacity -= header.length + 2))
2427
2781
  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
2428
2782
  resumableState.highImagePreloads &&
2429
2783
  (resumableState.highImagePreloads += ", "),
@@ -2489,7 +2843,7 @@ function preload(href, as, options) {
2489
2843
  0 < resumableState.remainingCapacity &&
2490
2844
  "font" === as &&
2491
2845
  ((key = getPreloadAsHeader(href, as, options)),
2492
- 2 <= (resumableState.remainingCapacity -= key.length))
2846
+ 0 <= (resumableState.remainingCapacity -= key.length + 2))
2493
2847
  )
2494
2848
  (renderState.resets.font[href] = PRELOAD_NO_CREDS),
2495
2849
  resumableState.fontPreloads &&
@@ -2712,7 +3066,8 @@ function hoistStyleQueueDependency(styleQueue) {
2712
3066
  function hoistStylesheetDependency(stylesheet) {
2713
3067
  this.stylesheets.add(stylesheet);
2714
3068
  }
2715
- var requestStorage = new async_hooks.AsyncLocalStorage(),
3069
+ var bind = Function.prototype.bind,
3070
+ requestStorage = new async_hooks.AsyncLocalStorage(),
2716
3071
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
2717
3072
  function getComponentNameFromType(type) {
2718
3073
  if (null == type) return null;
@@ -2724,8 +3079,6 @@ function getComponentNameFromType(type) {
2724
3079
  switch (type) {
2725
3080
  case REACT_FRAGMENT_TYPE:
2726
3081
  return "Fragment";
2727
- case REACT_PORTAL_TYPE:
2728
- return "Portal";
2729
3082
  case REACT_PROFILER_TYPE:
2730
3083
  return "Profiler";
2731
3084
  case REACT_STRICT_MODE_TYPE:
@@ -2734,9 +3087,13 @@ function getComponentNameFromType(type) {
2734
3087
  return "Suspense";
2735
3088
  case REACT_SUSPENSE_LIST_TYPE:
2736
3089
  return "SuspenseList";
3090
+ case REACT_ACTIVITY_TYPE:
3091
+ return "Activity";
2737
3092
  }
2738
3093
  if ("object" === typeof type)
2739
3094
  switch (type.$$typeof) {
3095
+ case REACT_PORTAL_TYPE:
3096
+ return "Portal";
2740
3097
  case REACT_CONTEXT_TYPE:
2741
3098
  return (type.displayName || "Context") + ".Provider";
2742
3099
  case REACT_CONSUMER_TYPE:
@@ -2824,18 +3181,15 @@ function switchContext(newSnapshot) {
2824
3181
  (null === prev
2825
3182
  ? pushAllNext(newSnapshot)
2826
3183
  : null === newSnapshot
2827
- ? popAllPrevious(prev)
2828
- : prev.depth === newSnapshot.depth
2829
- ? popToNearestCommonAncestor(prev, newSnapshot)
2830
- : prev.depth > newSnapshot.depth
2831
- ? popPreviousToCommonLevel(prev, newSnapshot)
2832
- : popNextToCommonLevel(prev, newSnapshot),
3184
+ ? popAllPrevious(prev)
3185
+ : prev.depth === newSnapshot.depth
3186
+ ? popToNearestCommonAncestor(prev, newSnapshot)
3187
+ : prev.depth > newSnapshot.depth
3188
+ ? popPreviousToCommonLevel(prev, newSnapshot)
3189
+ : popNextToCommonLevel(prev, newSnapshot),
2833
3190
  (currentActiveSnapshot = newSnapshot));
2834
3191
  }
2835
3192
  var classComponentUpdater = {
2836
- isMounted: function () {
2837
- return !1;
2838
- },
2839
3193
  enqueueSetState: function (inst, payload) {
2840
3194
  inst = inst._reactInternals;
2841
3195
  null !== inst.queue && inst.queue.push(payload);
@@ -2884,7 +3238,7 @@ function clz32Fallback(x) {
2884
3238
  return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
2885
3239
  }
2886
3240
  var SuspenseException = Error(
2887
- "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"
3241
+ "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
2888
3242
  );
2889
3243
  function noop$2() {}
2890
3244
  function trackUsedThenable(thenableState, thenable, index) {
@@ -2976,9 +3330,9 @@ function createWorkInProgressHook() {
2976
3330
  (firstWorkInProgressHook = workInProgressHook = createHook()))
2977
3331
  : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
2978
3332
  : null === workInProgressHook.next
2979
- ? ((isReRender = !1),
2980
- (workInProgressHook = workInProgressHook.next = createHook()))
2981
- : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
3333
+ ? ((isReRender = !1),
3334
+ (workInProgressHook = workInProgressHook.next = createHook()))
3335
+ : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
2982
3336
  return workInProgressHook;
2983
3337
  }
2984
3338
  function getThenableStateAfterSuspending() {
@@ -3025,8 +3379,8 @@ function useReducer(reducer, initialArg, init) {
3025
3379
  ? initialArg()
3026
3380
  : initialArg
3027
3381
  : void 0 !== init
3028
- ? init(initialArg)
3029
- : initialArg;
3382
+ ? init(initialArg)
3383
+ : initialArg;
3030
3384
  workInProgressHook.memoizedState = reducer;
3031
3385
  reducer = workInProgressHook.queue = { last: null, dispatch: null };
3032
3386
  reducer = reducer.dispatch = dispatchAction.bind(
@@ -3155,100 +3509,111 @@ function unsupportedRefresh() {
3155
3509
  }
3156
3510
  function noop$1() {}
3157
3511
  var HooksDispatcher = {
3158
- readContext: function (context) {
3159
- return context._currentValue;
3160
- },
3161
- use: function (usable) {
3162
- if (null !== usable && "object" === typeof usable) {
3163
- if ("function" === typeof usable.then) return unwrapThenable(usable);
3164
- if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
3165
- }
3166
- throw Error("An unsupported type was passed to use(): " + String(usable));
3167
- },
3168
- useContext: function (context) {
3169
- resolveCurrentlyRenderingComponent();
3170
- return context._currentValue;
3171
- },
3172
- useMemo: useMemo,
3173
- useReducer: useReducer,
3174
- useRef: function (initialValue) {
3175
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
3176
- workInProgressHook = createWorkInProgressHook();
3177
- var previousRef = workInProgressHook.memoizedState;
3178
- return null === previousRef
3179
- ? ((initialValue = { current: initialValue }),
3180
- (workInProgressHook.memoizedState = initialValue))
3181
- : previousRef;
3182
- },
3183
- useState: function (initialState) {
3184
- return useReducer(basicStateReducer, initialState);
3185
- },
3186
- useInsertionEffect: noop$1,
3187
- useLayoutEffect: noop$1,
3188
- useCallback: function (callback, deps) {
3189
- return useMemo(function () {
3190
- return callback;
3191
- }, deps);
3192
- },
3193
- useImperativeHandle: noop$1,
3194
- useEffect: noop$1,
3195
- useDebugValue: noop$1,
3196
- useDeferredValue: function (value, initialValue) {
3197
- resolveCurrentlyRenderingComponent();
3198
- return void 0 !== initialValue ? initialValue : value;
3199
- },
3200
- useTransition: function () {
3201
- resolveCurrentlyRenderingComponent();
3202
- return [!1, unsupportedStartTransition];
3203
- },
3204
- useId: function () {
3205
- var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
3206
- var overflow = JSCompiler_inline_result.overflow;
3207
- JSCompiler_inline_result = JSCompiler_inline_result.id;
3208
- JSCompiler_inline_result =
3209
- (
3210
- JSCompiler_inline_result &
3211
- ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
3212
- ).toString(32) + overflow;
3213
- var resumableState = currentResumableState;
3214
- if (null === resumableState)
3215
- throw Error(
3216
- "Invalid hook call. Hooks can only be called inside of the body of a function component."
3217
- );
3218
- overflow = localIdCounter++;
3219
- JSCompiler_inline_result =
3220
- ":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
3221
- 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
3222
- return JSCompiler_inline_result + ":";
3223
- },
3224
- useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
3225
- if (void 0 === getServerSnapshot)
3226
- throw Error(
3227
- "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
3228
- );
3229
- return getServerSnapshot();
3230
- },
3231
- useCacheRefresh: function () {
3232
- return unsupportedRefresh;
3233
- },
3234
- useHostTransitionStatus: function () {
3235
- resolveCurrentlyRenderingComponent();
3236
- return sharedNotPendingObject;
3512
+ readContext: function (context) {
3513
+ return context._currentValue;
3514
+ },
3515
+ use: function (usable) {
3516
+ if (null !== usable && "object" === typeof usable) {
3517
+ if ("function" === typeof usable.then) return unwrapThenable(usable);
3518
+ if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
3519
+ }
3520
+ throw Error("An unsupported type was passed to use(): " + String(usable));
3521
+ },
3522
+ useContext: function (context) {
3523
+ resolveCurrentlyRenderingComponent();
3524
+ return context._currentValue;
3525
+ },
3526
+ useMemo: useMemo,
3527
+ useReducer: useReducer,
3528
+ useRef: function (initialValue) {
3529
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
3530
+ workInProgressHook = createWorkInProgressHook();
3531
+ var previousRef = workInProgressHook.memoizedState;
3532
+ return null === previousRef
3533
+ ? ((initialValue = { current: initialValue }),
3534
+ (workInProgressHook.memoizedState = initialValue))
3535
+ : previousRef;
3536
+ },
3537
+ useState: function (initialState) {
3538
+ return useReducer(basicStateReducer, initialState);
3539
+ },
3540
+ useInsertionEffect: noop$1,
3541
+ useLayoutEffect: noop$1,
3542
+ useCallback: function (callback, deps) {
3543
+ return useMemo(function () {
3544
+ return callback;
3545
+ }, deps);
3546
+ },
3547
+ useImperativeHandle: noop$1,
3548
+ useEffect: noop$1,
3549
+ useDebugValue: noop$1,
3550
+ useDeferredValue: function (value, initialValue) {
3551
+ resolveCurrentlyRenderingComponent();
3552
+ return void 0 !== initialValue ? initialValue : value;
3553
+ },
3554
+ useTransition: function () {
3555
+ resolveCurrentlyRenderingComponent();
3556
+ return [!1, unsupportedStartTransition];
3557
+ },
3558
+ useId: function () {
3559
+ var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
3560
+ var overflow = JSCompiler_inline_result.overflow;
3561
+ JSCompiler_inline_result = JSCompiler_inline_result.id;
3562
+ JSCompiler_inline_result =
3563
+ (
3564
+ JSCompiler_inline_result &
3565
+ ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
3566
+ ).toString(32) + overflow;
3567
+ var resumableState = currentResumableState;
3568
+ if (null === resumableState)
3569
+ throw Error(
3570
+ "Invalid hook call. Hooks can only be called inside of the body of a function component."
3571
+ );
3572
+ overflow = localIdCounter++;
3573
+ JSCompiler_inline_result =
3574
+ "\u00ab" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
3575
+ 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
3576
+ return JSCompiler_inline_result + "\u00bb";
3577
+ },
3578
+ useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
3579
+ if (void 0 === getServerSnapshot)
3580
+ throw Error(
3581
+ "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
3582
+ );
3583
+ return getServerSnapshot();
3584
+ },
3585
+ useOptimistic: function (passthrough) {
3586
+ resolveCurrentlyRenderingComponent();
3587
+ return [passthrough, unsupportedSetOptimisticState];
3588
+ },
3589
+ useActionState: useActionState,
3590
+ useFormState: useActionState,
3591
+ useHostTransitionStatus: function () {
3592
+ resolveCurrentlyRenderingComponent();
3593
+ return sharedNotPendingObject;
3594
+ },
3595
+ useMemoCache: function (size) {
3596
+ for (var data = Array(size), i = 0; i < size; i++)
3597
+ data[i] = REACT_MEMO_CACHE_SENTINEL;
3598
+ return data;
3599
+ },
3600
+ useCacheRefresh: function () {
3601
+ return unsupportedRefresh;
3602
+ }
3237
3603
  },
3238
- useOptimistic: function (passthrough) {
3239
- resolveCurrentlyRenderingComponent();
3240
- return [passthrough, unsupportedSetOptimisticState];
3241
- }
3242
- };
3243
- HooksDispatcher.useFormState = useActionState;
3244
- HooksDispatcher.useActionState = useActionState;
3245
- var currentResumableState = null,
3604
+ currentResumableState = null,
3246
3605
  DefaultAsyncDispatcher = {
3247
3606
  getCacheForType: function () {
3248
3607
  throw Error("Not implemented.");
3249
3608
  }
3250
- },
3251
- prefix;
3609
+ };
3610
+ function prepareStackTrace(error, structuredStackTrace) {
3611
+ error = (error.name || "Error") + ": " + (error.message || "");
3612
+ for (var i = 0; i < structuredStackTrace.length; i++)
3613
+ error += "\n at " + structuredStackTrace[i].toString();
3614
+ return error;
3615
+ }
3616
+ var prefix, suffix;
3252
3617
  function describeBuiltInComponentFrame(name) {
3253
3618
  if (void 0 === prefix)
3254
3619
  try {
@@ -3256,71 +3621,79 @@ function describeBuiltInComponentFrame(name) {
3256
3621
  } catch (x) {
3257
3622
  var match = x.stack.trim().match(/\n( *(at )?)/);
3258
3623
  prefix = (match && match[1]) || "";
3624
+ suffix =
3625
+ -1 < x.stack.indexOf("\n at")
3626
+ ? " (<anonymous>)"
3627
+ : -1 < x.stack.indexOf("@")
3628
+ ? "@unknown:0:0"
3629
+ : "";
3259
3630
  }
3260
- return "\n" + prefix + name;
3631
+ return "\n" + prefix + name + suffix;
3261
3632
  }
3262
3633
  var reentry = !1;
3263
3634
  function describeNativeComponentFrame(fn, construct) {
3264
3635
  if (!fn || reentry) return "";
3265
3636
  reentry = !0;
3266
3637
  var previousPrepareStackTrace = Error.prepareStackTrace;
3267
- Error.prepareStackTrace = void 0;
3268
- var RunInRootFrame = {
3269
- DetermineComponentFrameRoot: function () {
3270
- try {
3271
- if (construct) {
3272
- var Fake = function () {
3273
- throw Error();
3274
- };
3275
- Object.defineProperty(Fake.prototype, "props", {
3276
- set: function () {
3638
+ Error.prepareStackTrace = prepareStackTrace;
3639
+ try {
3640
+ var RunInRootFrame = {
3641
+ DetermineComponentFrameRoot: function () {
3642
+ try {
3643
+ if (construct) {
3644
+ var Fake = function () {
3277
3645
  throw Error();
3646
+ };
3647
+ Object.defineProperty(Fake.prototype, "props", {
3648
+ set: function () {
3649
+ throw Error();
3650
+ }
3651
+ });
3652
+ if ("object" === typeof Reflect && Reflect.construct) {
3653
+ try {
3654
+ Reflect.construct(Fake, []);
3655
+ } catch (x) {
3656
+ var control = x;
3657
+ }
3658
+ Reflect.construct(fn, [], Fake);
3659
+ } else {
3660
+ try {
3661
+ Fake.call();
3662
+ } catch (x$24) {
3663
+ control = x$24;
3664
+ }
3665
+ fn.call(Fake.prototype);
3278
3666
  }
3279
- });
3280
- if ("object" === typeof Reflect && Reflect.construct) {
3281
- try {
3282
- Reflect.construct(Fake, []);
3283
- } catch (x) {
3284
- var control = x;
3285
- }
3286
- Reflect.construct(fn, [], Fake);
3287
3667
  } else {
3288
3668
  try {
3289
- Fake.call();
3290
- } catch (x$24) {
3291
- control = x$24;
3669
+ throw Error();
3670
+ } catch (x$25) {
3671
+ control = x$25;
3292
3672
  }
3293
- fn.call(Fake.prototype);
3294
- }
3295
- } else {
3296
- try {
3297
- throw Error();
3298
- } catch (x$25) {
3299
- control = x$25;
3673
+ (Fake = fn()) &&
3674
+ "function" === typeof Fake.catch &&
3675
+ Fake.catch(function () {});
3300
3676
  }
3301
- (Fake = fn()) &&
3302
- "function" === typeof Fake.catch &&
3303
- Fake.catch(function () {});
3677
+ } catch (sample) {
3678
+ if (sample && control && "string" === typeof sample.stack)
3679
+ return [sample.stack, control.stack];
3304
3680
  }
3305
- } catch (sample) {
3306
- if (sample && control && "string" === typeof sample.stack)
3307
- return [sample.stack, control.stack];
3681
+ return [null, null];
3308
3682
  }
3309
- return [null, null];
3310
- }
3311
- };
3312
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
3313
- "DetermineComponentFrameRoot";
3314
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
3315
- RunInRootFrame.DetermineComponentFrameRoot,
3316
- "name"
3317
- );
3318
- namePropDescriptor &&
3319
- namePropDescriptor.configurable &&
3320
- Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
3321
- value: "DetermineComponentFrameRoot"
3322
- });
3323
- try {
3683
+ };
3684
+ RunInRootFrame.DetermineComponentFrameRoot.displayName =
3685
+ "DetermineComponentFrameRoot";
3686
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(
3687
+ RunInRootFrame.DetermineComponentFrameRoot,
3688
+ "name"
3689
+ );
3690
+ namePropDescriptor &&
3691
+ namePropDescriptor.configurable &&
3692
+ Object.defineProperty(
3693
+ RunInRootFrame.DetermineComponentFrameRoot,
3694
+ "name",
3695
+ { value: "DetermineComponentFrameRoot" }
3696
+ );
3324
3697
  var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
3325
3698
  sampleStack = _RunInRootFrame$Deter[0],
3326
3699
  controlStack = _RunInRootFrame$Deter[1];
@@ -3391,11 +3764,207 @@ function describeNativeComponentFrame(fn, construct) {
3391
3764
  ? describeBuiltInComponentFrame(previousPrepareStackTrace)
3392
3765
  : "";
3393
3766
  }
3767
+ function describeComponentStackByType(type) {
3768
+ if ("string" === typeof type) return describeBuiltInComponentFrame(type);
3769
+ if ("function" === typeof type)
3770
+ return type.prototype && type.prototype.isReactComponent
3771
+ ? describeNativeComponentFrame(type, !0)
3772
+ : describeNativeComponentFrame(type, !1);
3773
+ if ("object" === typeof type && null !== type) {
3774
+ switch (type.$$typeof) {
3775
+ case REACT_FORWARD_REF_TYPE:
3776
+ return describeNativeComponentFrame(type.render, !1);
3777
+ case REACT_MEMO_TYPE:
3778
+ return describeNativeComponentFrame(type.type, !1);
3779
+ case REACT_LAZY_TYPE:
3780
+ var lazyComponent = type,
3781
+ payload = lazyComponent._payload;
3782
+ lazyComponent = lazyComponent._init;
3783
+ try {
3784
+ type = lazyComponent(payload);
3785
+ } catch (x) {
3786
+ return describeBuiltInComponentFrame("Lazy");
3787
+ }
3788
+ return describeComponentStackByType(type);
3789
+ }
3790
+ if ("string" === typeof type.name)
3791
+ return (
3792
+ (payload = type.env),
3793
+ describeBuiltInComponentFrame(
3794
+ type.name + (payload ? " [" + payload + "]" : "")
3795
+ )
3796
+ );
3797
+ }
3798
+ switch (type) {
3799
+ case REACT_SUSPENSE_LIST_TYPE:
3800
+ return describeBuiltInComponentFrame("SuspenseList");
3801
+ case REACT_SUSPENSE_TYPE:
3802
+ return describeBuiltInComponentFrame("Suspense");
3803
+ }
3804
+ return "";
3805
+ }
3394
3806
  function defaultErrorHandler(error) {
3395
- console.error(error);
3807
+ if (
3808
+ "object" === typeof error &&
3809
+ null !== error &&
3810
+ "string" === typeof error.environmentName
3811
+ ) {
3812
+ var JSCompiler_inline_result = error.environmentName;
3813
+ error = [error].slice(0);
3814
+ "string" === typeof error[0]
3815
+ ? error.splice(
3816
+ 0,
3817
+ 1,
3818
+ "\u001b[0m\u001b[7m%c%s\u001b[0m%c " + error[0],
3819
+ "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",
3820
+ " " + JSCompiler_inline_result + " ",
3821
+ ""
3822
+ )
3823
+ : error.splice(
3824
+ 0,
3825
+ 0,
3826
+ "\u001b[0m\u001b[7m%c%s\u001b[0m%c ",
3827
+ "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",
3828
+ " " + JSCompiler_inline_result + " ",
3829
+ ""
3830
+ );
3831
+ error.unshift(console);
3832
+ JSCompiler_inline_result = bind.apply(console.error, error);
3833
+ JSCompiler_inline_result();
3834
+ } else console.error(error);
3396
3835
  return null;
3397
3836
  }
3398
3837
  function noop() {}
3838
+ function RequestInstance(
3839
+ resumableState,
3840
+ renderState,
3841
+ rootFormatContext,
3842
+ progressiveChunkSize,
3843
+ onError,
3844
+ onAllReady,
3845
+ onShellReady,
3846
+ onShellError,
3847
+ onFatalError,
3848
+ onPostpone,
3849
+ formState
3850
+ ) {
3851
+ var abortSet = new Set();
3852
+ this.destination = null;
3853
+ this.flushScheduled = !1;
3854
+ this.resumableState = resumableState;
3855
+ this.renderState = renderState;
3856
+ this.rootFormatContext = rootFormatContext;
3857
+ this.progressiveChunkSize =
3858
+ void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
3859
+ this.status = 10;
3860
+ this.fatalError = null;
3861
+ this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
3862
+ this.completedPreambleSegments = this.completedRootSegment = null;
3863
+ this.abortableTasks = abortSet;
3864
+ this.pingedTasks = [];
3865
+ this.clientRenderedBoundaries = [];
3866
+ this.completedBoundaries = [];
3867
+ this.partialBoundaries = [];
3868
+ this.trackedPostpones = null;
3869
+ this.onError = void 0 === onError ? defaultErrorHandler : onError;
3870
+ this.onPostpone = void 0 === onPostpone ? noop : onPostpone;
3871
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
3872
+ this.onShellReady = void 0 === onShellReady ? noop : onShellReady;
3873
+ this.onShellError = void 0 === onShellError ? noop : onShellError;
3874
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
3875
+ this.formState = void 0 === formState ? null : formState;
3876
+ }
3877
+ function createRequest(
3878
+ children,
3879
+ resumableState,
3880
+ renderState,
3881
+ rootFormatContext,
3882
+ progressiveChunkSize,
3883
+ onError,
3884
+ onAllReady,
3885
+ onShellReady,
3886
+ onShellError,
3887
+ onFatalError,
3888
+ onPostpone,
3889
+ formState
3890
+ ) {
3891
+ resumableState = new RequestInstance(
3892
+ resumableState,
3893
+ renderState,
3894
+ rootFormatContext,
3895
+ progressiveChunkSize,
3896
+ onError,
3897
+ onAllReady,
3898
+ onShellReady,
3899
+ onShellError,
3900
+ onFatalError,
3901
+ onPostpone,
3902
+ formState
3903
+ );
3904
+ renderState = createPendingSegment(
3905
+ resumableState,
3906
+ 0,
3907
+ null,
3908
+ rootFormatContext,
3909
+ !1,
3910
+ !1
3911
+ );
3912
+ renderState.parentFlushed = !0;
3913
+ children = createRenderTask(
3914
+ resumableState,
3915
+ null,
3916
+ children,
3917
+ -1,
3918
+ null,
3919
+ renderState,
3920
+ null,
3921
+ null,
3922
+ resumableState.abortableTasks,
3923
+ null,
3924
+ rootFormatContext,
3925
+ null,
3926
+ emptyTreeContext,
3927
+ null,
3928
+ !1
3929
+ );
3930
+ pushComponentStack(children);
3931
+ resumableState.pingedTasks.push(children);
3932
+ return resumableState;
3933
+ }
3934
+ function createPrerenderRequest(
3935
+ children,
3936
+ resumableState,
3937
+ renderState,
3938
+ rootFormatContext,
3939
+ progressiveChunkSize,
3940
+ onError,
3941
+ onAllReady,
3942
+ onShellReady,
3943
+ onShellError,
3944
+ onFatalError,
3945
+ onPostpone
3946
+ ) {
3947
+ children = createRequest(
3948
+ children,
3949
+ resumableState,
3950
+ renderState,
3951
+ rootFormatContext,
3952
+ progressiveChunkSize,
3953
+ onError,
3954
+ onAllReady,
3955
+ onShellReady,
3956
+ onShellError,
3957
+ onFatalError,
3958
+ onPostpone,
3959
+ void 0
3960
+ );
3961
+ children.trackedPostpones = {
3962
+ workingMap: new Map(),
3963
+ rootNodes: [],
3964
+ rootSlots: null
3965
+ };
3966
+ return children;
3967
+ }
3399
3968
  var currentRequest = null;
3400
3969
  function resolveRequest() {
3401
3970
  if (currentRequest) return currentRequest;
@@ -3406,11 +3975,20 @@ function pingTask(request, task) {
3406
3975
  request.pingedTasks.push(task);
3407
3976
  1 === request.pingedTasks.length &&
3408
3977
  ((request.flushScheduled = null !== request.destination),
3409
- setImmediate(function () {
3410
- return performWork(request);
3411
- }));
3412
- }
3413
- function createSuspenseBoundary(request, fallbackAbortableTasks) {
3978
+ null !== request.trackedPostpones || 10 === request.status
3979
+ ? scheduleMicrotask(function () {
3980
+ return performWork(request);
3981
+ })
3982
+ : setImmediate(function () {
3983
+ return performWork(request);
3984
+ }));
3985
+ }
3986
+ function createSuspenseBoundary(
3987
+ request,
3988
+ fallbackAbortableTasks,
3989
+ contentPreamble,
3990
+ fallbackPreamble
3991
+ ) {
3414
3992
  return {
3415
3993
  status: 0,
3416
3994
  rootSegmentID: -1,
@@ -3422,6 +4000,8 @@ function createSuspenseBoundary(request, fallbackAbortableTasks) {
3422
4000
  errorDigest: null,
3423
4001
  contentState: createHoistableState(),
3424
4002
  fallbackState: createHoistableState(),
4003
+ contentPreamble: contentPreamble,
4004
+ fallbackPreamble: fallbackPreamble,
3425
4005
  trackedContentKeyPath: null,
3426
4006
  trackedFallbackNode: null
3427
4007
  };
@@ -3433,11 +4013,11 @@ function createRenderTask(
3433
4013
  childIndex,
3434
4014
  blockedBoundary,
3435
4015
  blockedSegment,
4016
+ blockedPreamble,
3436
4017
  hoistableState,
3437
4018
  abortSet,
3438
4019
  keyPath,
3439
4020
  formatContext,
3440
- legacyContext,
3441
4021
  context,
3442
4022
  treeContext,
3443
4023
  componentStack,
@@ -3456,11 +4036,11 @@ function createRenderTask(
3456
4036
  },
3457
4037
  blockedBoundary: blockedBoundary,
3458
4038
  blockedSegment: blockedSegment,
4039
+ blockedPreamble: blockedPreamble,
3459
4040
  hoistableState: hoistableState,
3460
4041
  abortSet: abortSet,
3461
4042
  keyPath: keyPath,
3462
4043
  formatContext: formatContext,
3463
- legacyContext: legacyContext,
3464
4044
  context: context,
3465
4045
  treeContext: treeContext,
3466
4046
  componentStack: componentStack,
@@ -3481,7 +4061,6 @@ function createReplayTask(
3481
4061
  abortSet,
3482
4062
  keyPath,
3483
4063
  formatContext,
3484
- legacyContext,
3485
4064
  context,
3486
4065
  treeContext,
3487
4066
  componentStack,
@@ -3501,11 +4080,11 @@ function createReplayTask(
3501
4080
  },
3502
4081
  blockedBoundary: blockedBoundary,
3503
4082
  blockedSegment: null,
4083
+ blockedPreamble: null,
3504
4084
  hoistableState: hoistableState,
3505
4085
  abortSet: abortSet,
3506
4086
  keyPath: keyPath,
3507
4087
  formatContext: formatContext,
3508
- legacyContext: legacyContext,
3509
4088
  context: context,
3510
4089
  treeContext: treeContext,
3511
4090
  componentStack: componentStack,
@@ -3525,58 +4104,66 @@ function createPendingSegment(
3525
4104
  ) {
3526
4105
  return {
3527
4106
  status: 0,
4107
+ parentFlushed: !1,
3528
4108
  id: -1,
3529
4109
  index: index,
3530
- parentFlushed: !1,
3531
4110
  chunks: [],
3532
4111
  children: [],
4112
+ preambleChildren: [],
3533
4113
  parentFormatContext: parentFormatContext,
3534
4114
  boundary: boundary,
3535
4115
  lastPushedText: lastPushedText,
3536
4116
  textEmbedded: textEmbedded
3537
4117
  };
3538
4118
  }
3539
- function createBuiltInComponentStack(task, type) {
3540
- return { tag: 0, parent: task.componentStack, type: type };
4119
+ function pushComponentStack(task) {
4120
+ var node = task.node;
4121
+ if ("object" === typeof node && null !== node)
4122
+ switch (node.$$typeof) {
4123
+ case REACT_ELEMENT_TYPE:
4124
+ task.componentStack = { parent: task.componentStack, type: node.type };
4125
+ }
3541
4126
  }
3542
- function getThrownInfo(request, node) {
3543
- if (node && null !== request.trackedPostpones) {
3544
- try {
3545
- request = "";
3546
- do {
3547
- switch (node.tag) {
3548
- case 0:
3549
- request += describeBuiltInComponentFrame(node.type);
3550
- break;
3551
- case 1:
3552
- request += describeNativeComponentFrame(node.type, !1);
3553
- break;
3554
- case 2:
3555
- request += describeNativeComponentFrame(node.type, !0);
4127
+ function getThrownInfo(node$jscomp$0) {
4128
+ var errorInfo = {};
4129
+ node$jscomp$0 &&
4130
+ Object.defineProperty(errorInfo, "componentStack", {
4131
+ configurable: !0,
4132
+ enumerable: !0,
4133
+ get: function () {
4134
+ try {
4135
+ var info = "",
4136
+ node = node$jscomp$0;
4137
+ do
4138
+ (info += describeComponentStackByType(node.type)),
4139
+ (node = node.parent);
4140
+ while (node);
4141
+ var JSCompiler_inline_result = info;
4142
+ } catch (x) {
4143
+ JSCompiler_inline_result =
4144
+ "\nError generating stack: " + x.message + "\n" + x.stack;
3556
4145
  }
3557
- node = node.parent;
3558
- } while (node);
3559
- var JSCompiler_temp = request;
3560
- } catch (x) {
3561
- JSCompiler_temp =
3562
- "\nError generating stack: " + x.message + "\n" + x.stack;
3563
- }
3564
- JSCompiler_temp = { componentStack: JSCompiler_temp };
3565
- } else JSCompiler_temp = {};
3566
- return JSCompiler_temp;
4146
+ Object.defineProperty(errorInfo, "componentStack", {
4147
+ value: JSCompiler_inline_result
4148
+ });
4149
+ return JSCompiler_inline_result;
4150
+ }
4151
+ });
4152
+ return errorInfo;
3567
4153
  }
3568
4154
  function logRecoverableError(request, error, errorInfo) {
3569
- request = request.onError(error, errorInfo);
3570
- if (null == request || "string" === typeof request) return request;
4155
+ request = request.onError;
4156
+ error = request(error, errorInfo);
4157
+ if (null == error || "string" === typeof error) return error;
3571
4158
  }
3572
4159
  function fatalError(request, error) {
3573
- var onShellError = request.onShellError;
3574
- onShellError(error);
3575
- onShellError = request.onFatalError;
4160
+ var onShellError = request.onShellError,
4161
+ onFatalError = request.onFatalError;
3576
4162
  onShellError(error);
4163
+ onFatalError(error);
3577
4164
  null !== request.destination
3578
- ? ((request.status = 2), request.destination.destroy(error))
3579
- : ((request.status = 1), (request.fatalError = error));
4165
+ ? ((request.status = 14), request.destination.destroy(error))
4166
+ : ((request.status = 13), (request.fatalError = error));
3580
4167
  }
3581
4168
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
3582
4169
  var prevThenableState = task.thenableState;
@@ -3629,171 +4216,179 @@ function finishFunctionComponent(
3629
4216
  renderNode(request, task, children, -1),
3630
4217
  (task.treeContext = keyPath))
3631
4218
  : didEmitActionStateMarkers
3632
- ? renderNode(request, task, children, -1)
3633
- : renderNodeDestructive(request, task, children, -1);
4219
+ ? renderNode(request, task, children, -1)
4220
+ : renderNodeDestructive(request, task, children, -1);
3634
4221
  task.keyPath = actionStateCount;
3635
4222
  }
3636
4223
  function renderElement(request, task, keyPath, type, props, ref) {
3637
4224
  if ("function" === typeof type)
3638
4225
  if (type.prototype && type.prototype.isReactComponent) {
3639
- var JSCompiler_inline_result = props;
4226
+ var newProps = props;
3640
4227
  if ("ref" in props) {
3641
- JSCompiler_inline_result = {};
4228
+ newProps = {};
3642
4229
  for (var propName in props)
3643
- "ref" !== propName &&
3644
- (JSCompiler_inline_result[propName] = props[propName]);
4230
+ "ref" !== propName && (newProps[propName] = props[propName]);
3645
4231
  }
3646
4232
  var defaultProps = type.defaultProps;
3647
4233
  if (defaultProps) {
3648
- JSCompiler_inline_result === props &&
3649
- (JSCompiler_inline_result = assign(
3650
- {},
3651
- JSCompiler_inline_result,
3652
- props
3653
- ));
3654
- for (var propName$31 in defaultProps)
3655
- void 0 === JSCompiler_inline_result[propName$31] &&
3656
- (JSCompiler_inline_result[propName$31] = defaultProps[propName$31]);
4234
+ newProps === props && (newProps = assign({}, newProps, props));
4235
+ for (var propName$33 in defaultProps)
4236
+ void 0 === newProps[propName$33] &&
4237
+ (newProps[propName$33] = defaultProps[propName$33]);
3657
4238
  }
3658
- props = task.componentStack;
3659
- task.componentStack = { tag: 2, parent: task.componentStack, type: type };
3660
- defaultProps = emptyContextObject;
4239
+ props = newProps;
4240
+ newProps = emptyContextObject;
4241
+ defaultProps = type.contextType;
4242
+ "object" === typeof defaultProps &&
4243
+ null !== defaultProps &&
4244
+ (newProps = defaultProps._currentValue);
4245
+ newProps = new type(props, newProps);
4246
+ var initialState = void 0 !== newProps.state ? newProps.state : null;
4247
+ newProps.updater = classComponentUpdater;
4248
+ newProps.props = props;
4249
+ newProps.state = initialState;
4250
+ defaultProps = { queue: [], replace: !1 };
4251
+ newProps._reactInternals = defaultProps;
3661
4252
  ref = type.contextType;
3662
- "object" === typeof ref &&
3663
- null !== ref &&
3664
- (defaultProps = ref._currentValue);
3665
- defaultProps = new type(JSCompiler_inline_result, defaultProps);
3666
- propName$31 = void 0 !== defaultProps.state ? defaultProps.state : null;
3667
- defaultProps.updater = classComponentUpdater;
3668
- defaultProps.props = JSCompiler_inline_result;
3669
- defaultProps.state = propName$31;
3670
- ref = { queue: [], replace: !1 };
3671
- defaultProps._reactInternals = ref;
3672
- var contextType = type.contextType;
3673
- defaultProps.context =
3674
- "object" === typeof contextType && null !== contextType
3675
- ? contextType._currentValue
4253
+ newProps.context =
4254
+ "object" === typeof ref && null !== ref
4255
+ ? ref._currentValue
3676
4256
  : emptyContextObject;
3677
- contextType = type.getDerivedStateFromProps;
3678
- "function" === typeof contextType &&
3679
- ((contextType = contextType(JSCompiler_inline_result, propName$31)),
3680
- (propName$31 =
3681
- null === contextType || void 0 === contextType
3682
- ? propName$31
3683
- : assign({}, propName$31, contextType)),
3684
- (defaultProps.state = propName$31));
4257
+ ref = type.getDerivedStateFromProps;
4258
+ "function" === typeof ref &&
4259
+ ((ref = ref(props, initialState)),
4260
+ (initialState =
4261
+ null === ref || void 0 === ref
4262
+ ? initialState
4263
+ : assign({}, initialState, ref)),
4264
+ (newProps.state = initialState));
3685
4265
  if (
3686
4266
  "function" !== typeof type.getDerivedStateFromProps &&
3687
- "function" !== typeof defaultProps.getSnapshotBeforeUpdate &&
3688
- ("function" === typeof defaultProps.UNSAFE_componentWillMount ||
3689
- "function" === typeof defaultProps.componentWillMount)
4267
+ "function" !== typeof newProps.getSnapshotBeforeUpdate &&
4268
+ ("function" === typeof newProps.UNSAFE_componentWillMount ||
4269
+ "function" === typeof newProps.componentWillMount)
3690
4270
  )
3691
4271
  if (
3692
- ((type = defaultProps.state),
3693
- "function" === typeof defaultProps.componentWillMount &&
3694
- defaultProps.componentWillMount(),
3695
- "function" === typeof defaultProps.UNSAFE_componentWillMount &&
3696
- defaultProps.UNSAFE_componentWillMount(),
3697
- type !== defaultProps.state &&
4272
+ ((type = newProps.state),
4273
+ "function" === typeof newProps.componentWillMount &&
4274
+ newProps.componentWillMount(),
4275
+ "function" === typeof newProps.UNSAFE_componentWillMount &&
4276
+ newProps.UNSAFE_componentWillMount(),
4277
+ type !== newProps.state &&
3698
4278
  classComponentUpdater.enqueueReplaceState(
3699
- defaultProps,
3700
- defaultProps.state,
4279
+ newProps,
4280
+ newProps.state,
3701
4281
  null
3702
4282
  ),
3703
- null !== ref.queue && 0 < ref.queue.length)
4283
+ null !== defaultProps.queue && 0 < defaultProps.queue.length)
3704
4284
  )
3705
4285
  if (
3706
- ((type = ref.queue),
3707
- (contextType = ref.replace),
3708
- (ref.queue = null),
3709
- (ref.replace = !1),
3710
- contextType && 1 === type.length)
4286
+ ((type = defaultProps.queue),
4287
+ (ref = defaultProps.replace),
4288
+ (defaultProps.queue = null),
4289
+ (defaultProps.replace = !1),
4290
+ ref && 1 === type.length)
3711
4291
  )
3712
- defaultProps.state = type[0];
4292
+ newProps.state = type[0];
3713
4293
  else {
3714
- ref = contextType ? type[0] : defaultProps.state;
3715
- propName$31 = !0;
3716
- for (
3717
- contextType = contextType ? 1 : 0;
3718
- contextType < type.length;
3719
- contextType++
3720
- )
3721
- (propName = type[contextType]),
3722
- (propName =
3723
- "function" === typeof propName
3724
- ? propName.call(
3725
- defaultProps,
3726
- ref,
3727
- JSCompiler_inline_result,
3728
- void 0
3729
- )
3730
- : propName),
3731
- null != propName &&
3732
- (propName$31
3733
- ? ((propName$31 = !1), (ref = assign({}, ref, propName)))
3734
- : assign(ref, propName));
3735
- defaultProps.state = ref;
4294
+ defaultProps = ref ? type[0] : newProps.state;
4295
+ initialState = !0;
4296
+ for (ref = ref ? 1 : 0; ref < type.length; ref++)
4297
+ (propName$33 = type[ref]),
4298
+ (propName$33 =
4299
+ "function" === typeof propName$33
4300
+ ? propName$33.call(newProps, defaultProps, props, void 0)
4301
+ : propName$33),
4302
+ null != propName$33 &&
4303
+ (initialState
4304
+ ? ((initialState = !1),
4305
+ (defaultProps = assign({}, defaultProps, propName$33)))
4306
+ : assign(defaultProps, propName$33));
4307
+ newProps.state = defaultProps;
3736
4308
  }
3737
- else ref.queue = null;
3738
- type = defaultProps.render();
3739
- JSCompiler_inline_result = task.keyPath;
4309
+ else defaultProps.queue = null;
4310
+ type = newProps.render();
4311
+ if (12 === request.status) throw null;
4312
+ props = task.keyPath;
3740
4313
  task.keyPath = keyPath;
3741
4314
  renderNodeDestructive(request, task, type, -1);
3742
- task.keyPath = JSCompiler_inline_result;
3743
- task.componentStack = props;
3744
- } else
3745
- (JSCompiler_inline_result = task.componentStack),
3746
- (task.componentStack = {
3747
- tag: 1,
3748
- parent: task.componentStack,
3749
- type: type
3750
- }),
3751
- (type = renderWithHooks(request, task, keyPath, type, props, void 0)),
3752
- finishFunctionComponent(
3753
- request,
3754
- task,
3755
- keyPath,
3756
- type,
3757
- 0 !== localIdCounter,
3758
- actionStateCounter,
3759
- actionStateMatchingIndex
3760
- ),
3761
- (task.componentStack = JSCompiler_inline_result);
3762
- else if ("string" === typeof type) {
3763
- JSCompiler_inline_result = task.componentStack;
3764
- task.componentStack = createBuiltInComponentStack(task, type);
3765
- defaultProps = task.blockedSegment;
3766
- if (null === defaultProps)
3767
- (defaultProps = props.children),
3768
- (ref = task.formatContext),
3769
- (propName$31 = task.keyPath),
3770
- (task.formatContext = getChildFormatContext(ref, type, props)),
4315
+ task.keyPath = props;
4316
+ } else {
4317
+ type = renderWithHooks(request, task, keyPath, type, props, void 0);
4318
+ if (12 === request.status) throw null;
4319
+ finishFunctionComponent(
4320
+ request,
4321
+ task,
4322
+ keyPath,
4323
+ type,
4324
+ 0 !== localIdCounter,
4325
+ actionStateCounter,
4326
+ actionStateMatchingIndex
4327
+ );
4328
+ }
4329
+ else if ("string" === typeof type)
4330
+ if (((newProps = task.blockedSegment), null === newProps))
4331
+ (newProps = props.children),
4332
+ (defaultProps = task.formatContext),
4333
+ (initialState = task.keyPath),
4334
+ (task.formatContext = getChildFormatContext(defaultProps, type, props)),
3771
4335
  (task.keyPath = keyPath),
3772
- renderNode(request, task, defaultProps, -1),
3773
- (task.formatContext = ref),
3774
- (task.keyPath = propName$31);
4336
+ renderNode(request, task, newProps, -1),
4337
+ (task.formatContext = defaultProps),
4338
+ (task.keyPath = initialState);
3775
4339
  else {
3776
- propName$31 = pushStartInstance(
3777
- defaultProps.chunks,
4340
+ ref = pushStartInstance(
4341
+ newProps.chunks,
3778
4342
  type,
3779
4343
  props,
3780
4344
  request.resumableState,
3781
4345
  request.renderState,
4346
+ task.blockedPreamble,
3782
4347
  task.hoistableState,
3783
4348
  task.formatContext,
3784
- defaultProps.lastPushedText,
4349
+ newProps.lastPushedText,
3785
4350
  task.isFallback
3786
4351
  );
3787
- defaultProps.lastPushedText = !1;
3788
- ref = task.formatContext;
3789
- contextType = task.keyPath;
3790
- task.formatContext = getChildFormatContext(ref, type, props);
4352
+ newProps.lastPushedText = !1;
4353
+ defaultProps = task.formatContext;
4354
+ initialState = task.keyPath;
3791
4355
  task.keyPath = keyPath;
3792
- renderNode(request, task, propName$31, -1);
3793
- task.formatContext = ref;
3794
- task.keyPath = contextType;
4356
+ 3 ===
4357
+ (task.formatContext = getChildFormatContext(defaultProps, type, props))
4358
+ .insertionMode
4359
+ ? ((keyPath = createPendingSegment(
4360
+ request,
4361
+ 0,
4362
+ null,
4363
+ task.formatContext,
4364
+ !1,
4365
+ !1
4366
+ )),
4367
+ newProps.preambleChildren.push(keyPath),
4368
+ (keyPath = createRenderTask(
4369
+ request,
4370
+ null,
4371
+ ref,
4372
+ -1,
4373
+ task.blockedBoundary,
4374
+ keyPath,
4375
+ task.blockedPreamble,
4376
+ task.hoistableState,
4377
+ request.abortableTasks,
4378
+ task.keyPath,
4379
+ task.formatContext,
4380
+ task.context,
4381
+ task.treeContext,
4382
+ task.componentStack,
4383
+ task.isFallback
4384
+ )),
4385
+ pushComponentStack(keyPath),
4386
+ request.pingedTasks.push(keyPath))
4387
+ : renderNode(request, task, ref, -1);
4388
+ task.formatContext = defaultProps;
4389
+ task.keyPath = initialState;
3795
4390
  a: {
3796
- keyPath = defaultProps.chunks;
4391
+ task = newProps.chunks;
3797
4392
  request = request.resumableState;
3798
4393
  switch (type) {
3799
4394
  case "title":
@@ -3816,26 +4411,27 @@ function renderElement(request, task, keyPath, type, props, ref) {
3816
4411
  case "wbr":
3817
4412
  break a;
3818
4413
  case "body":
3819
- if (1 >= ref.insertionMode) {
4414
+ if (1 >= defaultProps.insertionMode) {
3820
4415
  request.hasBody = !0;
3821
4416
  break a;
3822
4417
  }
3823
4418
  break;
3824
4419
  case "html":
3825
- if (0 === ref.insertionMode) {
4420
+ if (0 === defaultProps.insertionMode) {
3826
4421
  request.hasHtml = !0;
3827
4422
  break a;
3828
4423
  }
4424
+ break;
4425
+ case "head":
4426
+ if (1 >= defaultProps.insertionMode) break a;
3829
4427
  }
3830
- keyPath.push(endChunkForTag(type));
4428
+ task.push(endChunkForTag(type));
3831
4429
  }
3832
- defaultProps.lastPushedText = !1;
4430
+ newProps.lastPushedText = !1;
3833
4431
  }
3834
- task.componentStack = JSCompiler_inline_result;
3835
- } else {
4432
+ else {
3836
4433
  switch (type) {
3837
4434
  case REACT_LEGACY_HIDDEN_TYPE:
3838
- case REACT_DEBUG_TRACING_MODE_TYPE:
3839
4435
  case REACT_STRICT_MODE_TYPE:
3840
4436
  case REACT_PROFILER_TYPE:
3841
4437
  case REACT_FRAGMENT_TYPE:
@@ -3844,7 +4440,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
3844
4440
  renderNodeDestructive(request, task, props.children, -1);
3845
4441
  task.keyPath = type;
3846
4442
  return;
3847
- case REACT_OFFSCREEN_TYPE:
4443
+ case REACT_ACTIVITY_TYPE:
3848
4444
  "hidden" !== props.mode &&
3849
4445
  ((type = task.keyPath),
3850
4446
  (task.keyPath = keyPath),
@@ -3852,14 +4448,12 @@ function renderElement(request, task, keyPath, type, props, ref) {
3852
4448
  (task.keyPath = type));
3853
4449
  return;
3854
4450
  case REACT_SUSPENSE_LIST_TYPE:
3855
- type = task.componentStack;
3856
- task.componentStack = createBuiltInComponentStack(task, "SuspenseList");
3857
- JSCompiler_inline_result = task.keyPath;
4451
+ type = task.keyPath;
3858
4452
  task.keyPath = keyPath;
3859
4453
  renderNodeDestructive(request, task, props.children, -1);
3860
- task.keyPath = JSCompiler_inline_result;
3861
- task.componentStack = type;
4454
+ task.keyPath = type;
3862
4455
  return;
4456
+ case REACT_VIEW_TRANSITION_TYPE:
3863
4457
  case REACT_SCOPE_TYPE:
3864
4458
  throw Error("ReactDOMServer does not yet support scope components.");
3865
4459
  case REACT_SUSPENSE_TYPE:
@@ -3873,31 +4467,35 @@ function renderElement(request, task, keyPath, type, props, ref) {
3873
4467
  task.keyPath = type;
3874
4468
  }
3875
4469
  } else {
3876
- var previousComponentStack = task.componentStack;
3877
- type = task.componentStack = createBuiltInComponentStack(
3878
- task,
3879
- "Suspense"
3880
- );
3881
- var prevKeyPath = task.keyPath;
3882
- ref = task.blockedBoundary;
3883
- var parentHoistableState = task.hoistableState,
3884
- parentSegment = task.blockedSegment;
3885
- propName$31 = props.fallback;
3886
- var content = props.children;
3887
- props = new Set();
3888
- contextType = createSuspenseBoundary(request, props);
4470
+ type = task.keyPath;
4471
+ var parentBoundary = task.blockedBoundary;
4472
+ ref = task.blockedPreamble;
4473
+ var parentHoistableState = task.hoistableState;
4474
+ propName$33 = task.blockedSegment;
4475
+ propName = props.fallback;
4476
+ props = props.children;
4477
+ var fallbackAbortSet = new Set();
4478
+ var newBoundary =
4479
+ 2 > task.formatContext.insertionMode
4480
+ ? createSuspenseBoundary(
4481
+ request,
4482
+ fallbackAbortSet,
4483
+ createPreambleState(),
4484
+ createPreambleState()
4485
+ )
4486
+ : createSuspenseBoundary(request, fallbackAbortSet, null, null);
3889
4487
  null !== request.trackedPostpones &&
3890
- (contextType.trackedContentKeyPath = keyPath);
3891
- propName = createPendingSegment(
4488
+ (newBoundary.trackedContentKeyPath = keyPath);
4489
+ var boundarySegment = createPendingSegment(
3892
4490
  request,
3893
- parentSegment.chunks.length,
3894
- contextType,
4491
+ propName$33.chunks.length,
4492
+ newBoundary,
3895
4493
  task.formatContext,
3896
4494
  !1,
3897
4495
  !1
3898
4496
  );
3899
- parentSegment.children.push(propName);
3900
- parentSegment.lastPushedText = !1;
4497
+ propName$33.children.push(boundarySegment);
4498
+ propName$33.lastPushedText = !1;
3901
4499
  var contentRootSegment = createPendingSegment(
3902
4500
  request,
3903
4501
  0,
@@ -3907,107 +4505,132 @@ function renderElement(request, task, keyPath, type, props, ref) {
3907
4505
  !1
3908
4506
  );
3909
4507
  contentRootSegment.parentFlushed = !0;
3910
- task.blockedBoundary = contextType;
3911
- task.hoistableState = contextType.contentState;
3912
- task.blockedSegment = contentRootSegment;
3913
- task.keyPath = keyPath;
3914
- try {
3915
- if (
3916
- (renderNode(request, task, content, -1),
3917
- contentRootSegment.lastPushedText &&
3918
- contentRootSegment.textEmbedded &&
3919
- contentRootSegment.chunks.push(textSeparator),
3920
- (contentRootSegment.status = 1),
3921
- queueCompletedSegment(contextType, contentRootSegment),
3922
- 0 === contextType.pendingTasks && 0 === contextType.status)
3923
- ) {
3924
- contextType.status = 1;
3925
- task.componentStack = previousComponentStack;
3926
- break a;
4508
+ if (null !== request.trackedPostpones) {
4509
+ newProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
4510
+ defaultProps = [newProps[1], newProps[2], [], null];
4511
+ request.trackedPostpones.workingMap.set(newProps, defaultProps);
4512
+ newBoundary.trackedFallbackNode = defaultProps;
4513
+ task.blockedSegment = boundarySegment;
4514
+ task.blockedPreamble = newBoundary.fallbackPreamble;
4515
+ task.keyPath = newProps;
4516
+ boundarySegment.status = 6;
4517
+ try {
4518
+ renderNode(request, task, propName, -1),
4519
+ boundarySegment.lastPushedText &&
4520
+ boundarySegment.textEmbedded &&
4521
+ boundarySegment.chunks.push(textSeparator),
4522
+ (boundarySegment.status = 1);
4523
+ } catch (thrownValue) {
4524
+ throw (
4525
+ ((boundarySegment.status = 12 === request.status ? 3 : 4),
4526
+ thrownValue)
4527
+ );
4528
+ } finally {
4529
+ (task.blockedSegment = propName$33),
4530
+ (task.blockedPreamble = ref),
4531
+ (task.keyPath = type);
3927
4532
  }
3928
- } catch (error) {
3929
- (contentRootSegment.status = 4),
3930
- (contextType.status = 4),
3931
- (JSCompiler_inline_result = getThrownInfo(
3932
- request,
3933
- task.componentStack
3934
- )),
3935
- (defaultProps = logRecoverableError(
3936
- request,
3937
- error,
3938
- JSCompiler_inline_result
3939
- )),
3940
- (contextType.errorDigest = defaultProps),
3941
- untrackBoundary(request, contextType);
3942
- } finally {
3943
- (task.blockedBoundary = ref),
3944
- (task.hoistableState = parentHoistableState),
3945
- (task.blockedSegment = parentSegment),
3946
- (task.keyPath = prevKeyPath),
3947
- (task.componentStack = previousComponentStack);
4533
+ task = createRenderTask(
4534
+ request,
4535
+ null,
4536
+ props,
4537
+ -1,
4538
+ newBoundary,
4539
+ contentRootSegment,
4540
+ newBoundary.contentPreamble,
4541
+ newBoundary.contentState,
4542
+ task.abortSet,
4543
+ keyPath,
4544
+ task.formatContext,
4545
+ task.context,
4546
+ task.treeContext,
4547
+ task.componentStack,
4548
+ task.isFallback
4549
+ );
4550
+ pushComponentStack(task);
4551
+ request.pingedTasks.push(task);
4552
+ } else {
4553
+ task.blockedBoundary = newBoundary;
4554
+ task.blockedPreamble = newBoundary.contentPreamble;
4555
+ task.hoistableState = newBoundary.contentState;
4556
+ task.blockedSegment = contentRootSegment;
4557
+ task.keyPath = keyPath;
4558
+ contentRootSegment.status = 6;
4559
+ try {
4560
+ if (
4561
+ (renderNode(request, task, props, -1),
4562
+ contentRootSegment.lastPushedText &&
4563
+ contentRootSegment.textEmbedded &&
4564
+ contentRootSegment.chunks.push(textSeparator),
4565
+ (contentRootSegment.status = 1),
4566
+ queueCompletedSegment(newBoundary, contentRootSegment),
4567
+ 0 === newBoundary.pendingTasks && 0 === newBoundary.status)
4568
+ ) {
4569
+ newBoundary.status = 1;
4570
+ 0 === request.pendingRootTasks &&
4571
+ task.blockedPreamble &&
4572
+ preparePreamble(request);
4573
+ break a;
4574
+ }
4575
+ } catch (thrownValue$28) {
4576
+ (newBoundary.status = 4),
4577
+ 12 === request.status
4578
+ ? ((contentRootSegment.status = 3),
4579
+ (newProps = request.fatalError))
4580
+ : ((contentRootSegment.status = 4),
4581
+ (newProps = thrownValue$28)),
4582
+ (defaultProps = getThrownInfo(task.componentStack)),
4583
+ (initialState = logRecoverableError(
4584
+ request,
4585
+ newProps,
4586
+ defaultProps
4587
+ )),
4588
+ (newBoundary.errorDigest = initialState),
4589
+ untrackBoundary(request, newBoundary);
4590
+ } finally {
4591
+ (task.blockedBoundary = parentBoundary),
4592
+ (task.blockedPreamble = ref),
4593
+ (task.hoistableState = parentHoistableState),
4594
+ (task.blockedSegment = propName$33),
4595
+ (task.keyPath = type);
4596
+ }
4597
+ task = createRenderTask(
4598
+ request,
4599
+ null,
4600
+ propName,
4601
+ -1,
4602
+ parentBoundary,
4603
+ boundarySegment,
4604
+ newBoundary.fallbackPreamble,
4605
+ newBoundary.fallbackState,
4606
+ fallbackAbortSet,
4607
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
4608
+ task.formatContext,
4609
+ task.context,
4610
+ task.treeContext,
4611
+ task.componentStack,
4612
+ !0
4613
+ );
4614
+ pushComponentStack(task);
4615
+ request.pingedTasks.push(task);
3948
4616
  }
3949
- JSCompiler_inline_result = [
3950
- keyPath[0],
3951
- "Suspense Fallback",
3952
- keyPath[2]
3953
- ];
3954
- defaultProps = request.trackedPostpones;
3955
- null !== defaultProps &&
3956
- ((previousComponentStack = [
3957
- JSCompiler_inline_result[1],
3958
- JSCompiler_inline_result[2],
3959
- [],
3960
- null
3961
- ]),
3962
- defaultProps.workingMap.set(
3963
- JSCompiler_inline_result,
3964
- previousComponentStack
3965
- ),
3966
- 5 === contextType.status
3967
- ? (defaultProps.workingMap.get(keyPath)[4] =
3968
- previousComponentStack)
3969
- : (contextType.trackedFallbackNode = previousComponentStack));
3970
- task = createRenderTask(
3971
- request,
3972
- null,
3973
- propName$31,
3974
- -1,
3975
- ref,
3976
- propName,
3977
- contextType.fallbackState,
3978
- props,
3979
- JSCompiler_inline_result,
3980
- task.formatContext,
3981
- task.legacyContext,
3982
- task.context,
3983
- task.treeContext,
3984
- type,
3985
- !0
3986
- );
3987
- request.pingedTasks.push(task);
3988
4617
  }
3989
4618
  return;
3990
4619
  }
3991
4620
  if ("object" === typeof type && null !== type)
3992
4621
  switch (type.$$typeof) {
3993
4622
  case REACT_FORWARD_REF_TYPE:
3994
- JSCompiler_inline_result = task.componentStack;
3995
- task.componentStack = {
3996
- tag: 1,
3997
- parent: task.componentStack,
3998
- type: type.render
3999
- };
4000
4623
  if ("ref" in props)
4001
- for (contextType in ((defaultProps = {}), props))
4002
- "ref" !== contextType &&
4003
- (defaultProps[contextType] = props[contextType]);
4004
- else defaultProps = props;
4624
+ for (newBoundary in ((newProps = {}), props))
4625
+ "ref" !== newBoundary &&
4626
+ (newProps[newBoundary] = props[newBoundary]);
4627
+ else newProps = props;
4005
4628
  type = renderWithHooks(
4006
4629
  request,
4007
4630
  task,
4008
4631
  keyPath,
4009
4632
  type.render,
4010
- defaultProps,
4633
+ newProps,
4011
4634
  ref
4012
4635
  );
4013
4636
  finishFunctionComponent(
@@ -4019,7 +4642,6 @@ function renderElement(request, task, keyPath, type, props, ref) {
4019
4642
  actionStateCounter,
4020
4643
  actionStateMatchingIndex
4021
4644
  );
4022
- task.componentStack = JSCompiler_inline_result;
4023
4645
  return;
4024
4646
  case REACT_MEMO_TYPE:
4025
4647
  renderElement(request, task, keyPath, type.type, props, ref);
@@ -4027,16 +4649,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4027
4649
  case REACT_PROVIDER_TYPE:
4028
4650
  case REACT_CONTEXT_TYPE:
4029
4651
  defaultProps = props.children;
4030
- JSCompiler_inline_result = task.keyPath;
4652
+ newProps = task.keyPath;
4031
4653
  props = props.value;
4032
- ref = type._currentValue;
4654
+ initialState = type._currentValue;
4033
4655
  type._currentValue = props;
4034
- propName$31 = currentActiveSnapshot;
4656
+ ref = currentActiveSnapshot;
4035
4657
  currentActiveSnapshot = type = {
4036
- parent: propName$31,
4037
- depth: null === propName$31 ? 0 : propName$31.depth + 1,
4658
+ parent: ref,
4659
+ depth: null === ref ? 0 : ref.depth + 1,
4038
4660
  context: type,
4039
- parentValue: ref,
4661
+ parentValue: initialState,
4040
4662
  value: props
4041
4663
  };
4042
4664
  task.context = type;
@@ -4050,7 +4672,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4050
4672
  request.context._currentValue = request.parentValue;
4051
4673
  request = currentActiveSnapshot = request.parent;
4052
4674
  task.context = request;
4053
- task.keyPath = JSCompiler_inline_result;
4675
+ task.keyPath = newProps;
4054
4676
  return;
4055
4677
  case REACT_CONSUMER_TYPE:
4056
4678
  props = props.children;
@@ -4061,12 +4683,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4061
4683
  task.keyPath = props;
4062
4684
  return;
4063
4685
  case REACT_LAZY_TYPE:
4064
- JSCompiler_inline_result = task.componentStack;
4065
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4066
- defaultProps = type._init;
4067
- type = defaultProps(type._payload);
4068
- renderElement(request, task, keyPath, type, props, void 0);
4069
- task.componentStack = JSCompiler_inline_result;
4686
+ newProps = type._init;
4687
+ type = newProps(type._payload);
4688
+ if (12 === request.status) throw null;
4689
+ renderElement(request, task, keyPath, type, props, ref);
4070
4690
  return;
4071
4691
  }
4072
4692
  throw Error(
@@ -4102,23 +4722,29 @@ function resumeNode(request, task, segmentId, node, childIndex) {
4102
4722
  (task.replay = prevReplay), (task.blockedSegment = null);
4103
4723
  }
4104
4724
  }
4105
- function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4106
- if (null !== task.replay && "number" === typeof task.replay.slots)
4107
- resumeNode(request, task, task.replay.slots, node$jscomp$0, childIndex);
4108
- else if (
4109
- ((task.node = node$jscomp$0),
4110
- (task.childIndex = childIndex),
4111
- null !== node$jscomp$0)
4112
- ) {
4113
- if ("object" === typeof node$jscomp$0) {
4114
- switch (node$jscomp$0.$$typeof) {
4725
+ function renderNodeDestructive(request, task, node, childIndex) {
4726
+ null !== task.replay && "number" === typeof task.replay.slots
4727
+ ? resumeNode(request, task, task.replay.slots, node, childIndex)
4728
+ : ((task.node = node),
4729
+ (task.childIndex = childIndex),
4730
+ (node = task.componentStack),
4731
+ pushComponentStack(task),
4732
+ retryNode(request, task),
4733
+ (task.componentStack = node));
4734
+ }
4735
+ function retryNode(request, task) {
4736
+ var node = task.node,
4737
+ childIndex = task.childIndex;
4738
+ if (null !== node) {
4739
+ if ("object" === typeof node) {
4740
+ switch (node.$$typeof) {
4115
4741
  case REACT_ELEMENT_TYPE:
4116
- var type = node$jscomp$0.type,
4117
- key = node$jscomp$0.key,
4118
- props = node$jscomp$0.props;
4119
- node$jscomp$0 = props.ref;
4120
- var ref = void 0 !== node$jscomp$0 ? node$jscomp$0 : null;
4121
- var name = getComponentNameFromType(type),
4742
+ var type = node.type,
4743
+ key = node.key,
4744
+ props = node.props;
4745
+ node = props.ref;
4746
+ var ref = void 0 !== node ? node : null,
4747
+ name = getComponentNameFromType(type),
4122
4748
  keyOrIndex =
4123
4749
  null == key ? (-1 === childIndex ? 0 : childIndex) : key;
4124
4750
  key = [task.keyPath, name, keyOrIndex];
@@ -4126,24 +4752,20 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4126
4752
  a: {
4127
4753
  var replay = task.replay;
4128
4754
  childIndex = replay.nodes;
4129
- for (
4130
- node$jscomp$0 = 0;
4131
- node$jscomp$0 < childIndex.length;
4132
- node$jscomp$0++
4133
- ) {
4134
- var node = childIndex[node$jscomp$0];
4135
- if (keyOrIndex === node[1]) {
4136
- if (4 === node.length) {
4137
- if (null !== name && name !== node[0])
4755
+ for (node = 0; node < childIndex.length; node++) {
4756
+ var node$jscomp$0 = childIndex[node];
4757
+ if (keyOrIndex === node$jscomp$0[1]) {
4758
+ if (4 === node$jscomp$0.length) {
4759
+ if (null !== name && name !== node$jscomp$0[0])
4138
4760
  throw Error(
4139
4761
  "Expected the resume to render <" +
4140
- node[0] +
4762
+ node$jscomp$0[0] +
4141
4763
  "> in this slot but instead it rendered <" +
4142
4764
  name +
4143
4765
  ">. The tree doesn't match so React will fallback to client rendering."
4144
4766
  );
4145
- var childNodes = node[2];
4146
- name = node[3];
4767
+ var childNodes = node$jscomp$0[2];
4768
+ name = node$jscomp$0[3];
4147
4769
  keyOrIndex = task.node;
4148
4770
  task.replay = {
4149
4771
  nodes: childNodes,
@@ -4172,14 +4794,13 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4172
4794
  x)
4173
4795
  );
4174
4796
  task.replay.pendingTasks--;
4175
- props = getThrownInfo(request, task.componentStack);
4176
- key = request;
4177
- request = task.blockedBoundary;
4797
+ props = getThrownInfo(task.componentStack);
4798
+ key = task.blockedBoundary;
4178
4799
  type = x;
4179
- props = logRecoverableError(key, type, props);
4800
+ props = logRecoverableError(request, type, props);
4180
4801
  abortRemainingReplayNodes(
4181
- key,
4182
4802
  request,
4803
+ key,
4183
4804
  childNodes,
4184
4805
  name,
4185
4806
  type,
@@ -4196,29 +4817,39 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4196
4817
  );
4197
4818
  b: {
4198
4819
  replay = void 0;
4199
- type = node[5];
4200
- ref = node[2];
4201
- name = node[3];
4202
- keyOrIndex = null === node[4] ? [] : node[4][2];
4203
- node = null === node[4] ? null : node[4][3];
4204
- var previousComponentStack = task.componentStack,
4205
- suspenseComponentStack = (task.componentStack =
4206
- createBuiltInComponentStack(task, "Suspense")),
4207
- prevKeyPath = task.keyPath,
4820
+ type = node$jscomp$0[5];
4821
+ ref = node$jscomp$0[2];
4822
+ name = node$jscomp$0[3];
4823
+ keyOrIndex =
4824
+ null === node$jscomp$0[4] ? [] : node$jscomp$0[4][2];
4825
+ node$jscomp$0 =
4826
+ null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4827
+ var prevKeyPath = task.keyPath,
4208
4828
  previousReplaySet = task.replay,
4209
4829
  parentBoundary = task.blockedBoundary,
4210
4830
  parentHoistableState = task.hoistableState,
4211
- content = props.children;
4212
- props = props.fallback;
4213
- var fallbackAbortSet = new Set(),
4214
- resumedBoundary = createSuspenseBoundary(
4215
- request,
4216
- fallbackAbortSet
4217
- );
4218
- resumedBoundary.parentFlushed = !0;
4219
- resumedBoundary.rootSegmentID = type;
4220
- task.blockedBoundary = resumedBoundary;
4221
- task.hoistableState = resumedBoundary.contentState;
4831
+ content = props.children,
4832
+ fallback = props.fallback,
4833
+ fallbackAbortSet = new Set();
4834
+ props =
4835
+ 2 > task.formatContext.insertionMode
4836
+ ? createSuspenseBoundary(
4837
+ request,
4838
+ fallbackAbortSet,
4839
+ createPreambleState(),
4840
+ createPreambleState()
4841
+ )
4842
+ : createSuspenseBoundary(
4843
+ request,
4844
+ fallbackAbortSet,
4845
+ null,
4846
+ null
4847
+ );
4848
+ props.parentFlushed = !0;
4849
+ props.rootSegmentID = type;
4850
+ task.blockedBoundary = props;
4851
+ task.hoistableState = props.contentState;
4852
+ task.keyPath = key;
4222
4853
  task.replay = {
4223
4854
  nodes: ref,
4224
4855
  slots: name,
@@ -4234,58 +4865,53 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4234
4865
  "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
4235
4866
  );
4236
4867
  task.replay.pendingTasks--;
4237
- if (
4238
- 0 === resumedBoundary.pendingTasks &&
4239
- 0 === resumedBoundary.status
4240
- ) {
4241
- resumedBoundary.status = 1;
4242
- request.completedBoundaries.push(resumedBoundary);
4868
+ if (0 === props.pendingTasks && 0 === props.status) {
4869
+ props.status = 1;
4870
+ request.completedBoundaries.push(props);
4243
4871
  break b;
4244
4872
  }
4245
4873
  } catch (error) {
4246
- (resumedBoundary.status = 4),
4247
- (childNodes = getThrownInfo(
4248
- request,
4249
- task.componentStack
4250
- )),
4874
+ (props.status = 4),
4875
+ (childNodes = getThrownInfo(task.componentStack)),
4251
4876
  (replay = logRecoverableError(
4252
4877
  request,
4253
4878
  error,
4254
4879
  childNodes
4255
4880
  )),
4256
- (resumedBoundary.errorDigest = replay),
4881
+ (props.errorDigest = replay),
4257
4882
  task.replay.pendingTasks--,
4258
- request.clientRenderedBoundaries.push(
4259
- resumedBoundary
4260
- );
4883
+ request.clientRenderedBoundaries.push(props);
4261
4884
  } finally {
4262
4885
  (task.blockedBoundary = parentBoundary),
4263
4886
  (task.hoistableState = parentHoistableState),
4264
4887
  (task.replay = previousReplaySet),
4265
- (task.keyPath = prevKeyPath),
4266
- (task.componentStack = previousComponentStack);
4888
+ (task.keyPath = prevKeyPath);
4267
4889
  }
4268
4890
  task = createReplayTask(
4269
4891
  request,
4270
4892
  null,
4271
- { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
4272
- props,
4893
+ {
4894
+ nodes: keyOrIndex,
4895
+ slots: node$jscomp$0,
4896
+ pendingTasks: 0
4897
+ },
4898
+ fallback,
4273
4899
  -1,
4274
4900
  parentBoundary,
4275
- resumedBoundary.fallbackState,
4901
+ props.fallbackState,
4276
4902
  fallbackAbortSet,
4277
4903
  [key[0], "Suspense Fallback", key[2]],
4278
4904
  task.formatContext,
4279
- task.legacyContext,
4280
4905
  task.context,
4281
4906
  task.treeContext,
4282
- suspenseComponentStack,
4907
+ task.componentStack,
4283
4908
  !0
4284
4909
  );
4910
+ pushComponentStack(task);
4285
4911
  request.pingedTasks.push(task);
4286
4912
  }
4287
4913
  }
4288
- childIndex.splice(node$jscomp$0, 1);
4914
+ childIndex.splice(node, 1);
4289
4915
  break a;
4290
4916
  }
4291
4917
  }
@@ -4297,80 +4923,68 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4297
4923
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
4298
4924
  );
4299
4925
  case REACT_LAZY_TYPE:
4300
- childNodes = task.componentStack;
4301
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4302
- props = node$jscomp$0._init;
4303
- node$jscomp$0 = props(node$jscomp$0._payload);
4304
- task.componentStack = childNodes;
4305
- renderNodeDestructive(request, task, node$jscomp$0, childIndex);
4926
+ childNodes = node._init;
4927
+ node = childNodes(node._payload);
4928
+ if (12 === request.status) throw null;
4929
+ renderNodeDestructive(request, task, node, childIndex);
4306
4930
  return;
4307
4931
  }
4308
- if (isArrayImpl(node$jscomp$0)) {
4309
- renderChildrenArray(request, task, node$jscomp$0, childIndex);
4932
+ if (isArrayImpl(node)) {
4933
+ renderChildrenArray(request, task, node, childIndex);
4310
4934
  return;
4311
4935
  }
4312
- null === node$jscomp$0 || "object" !== typeof node$jscomp$0
4936
+ null === node || "object" !== typeof node
4313
4937
  ? (childNodes = null)
4314
4938
  : ((childNodes =
4315
- (MAYBE_ITERATOR_SYMBOL && node$jscomp$0[MAYBE_ITERATOR_SYMBOL]) ||
4316
- node$jscomp$0["@@iterator"]),
4939
+ (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
4940
+ node["@@iterator"]),
4317
4941
  (childNodes = "function" === typeof childNodes ? childNodes : null));
4318
- if (childNodes && (childNodes = childNodes.call(node$jscomp$0))) {
4319
- node$jscomp$0 = childNodes.next();
4320
- if (!node$jscomp$0.done) {
4942
+ if (childNodes && (childNodes = childNodes.call(node))) {
4943
+ node = childNodes.next();
4944
+ if (!node.done) {
4321
4945
  props = [];
4322
- do
4323
- props.push(node$jscomp$0.value),
4324
- (node$jscomp$0 = childNodes.next());
4325
- while (!node$jscomp$0.done);
4946
+ do props.push(node.value), (node = childNodes.next());
4947
+ while (!node.done);
4326
4948
  renderChildrenArray(request, task, props, childIndex);
4327
4949
  }
4328
4950
  return;
4329
4951
  }
4330
- if ("function" === typeof node$jscomp$0.then)
4952
+ if ("function" === typeof node.then)
4331
4953
  return (
4332
4954
  (task.thenableState = null),
4333
- renderNodeDestructive(
4334
- request,
4335
- task,
4336
- unwrapThenable(node$jscomp$0),
4337
- childIndex
4338
- )
4955
+ renderNodeDestructive(request, task, unwrapThenable(node), childIndex)
4339
4956
  );
4340
- if (node$jscomp$0.$$typeof === REACT_CONTEXT_TYPE)
4957
+ if (node.$$typeof === REACT_CONTEXT_TYPE)
4341
4958
  return renderNodeDestructive(
4342
4959
  request,
4343
4960
  task,
4344
- node$jscomp$0._currentValue,
4961
+ node._currentValue,
4345
4962
  childIndex
4346
4963
  );
4347
- childIndex = Object.prototype.toString.call(node$jscomp$0);
4964
+ childIndex = Object.prototype.toString.call(node);
4348
4965
  throw Error(
4349
4966
  "Objects are not valid as a React child (found: " +
4350
4967
  ("[object Object]" === childIndex
4351
- ? "object with keys {" + Object.keys(node$jscomp$0).join(", ") + "}"
4968
+ ? "object with keys {" + Object.keys(node).join(", ") + "}"
4352
4969
  : childIndex) +
4353
4970
  "). If you meant to render a collection of children, use an array instead."
4354
4971
  );
4355
4972
  }
4356
- if ("string" === typeof node$jscomp$0)
4973
+ if ("string" === typeof node)
4357
4974
  (childIndex = task.blockedSegment),
4358
4975
  null !== childIndex &&
4359
4976
  (childIndex.lastPushedText = pushTextInstance(
4360
4977
  childIndex.chunks,
4361
- node$jscomp$0,
4978
+ node,
4362
4979
  request.renderState,
4363
4980
  childIndex.lastPushedText
4364
4981
  ));
4365
- else if (
4366
- "number" === typeof node$jscomp$0 ||
4367
- "bigint" === typeof node$jscomp$0
4368
- )
4982
+ else if ("number" === typeof node || "bigint" === typeof node)
4369
4983
  (childIndex = task.blockedSegment),
4370
4984
  null !== childIndex &&
4371
4985
  (childIndex.lastPushedText = pushTextInstance(
4372
4986
  childIndex.chunks,
4373
- "" + node$jscomp$0,
4987
+ "" + node,
4374
4988
  request.renderState,
4375
4989
  childIndex.lastPushedText
4376
4990
  ));
@@ -4408,7 +5022,7 @@ function renderChildrenArray(request, task, children, childIndex) {
4408
5022
  )
4409
5023
  throw x;
4410
5024
  task.replay.pendingTasks--;
4411
- children = getThrownInfo(request, task.componentStack);
5025
+ children = getThrownInfo(task.componentStack);
4412
5026
  var boundary = task.blockedBoundary,
4413
5027
  error = x;
4414
5028
  children = logRecoverableError(request, error, children);
@@ -4463,9 +5077,56 @@ function untrackBoundary(request, boundary) {
4463
5077
  void 0 !== boundary &&
4464
5078
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
4465
5079
  }
5080
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
5081
+ return createReplayTask(
5082
+ request,
5083
+ thenableState,
5084
+ task.replay,
5085
+ task.node,
5086
+ task.childIndex,
5087
+ task.blockedBoundary,
5088
+ task.hoistableState,
5089
+ task.abortSet,
5090
+ task.keyPath,
5091
+ task.formatContext,
5092
+ task.context,
5093
+ task.treeContext,
5094
+ task.componentStack,
5095
+ task.isFallback
5096
+ );
5097
+ }
5098
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
5099
+ var segment = task.blockedSegment,
5100
+ newSegment = createPendingSegment(
5101
+ request,
5102
+ segment.chunks.length,
5103
+ null,
5104
+ task.formatContext,
5105
+ segment.lastPushedText,
5106
+ !0
5107
+ );
5108
+ segment.children.push(newSegment);
5109
+ segment.lastPushedText = !1;
5110
+ return createRenderTask(
5111
+ request,
5112
+ thenableState,
5113
+ task.node,
5114
+ task.childIndex,
5115
+ task.blockedBoundary,
5116
+ newSegment,
5117
+ task.blockedPreamble,
5118
+ task.hoistableState,
5119
+ task.abortSet,
5120
+ task.keyPath,
5121
+ task.formatContext,
5122
+ task.context,
5123
+ task.treeContext,
5124
+ task.componentStack,
5125
+ task.isFallback
5126
+ );
5127
+ }
4466
5128
  function renderNode(request, task, node, childIndex) {
4467
5129
  var previousFormatContext = task.formatContext,
4468
- previousLegacyContext = task.legacyContext,
4469
5130
  previousContext = task.context,
4470
5131
  previousKeyPath = task.keyPath,
4471
5132
  previousTreeContext = task.treeContext,
@@ -4481,37 +5142,32 @@ function renderNode(request, task, node, childIndex) {
4481
5142
  thrownValue === SuspenseException
4482
5143
  ? getSuspendedThenable()
4483
5144
  : thrownValue),
4484
- "object" === typeof node &&
4485
- null !== node &&
4486
- "function" === typeof node.then)
5145
+ "object" === typeof node && null !== node)
4487
5146
  ) {
4488
- childIndex = getThenableStateAfterSuspending();
4489
- request = createReplayTask(
4490
- request,
4491
- childIndex,
4492
- task.replay,
4493
- task.node,
4494
- task.childIndex,
4495
- task.blockedBoundary,
4496
- task.hoistableState,
4497
- task.abortSet,
4498
- task.keyPath,
4499
- task.formatContext,
4500
- task.legacyContext,
4501
- task.context,
4502
- task.treeContext,
4503
- null !== task.componentStack ? task.componentStack.parent : null,
4504
- task.isFallback
4505
- ).ping;
4506
- node.then(request, request);
4507
- task.formatContext = previousFormatContext;
4508
- task.legacyContext = previousLegacyContext;
4509
- task.context = previousContext;
4510
- task.keyPath = previousKeyPath;
4511
- task.treeContext = previousTreeContext;
4512
- task.componentStack = previousComponentStack;
4513
- switchContext(previousContext);
4514
- return;
5147
+ if ("function" === typeof node.then) {
5148
+ childIndex = getThenableStateAfterSuspending();
5149
+ request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
5150
+ node.then(request, request);
5151
+ task.formatContext = previousFormatContext;
5152
+ task.context = previousContext;
5153
+ task.keyPath = previousKeyPath;
5154
+ task.treeContext = previousTreeContext;
5155
+ task.componentStack = previousComponentStack;
5156
+ switchContext(previousContext);
5157
+ return;
5158
+ }
5159
+ if ("Maximum call stack size exceeded" === node.message) {
5160
+ node = getThenableStateAfterSuspending();
5161
+ node = spawnNewSuspendedReplayTask(request, task, node);
5162
+ request.pingedTasks.push(node);
5163
+ task.formatContext = previousFormatContext;
5164
+ task.context = previousContext;
5165
+ task.keyPath = previousKeyPath;
5166
+ task.treeContext = previousTreeContext;
5167
+ task.componentStack = previousComponentStack;
5168
+ switchContext(previousContext);
5169
+ return;
5170
+ }
4515
5171
  }
4516
5172
  }
4517
5173
  else {
@@ -4519,62 +5175,45 @@ function renderNode(request, task, node, childIndex) {
4519
5175
  chunkLength = segment.chunks.length;
4520
5176
  try {
4521
5177
  return renderNodeDestructive(request, task, node, childIndex);
4522
- } catch (thrownValue$40) {
5178
+ } catch (thrownValue$48) {
4523
5179
  if (
4524
5180
  (resetHooksState(),
4525
5181
  (segment.children.length = childrenLength),
4526
5182
  (segment.chunks.length = chunkLength),
4527
5183
  (node =
4528
- thrownValue$40 === SuspenseException
5184
+ thrownValue$48 === SuspenseException
4529
5185
  ? getSuspendedThenable()
4530
- : thrownValue$40),
4531
- "object" === typeof node &&
4532
- null !== node &&
4533
- "function" === typeof node.then)
5186
+ : thrownValue$48),
5187
+ "object" === typeof node && null !== node)
4534
5188
  ) {
4535
- childIndex = getThenableStateAfterSuspending();
4536
- segment = task.blockedSegment;
4537
- childrenLength = createPendingSegment(
4538
- request,
4539
- segment.chunks.length,
4540
- null,
4541
- task.formatContext,
4542
- segment.lastPushedText,
4543
- !0
4544
- );
4545
- segment.children.push(childrenLength);
4546
- segment.lastPushedText = !1;
4547
- request = createRenderTask(
4548
- request,
4549
- childIndex,
4550
- task.node,
4551
- task.childIndex,
4552
- task.blockedBoundary,
4553
- childrenLength,
4554
- task.hoistableState,
4555
- task.abortSet,
4556
- task.keyPath,
4557
- task.formatContext,
4558
- task.legacyContext,
4559
- task.context,
4560
- task.treeContext,
4561
- null !== task.componentStack ? task.componentStack.parent : null,
4562
- task.isFallback
4563
- ).ping;
4564
- node.then(request, request);
4565
- task.formatContext = previousFormatContext;
4566
- task.legacyContext = previousLegacyContext;
4567
- task.context = previousContext;
4568
- task.keyPath = previousKeyPath;
4569
- task.treeContext = previousTreeContext;
4570
- task.componentStack = previousComponentStack;
4571
- switchContext(previousContext);
4572
- return;
5189
+ if ("function" === typeof node.then) {
5190
+ childIndex = getThenableStateAfterSuspending();
5191
+ request = spawnNewSuspendedRenderTask(request, task, childIndex).ping;
5192
+ node.then(request, request);
5193
+ task.formatContext = previousFormatContext;
5194
+ task.context = previousContext;
5195
+ task.keyPath = previousKeyPath;
5196
+ task.treeContext = previousTreeContext;
5197
+ task.componentStack = previousComponentStack;
5198
+ switchContext(previousContext);
5199
+ return;
5200
+ }
5201
+ if ("Maximum call stack size exceeded" === node.message) {
5202
+ node = getThenableStateAfterSuspending();
5203
+ node = spawnNewSuspendedRenderTask(request, task, node);
5204
+ request.pingedTasks.push(node);
5205
+ task.formatContext = previousFormatContext;
5206
+ task.context = previousContext;
5207
+ task.keyPath = previousKeyPath;
5208
+ task.treeContext = previousTreeContext;
5209
+ task.componentStack = previousComponentStack;
5210
+ switchContext(previousContext);
5211
+ return;
5212
+ }
4573
5213
  }
4574
5214
  }
4575
5215
  }
4576
5216
  task.formatContext = previousFormatContext;
4577
- task.legacyContext = previousLegacyContext;
4578
5217
  task.context = previousContext;
4579
5218
  task.keyPath = previousKeyPath;
4580
5219
  task.treeContext = previousTreeContext;
@@ -4609,7 +5248,12 @@ function abortRemainingReplayNodes(
4609
5248
  node = node[5];
4610
5249
  var request = request$jscomp$0,
4611
5250
  errorDigest = errorDigest$jscomp$0,
4612
- resumedBoundary = createSuspenseBoundary(request, new Set());
5251
+ resumedBoundary = createSuspenseBoundary(
5252
+ request,
5253
+ new Set(),
5254
+ null,
5255
+ null
5256
+ );
4613
5257
  resumedBoundary.parentFlushed = !0;
4614
5258
  resumedBoundary.rootSegmentID = node;
4615
5259
  resumedBoundary.status = 4;
@@ -4635,26 +5279,30 @@ function abortRemainingReplayNodes(
4635
5279
  function abortTask(task, request, error) {
4636
5280
  var boundary = task.blockedBoundary,
4637
5281
  segment = task.blockedSegment;
4638
- null !== segment && (segment.status = 3);
5282
+ if (null !== segment) {
5283
+ if (6 === segment.status) return;
5284
+ segment.status = 3;
5285
+ }
5286
+ segment = getThrownInfo(task.componentStack);
4639
5287
  if (null === boundary) {
4640
- if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
4641
- task = task.replay;
4642
- if (null === task) {
4643
- logRecoverableError(request, error, boundary);
5288
+ if (13 !== request.status && 14 !== request.status) {
5289
+ boundary = task.replay;
5290
+ if (null === boundary) {
5291
+ logRecoverableError(request, error, segment);
4644
5292
  fatalError(request, error);
4645
5293
  return;
4646
5294
  }
4647
- task.pendingTasks--;
4648
- 0 === task.pendingTasks &&
4649
- 0 < task.nodes.length &&
4650
- ((boundary = logRecoverableError(request, error, boundary)),
5295
+ boundary.pendingTasks--;
5296
+ 0 === boundary.pendingTasks &&
5297
+ 0 < boundary.nodes.length &&
5298
+ ((task = logRecoverableError(request, error, segment)),
4651
5299
  abortRemainingReplayNodes(
4652
5300
  request,
4653
5301
  null,
4654
- task.nodes,
4655
- task.slots,
5302
+ boundary.nodes,
5303
+ boundary.slots,
4656
5304
  error,
4657
- boundary
5305
+ task
4658
5306
  ));
4659
5307
  request.pendingRootTasks--;
4660
5308
  0 === request.pendingRootTasks && completeShell(request);
@@ -4663,8 +5311,8 @@ function abortTask(task, request, error) {
4663
5311
  boundary.pendingTasks--,
4664
5312
  4 !== boundary.status &&
4665
5313
  ((boundary.status = 4),
4666
- (task = getThrownInfo(request, task.componentStack)),
4667
- (task = logRecoverableError(request, error, task)),
5314
+ (task = logRecoverableError(request, error, segment)),
5315
+ (boundary.status = 4),
4668
5316
  (boundary.errorDigest = task),
4669
5317
  untrackBoundary(request, boundary),
4670
5318
  boundary.parentFlushed &&
@@ -4718,7 +5366,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
4718
5366
  referrerPolicy: props$jscomp$0.referrerPolicy,
4719
5367
  media: props$jscomp$0.media
4720
5368
  });
4721
- if (2 <= (headers.remainingCapacity -= header.length))
5369
+ if (0 <= (headers.remainingCapacity -= header.length + 2))
4722
5370
  (renderState.resets.style[key] = PRELOAD_NO_CREDS),
4723
5371
  linkHeader && (linkHeader += ", "),
4724
5372
  (linkHeader += header),
@@ -4739,6 +5387,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
4739
5387
  }
4740
5388
  function completeShell(request) {
4741
5389
  null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
5390
+ null === request.trackedPostpones && preparePreamble(request);
4742
5391
  request.onShellError = noop;
4743
5392
  request = request.onShellReady;
4744
5393
  request();
@@ -4751,6 +5400,7 @@ function completeAll(request) {
4751
5400
  : null === request.completedRootSegment ||
4752
5401
  5 !== request.completedRootSegment.status
4753
5402
  );
5403
+ preparePreamble(request);
4754
5404
  request = request.onAllReady;
4755
5405
  request();
4756
5406
  }
@@ -4791,7 +5441,11 @@ function finishedTask(request, boundary, segment) {
4791
5441
  request.completedBoundaries.push(boundary),
4792
5442
  1 === boundary.status &&
4793
5443
  (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
4794
- boundary.fallbackAbortableTasks.clear()))
5444
+ boundary.fallbackAbortableTasks.clear(),
5445
+ 0 === request.pendingRootTasks &&
5446
+ null === request.trackedPostpones &&
5447
+ null !== boundary.contentPreamble &&
5448
+ preparePreamble(request)))
4795
5449
  : null !== segment &&
4796
5450
  segment.parentFlushed &&
4797
5451
  1 === segment.status &&
@@ -4803,7 +5457,7 @@ function finishedTask(request, boundary, segment) {
4803
5457
  0 === request.allPendingTasks && completeAll(request);
4804
5458
  }
4805
5459
  function performWork(request$jscomp$2) {
4806
- if (2 !== request$jscomp$2.status) {
5460
+ if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
4807
5461
  var prevContext = currentActiveSnapshot,
4808
5462
  prevDispatcher = ReactSharedInternals.H;
4809
5463
  ReactSharedInternals.H = HooksDispatcher;
@@ -4825,12 +5479,15 @@ function performWork(request$jscomp$2) {
4825
5479
  if (0 !== task.replay.pendingTasks) {
4826
5480
  switchContext(task.context);
4827
5481
  try {
4828
- renderNodeDestructive(
4829
- request$jscomp$0,
4830
- task,
4831
- task.node,
4832
- task.childIndex
4833
- );
5482
+ "number" === typeof task.replay.slots
5483
+ ? resumeNode(
5484
+ request$jscomp$0,
5485
+ task,
5486
+ task.replay.slots,
5487
+ task.node,
5488
+ task.childIndex
5489
+ )
5490
+ : retryNode(request$jscomp$0, task);
4834
5491
  if (
4835
5492
  1 === task.replay.pendingTasks &&
4836
5493
  0 < task.replay.nodes.length
@@ -4855,19 +5512,17 @@ function performWork(request$jscomp$2) {
4855
5512
  var ping = task.ping;
4856
5513
  x.then(ping, ping);
4857
5514
  task.thenableState = getThenableStateAfterSuspending();
4858
- null !== task.componentStack &&
4859
- (task.componentStack = task.componentStack.parent);
4860
5515
  } else {
4861
5516
  task.replay.pendingTasks--;
4862
5517
  task.abortSet.delete(task);
4863
- var errorInfo = getThrownInfo(
4864
- request$jscomp$0,
4865
- task.componentStack
4866
- );
5518
+ var errorInfo = getThrownInfo(task.componentStack);
4867
5519
  request = void 0;
4868
5520
  var request$jscomp$1 = request$jscomp$0,
4869
5521
  boundary = task.blockedBoundary,
4870
- error$jscomp$0 = x,
5522
+ error$jscomp$0 =
5523
+ 12 === request$jscomp$0.status
5524
+ ? request$jscomp$0.fatalError
5525
+ : x,
4871
5526
  replayNodes = task.replay.nodes,
4872
5527
  resumeSlots = task.replay.slots;
4873
5528
  request = logRecoverableError(
@@ -4898,11 +5553,12 @@ function performWork(request$jscomp$2) {
4898
5553
  (request$jscomp$1 = segment),
4899
5554
  0 === request$jscomp$1.status)
4900
5555
  ) {
5556
+ request$jscomp$1.status = 6;
4901
5557
  switchContext(task.context);
4902
5558
  var childrenLength = request$jscomp$1.children.length,
4903
5559
  chunkLength = request$jscomp$1.chunks.length;
4904
5560
  try {
4905
- renderNodeDestructive(request, task, task.node, task.childIndex),
5561
+ retryNode(request, task),
4906
5562
  request$jscomp$1.lastPushedText &&
4907
5563
  request$jscomp$1.textEmbedded &&
4908
5564
  request$jscomp$1.chunks.push(textSeparator),
@@ -4916,22 +5572,20 @@ function performWork(request$jscomp$2) {
4916
5572
  var x$jscomp$0 =
4917
5573
  thrownValue === SuspenseException
4918
5574
  ? getSuspendedThenable()
4919
- : thrownValue;
5575
+ : 12 === request.status
5576
+ ? request.fatalError
5577
+ : thrownValue;
4920
5578
  if (
4921
5579
  "object" === typeof x$jscomp$0 &&
4922
5580
  null !== x$jscomp$0 &&
4923
5581
  "function" === typeof x$jscomp$0.then
4924
5582
  ) {
5583
+ request$jscomp$1.status = 0;
5584
+ task.thenableState = getThenableStateAfterSuspending();
4925
5585
  var ping$jscomp$0 = task.ping;
4926
5586
  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
4927
- task.thenableState = getThenableStateAfterSuspending();
4928
- null !== task.componentStack &&
4929
- (task.componentStack = task.componentStack.parent);
4930
5587
  } else {
4931
- var errorInfo$jscomp$0 = getThrownInfo(
4932
- request,
4933
- task.componentStack
4934
- );
5588
+ var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
4935
5589
  task.abortSet.delete(task);
4936
5590
  request$jscomp$1.status = 4;
4937
5591
  var boundary$jscomp$0 = task.blockedBoundary;
@@ -4948,9 +5602,11 @@ function performWork(request$jscomp$2) {
4948
5602
  (boundary$jscomp$0.errorDigest = request$jscomp$0),
4949
5603
  untrackBoundary(request, boundary$jscomp$0),
4950
5604
  boundary$jscomp$0.parentFlushed &&
4951
- request.clientRenderedBoundaries.push(
4952
- boundary$jscomp$0
4953
- )));
5605
+ request.clientRenderedBoundaries.push(boundary$jscomp$0),
5606
+ 0 === request.pendingRootTasks &&
5607
+ null === request.trackedPostpones &&
5608
+ null !== boundary$jscomp$0.contentPreamble &&
5609
+ preparePreamble(request)));
4954
5610
  request.allPendingTasks--;
4955
5611
  0 === request.allPendingTasks && completeAll(request);
4956
5612
  }
@@ -4973,6 +5629,85 @@ function performWork(request$jscomp$2) {
4973
5629
  }
4974
5630
  }
4975
5631
  }
5632
+ function preparePreambleFromSubtree(
5633
+ request,
5634
+ segment,
5635
+ collectedPreambleSegments
5636
+ ) {
5637
+ segment.preambleChildren.length &&
5638
+ collectedPreambleSegments.push(segment.preambleChildren);
5639
+ for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)
5640
+ pendingPreambles =
5641
+ preparePreambleFromSegment(
5642
+ request,
5643
+ segment.children[i],
5644
+ collectedPreambleSegments
5645
+ ) || pendingPreambles;
5646
+ return pendingPreambles;
5647
+ }
5648
+ function preparePreambleFromSegment(
5649
+ request,
5650
+ segment,
5651
+ collectedPreambleSegments
5652
+ ) {
5653
+ var boundary = segment.boundary;
5654
+ if (null === boundary)
5655
+ return preparePreambleFromSubtree(
5656
+ request,
5657
+ segment,
5658
+ collectedPreambleSegments
5659
+ );
5660
+ var preamble = boundary.contentPreamble,
5661
+ fallbackPreamble = boundary.fallbackPreamble;
5662
+ if (null === preamble || null === fallbackPreamble) return !1;
5663
+ switch (boundary.status) {
5664
+ case 1:
5665
+ hoistPreambleState(request.renderState, preamble);
5666
+ segment = boundary.completedSegments[0];
5667
+ if (!segment)
5668
+ throw Error(
5669
+ "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
5670
+ );
5671
+ return preparePreambleFromSubtree(
5672
+ request,
5673
+ segment,
5674
+ collectedPreambleSegments
5675
+ );
5676
+ case 5:
5677
+ if (null !== request.trackedPostpones) return !0;
5678
+ case 4:
5679
+ if (1 === segment.status)
5680
+ return (
5681
+ hoistPreambleState(request.renderState, fallbackPreamble),
5682
+ preparePreambleFromSubtree(
5683
+ request,
5684
+ segment,
5685
+ collectedPreambleSegments
5686
+ )
5687
+ );
5688
+ default:
5689
+ return !0;
5690
+ }
5691
+ }
5692
+ function preparePreamble(request) {
5693
+ if (
5694
+ request.completedRootSegment &&
5695
+ null === request.completedPreambleSegments
5696
+ ) {
5697
+ var collectedPreambleSegments = [],
5698
+ hasPendingPreambles = preparePreambleFromSegment(
5699
+ request,
5700
+ request.completedRootSegment,
5701
+ collectedPreambleSegments
5702
+ ),
5703
+ preamble = request.renderState.preamble;
5704
+ if (
5705
+ !1 === hasPendingPreambles ||
5706
+ (preamble.headChunks && preamble.bodyChunks)
5707
+ )
5708
+ request.completedPreambleSegments = collectedPreambleSegments;
5709
+ }
5710
+ }
4976
5711
  function flushSubtree(request, destination, segment, hoistableState) {
4977
5712
  segment.parentFlushed = !0;
4978
5713
  switch (segment.status) {
@@ -5017,21 +5752,27 @@ function flushSegment(request, destination, segment, hoistableState) {
5017
5752
  if (null === boundary)
5018
5753
  return flushSubtree(request, destination, segment, hoistableState);
5019
5754
  boundary.parentFlushed = !0;
5020
- if (4 === boundary.status)
5021
- (boundary = boundary.errorDigest),
5022
- writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary),
5023
- writeChunk(destination, clientRenderedSuspenseBoundaryError1),
5024
- boundary &&
5025
- (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
5026
- writeChunk(destination, escapeTextForBrowser(boundary)),
5027
- writeChunk(
5028
- destination,
5029
- clientRenderedSuspenseBoundaryErrorAttrInterstitial
5030
- )),
5031
- writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2),
5032
- flushSubtree(request, destination, segment, hoistableState);
5033
- else if (1 !== boundary.status)
5034
- 0 === boundary.status && (boundary.rootSegmentID = request.nextSegmentId++),
5755
+ if (4 === boundary.status) {
5756
+ var errorDigest = boundary.errorDigest;
5757
+ writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);
5758
+ writeChunk(destination, clientRenderedSuspenseBoundaryError1);
5759
+ errorDigest &&
5760
+ (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
5761
+ writeChunk(destination, escapeTextForBrowser(errorDigest)),
5762
+ writeChunk(
5763
+ destination,
5764
+ clientRenderedSuspenseBoundaryErrorAttrInterstitial
5765
+ ));
5766
+ writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);
5767
+ flushSubtree(request, destination, segment, hoistableState);
5768
+ (request = boundary.fallbackPreamble) &&
5769
+ writePreambleContribution(destination, request);
5770
+ return writeChunkAndReturn(destination, endSuspenseBoundary);
5771
+ }
5772
+ if (1 !== boundary.status)
5773
+ return (
5774
+ 0 === boundary.status &&
5775
+ (boundary.rootSegmentID = request.nextSegmentId++),
5035
5776
  0 < boundary.completedSegments.length &&
5036
5777
  request.partialBoundaries.push(boundary),
5037
5778
  writeStartPendingSuspenseBoundary(
@@ -5046,29 +5787,34 @@ function flushSegment(request, destination, segment, hoistableState) {
5046
5787
  hoistStylesheetDependency,
5047
5788
  hoistableState
5048
5789
  )),
5049
- flushSubtree(request, destination, segment, hoistableState);
5050
- else if (boundary.byteSize > request.progressiveChunkSize)
5051
- (boundary.rootSegmentID = request.nextSegmentId++),
5790
+ flushSubtree(request, destination, segment, hoistableState),
5791
+ writeChunkAndReturn(destination, endSuspenseBoundary)
5792
+ );
5793
+ if (boundary.byteSize > request.progressiveChunkSize)
5794
+ return (
5795
+ (boundary.rootSegmentID = request.nextSegmentId++),
5052
5796
  request.completedBoundaries.push(boundary),
5053
5797
  writeStartPendingSuspenseBoundary(
5054
5798
  destination,
5055
5799
  request.renderState,
5056
5800
  boundary.rootSegmentID
5057
5801
  ),
5058
- flushSubtree(request, destination, segment, hoistableState);
5059
- else {
5060
- hoistableState &&
5061
- ((segment = boundary.contentState),
5062
- segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
5063
- segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
5064
- writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
5065
- segment = boundary.completedSegments;
5066
- if (1 !== segment.length)
5067
- throw Error(
5068
- "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
5069
- );
5070
- flushSegment(request, destination, segment[0], hoistableState);
5071
- }
5802
+ flushSubtree(request, destination, segment, hoistableState),
5803
+ writeChunkAndReturn(destination, endSuspenseBoundary)
5804
+ );
5805
+ hoistableState &&
5806
+ ((segment = boundary.contentState),
5807
+ segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
5808
+ segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
5809
+ writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
5810
+ segment = boundary.completedSegments;
5811
+ if (1 !== segment.length)
5812
+ throw Error(
5813
+ "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
5814
+ );
5815
+ flushSegment(request, destination, segment[0], hoistableState);
5816
+ (request = boundary.contentPreamble) &&
5817
+ writePreambleContribution(destination, request);
5072
5818
  return writeChunkAndReturn(destination, endSuspenseBoundary);
5073
5819
  }
5074
5820
  function flushSegmentContainer(request, destination, segment, hoistableState) {
@@ -5111,13 +5857,13 @@ function flushCompletedBoundary(request, destination, boundary) {
5111
5857
  ? ((completedSegments.instructions |= 10),
5112
5858
  writeChunk(destination, completeBoundaryWithStylesScript1FullBoth))
5113
5859
  : 0 === (completedSegments.instructions & 8)
5114
- ? ((completedSegments.instructions |= 8),
5115
- writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5116
- : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5860
+ ? ((completedSegments.instructions |= 8),
5861
+ writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5862
+ : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5117
5863
  : 0 === (completedSegments.instructions & 2)
5118
- ? ((completedSegments.instructions |= 2),
5119
- writeChunk(destination, completeBoundaryScript1Full))
5120
- : writeChunk(destination, completeBoundaryScript1Partial);
5864
+ ? ((completedSegments.instructions |= 2),
5865
+ writeChunk(destination, completeBoundaryScript1Full))
5866
+ : writeChunk(destination, completeBoundaryScript1Partial);
5121
5867
  completedSegments = i.toString(16);
5122
5868
  writeChunk(destination, request.boundaryPrefix);
5123
5869
  writeChunk(destination, completedSegments);
@@ -5176,9 +5922,12 @@ function flushCompletedQueues(request, destination) {
5176
5922
  completedRootSegment = request.completedRootSegment;
5177
5923
  if (null !== completedRootSegment) {
5178
5924
  if (5 === completedRootSegment.status) return;
5925
+ var completedPreambleSegments = request.completedPreambleSegments;
5926
+ if (null === completedPreambleSegments) return;
5179
5927
  var renderState = request.renderState,
5180
- htmlChunks = renderState.htmlChunks,
5181
- headChunks = renderState.headChunks,
5928
+ preamble = renderState.preamble,
5929
+ htmlChunks = preamble.htmlChunks,
5930
+ headChunks = preamble.headChunks,
5182
5931
  i$jscomp$0;
5183
5932
  if (htmlChunks) {
5184
5933
  for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
@@ -5219,10 +5968,27 @@ function flushCompletedQueues(request, destination) {
5219
5968
  var hoistableChunks = renderState.hoistableChunks;
5220
5969
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
5221
5970
  writeChunk(destination, hoistableChunks[i$jscomp$0]);
5222
- hoistableChunks.length = 0;
5223
- htmlChunks &&
5224
- null === headChunks &&
5971
+ for (
5972
+ renderState = hoistableChunks.length = 0;
5973
+ renderState < completedPreambleSegments.length;
5974
+ renderState++
5975
+ ) {
5976
+ var segments = completedPreambleSegments[renderState];
5977
+ for (preamble = 0; preamble < segments.length; preamble++)
5978
+ flushSegment(request, destination, segments[preamble], null);
5979
+ }
5980
+ var preamble$jscomp$0 = request.renderState.preamble,
5981
+ headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
5982
+ (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) &&
5225
5983
  writeChunk(destination, endChunkForTag("head"));
5984
+ var bodyChunks = preamble$jscomp$0.bodyChunks;
5985
+ if (bodyChunks)
5986
+ for (
5987
+ completedPreambleSegments = 0;
5988
+ completedPreambleSegments < bodyChunks.length;
5989
+ completedPreambleSegments++
5990
+ )
5991
+ writeChunk(destination, bodyChunks[completedPreambleSegments]);
5226
5992
  flushSegment(request, destination, completedRootSegment, null);
5227
5993
  request.completedRootSegment = null;
5228
5994
  writeBootstrap(destination, request.renderState);
@@ -5316,11 +6082,11 @@ function flushCompletedQueues(request, destination) {
5316
6082
  destinationHasCapacity$1 = !0;
5317
6083
  var partialBoundaries = request.partialBoundaries;
5318
6084
  for (i = 0; i < partialBoundaries.length; i++) {
5319
- var boundary$44 = partialBoundaries[i];
6085
+ var boundary$51 = partialBoundaries[i];
5320
6086
  a: {
5321
6087
  clientRenderedBoundaries = request;
5322
6088
  boundary = destination;
5323
- var completedSegments = boundary$44.completedSegments;
6089
+ var completedSegments = boundary$51.completedSegments;
5324
6090
  for (
5325
6091
  JSCompiler_inline_result = 0;
5326
6092
  JSCompiler_inline_result < completedSegments.length;
@@ -5330,7 +6096,7 @@ function flushCompletedQueues(request, destination) {
5330
6096
  !flushPartiallyCompletedSegment(
5331
6097
  clientRenderedBoundaries,
5332
6098
  boundary,
5333
- boundary$44,
6099
+ boundary$51,
5334
6100
  completedSegments[JSCompiler_inline_result]
5335
6101
  )
5336
6102
  ) {
@@ -5342,7 +6108,7 @@ function flushCompletedQueues(request, destination) {
5342
6108
  completedSegments.splice(0, JSCompiler_inline_result);
5343
6109
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5344
6110
  boundary,
5345
- boundary$44.contentState,
6111
+ boundary$51.contentState,
5346
6112
  clientRenderedBoundaries.renderState
5347
6113
  );
5348
6114
  }
@@ -5375,6 +6141,7 @@ function flushCompletedQueues(request, destination) {
5375
6141
  i.hasHtml && writeChunk(destination, endChunkForTag("html")),
5376
6142
  completeWriting(destination),
5377
6143
  flushBuffered(destination),
6144
+ (request.status = 14),
5378
6145
  destination.end(),
5379
6146
  (request.destination = null))
5380
6147
  : (completeWriting(destination), flushBuffered(destination));
@@ -5382,17 +6149,18 @@ function flushCompletedQueues(request, destination) {
5382
6149
  }
5383
6150
  function startWork(request) {
5384
6151
  request.flushScheduled = null !== request.destination;
5385
- setImmediate(function () {
6152
+ scheduleMicrotask(function () {
5386
6153
  return requestStorage.run(request, performWork, request);
5387
6154
  });
5388
- null === request.trackedPostpones &&
5389
- setImmediate(function () {
5390
- return requestStorage.run(
6155
+ setImmediate(function () {
6156
+ 10 === request.status && (request.status = 11);
6157
+ null === request.trackedPostpones &&
6158
+ requestStorage.run(
5391
6159
  request,
5392
6160
  enqueueEarlyPreloadsAfterInitialWork,
5393
6161
  request
5394
6162
  );
5395
- });
6163
+ });
5396
6164
  }
5397
6165
  function enqueueEarlyPreloadsAfterInitialWork(request) {
5398
6166
  safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
@@ -5410,9 +6178,9 @@ function enqueueFlush(request) {
5410
6178
  }));
5411
6179
  }
5412
6180
  function startFlowing(request, destination) {
5413
- if (1 === request.status)
5414
- (request.status = 2), destination.destroy(request.fatalError);
5415
- else if (2 !== request.status && null === request.destination) {
6181
+ if (13 === request.status)
6182
+ (request.status = 14), destination.destroy(request.fatalError);
6183
+ else if (14 !== request.status && null === request.destination) {
5416
6184
  request.destination = destination;
5417
6185
  try {
5418
6186
  flushCompletedQueues(request, destination);
@@ -5422,13 +6190,19 @@ function startFlowing(request, destination) {
5422
6190
  }
5423
6191
  }
5424
6192
  function abort(request, reason) {
6193
+ if (11 === request.status || 10 === request.status) request.status = 12;
5425
6194
  try {
5426
6195
  var abortableTasks = request.abortableTasks;
5427
6196
  if (0 < abortableTasks.size) {
5428
6197
  var error =
5429
6198
  void 0 === reason
5430
6199
  ? Error("The render was aborted by the server without a reason.")
5431
- : reason;
6200
+ : "object" === typeof reason &&
6201
+ null !== reason &&
6202
+ "function" === typeof reason.then
6203
+ ? Error("The render was aborted by the server with a promise.")
6204
+ : reason;
6205
+ request.fatalError = error;
5432
6206
  abortableTasks.forEach(function (task) {
5433
6207
  return abortTask(task, request, error);
5434
6208
  });
@@ -5436,10 +6210,20 @@ function abort(request, reason) {
5436
6210
  }
5437
6211
  null !== request.destination &&
5438
6212
  flushCompletedQueues(request, request.destination);
5439
- } catch (error$46) {
5440
- logRecoverableError(request, error$46, {}), fatalError(request, error$46);
6213
+ } catch (error$53) {
6214
+ logRecoverableError(request, error$53, {}), fatalError(request, error$53);
5441
6215
  }
5442
6216
  }
6217
+ function ensureCorrectIsomorphicReactVersion() {
6218
+ var isomorphicReactPackageVersion = React.version;
6219
+ if ("19.2.0-canary-5252281c-20250408" !== isomorphicReactPackageVersion)
6220
+ throw Error(
6221
+ 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
6222
+ (isomorphicReactPackageVersion +
6223
+ "\n - react-dom: 19.2.0-canary-5252281c-20250408\nLearn more: https://react.dev/warnings/version-mismatch")
6224
+ );
6225
+ }
6226
+ ensureCorrectIsomorphicReactVersion();
5443
6227
  function createDrainHandler(destination, request) {
5444
6228
  return function () {
5445
6229
  return startFlowing(request, destination);
@@ -5452,280 +6236,100 @@ function createCancelHandler(request, reason) {
5452
6236
  };
5453
6237
  }
5454
6238
  function createRequestImpl(children, options) {
5455
- var JSCompiler_inline_result = options ? options.identifierPrefix : void 0;
5456
- JSCompiler_inline_result = {
5457
- idPrefix:
5458
- void 0 === JSCompiler_inline_result ? "" : JSCompiler_inline_result,
5459
- nextFormID: 0,
5460
- streamingFormat: 0,
5461
- bootstrapScriptContent: options ? options.bootstrapScriptContent : void 0,
5462
- bootstrapScripts: options ? options.bootstrapScripts : void 0,
5463
- bootstrapModules: options ? options.bootstrapModules : void 0,
5464
- instructions: 0,
5465
- hasBody: !1,
5466
- hasHtml: !1,
5467
- unknownResources: {},
5468
- dnsResources: {},
5469
- connectResources: { default: {}, anonymous: {}, credentials: {} },
5470
- imageResources: {},
5471
- styleResources: {},
5472
- scriptResources: {},
5473
- moduleUnknownResources: {},
5474
- moduleScriptResources: {}
5475
- };
5476
- var nonce = options ? options.nonce : void 0,
5477
- importMap = options ? options.importMap : void 0,
5478
- onHeaders = options ? options.onHeaders : void 0,
5479
- maxHeadersLength = options ? options.maxHeadersLength : void 0,
5480
- inlineScriptWithNonce =
5481
- void 0 === nonce
5482
- ? startInlineScript
5483
- : stringToPrecomputedChunk(
5484
- '<script nonce="' + escapeTextForBrowser(nonce) + '">'
5485
- ),
5486
- idPrefix = JSCompiler_inline_result.idPrefix,
5487
- bootstrapChunks = [],
5488
- bootstrapScriptContent = JSCompiler_inline_result.bootstrapScriptContent,
5489
- bootstrapScripts = JSCompiler_inline_result.bootstrapScripts,
5490
- bootstrapModules = JSCompiler_inline_result.bootstrapModules;
5491
- void 0 !== bootstrapScriptContent &&
5492
- bootstrapChunks.push(
5493
- inlineScriptWithNonce,
5494
- ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
5495
- endInlineScript
5496
- );
5497
- bootstrapScriptContent = [];
5498
- void 0 !== importMap &&
5499
- (bootstrapScriptContent.push(importMapScriptStart),
5500
- bootstrapScriptContent.push(
5501
- ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
6239
+ var resumableState = createResumableState(
6240
+ options ? options.identifierPrefix : void 0,
6241
+ options ? options.unstable_externalRuntimeSrc : void 0,
6242
+ options ? options.bootstrapScriptContent : void 0,
6243
+ options ? options.bootstrapScripts : void 0,
6244
+ options ? options.bootstrapModules : void 0
6245
+ );
6246
+ return createRequest(
6247
+ children,
6248
+ resumableState,
6249
+ createRenderState(
6250
+ resumableState,
6251
+ options ? options.nonce : void 0,
6252
+ options ? options.unstable_externalRuntimeSrc : void 0,
6253
+ options ? options.importMap : void 0,
6254
+ options ? options.onHeaders : void 0,
6255
+ options ? options.maxHeadersLength : void 0
5502
6256
  ),
5503
- bootstrapScriptContent.push(importMapScriptEnd));
5504
- importMap = onHeaders
5505
- ? {
5506
- preconnects: "",
5507
- fontPreloads: "",
5508
- highImagePreloads: "",
5509
- remainingCapacity:
5510
- "number" === typeof maxHeadersLength ? maxHeadersLength : 2e3
5511
- }
5512
- : null;
5513
- onHeaders = {
5514
- placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
5515
- segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
5516
- boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
5517
- startInlineScript: inlineScriptWithNonce,
5518
- htmlChunks: null,
5519
- headChunks: null,
5520
- externalRuntimeScript: null,
5521
- bootstrapChunks: bootstrapChunks,
5522
- importMapChunks: bootstrapScriptContent,
5523
- onHeaders: onHeaders,
5524
- headers: importMap,
5525
- resets: {
5526
- font: {},
5527
- dns: {},
5528
- connect: { default: {}, anonymous: {}, credentials: {} },
5529
- image: {},
5530
- style: {}
6257
+ createRootFormatContext(options ? options.namespaceURI : void 0),
6258
+ options ? options.progressiveChunkSize : void 0,
6259
+ options ? options.onError : void 0,
6260
+ options ? options.onAllReady : void 0,
6261
+ options ? options.onShellReady : void 0,
6262
+ options ? options.onShellError : void 0,
6263
+ void 0,
6264
+ options ? options.onPostpone : void 0,
6265
+ options ? options.formState : void 0
6266
+ );
6267
+ }
6268
+ ensureCorrectIsomorphicReactVersion();
6269
+ function createFakeWritable(readable) {
6270
+ return {
6271
+ write: function (chunk) {
6272
+ return readable.push(chunk);
5531
6273
  },
5532
- charsetChunks: [],
5533
- viewportChunks: [],
5534
- hoistableChunks: [],
5535
- preconnects: new Set(),
5536
- fontPreloads: new Set(),
5537
- highImagePreloads: new Set(),
5538
- styles: new Map(),
5539
- bootstrapScripts: new Set(),
5540
- scripts: new Set(),
5541
- bulkPreloads: new Set(),
5542
- preloads: {
5543
- images: new Map(),
5544
- stylesheets: new Map(),
5545
- scripts: new Map(),
5546
- moduleScripts: new Map()
6274
+ end: function () {
6275
+ readable.push(null);
5547
6276
  },
5548
- nonce: nonce,
5549
- hoistableState: null,
5550
- stylesToHoist: !1
5551
- };
5552
- if (void 0 !== bootstrapScripts)
5553
- for (
5554
- inlineScriptWithNonce = 0;
5555
- inlineScriptWithNonce < bootstrapScripts.length;
5556
- inlineScriptWithNonce++
5557
- ) {
5558
- var scriptConfig = bootstrapScripts[inlineScriptWithNonce];
5559
- maxHeadersLength = importMap = void 0;
5560
- bootstrapScriptContent = {
5561
- rel: "preload",
5562
- as: "script",
5563
- fetchPriority: "low",
5564
- nonce: nonce
5565
- };
5566
- "string" === typeof scriptConfig
5567
- ? (bootstrapScriptContent.href = idPrefix = scriptConfig)
5568
- : ((bootstrapScriptContent.href = idPrefix = scriptConfig.src),
5569
- (bootstrapScriptContent.integrity = maxHeadersLength =
5570
- "string" === typeof scriptConfig.integrity
5571
- ? scriptConfig.integrity
5572
- : void 0),
5573
- (bootstrapScriptContent.crossOrigin = importMap =
5574
- "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
5575
- ? void 0
5576
- : "use-credentials" === scriptConfig.crossOrigin
5577
- ? "use-credentials"
5578
- : ""));
5579
- scriptConfig = JSCompiler_inline_result;
5580
- var href = idPrefix;
5581
- scriptConfig.scriptResources[href] = null;
5582
- scriptConfig.moduleScriptResources[href] = null;
5583
- scriptConfig = [];
5584
- pushLinkImpl(scriptConfig, bootstrapScriptContent);
5585
- onHeaders.bootstrapScripts.add(scriptConfig);
5586
- bootstrapChunks.push(startScriptSrc, escapeTextForBrowser(idPrefix));
5587
- nonce && bootstrapChunks.push(scriptNonce, escapeTextForBrowser(nonce));
5588
- "string" === typeof maxHeadersLength &&
5589
- bootstrapChunks.push(
5590
- scriptIntegirty,
5591
- escapeTextForBrowser(maxHeadersLength)
5592
- );
5593
- "string" === typeof importMap &&
5594
- bootstrapChunks.push(
5595
- scriptCrossOrigin,
5596
- escapeTextForBrowser(importMap)
5597
- );
5598
- bootstrapChunks.push(endAsyncScript);
6277
+ destroy: function (error) {
6278
+ readable.destroy(error);
5599
6279
  }
5600
- if (void 0 !== bootstrapModules)
5601
- for (
5602
- bootstrapScripts = 0;
5603
- bootstrapScripts < bootstrapModules.length;
5604
- bootstrapScripts++
5605
- )
5606
- (bootstrapScriptContent = bootstrapModules[bootstrapScripts]),
5607
- (importMap = idPrefix = void 0),
5608
- (maxHeadersLength = {
5609
- rel: "modulepreload",
5610
- fetchPriority: "low",
5611
- nonce: nonce
5612
- }),
5613
- "string" === typeof bootstrapScriptContent
5614
- ? (maxHeadersLength.href = inlineScriptWithNonce =
5615
- bootstrapScriptContent)
5616
- : ((maxHeadersLength.href = inlineScriptWithNonce =
5617
- bootstrapScriptContent.src),
5618
- (maxHeadersLength.integrity = importMap =
5619
- "string" === typeof bootstrapScriptContent.integrity
5620
- ? bootstrapScriptContent.integrity
5621
- : void 0),
5622
- (maxHeadersLength.crossOrigin = idPrefix =
5623
- "string" === typeof bootstrapScriptContent ||
5624
- null == bootstrapScriptContent.crossOrigin
5625
- ? void 0
5626
- : "use-credentials" === bootstrapScriptContent.crossOrigin
5627
- ? "use-credentials"
5628
- : "")),
5629
- (bootstrapScriptContent = JSCompiler_inline_result),
5630
- (scriptConfig = inlineScriptWithNonce),
5631
- (bootstrapScriptContent.scriptResources[scriptConfig] = null),
5632
- (bootstrapScriptContent.moduleScriptResources[scriptConfig] = null),
5633
- (bootstrapScriptContent = []),
5634
- pushLinkImpl(bootstrapScriptContent, maxHeadersLength),
5635
- onHeaders.bootstrapScripts.add(bootstrapScriptContent),
5636
- bootstrapChunks.push(
5637
- startModuleSrc,
5638
- escapeTextForBrowser(inlineScriptWithNonce)
5639
- ),
5640
- nonce && bootstrapChunks.push(scriptNonce, escapeTextForBrowser(nonce)),
5641
- "string" === typeof importMap &&
5642
- bootstrapChunks.push(
5643
- scriptIntegirty,
5644
- escapeTextForBrowser(importMap)
5645
- ),
5646
- "string" === typeof idPrefix &&
5647
- bootstrapChunks.push(
5648
- scriptCrossOrigin,
5649
- escapeTextForBrowser(idPrefix)
5650
- ),
5651
- bootstrapChunks.push(endAsyncScript);
5652
- nonce = options ? options.namespaceURI : void 0;
5653
- nonce = createFormatContext(
5654
- "http://www.w3.org/2000/svg" === nonce
5655
- ? 3
5656
- : "http://www.w3.org/1998/Math/MathML" === nonce
5657
- ? 4
5658
- : 0,
5659
- null,
5660
- 0
5661
- );
5662
- bootstrapModules = options ? options.progressiveChunkSize : void 0;
5663
- bootstrapScripts = options ? options.onError : void 0;
5664
- inlineScriptWithNonce = options ? options.onAllReady : void 0;
5665
- idPrefix = options ? options.onShellReady : void 0;
5666
- importMap = options ? options.onShellError : void 0;
5667
- maxHeadersLength = options ? options.onPostpone : void 0;
5668
- bootstrapScriptContent = options ? options.formState : void 0;
5669
- options = [];
5670
- bootstrapChunks = new Set();
5671
- JSCompiler_inline_result = {
5672
- destination: null,
5673
- flushScheduled: !1,
5674
- resumableState: JSCompiler_inline_result,
5675
- renderState: onHeaders,
5676
- rootFormatContext: nonce,
5677
- progressiveChunkSize:
5678
- void 0 === bootstrapModules ? 12800 : bootstrapModules,
5679
- status: 0,
5680
- fatalError: null,
5681
- nextSegmentId: 0,
5682
- allPendingTasks: 0,
5683
- pendingRootTasks: 0,
5684
- completedRootSegment: null,
5685
- abortableTasks: bootstrapChunks,
5686
- pingedTasks: options,
5687
- clientRenderedBoundaries: [],
5688
- completedBoundaries: [],
5689
- partialBoundaries: [],
5690
- trackedPostpones: null,
5691
- onError:
5692
- void 0 === bootstrapScripts ? defaultErrorHandler : bootstrapScripts,
5693
- onPostpone: void 0 === maxHeadersLength ? noop : maxHeadersLength,
5694
- onAllReady: void 0 === inlineScriptWithNonce ? noop : inlineScriptWithNonce,
5695
- onShellReady: void 0 === idPrefix ? noop : idPrefix,
5696
- onShellError: void 0 === importMap ? noop : importMap,
5697
- onFatalError: noop,
5698
- formState: void 0 === bootstrapScriptContent ? null : bootstrapScriptContent
5699
6280
  };
5700
- onHeaders = createPendingSegment(
5701
- JSCompiler_inline_result,
5702
- 0,
5703
- null,
5704
- nonce,
5705
- !1,
5706
- !1
5707
- );
5708
- onHeaders.parentFlushed = !0;
5709
- children = createRenderTask(
5710
- JSCompiler_inline_result,
5711
- null,
5712
- children,
5713
- -1,
5714
- null,
5715
- onHeaders,
5716
- null,
5717
- bootstrapChunks,
5718
- null,
5719
- nonce,
5720
- emptyContextObject,
5721
- null,
5722
- emptyTreeContext,
5723
- null,
5724
- !1
5725
- );
5726
- options.push(children);
5727
- return JSCompiler_inline_result;
5728
6281
  }
6282
+ exports.prerenderToNodeStream = function (children, options) {
6283
+ return new Promise(function (resolve, reject) {
6284
+ var resumableState = createResumableState(
6285
+ options ? options.identifierPrefix : void 0,
6286
+ options ? options.unstable_externalRuntimeSrc : void 0,
6287
+ options ? options.bootstrapScriptContent : void 0,
6288
+ options ? options.bootstrapScripts : void 0,
6289
+ options ? options.bootstrapModules : void 0
6290
+ ),
6291
+ request = createPrerenderRequest(
6292
+ children,
6293
+ resumableState,
6294
+ createRenderState(
6295
+ resumableState,
6296
+ void 0,
6297
+ options ? options.unstable_externalRuntimeSrc : void 0,
6298
+ options ? options.importMap : void 0,
6299
+ options ? options.onHeaders : void 0,
6300
+ options ? options.maxHeadersLength : void 0
6301
+ ),
6302
+ createRootFormatContext(options ? options.namespaceURI : void 0),
6303
+ options ? options.progressiveChunkSize : void 0,
6304
+ options ? options.onError : void 0,
6305
+ function () {
6306
+ var readable = new stream.Readable({
6307
+ read: function () {
6308
+ startFlowing(request, writable);
6309
+ }
6310
+ }),
6311
+ writable = createFakeWritable(readable);
6312
+ resolve({ prelude: readable });
6313
+ },
6314
+ void 0,
6315
+ void 0,
6316
+ reject,
6317
+ options ? options.onPostpone : void 0
6318
+ );
6319
+ if (options && options.signal) {
6320
+ var signal = options.signal;
6321
+ if (signal.aborted) abort(request, signal.reason);
6322
+ else {
6323
+ var listener = function () {
6324
+ abort(request, signal.reason);
6325
+ signal.removeEventListener("abort", listener);
6326
+ };
6327
+ signal.addEventListener("abort", listener);
6328
+ }
6329
+ }
6330
+ startWork(request);
6331
+ });
6332
+ };
5729
6333
  exports.renderToPipeableStream = function (children, options) {
5730
6334
  var request = createRequestImpl(children, options),
5731
6335
  hasStartedFlowing = !1;
@@ -5742,8 +6346,8 @@ exports.renderToPipeableStream = function (children, options) {
5742
6346
  null === request.trackedPostpones
5743
6347
  ? 0 === request.pendingRootTasks
5744
6348
  : null === request.completedRootSegment
5745
- ? 0 === request.pendingRootTasks
5746
- : 5 !== request.completedRootSegment.status
6349
+ ? 0 === request.pendingRootTasks
6350
+ : 5 !== request.completedRootSegment.status
5747
6351
  );
5748
6352
  startFlowing(request, destination);
5749
6353
  destination.on("drain", createDrainHandler(destination, request));
@@ -5765,4 +6369,4 @@ exports.renderToPipeableStream = function (children, options) {
5765
6369
  }
5766
6370
  };
5767
6371
  };
5768
- exports.version = "19.0.0-beta-4508873393-20240430";
6372
+ exports.version = "19.2.0-canary-5252281c-20250408";