From ea44a179f8fb80b8eb8d2158cc8a07398267733f Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Wed, 23 Apr 2025 16:25:32 +0000 Subject: [PATCH 1/6] Update `react@experimental` --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68f1e035f18e1..81127c2962f7a 100644 --- a/package.json +++ b/package.json @@ -231,13 +231,13 @@ "react-builtin": "npm:react@19.2.0-canary-bc6184dd-20250417", "react-dom": "19.0.0", "react-dom-builtin": "npm:react-dom@19.2.0-canary-bc6184dd-20250417", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-bc6184dd-20250417", - "react-experimental-builtin": "npm:react@0.0.0-experimental-bc6184dd-20250417", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-914319ae-20250423", + "react-experimental-builtin": "npm:react@0.0.0-experimental-914319ae-20250423", "react-is-builtin": "npm:react-is@19.2.0-canary-bc6184dd-20250417", "react-server-dom-turbopack": "19.2.0-canary-bc6184dd-20250417", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-bc6184dd-20250417", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-914319ae-20250423", "react-server-dom-webpack": "19.2.0-canary-bc6184dd-20250417", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-bc6184dd-20250417", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-914319ae-20250423", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -248,7 +248,7 @@ "sass": "1.54.0", "satori": "0.12.2", "scheduler-builtin": "npm:scheduler@0.27.0-canary-bc6184dd-20250417", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-bc6184dd-20250417", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-914319ae-20250423", "seedrandom": "3.0.5", "semver": "7.3.7", "shell-quote": "1.7.3", From 49a0754960d3ce7fc54fded58dd3358db4fabd30 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Wed, 23 Apr 2025 16:25:33 +0000 Subject: [PATCH 2/6] Update `react` --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 81127c2962f7a..b5f2f13801378 100644 --- a/package.json +++ b/package.json @@ -228,15 +228,15 @@ "pretty-ms": "7.0.0", "random-seed": "0.3.0", "react": "19.0.0", - "react-builtin": "npm:react@19.2.0-canary-bc6184dd-20250417", + "react-builtin": "npm:react@19.2.0-canary-914319ae-20250423", "react-dom": "19.0.0", - "react-dom-builtin": "npm:react-dom@19.2.0-canary-bc6184dd-20250417", + "react-dom-builtin": "npm:react-dom@19.2.0-canary-914319ae-20250423", "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-914319ae-20250423", "react-experimental-builtin": "npm:react@0.0.0-experimental-914319ae-20250423", - "react-is-builtin": "npm:react-is@19.2.0-canary-bc6184dd-20250417", - "react-server-dom-turbopack": "19.2.0-canary-bc6184dd-20250417", + "react-is-builtin": "npm:react-is@19.2.0-canary-914319ae-20250423", + "react-server-dom-turbopack": "19.2.0-canary-914319ae-20250423", "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-914319ae-20250423", - "react-server-dom-webpack": "19.2.0-canary-bc6184dd-20250417", + "react-server-dom-webpack": "19.2.0-canary-914319ae-20250423", "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-914319ae-20250423", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", @@ -247,7 +247,7 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.12.2", - "scheduler-builtin": "npm:scheduler@0.27.0-canary-bc6184dd-20250417", + "scheduler-builtin": "npm:scheduler@0.27.0-canary-914319ae-20250423", "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-914319ae-20250423", "seedrandom": "3.0.5", "semver": "7.3.7", @@ -290,10 +290,10 @@ "@types/react": "^19.1.1", "@types/react-dom": "19.1.2", "jest-snapshot": "30.0.0-alpha.6", - "react": "19.2.0-canary-bc6184dd-20250417", - "react-dom": "19.2.0-canary-bc6184dd-20250417", - "react-is": "19.2.0-canary-bc6184dd-20250417", - "scheduler": "0.27.0-canary-bc6184dd-20250417" + "react": "19.2.0-canary-914319ae-20250423", + "react-dom": "19.2.0-canary-914319ae-20250423", + "react-is": "19.2.0-canary-914319ae-20250423", + "scheduler": "0.27.0-canary-914319ae-20250423" }, "patchedDependencies": { "webpack-sources@3.2.3": "patches/webpack-sources@3.2.3.patch", From 9087710cb974d446c81836d271a5098e458f7d98 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Wed, 23 Apr 2025 16:25:34 +0000 Subject: [PATCH 3/6] Updated peer dependency references in apps From 79aac8ceda3665f9abce88c2db90fe586f7de599 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Wed, 23 Apr 2025 16:25:34 +0000 Subject: [PATCH 4/6] Updated peer dependency references in libraries From 43d9d0e784051c7bb5b90d60bbb4dbd2eef756e4 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Wed, 23 Apr 2025 16:25:48 +0000 Subject: [PATCH 5/6] Update lockfile --- pnpm-lock.yaml | 446 ++++++++++++++++++++++++------------------------- 1 file changed, 223 insertions(+), 223 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 659b6fa115d58..01b332d7e2a78 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,10 +16,10 @@ overrides: '@types/react': ^19.1.1 '@types/react-dom': 19.1.2 jest-snapshot: 30.0.0-alpha.6 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 - react-is: 19.2.0-canary-bc6184dd-20250417 - scheduler: 0.27.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 + react-is: 19.2.0-canary-914319ae-20250423 + scheduler: 0.27.0-canary-914319ae-20250423 patchedDependencies: stacktrace-parser@0.1.10: @@ -71,7 +71,7 @@ importers: version: 11.11.0 '@emotion/react': specifier: 11.11.1 - version: 11.11.1(@types/react@19.1.1)(react@19.2.0-canary-bc6184dd-20250417) + version: 11.11.1(@types/react@19.1.1)(react@19.2.0-canary-914319ae-20250423) '@fullhuman/postcss-purgecss': specifier: 1.3.0 version: 1.3.0 @@ -83,7 +83,7 @@ importers: version: 2.2.1(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))) '@mdx-js/react': specifier: 2.2.1 - version: 2.2.1(react@19.2.0-canary-bc6184dd-20250417) + version: 2.2.1(react@19.2.0-canary-914319ae-20250423) '@next/bundle-analyzer': specifier: workspace:* version: link:packages/next-bundle-analyzer @@ -149,7 +149,7 @@ importers: version: 6.1.2(@jest/globals@29.7.0)(@types/jest@29.5.5)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(vitest@3.0.4(@types/node@20.17.6)(sass@1.54.0)(tsx@4.19.2)) '@testing-library/react': specifier: ^15.0.5 - version: 15.0.7(@types/react@19.1.1)(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417) + version: 15.0.7(@types/react@19.1.1)(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423) '@types/busboy': specifier: 1.5.3 version: 1.5.3 @@ -469,44 +469,44 @@ importers: specifier: 0.3.0 version: 0.3.0 react: - specifier: 19.2.0-canary-bc6184dd-20250417 - version: 19.2.0-canary-bc6184dd-20250417 + specifier: 19.2.0-canary-914319ae-20250423 + version: 19.2.0-canary-914319ae-20250423 react-builtin: - specifier: npm:react@19.2.0-canary-bc6184dd-20250417 - version: react@19.2.0-canary-bc6184dd-20250417 + specifier: npm:react@19.2.0-canary-914319ae-20250423 + version: react@19.2.0-canary-914319ae-20250423 react-dom: - specifier: 19.2.0-canary-bc6184dd-20250417 - version: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + specifier: 19.2.0-canary-914319ae-20250423 + version: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) react-dom-builtin: - specifier: npm:react-dom@19.2.0-canary-bc6184dd-20250417 - version: react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + specifier: npm:react-dom@19.2.0-canary-914319ae-20250423 + version: react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) react-dom-experimental-builtin: - specifier: npm:react-dom@0.0.0-experimental-bc6184dd-20250417 - version: react-dom@0.0.0-experimental-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + specifier: npm:react-dom@0.0.0-experimental-914319ae-20250423 + version: react-dom@0.0.0-experimental-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) react-experimental-builtin: - specifier: npm:react@0.0.0-experimental-bc6184dd-20250417 - version: react@0.0.0-experimental-bc6184dd-20250417 + specifier: npm:react@0.0.0-experimental-914319ae-20250423 + version: react@0.0.0-experimental-914319ae-20250423 react-is-builtin: - specifier: npm:react-is@19.2.0-canary-bc6184dd-20250417 - version: react-is@19.2.0-canary-bc6184dd-20250417 + specifier: npm:react-is@19.2.0-canary-914319ae-20250423 + version: react-is@19.2.0-canary-914319ae-20250423 react-server-dom-turbopack: - specifier: 19.2.0-canary-bc6184dd-20250417 - version: 19.2.0-canary-bc6184dd-20250417(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417) + specifier: 19.2.0-canary-914319ae-20250423 + version: 19.2.0-canary-914319ae-20250423(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423) react-server-dom-turbopack-experimental: - specifier: npm:react-server-dom-turbopack@0.0.0-experimental-bc6184dd-20250417 - version: react-server-dom-turbopack@0.0.0-experimental-bc6184dd-20250417(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417) + specifier: npm:react-server-dom-turbopack@0.0.0-experimental-914319ae-20250423 + version: react-server-dom-turbopack@0.0.0-experimental-914319ae-20250423(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423) react-server-dom-webpack: - specifier: 19.2.0-canary-bc6184dd-20250417 - version: 19.2.0-canary-bc6184dd-20250417(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))) + specifier: 19.2.0-canary-914319ae-20250423 + version: 19.2.0-canary-914319ae-20250423(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))) react-server-dom-webpack-experimental: - specifier: npm:react-server-dom-webpack@0.0.0-experimental-bc6184dd-20250417 - version: react-server-dom-webpack@0.0.0-experimental-bc6184dd-20250417(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))) + specifier: npm:react-server-dom-webpack@0.0.0-experimental-914319ae-20250423 + version: react-server-dom-webpack@0.0.0-experimental-914319ae-20250423(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))) react-ssr-prepass: specifier: 1.0.8 - version: 1.0.8(react-is@19.2.0-canary-c44e4a25-20250409)(react@19.2.0-canary-bc6184dd-20250417) + version: 1.0.8(react-is@19.2.0-canary-c44e4a25-20250409)(react@19.2.0-canary-914319ae-20250423) react-virtualized: specifier: 9.22.3 - version: 9.22.3(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417) + version: 9.22.3(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423) relay-compiler: specifier: 13.0.2 version: 13.0.2 @@ -529,11 +529,11 @@ importers: specifier: 0.12.2 version: 0.12.2 scheduler-builtin: - specifier: npm:scheduler@0.27.0-canary-bc6184dd-20250417 - version: scheduler@0.27.0-canary-bc6184dd-20250417 + specifier: npm:scheduler@0.27.0-canary-914319ae-20250423 + version: scheduler@0.27.0-canary-914319ae-20250423 scheduler-experimental-builtin: - specifier: npm:scheduler@0.0.0-experimental-bc6184dd-20250417 - version: scheduler@0.0.0-experimental-bc6184dd-20250417 + specifier: npm:scheduler@0.0.0-experimental-914319ae-20250423 + version: scheduler@0.0.0-experimental-914319ae-20250423 seedrandom: specifier: 3.0.5 version: 3.0.5 @@ -548,13 +548,13 @@ importers: version: 6.0.0 styled-jsx: specifier: 5.1.6 - version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-bc6184dd-20250417) + version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-914319ae-20250423) styled-jsx-plugin-postcss: specifier: 3.0.2 version: 3.0.2 swr: specifier: ^2.2.4 - version: 2.2.4(react@19.2.0-canary-bc6184dd-20250417) + version: 2.2.4(react@19.2.0-canary-914319ae-20250423) tailwindcss: specifier: 3.2.7 version: 3.2.7(postcss@8.4.31) @@ -905,17 +905,17 @@ importers: specifier: 8.4.31 version: 8.4.31 react: - specifier: 19.2.0-canary-bc6184dd-20250417 - version: 19.2.0-canary-bc6184dd-20250417 + specifier: 19.2.0-canary-914319ae-20250423 + version: 19.2.0-canary-914319ae-20250423 react-dom: - specifier: 19.2.0-canary-bc6184dd-20250417 - version: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + specifier: 19.2.0-canary-914319ae-20250423 + version: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) sass: specifier: ^1.3.0 version: 1.77.8 styled-jsx: specifier: 5.1.6 - version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-bc6184dd-20250417) + version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-914319ae-20250423) optionalDependencies: sharp: specifier: ^0.34.1 @@ -1046,13 +1046,13 @@ importers: version: 1.0.5(@swc/helpers@0.5.15)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)) '@storybook/blocks': specifier: 8.6.0 - version: 8.6.0(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3)) + version: 8.6.0(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3)) '@storybook/react': specifier: 8.6.0 - version: 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + version: 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) '@storybook/react-webpack5': specifier: 8.6.0 - version: 8.6.0(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + version: 8.6.0(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) '@storybook/test': specifier: 8.6.0 version: 8.6.0(storybook@8.6.0(prettier@3.3.3)) @@ -1526,7 +1526,7 @@ importers: version: 1.0.35 unistore: specifier: 3.4.1 - version: 3.4.1(react@19.2.0-canary-bc6184dd-20250417) + version: 3.4.1(react@19.2.0-canary-914319ae-20250423) util: specifier: 0.12.4 version: 0.12.4 @@ -1699,8 +1699,8 @@ importers: packages/third-parties: dependencies: react: - specifier: 19.2.0-canary-bc6184dd-20250417 - version: 19.2.0-canary-bc6184dd-20250417 + specifier: 19.2.0-canary-914319ae-20250423 + version: 19.2.0-canary-914319ae-20250423 third-party-capital: specifier: 1.0.20 version: 1.0.20 @@ -1763,14 +1763,14 @@ importers: specifier: 29.5.0 version: 29.5.0 react: - specifier: 19.2.0-canary-bc6184dd-20250417 - version: 19.2.0-canary-bc6184dd-20250417 + specifier: 19.2.0-canary-914319ae-20250423 + version: 19.2.0-canary-914319ae-20250423 react-test-renderer: specifier: 18.2.0 - version: 18.2.0(react@19.2.0-canary-bc6184dd-20250417) + version: 18.2.0(react@19.2.0-canary-914319ae-20250423) styled-jsx: specifier: ^5.1.2 - version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-bc6184dd-20250417) + version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-914319ae-20250423) turbopack/packages/devlow-bench: dependencies: @@ -3500,7 +3500,7 @@ packages: resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: '@types/react': '*' - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true @@ -3517,7 +3517,7 @@ packages: '@emotion/use-insertion-effect-with-fallbacks@1.0.1': resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 '@emotion/utils@1.2.1': resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} @@ -4172,14 +4172,14 @@ packages: '@floating-ui/react-dom@2.1.0': resolution: {integrity: sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 '@floating-ui/react@0.26.16': resolution: {integrity: sha512-HEf43zxZNAI/E781QIVpYSF3K2VH4TTYZpqecjdsFkjsaU1EbaWcM++kw0HXFffj7gDUcBFevX8s0rQGQpxkow==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 '@floating-ui/utils@0.2.2': resolution: {integrity: sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==} @@ -4872,13 +4872,13 @@ packages: resolution: {integrity: sha512-l9ypojKN3PjwO1CSLIsqxi7mA25+7w+xc71Q+JuCCREI0tuGwkZsKbIOpuTATIJOjPh8ycLiW7QxX1LYsRTq6w==} peerDependencies: '@mantine/hooks': 7.10.1 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 '@mantine/hooks@7.11.2': resolution: {integrity: sha512-jhyVe/sbDEG2U8rr2lMecUPgQxcfr5hh9HazqGfkS7ZRIMDO7uJ947yAcTMGGkp5Lxtt5TBFt1Cb6tiB2/1agg==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 '@mapbox/node-pre-gyp@1.0.5': resolution: {integrity: sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==} @@ -4895,13 +4895,13 @@ packages: '@mdx-js/react@2.2.1': resolution: {integrity: sha512-YdXcMcEnqZhzql98RNrqYo9cEhTTesBiCclEtoiQUbJwx87q9453GTapYU6kJ8ZZ2ek1Vp25SiAXEFy5O/eAPw==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 '@mdx-js/react@3.1.0': resolution: {integrity: sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==} peerDependencies: '@types/react': ^19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 '@module-federation/error-codes@0.11.2': resolution: {integrity: sha512-ik1Qnn0I+WyEdprTck9WGlH41vGsVdUg8cfO+ZM02qOb2cZm5Vu3SlxGAobj6g7uAj0g8yINnd7h7Dci40BxQA==} @@ -5586,8 +5586,8 @@ packages: '@storybook/blocks@8.6.0': resolution: {integrity: sha512-3PNxlB5Ooj8CIhttbDxeV6kW7ui+2GEdTngtqhnsUHVjzeTKpilsk2lviOeUzqlyq5FDK+rhpZ3L3DJ9pDvioA==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 storybook: ^8.6.0 peerDependenciesMeta: react: @@ -5637,8 +5637,8 @@ packages: resolution: {integrity: sha512-Nz/UzeYQdUZUhacrPyfkiiysSjydyjgg/p0P9HxB4p/WaJUUjMAcaoaLgy3EXx61zZJ3iD36WPuDkZs5QYrA0A==} engines: {node: '>=14.0.0'} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 '@storybook/instrumenter@8.6.0': resolution: {integrity: sha512-eEY/Hfa3Vj5Nv4vHRHlSqjoyW6oAKNK3rKIXfL/eawQwb7rKhzijDLG5YBH44Hh7dEPIqUp0LEdgpyIY7GXezg==} @@ -5654,8 +5654,8 @@ packages: resolution: {integrity: sha512-04T86VG0UJtiozgZkTR5sY1qM3E0Rgwqwllvyy7kFFdkV+Sv/VsPjW9sC38s9C8FtCYRL8pJZz81ey3oylpIMA==} engines: {node: '>=18.0.0'} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 storybook: ^8.6.0 typescript: '*' peerDependenciesMeta: @@ -5676,16 +5676,16 @@ packages: '@storybook/react-dom-shim@8.6.0': resolution: {integrity: sha512-5Y+vMHhcx0xnaNsLQMbkmjc3zkDn/fGBNsiLH2e4POvW3ZQvOxjoyxAsEQaKwLtFgsdCFSd2tR89F6ItYrA2JQ==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 storybook: ^8.6.0 '@storybook/react-webpack5@8.6.0': resolution: {integrity: sha512-2L9CYDPn1OL0B8K5EU/Wpo9Slg8f0vkYPaPioQnmcK3Q4SJR4JAuDVWHUtNdxhaPOkHIy887Tfrf6BEC/blMaQ==} engines: {node: '>=18.0.0'} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 storybook: ^8.6.0 typescript: '>= 4.2.x' peerDependenciesMeta: @@ -5697,8 +5697,8 @@ packages: engines: {node: '>=18.0.0'} peerDependencies: '@storybook/test': 8.6.0 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 storybook: ^8.6.0 typescript: '>= 4.2.x' peerDependenciesMeta: @@ -5934,8 +5934,8 @@ packages: engines: {node: '>=18'} peerDependencies: '@types/react': ^19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true @@ -12043,7 +12043,7 @@ packages: lucide-react@0.383.0: resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} @@ -14535,23 +14535,23 @@ packages: resolution: {integrity: sha512-APPU8HB2uZnpl6Vt/+0AFoVYgSRtfiP6FLrZgPPTDmqSb2R4qZRbgd0A3VzIFxDt5e+Fozjx79WjLWnF69DK8g==} engines: {node: '>=16.14.0'} - react-dom@0.0.0-experimental-bc6184dd-20250417: - resolution: {integrity: sha512-EyxzmVZaq+ZskGg+56WgFi5eu//3HXGUJJQ3jG5Ryy+tn8KIEOOY3EwOksoBnj8rwnGOBcxKqe0cRyeGXBcP5g==} + react-dom@0.0.0-experimental-914319ae-20250423: + resolution: {integrity: sha512-P6eooBgn1BAEKukFLvPoJ4LMklPzhy1WjF1xzWGQYheuWUuMDH1p27CdjKjfMpx5pGkCihBS5q4C9556QiP3Ew==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 - react-dom@19.2.0-canary-bc6184dd-20250417: - resolution: {integrity: sha512-VTzPURc663JnYz7Bocn9SZBHWG4fg0FmHhpIg3wsv0RgVRigAcpVyTUiWzaGH6AYBrpgZePMJk09bLDLpAmr7g==} + react-dom@19.2.0-canary-914319ae-20250423: + resolution: {integrity: sha512-J4GU0UMUyJGaLzS7mQ5Wiymblhzw2ulNsqLY+fsgT8wbm8VpNeiTrJUi8puCslX9DrswoJJBO2yzhGSceqVC2Q==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 react-dom@19.2.0-canary-c44e4a25-20250409: resolution: {integrity: sha512-H3k6JpW39XBogZz6ptprQ4MRwG83bRONkb+6DzHQChVLY+TWiGNBKJxnJN6VzRoqsBNZFwSu8WdhK5vLtj4h3A==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 - react-is@19.2.0-canary-bc6184dd-20250417: - resolution: {integrity: sha512-fUAwCzZUGLDKdVs7F5wEg5by4V+h68c0w1pSaT14LfQXgWRE4+plT3a7MjDjdmlJgCFG06UH1cTHwhDXGj165Q==} + react-is@19.2.0-canary-914319ae-20250423: + resolution: {integrity: sha512-VT7BiceyjE9ymaaA8ZyUbhXpcCzVoObwldv9UUXwL3aTtOXrQ4ZVpy0IW22wHu7oUxya+XOLTHKoz+Q67bSu5g==} react-is@19.2.0-canary-c44e4a25-20250409: resolution: {integrity: sha512-vF0L6mbn4Gx4TU7srrazt/6aBhLIRWttvNlh6GGI9nsqgvl1RrPKfDuybxjDP/8IZfuMj7/D5CkwwyZUa3i1AQ==} @@ -14562,8 +14562,8 @@ packages: react-number-format@5.4.0: resolution: {integrity: sha512-NWdICrqLhI7rAS8yUeLVd6Wr4cN7UjJ9IBTS0f/a9i7UB4x4Ti70kGnksBtZ7o4Z7YRbvCMMR/jQmkoOBa/4fg==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 react-refresh@0.12.0: resolution: {integrity: sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==} @@ -14574,7 +14574,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': ^19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true @@ -14584,58 +14584,58 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': ^19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true - react-server-dom-turbopack@0.0.0-experimental-bc6184dd-20250417: - resolution: {integrity: sha512-QkXRZx+DZ3PCiyq6Wp6JxZDvu7ff4ttgT7o0Hw74k1qHFaHCDVTK1rAuMJSeWnQ7kk8TZmJL6sIe9PxZK15dXg==} + react-server-dom-turbopack@0.0.0-experimental-914319ae-20250423: + resolution: {integrity: sha512-pM9RN8V/pbklP6i0blKuVu5woZdPjSJhdm2GH9J7Ent7t90rEHxXaSsN/xOXb+oMC6B5QNKjyJDOomsWCGD2fw==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 - react-server-dom-turbopack@19.2.0-canary-bc6184dd-20250417: - resolution: {integrity: sha512-Y75MOOZ8hl5P5tg6+mzNkeAP+VZ7+VHYLpqDzeddzCwVcT5mANgwW93U1jCnPVLPgzQx4kfh7975WKZhadNs/A==} + react-server-dom-turbopack@19.2.0-canary-914319ae-20250423: + resolution: {integrity: sha512-ev5uXWLB0kfDQq8af9cdp6S1X5FSH7iNr23Zz1XIsaWMcRcpLD/ehjqJARIlw9WkkSVZc5WcuJSskWQztJR5dA==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 - react-server-dom-webpack@0.0.0-experimental-bc6184dd-20250417: - resolution: {integrity: sha512-5/VHh+qztilGpRGCIqT5D+sx2Oh1wRIXqP4unFt0Kq0E8qlWMu9oqvYO5KUtGccSubXDBBMz8TRoLVoCn75RsA==} + react-server-dom-webpack@0.0.0-experimental-914319ae-20250423: + resolution: {integrity: sha512-h8FgQfoCwJfSvkUOSGPvQ8ogwM67DCf3eVSCz32kBD7ctfSGwS1T1DXS6GgyjphDDHiAQqjFGTAZJjV5J/GTSA==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 webpack: 5.98.0 - react-server-dom-webpack@19.2.0-canary-bc6184dd-20250417: - resolution: {integrity: sha512-G0AyYW1wSc21V0JSDIiX516ZWiOXVTl3U9CIgCgKto6pvLFRNN+94nzsEJBGT2ftw6bEzZ0rxD5jofQVxYK1wg==} + react-server-dom-webpack@19.2.0-canary-914319ae-20250423: + resolution: {integrity: sha512-k8v/CHKhhlqWefzZ9Sc6xdvU5LmEygld4l14VEMwXlozEilR/j1dPHGxFnPV7cl8ys5GdH3Q7PkDIrMZChlSwQ==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 webpack: 5.98.0 react-shallow-renderer@16.15.0: resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 react-ssr-prepass@1.0.8: resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-is: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-is: 19.2.0-canary-914319ae-20250423 react-style-singleton@2.2.1: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: '@types/react': ^19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true @@ -14643,26 +14643,26 @@ packages: react-test-renderer@18.2.0: resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 react-textarea-autosize@8.5.3: resolution: {integrity: sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==} engines: {node: '>=10'} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 react-virtualized@9.22.3: resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423 - react@0.0.0-experimental-bc6184dd-20250417: - resolution: {integrity: sha512-pfbtjVmOErDmXowa25AuTMtOAtI0jeEM5HGL9LYsjqXkIr1dKHfdcthWyyLZtMRrTvE9Dihlmtn6IS0fn234xw==} + react@0.0.0-experimental-914319ae-20250423: + resolution: {integrity: sha512-n2iBr5TXeotJ9RgYH1nDfMgbTXFdoS6kS1c73rFhqllzDRZ1wk/HXGQiLsR9bd63aZgw+YzRWX12SGXpboNESQ==} engines: {node: '>=0.10.0'} - react@19.2.0-canary-bc6184dd-20250417: - resolution: {integrity: sha512-PvK1Gma7eFuCzFHDsOvcavbyjl6Tobu/Up4eQHWaTIeZes/5wHH1zdx+XUwGEBkbxag3X5ugexvVqB1namNxYw==} + react@19.2.0-canary-914319ae-20250423: + resolution: {integrity: sha512-y8DI3kkJ9mGZOKjNZ3IbNiH8pxHxJZEpUGZfAmSPyresOoWay5mQVKFpiq/ZzSajQDhRmbRBoehhqL0VBoADPg==} engines: {node: '>=0.10.0'} react@19.2.0-canary-c44e4a25-20250409: @@ -15216,11 +15216,11 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.0.0-experimental-bc6184dd-20250417: - resolution: {integrity: sha512-6iruDraThD/SknaX1ZhuLUaaUA6WjHuwyQKPHaXltoeyQebT3N0Gw/9ob6CdOmOO9RtsUqv13IaBKR7lmtiPMg==} + scheduler@0.0.0-experimental-914319ae-20250423: + resolution: {integrity: sha512-sS+HKzSWGcirCS+D6+S2MUXGfbUnvy2mo+hiw6RbPBt+a+C7s2x72l/JkiUabbnaIJEQLh7g5qQ3gFJnxwHe9A==} - scheduler@0.27.0-canary-bc6184dd-20250417: - resolution: {integrity: sha512-u8eSIha5/CQLYdjWIRjz2K6C8iEOQ4e2k6ZcKnVczk4Dk8ofTut7KJwPCsvF9RiKWjIfGixUX1aTFe7AL/zAdw==} + scheduler@0.27.0-canary-914319ae-20250423: + resolution: {integrity: sha512-+aD1zdBxhp3RZwU8dCDCU2VoYbXUZtsiJ4r2MMor1rPUihnY3ZamhxKw06lQN/QJk4BlbowCXf/1P5xLAoCokA==} schema-utils@2.7.1: resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} @@ -15863,7 +15863,7 @@ packages: peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@babel/core': optional: true @@ -15947,7 +15947,7 @@ packages: swr@2.2.4: resolution: {integrity: sha512-njiZ/4RiIhoOlAaLYDqwz5qH/KZXVilRLvomrx83HjzCWTfa+InyfAjv05PSFxnmLzZkNO9ZfvgoqzAaEI4sGQ==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 symbol-observable@1.0.1: resolution: {integrity: sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==} @@ -16747,7 +16747,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': ^19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true @@ -16755,13 +16755,13 @@ packages: use-composed-ref@1.3.0: resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 use-isomorphic-layout-effect@1.1.2: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true @@ -16770,7 +16770,7 @@ packages: resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} peerDependencies: '@types/react': '*' - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true @@ -16780,7 +16780,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': ^19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 peerDependenciesMeta: '@types/react': optional: true @@ -16788,7 +16788,7 @@ packages: use-sync-external-store@1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -19577,17 +19577,17 @@ snapshots: '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.1(@types/react@19.1.1)(react@19.2.0-canary-bc6184dd-20250417)': + '@emotion/react@11.11.1(@types/react@19.1.1)(react@19.2.0-canary-914319ae-20250423)': dependencies: '@babel/runtime': 7.22.5 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.2.0-canary-bc6184dd-20250417) + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.2.0-canary-914319ae-20250423) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 hoist-non-react-statics: 3.3.2 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 optionalDependencies: '@types/react': 19.1.1 transitivePeerDependencies: @@ -19605,9 +19605,9 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.2.0-canary-bc6184dd-20250417)': + '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.2.0-canary-914319ae-20250423)': dependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 '@emotion/utils@1.2.1': {} @@ -21235,11 +21235,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.2.1(react@19.2.0-canary-bc6184dd-20250417)': + '@mdx-js/react@2.2.1(react@19.2.0-canary-914319ae-20250423)': dependencies: '@types/mdx': 2.0.3 '@types/react': 19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 '@mdx-js/react@2.2.1(react@19.2.0-canary-c44e4a25-20250409)': dependencies: @@ -21247,11 +21247,11 @@ snapshots: '@types/react': 19.1.1 react: 19.2.0-canary-c44e4a25-20250409 - '@mdx-js/react@3.1.0(@types/react@19.1.1)(react@19.2.0-canary-bc6184dd-20250417)': + '@mdx-js/react@3.1.0(@types/react@19.1.1)(react@19.2.0-canary-914319ae-20250423)': dependencies: '@types/mdx': 2.0.3 '@types/react': 19.1.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 '@module-federation/error-codes@0.11.2': {} @@ -21976,12 +21976,12 @@ snapshots: '@storybook/addon-docs@8.6.0(@types/react@19.1.1)(storybook@8.6.0(prettier@3.3.3))': dependencies: - '@mdx-js/react': 3.1.0(@types/react@19.1.1)(react@19.2.0-canary-bc6184dd-20250417) - '@storybook/blocks': 8.6.0(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3)) + '@mdx-js/react': 3.1.0(@types/react@19.1.1)(react@19.2.0-canary-914319ae-20250423) + '@storybook/blocks': 8.6.0(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3)) '@storybook/csf-plugin': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - '@storybook/react-dom-shim': 8.6.0(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3)) - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + '@storybook/react-dom-shim': 8.6.0(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3)) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) storybook: 8.6.0(prettier@3.3.3) ts-dedent: 2.2.0 transitivePeerDependencies: @@ -22046,14 +22046,14 @@ snapshots: - '@swc/helpers' - webpack - '@storybook/blocks@8.6.0(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))': + '@storybook/blocks@8.6.0(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))': dependencies: - '@storybook/icons': 1.3.0(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417) + '@storybook/icons': 1.3.0(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423) storybook: 8.6.0(prettier@3.3.3) ts-dedent: 2.2.0 optionalDependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) '@storybook/builder-webpack5@8.6.0(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: @@ -22132,10 +22132,10 @@ snapshots: '@storybook/global@5.0.0': {} - '@storybook/icons@1.3.0(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)': + '@storybook/icons@1.3.0(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)': dependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) '@storybook/instrumenter@8.6.0(storybook@8.6.0(prettier@3.3.3))': dependencies: @@ -22147,17 +22147,17 @@ snapshots: dependencies: storybook: 8.6.0(prettier@3.3.3) - '@storybook/preset-react-webpack@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': + '@storybook/preset-react-webpack@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: '@storybook/core-webpack': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.8.2)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)) '@types/semver': 7.5.6 find-up: 5.0.0 magic-string: 0.30.17 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 react-docgen: 7.1.0 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) resolve: 1.22.8 semver: 7.6.3 storybook: 8.6.0(prettier@3.3.3) @@ -22191,19 +22191,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@storybook/react-dom-shim@8.6.0(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))': + '@storybook/react-dom-shim@8.6.0(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))': dependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) storybook: 8.6.0(prettier@3.3.3) - '@storybook/react-webpack5@8.6.0(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': + '@storybook/react-webpack5@8.6.0(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: '@storybook/builder-webpack5': 8.6.0(@rspack/core@1.3.4(@swc/helpers@0.5.15))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) - '@storybook/preset-react-webpack': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) - '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + '@storybook/preset-react-webpack': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2)(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) storybook: 8.6.0(prettier@3.3.3) optionalDependencies: typescript: 5.8.2 @@ -22216,16 +22216,16 @@ snapshots: - uglify-js - webpack-cli - '@storybook/react@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': + '@storybook/react@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.3.3)))(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: '@storybook/components': 8.6.0(storybook@8.6.0(prettier@3.3.3)) '@storybook/global': 5.0.0 '@storybook/manager-api': 8.6.0(storybook@8.6.0(prettier@3.3.3)) '@storybook/preview-api': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - '@storybook/react-dom-shim': 8.6.0(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(storybook@8.6.0(prettier@3.3.3)) + '@storybook/react-dom-shim': 8.6.0(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(storybook@8.6.0(prettier@3.3.3)) '@storybook/theming': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) storybook: 8.6.0(prettier@3.3.3) optionalDependencies: '@storybook/test': 8.6.0(storybook@8.6.0(prettier@3.3.3)) @@ -22499,13 +22499,13 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 - '@testing-library/react@15.0.7(@types/react@19.1.1)(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)': + '@testing-library/react@15.0.7(@types/react@19.1.1)(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)': dependencies: '@babel/runtime': 7.22.5 '@testing-library/dom': 10.1.0 '@types/react-dom': 19.1.2(@types/react@19.1.1) - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) optionalDependencies: '@types/react': 19.1.1 @@ -28245,7 +28245,7 @@ snapshots: hoist-non-react-statics@3.3.2: dependencies: - react-is: 19.2.0-canary-bc6184dd-20250417 + react-is: 19.2.0-canary-914319ae-20250423 homedir-polyfill@1.0.3: dependencies: @@ -33150,25 +33150,25 @@ snapshots: dependencies: ansi-regex: 5.0.1 ansi-styles: 5.2.0 - react-is: 19.2.0-canary-bc6184dd-20250417 + react-is: 19.2.0-canary-914319ae-20250423 pretty-format@29.5.0: dependencies: '@jest/schemas': 29.4.3 ansi-styles: 5.2.0 - react-is: 19.2.0-canary-bc6184dd-20250417 + react-is: 19.2.0-canary-914319ae-20250423 pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 19.2.0-canary-bc6184dd-20250417 + react-is: 19.2.0-canary-914319ae-20250423 pretty-format@30.0.0-alpha.6: dependencies: '@jest/schemas': 30.0.0-alpha.6 ansi-styles: 5.2.0 - react-is: 19.2.0-canary-bc6184dd-20250417 + react-is: 19.2.0-canary-914319ae-20250423 pretty-ms@7.0.0: dependencies: @@ -33231,7 +33231,7 @@ snapshots: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react-is: 19.2.0-canary-bc6184dd-20250417 + react-is: 19.2.0-canary-914319ae-20250423 property-information@5.6.0: dependencies: @@ -33438,22 +33438,22 @@ snapshots: transitivePeerDependencies: - supports-color - react-dom@0.0.0-experimental-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417): + react-dom@0.0.0-experimental-914319ae-20250423(react@19.2.0-canary-914319ae-20250423): dependencies: - react: 19.2.0-canary-bc6184dd-20250417 - scheduler: 0.27.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + scheduler: 0.27.0-canary-914319ae-20250423 - react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417): + react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423): dependencies: - react: 19.2.0-canary-bc6184dd-20250417 - scheduler: 0.27.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + scheduler: 0.27.0-canary-914319ae-20250423 react-dom@19.2.0-canary-c44e4a25-20250409(react@19.2.0-canary-c44e4a25-20250409): dependencies: react: 19.2.0-canary-c44e4a25-20250409 - scheduler: 0.27.0-canary-bc6184dd-20250417 + scheduler: 0.27.0-canary-914319ae-20250423 - react-is@19.2.0-canary-bc6184dd-20250417: {} + react-is@19.2.0-canary-914319ae-20250423: {} react-is@19.2.0-canary-c44e4a25-20250409: {} @@ -33486,48 +33486,48 @@ snapshots: optionalDependencies: '@types/react': 19.1.1 - react-server-dom-turbopack@0.0.0-experimental-bc6184dd-20250417(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417): + react-server-dom-turbopack@0.0.0-experimental-914319ae-20250423(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) - react-server-dom-turbopack@19.2.0-canary-bc6184dd-20250417(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417): + react-server-dom-turbopack@19.2.0-canary-914319ae-20250423(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) - react-server-dom-webpack@0.0.0-experimental-bc6184dd-20250417(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): + react-server-dom-webpack@0.0.0-experimental-914319ae-20250423(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) webpack: 5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-server-dom-webpack@19.2.0-canary-bc6184dd-20250417(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): + react-server-dom-webpack@19.2.0-canary-914319ae-20250423(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) webpack: 5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-shallow-renderer@16.15.0(react@19.2.0-canary-bc6184dd-20250417): + react-shallow-renderer@16.15.0(react@19.2.0-canary-914319ae-20250423): dependencies: object-assign: 4.1.1 - react: 19.2.0-canary-bc6184dd-20250417 - react-is: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-is: 19.2.0-canary-914319ae-20250423 - react-ssr-prepass@1.0.8(react-is@19.2.0-canary-c44e4a25-20250409)(react@19.2.0-canary-bc6184dd-20250417): + react-ssr-prepass@1.0.8(react-is@19.2.0-canary-c44e4a25-20250409)(react@19.2.0-canary-914319ae-20250423): dependencies: object-is: 1.0.2 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 react-is: 19.2.0-canary-c44e4a25-20250409 react-style-singleton@2.2.1(@types/react@19.1.1)(react@19.2.0-canary-c44e4a25-20250409): @@ -33539,12 +33539,12 @@ snapshots: optionalDependencies: '@types/react': 19.1.1 - react-test-renderer@18.2.0(react@19.2.0-canary-bc6184dd-20250417): + react-test-renderer@18.2.0(react@19.2.0-canary-914319ae-20250423): dependencies: - react: 19.2.0-canary-bc6184dd-20250417 - react-is: 19.2.0-canary-bc6184dd-20250417 - react-shallow-renderer: 16.15.0(react@19.2.0-canary-bc6184dd-20250417) - scheduler: 0.27.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 + react-is: 19.2.0-canary-914319ae-20250423 + react-shallow-renderer: 16.15.0(react@19.2.0-canary-914319ae-20250423) + scheduler: 0.27.0-canary-914319ae-20250423 react-textarea-autosize@8.5.3(@types/react@19.1.1)(react@19.2.0-canary-c44e4a25-20250409): dependencies: @@ -33555,20 +33555,20 @@ snapshots: transitivePeerDependencies: - '@types/react' - react-virtualized@9.22.3(react-dom@19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417))(react@19.2.0-canary-bc6184dd-20250417): + react-virtualized@9.22.3(react-dom@19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423))(react@19.2.0-canary-914319ae-20250423): dependencies: '@babel/runtime': 7.22.5 clsx: 1.1.1 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.2.0-canary-bc6184dd-20250417 - react-dom: 19.2.0-canary-bc6184dd-20250417(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + react-dom: 19.2.0-canary-914319ae-20250423(react@19.2.0-canary-914319ae-20250423) react-lifecycles-compat: 3.0.4 - react@0.0.0-experimental-bc6184dd-20250417: {} + react@0.0.0-experimental-914319ae-20250423: {} - react@19.2.0-canary-bc6184dd-20250417: {} + react@19.2.0-canary-914319ae-20250423: {} react@19.2.0-canary-c44e4a25-20250409: {} @@ -34336,9 +34336,9 @@ snapshots: dependencies: xmlchars: 2.2.0 - scheduler@0.0.0-experimental-bc6184dd-20250417: {} + scheduler@0.0.0-experimental-914319ae-20250423: {} - scheduler@0.27.0-canary-bc6184dd-20250417: {} + scheduler@0.27.0-canary-914319ae-20250423: {} schema-utils@2.7.1: dependencies: @@ -35100,10 +35100,10 @@ snapshots: postcss: 7.0.32 postcss-load-plugins: 2.3.0 - styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-bc6184dd-20250417): + styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.2.0-canary-914319ae-20250423): dependencies: client-only: 0.0.1 - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 optionalDependencies: '@babel/core': 7.22.5 babel-plugin-macros: 3.1.0 @@ -35199,11 +35199,11 @@ snapshots: '@swc/counter': 0.1.3 webpack: 5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))(esbuild@0.24.2) - swr@2.2.4(react@19.2.0-canary-bc6184dd-20250417): + swr@2.2.4(react@19.2.0-canary-914319ae-20250423): dependencies: client-only: 0.0.1 - react: 19.2.0-canary-bc6184dd-20250417 - use-sync-external-store: 1.2.0(react@19.2.0-canary-bc6184dd-20250417) + react: 19.2.0-canary-914319ae-20250423 + use-sync-external-store: 1.2.0(react@19.2.0-canary-914319ae-20250423) symbol-observable@1.0.1: {} @@ -36005,9 +36005,9 @@ snapshots: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 - unistore@3.4.1(react@19.2.0-canary-bc6184dd-20250417): + unistore@3.4.1(react@19.2.0-canary-914319ae-20250423): optionalDependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 universal-github-app-jwt@1.1.1: dependencies: @@ -36133,9 +36133,9 @@ snapshots: optionalDependencies: '@types/react': 19.1.1 - use-sync-external-store@1.2.0(react@19.2.0-canary-bc6184dd-20250417): + use-sync-external-store@1.2.0(react@19.2.0-canary-914319ae-20250423): dependencies: - react: 19.2.0-canary-bc6184dd-20250417 + react: 19.2.0-canary-914319ae-20250423 util-deprecate@1.0.2: {} From f6b8a42b0ef3e5681a708069ef268a4cda166fdf Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Wed, 23 Apr 2025 16:26:25 +0000 Subject: [PATCH 6/6] ncc-compiled --- .../cjs/react-dom-client.development.js | 2448 ++++++++++------- .../cjs/react-dom-client.production.js | 1163 +++++--- .../cjs/react-dom-profiling.development.js | 2448 ++++++++++------- .../cjs/react-dom-profiling.profiling.js | 1135 +++++--- ...t-dom-server-legacy.browser.development.js | 18 +- ...ct-dom-server-legacy.browser.production.js | 18 +- ...eact-dom-server-legacy.node.development.js | 18 +- ...react-dom-server-legacy.node.production.js | 18 +- .../react-dom-server.browser.development.js | 22 +- .../react-dom-server.browser.production.js | 22 +- .../cjs/react-dom-server.bun.production.js | 22 +- .../cjs/react-dom-server.edge.development.js | 22 +- .../cjs/react-dom-server.edge.production.js | 22 +- .../cjs/react-dom-server.node.development.js | 22 +- .../cjs/react-dom-server.node.production.js | 22 +- .../react-dom-unstable_testing.development.js | 2448 ++++++++++------- .../react-dom-unstable_testing.production.js | 1163 +++++--- .../cjs/react-dom.development.js | 2 +- .../cjs/react-dom.production.js | 2 +- .../cjs/react-dom.react-server.development.js | 2 +- .../cjs/react-dom.react-server.production.js | 2 +- .../react-dom-experimental/package.json | 4 +- .../cjs/react-dom-client.development.js | 1408 ++++++---- .../cjs/react-dom-client.production.js | 1049 ++++--- .../cjs/react-dom-profiling.development.js | 1408 ++++++---- .../cjs/react-dom-profiling.profiling.js | 1244 +++++---- ...t-dom-server-legacy.browser.development.js | 18 +- ...ct-dom-server-legacy.browser.production.js | 18 +- ...eact-dom-server-legacy.node.development.js | 18 +- ...react-dom-server-legacy.node.production.js | 18 +- .../react-dom-server.browser.development.js | 22 +- .../react-dom-server.browser.production.js | 22 +- .../cjs/react-dom-server.bun.production.js | 22 +- .../cjs/react-dom-server.edge.development.js | 22 +- .../cjs/react-dom-server.edge.production.js | 22 +- .../cjs/react-dom-server.node.development.js | 22 +- .../cjs/react-dom-server.node.production.js | 22 +- .../react-dom/cjs/react-dom.development.js | 2 +- .../react-dom/cjs/react-dom.production.js | 2 +- .../cjs/react-dom.react-server.development.js | 2 +- .../cjs/react-dom.react-server.production.js | 2 +- .../next/src/compiled/react-dom/package.json | 4 +- .../cjs/react.development.js | 2 +- .../cjs/react.production.js | 2 +- .../cjs/react.react-server.development.js | 2 +- .../cjs/react.react-server.production.js | 2 +- .../next/src/compiled/react-is/package.json | 2 +- ...om-turbopack-client.browser.development.js | 4 +- ...om-turbopack-server.browser.development.js | 30 +- ...dom-turbopack-server.browser.production.js | 27 +- ...r-dom-turbopack-server.edge.development.js | 30 +- ...er-dom-turbopack-server.edge.production.js | 27 +- ...r-dom-turbopack-server.node.development.js | 30 +- ...er-dom-turbopack-server.node.production.js | 27 +- .../package.json | 4 +- ...om-turbopack-client.browser.development.js | 4 +- ...om-turbopack-server.browser.development.js | 30 +- ...dom-turbopack-server.browser.production.js | 27 +- ...r-dom-turbopack-server.edge.development.js | 30 +- ...er-dom-turbopack-server.edge.production.js | 27 +- ...r-dom-turbopack-server.node.development.js | 30 +- ...er-dom-turbopack-server.node.production.js | 27 +- .../react-server-dom-turbopack/package.json | 4 +- ...-dom-webpack-client.browser.development.js | 4 +- ...-dom-webpack-server.browser.development.js | 30 +- ...r-dom-webpack-server.browser.production.js | 27 +- ...ver-dom-webpack-server.edge.development.js | 33 +- ...rver-dom-webpack-server.edge.production.js | 30 +- ...ver-dom-webpack-server.node.development.js | 30 +- ...rver-dom-webpack-server.node.production.js | 27 +- ...bpack-server.node.unbundled.development.js | 30 +- ...ebpack-server.node.unbundled.production.js | 27 +- .../package.json | 4 +- ...-dom-webpack-client.browser.development.js | 4 +- ...-dom-webpack-server.browser.development.js | 30 +- ...r-dom-webpack-server.browser.production.js | 27 +- ...ver-dom-webpack-server.edge.development.js | 33 +- ...rver-dom-webpack-server.edge.production.js | 30 +- ...ver-dom-webpack-server.node.development.js | 30 +- ...rver-dom-webpack-server.node.production.js | 27 +- ...bpack-server.node.unbundled.development.js | 30 +- ...ebpack-server.node.unbundled.production.js | 27 +- .../react-server-dom-webpack/package.json | 4 +- .../compiled/react/cjs/react.development.js | 2 +- .../compiled/react/cjs/react.production.js | 2 +- .../cjs/react.react-server.development.js | 2 +- .../cjs/react.react-server.production.js | 2 +- .../next/src/compiled/unistore/unistore.js | 2 +- 88 files changed, 10473 insertions(+), 6779 deletions(-) diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js index 2cc357543696d..9312a3bb7ff21 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js @@ -146,6 +146,16 @@ } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -1221,6 +1231,16 @@ rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1338,13 +1358,13 @@ (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -1362,6 +1382,7 @@ 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -1898,6 +1919,8 @@ return fiber.type; case 16: return "Lazy"; + case 31: + return "Activity"; case 13: return "Suspense"; case 19: @@ -4296,6 +4319,11 @@ content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -4376,6 +4404,21 @@ (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -4423,6 +4466,12 @@ siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -4546,6 +4595,7 @@ for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -4579,7 +4629,7 @@ diffNode.serverTail.push(description); JSCompiler_temp = "Suspense" === description.type - ? getNextHydratableInstanceAfterSuspenseInstance(JSCompiler_temp) + ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling); } throwOnHydrationMismatch(fiber); @@ -4593,7 +4643,16 @@ "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); nextHydratableInstance = - getNextHydratableInstanceAfterSuspenseInstance(fiber); + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -6997,19 +7056,17 @@ ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current, fiber), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack(fiber) { push(suspenseStackCursor, suspenseStackCursor.current, fiber); @@ -9117,6 +9174,7 @@ var suspenseBoundary = suspenseHandlerStackCursor.current; if (null !== suspenseBoundary) { switch (suspenseBoundary.tag) { + case 31: case 13: return ( null === shellBoundary @@ -9456,7 +9514,18 @@ renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -9468,16 +9537,6 @@ renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -9515,6 +9574,42 @@ propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -10213,74 +10308,54 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2905; - var JSCompiler_object_inline_stack_2904 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2983; + var JSCompiler_object_inline_stack_2982 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2905 = didSuspend) || - (JSCompiler_object_inline_componentStack_2905 = + var JSCompiler_object_inline_digest_2981 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_componentStack_2983 = didSuspend) || + (JSCompiler_object_inline_componentStack_2983 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2905 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2905 = + JSCompiler_object_inline_componentStack_2983 && + ((JSCompiler_object_inline_digest_2981 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_componentStack_2983 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_digest_2981 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - JSCompiler_object_inline_componentStack_2905 = current; - for ( - renderLanes = rootOrSingletonContext; - 8 !== JSCompiler_object_inline_componentStack_2905.nodeType; - - ) { - if (!renderLanes) { - renderLanes = null; - break a; - } - JSCompiler_object_inline_componentStack_2905 = - getNextHydratable( - JSCompiler_object_inline_componentStack_2905.nextSibling - ); - if (null === JSCompiler_object_inline_componentStack_2905) { - renderLanes = null; - break a; - } - } - renderLanes = JSCompiler_object_inline_componentStack_2905; - } - null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { - dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (JSCompiler_object_inline_componentStack_2905 = renderLanes), - (JSCompiler_object_inline_stack_2904 = createFiber( - 18, - null, - null, - NoMode + (current = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + current, + rootOrSingletonContext )), - (JSCompiler_object_inline_stack_2904.stateNode = - JSCompiler_object_inline_componentStack_2905), - (JSCompiler_object_inline_stack_2904.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_stack_2904), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else renderLanes = null; + (renderLanes = + null !== renderLanes && renderLanes.data !== ACTIVITY_START_DATA + ? renderLanes + : null), + null !== renderLanes && + ((JSCompiler_object_inline_componentStack_2983 = { + dehydrated: renderLanes, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }), + (workInProgress.memoizedState = + JSCompiler_object_inline_componentStack_2983), + (JSCompiler_object_inline_componentStack_2983 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_componentStack_2983.return = + workInProgress), + (workInProgress.child = + JSCompiler_object_inline_componentStack_2983), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null); if (null === renderLanes) throw ( (warnNonHydratedInstance(workInProgress, current), @@ -10291,315 +10366,287 @@ : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_message_2902 = - JSCompiler_object_inline_stack_2904.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2904.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_2982.children, + nextFallbackChildren = JSCompiler_object_inline_stack_2982.fallback; + if (JSCompiler_object_inline_digest_2981) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2904 = + (JSCompiler_object_inline_stack_2982 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2902, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_message_2902 = workInProgress.child), - (JSCompiler_object_inline_message_2902.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2902.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2905, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2983, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2904 + JSCompiler_object_inline_stack_2982 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2904.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2982.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2904 = + (JSCompiler_object_inline_stack_2982 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2902, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_message_2902 = workInProgress.child), - (JSCompiler_object_inline_message_2902.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2902.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2905, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2983, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2904 + JSCompiler_object_inline_stack_2982 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2902 + nextPrimaryChildren ); } - var JSCompiler_object_inline_digest_2903 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_digest_2903 && - ((JSCompiler_object_inline_message_2902 = - JSCompiler_object_inline_digest_2903.dehydrated), - null !== JSCompiler_object_inline_message_2902) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2902 = - JSCompiler_object_inline_stack_2904.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2904 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2904.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_message_2902 = - createFiberFromFragment( - JSCompiler_object_inline_message_2902, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_message_2980 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_message_2980) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2982.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_2982 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2982.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_message_2902.flags |= 2), - (JSCompiler_object_inline_stack_2904.return = workInProgress), - (JSCompiler_object_inline_message_2902.return = workInProgress), - (JSCompiler_object_inline_stack_2904.sibling = - JSCompiler_object_inline_message_2902), - (workInProgress.child = JSCompiler_object_inline_stack_2904), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2904 = workInProgress.child), - (JSCompiler_object_inline_stack_2904.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2904.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2905, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2982.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2982.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2982), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2902)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2902)) - ) { - JSCompiler_object_inline_componentStack_2905 = - JSCompiler_object_inline_message_2902.nextSibling && - JSCompiler_object_inline_message_2902.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2905) { - nextFallbackChildren = - JSCompiler_object_inline_componentStack_2905.dgst; - var message = JSCompiler_object_inline_componentStack_2905.msg; - var componentStack = - JSCompiler_object_inline_componentStack_2905.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_componentStack_2905.cstck; - } - JSCompiler_object_inline_message_2902 = message; - JSCompiler_object_inline_digest_2903 = nextFallbackChildren; - JSCompiler_object_inline_stack_2904 = componentStack; - JSCompiler_object_inline_componentStack_2905 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_digest_2903; - componentStack = JSCompiler_object_inline_componentStack_2905; - "POSTPONE" !== nextFallbackChildren && - ((JSCompiler_object_inline_componentStack_2905 = - JSCompiler_object_inline_message_2902 - ? Error(JSCompiler_object_inline_message_2902) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." - )), - (JSCompiler_object_inline_componentStack_2905.stack = - JSCompiler_object_inline_stack_2904 || ""), - (JSCompiler_object_inline_componentStack_2905.digest = - nextFallbackChildren), - (JSCompiler_object_inline_stack_2904 = - void 0 === componentStack ? null : componentStack), - (JSCompiler_object_inline_message_2902 = { - value: JSCompiler_object_inline_componentStack_2905, - source: null, - stack: JSCompiler_object_inline_stack_2904 - }), - "string" === typeof JSCompiler_object_inline_stack_2904 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2905, - JSCompiler_object_inline_message_2902 - ), - queueHydrationError(JSCompiler_object_inline_message_2902)); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + ), + (JSCompiler_object_inline_stack_2982 = workInProgress.child), + (JSCompiler_object_inline_stack_2982.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2982.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2983, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2980)) + ) { + JSCompiler_object_inline_componentStack_2983 = + JSCompiler_object_inline_message_2980.nextSibling && + JSCompiler_object_inline_message_2980.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2983) { + nextPrimaryChildren = + JSCompiler_object_inline_componentStack_2983.dgst; + var message = JSCompiler_object_inline_componentStack_2983.msg; + nextFallbackChildren = + JSCompiler_object_inline_componentStack_2983.stck; + var componentStack = + JSCompiler_object_inline_componentStack_2983.cstck; + } + JSCompiler_object_inline_message_2980 = message; + JSCompiler_object_inline_digest_2981 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2982 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_2983 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_digest_2981; + nextFallbackChildren = JSCompiler_object_inline_message_2980; + componentStack = JSCompiler_object_inline_componentStack_2983; + "POSTPONE" !== nextPrimaryChildren && + ((JSCompiler_object_inline_componentStack_2983 = + nextFallbackChildren + ? Error(nextFallbackChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + )), + (JSCompiler_object_inline_componentStack_2983.stack = + JSCompiler_object_inline_stack_2982 || ""), + (JSCompiler_object_inline_componentStack_2983.digest = + nextPrimaryChildren), + (JSCompiler_object_inline_stack_2982 = + void 0 === componentStack ? null : componentStack), + (nextPrimaryChildren = { + value: JSCompiler_object_inline_componentStack_2983, + source: null, + stack: JSCompiler_object_inline_stack_2982 + }), + "string" === typeof JSCompiler_object_inline_stack_2982 && + CapturedStacks.set( + JSCompiler_object_inline_componentStack_2983, + nextPrimaryChildren + ), + queueHydrationError(nextPrimaryChildren)); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_componentStack_2905 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2905) - ) { - JSCompiler_object_inline_componentStack_2905 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_componentStack_2905 && - ((JSCompiler_object_inline_stack_2904 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2904 = - 0 !== (JSCompiler_object_inline_stack_2904 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2904 - )), - (JSCompiler_object_inline_stack_2904 = - 0 !== - (JSCompiler_object_inline_stack_2904 & - (JSCompiler_object_inline_componentStack_2905.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2904), - 0 !== JSCompiler_object_inline_stack_2904 && - JSCompiler_object_inline_stack_2904 !== - JSCompiler_object_inline_digest_2903.retryLane) - ) - throw ( - ((JSCompiler_object_inline_digest_2903.retryLane = - JSCompiler_object_inline_stack_2904), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2904 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2905, - current, - JSCompiler_object_inline_stack_2904 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_message_2902.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_message_2902.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_digest_2903.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2902.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2904.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_componentStack_2983 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_componentStack_2983) + ) { + JSCompiler_object_inline_componentStack_2983 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_componentStack_2983 && + ((JSCompiler_object_inline_stack_2982 = getBumpedLaneForHydration( + JSCompiler_object_inline_componentStack_2983, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2982 && + JSCompiler_object_inline_stack_2982 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2982), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2982 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_componentStack_2983, + current, + JSCompiler_object_inline_stack_2982 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_message_2980.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_message_2980.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_message_2980.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2982.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_digest_2981) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2902 = - JSCompiler_object_inline_stack_2904.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2982.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2904 = createWorkInProgress( + (JSCompiler_object_inline_message_2980 = componentStack.sibling), + (JSCompiler_object_inline_stack_2982 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2904.children + children: JSCompiler_object_inline_stack_2982.children } )), - (JSCompiler_object_inline_stack_2904.subtreeFlags = + (JSCompiler_object_inline_stack_2982.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_message_2902 = createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_message_2902 + null !== JSCompiler_object_inline_message_2980 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_message_2980, + nextPrimaryChildren )) - : ((JSCompiler_object_inline_message_2902 = createFiberFromFragment( - JSCompiler_object_inline_message_2902, + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_message_2902.flags |= 2)), - (JSCompiler_object_inline_message_2902.return = workInProgress), - (JSCompiler_object_inline_stack_2904.return = workInProgress), - (JSCompiler_object_inline_stack_2904.sibling = - JSCompiler_object_inline_message_2902), - (workInProgress.child = JSCompiler_object_inline_stack_2904), - (JSCompiler_object_inline_stack_2904 = - JSCompiler_object_inline_message_2902), - (JSCompiler_object_inline_message_2902 = workInProgress.child), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2982.return = workInProgress), + (JSCompiler_object_inline_stack_2982.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2982), + (JSCompiler_object_inline_stack_2982 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_message_2980 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_message_2980 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_message_2980, + pool: JSCompiler_object_inline_message_2980 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10607,33 +10654,31 @@ baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_message_2902.memoizedState = - nextFallbackChildren), - (JSCompiler_object_inline_message_2902.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2905, - renderLanes - )), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2983, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2904 + JSCompiler_object_inline_stack_2982 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2904.children + children: JSCompiler_object_inline_stack_2982.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2905 = + ((JSCompiler_object_inline_componentStack_2983 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2905 + null === JSCompiler_object_inline_componentStack_2983 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2905.push(current)); + : JSCompiler_object_inline_componentStack_2983.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10995,6 +11040,14 @@ stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -11073,7 +11126,7 @@ } function beginWork(current, workInProgress, renderLanes) { if (workInProgress._debugNeedsRemount && null !== current) { - renderLanes = createFiberFromTypeAndProps( + var copiedFiber = createFiberFromTypeAndProps( workInProgress.type, workInProgress.key, workInProgress.pendingProps, @@ -11081,19 +11134,19 @@ workInProgress.mode, workInProgress.lanes ); - renderLanes._debugStack = workInProgress._debugStack; - renderLanes._debugTask = workInProgress._debugTask; + copiedFiber._debugStack = workInProgress._debugStack; + copiedFiber._debugTask = workInProgress._debugTask; var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; workInProgress.alternate = null; - renderLanes.index = workInProgress.index; - renderLanes.sibling = workInProgress.sibling; - renderLanes.return = workInProgress.return; - renderLanes.ref = workInProgress.ref; - renderLanes._debugInfo = workInProgress._debugInfo; + copiedFiber.index = workInProgress.index; + copiedFiber.sibling = workInProgress.sibling; + copiedFiber.return = workInProgress.return; + copiedFiber.ref = workInProgress.ref; + copiedFiber._debugInfo = workInProgress._debugInfo; if (workInProgress === returnFiber.child) - returnFiber.child = renderLanes; + returnFiber.child = copiedFiber; else { var prevSibling = returnFiber.child; if (null === prevSibling) @@ -11101,14 +11154,14 @@ for (; prevSibling.sibling !== workInProgress; ) if (((prevSibling = prevSibling.sibling), null === prevSibling)) throw Error("Expected to find the previous sibling."); - prevSibling.sibling = renderLanes; + prevSibling.sibling = copiedFiber; } - workInProgress = returnFiber.deletions; - null === workInProgress + var deletions = returnFiber.deletions; + null === deletions ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) - : workInProgress.push(current); - renderLanes.flags |= 2; - return renderLanes; + : deletions.push(current); + copiedFiber.flags |= 2; + return copiedFiber; } if (null !== current) if ( @@ -11133,92 +11186,95 @@ } else { didReceiveUpdate = !1; - if ((returnFiber = isHydrating)) - warnIfNotHydrating(), - (returnFiber = 0 !== (workInProgress.flags & 1048576)); - returnFiber && - ((returnFiber = workInProgress.index), + var JSCompiler_temp; + if ((JSCompiler_temp = isHydrating)) warnIfNotHydrating(), - pushTreeId(workInProgress, treeForkCount, returnFiber)); + (JSCompiler_temp = 0 !== (workInProgress.flags & 1048576)); + if (JSCompiler_temp) { + var slotIndex = workInProgress.index; + warnIfNotHydrating(); + pushTreeId(workInProgress, treeForkCount, slotIndex); + } } workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - a: if ( - ((returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(workInProgress.elementType)), - (workInProgress.type = current), - "function" === typeof current) - ) - shouldConstruct(current) - ? ((returnFiber = resolveClassComponentProps( - current, - returnFiber - )), - (workInProgress.tag = 1), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ))) - : ((workInProgress.tag = 0), - validateFunctionComponentInDev(workInProgress, current), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ))); - else { - if (void 0 !== current && null !== current) - if ( - ((prevSibling = current.$$typeof), - prevSibling === REACT_FORWARD_REF_TYPE) - ) { - workInProgress.tag = 11; - workInProgress.type = current = - resolveForwardRefForHotReloading(current); - workInProgress = updateForwardRef( - null, - workInProgress, - current, - returnFiber, - renderLanes + a: { + var props = workInProgress.pendingProps; + var Component = callLazyInitInDEV(workInProgress.elementType); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props ); - break a; - } else if (prevSibling === REACT_MEMO_TYPE) { - workInProgress.tag = 14; - workInProgress = updateMemoComponent( + workInProgress.tag = 1; + workInProgress.type = Component = + resolveFunctionForHotReloading(Component); + var JSCompiler_inline_result = updateClassComponent( null, workInProgress, - current, - returnFiber, + Component, + resolvedProps, renderLanes ); - break a; + } else + (workInProgress.tag = 0), + validateFunctionComponentInDev(workInProgress, Component), + (workInProgress.type = Component = + resolveFunctionForHotReloading(Component)), + (JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + props, + renderLanes + )); + else { + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = 11; + workInProgress.type = Component = + resolveForwardRefForHotReloading(Component); + JSCompiler_inline_result = updateForwardRef( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + JSCompiler_inline_result = updateMemoComponent( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } } - workInProgress = ""; - null !== current && - "object" === typeof current && - current.$$typeof === REACT_LAZY_TYPE && - (workInProgress = - " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - current + - ". Lazy element type must resolve to a class or function." + - workInProgress - ); + var hint = ""; + null !== Component && + "object" === typeof Component && + Component.$$typeof === REACT_LAZY_TYPE && + (hint = + " Did you wrap a component in React.lazy() more than once?"); + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + loggedComponent + + ". Lazy element type must resolve to a class or function." + + hint + ); + } } - return workInProgress; + return JSCompiler_inline_result; case 0: return updateFunctionComponent( current, @@ -11228,19 +11284,17 @@ renderLanes ); case 1: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component = workInProgress.type, + _resolvedProps4 = resolveClassComponentProps( + _Component, workInProgress.pendingProps - )), - updateClassComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + ); + return updateClassComponent( + current, + workInProgress, + _Component, + _resolvedProps4, + renderLanes ); case 3: a: { @@ -11252,15 +11306,15 @@ throw Error( "Should have a current fiber. This is a bug in React." ); - returnFiber = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - prevSibling = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, returnFiber, null, renderLanes); - var nextState = workInProgress.memoizedState; - returnFiber = nextState.cache; - pushProvider(workInProgress, CacheContext, returnFiber); - returnFiber !== prevState.cache && + processUpdateQueue(workInProgress, nextProps, null, renderLanes); + var nextState = workInProgress.memoizedState, + nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -11268,296 +11322,303 @@ !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - returnFiber = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: returnFiber, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (returnFiber !== prevSibling) { - prevSibling = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error( "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering." ), workInProgress ); - queueHydrationError(prevSibling); - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; didSuspendOrErrorDEV = !1; hydrationDiffRootDEV = null; rootOrSingletonContext = !0; - current = mountChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - ); - for (workInProgress.child = current; current; ) - (current.flags = (current.flags & -3) | 4096), - (current = current.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), + (node = node.sibling); } - else { + } else { resetHydrationState(); - if (returnFiber === prevSibling) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = + bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } reconcileChildren( current, workInProgress, - returnFiber, + nextChildren, renderLanes ); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (current = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = current) - : isHydrating || - ((current = workInProgress.type), - (renderLanes = workInProgress.pendingProps), - (returnFiber = requiredContext( - rootInstanceStackCursor.current - )), - (returnFiber = - getOwnerDocumentFromRootContainer( - returnFiber - ).createElement(current)), - (returnFiber[internalInstanceKey] = workInProgress), - (returnFiber[internalPropsKey] = renderLanes), - setInitialProperties(returnFiber, current, renderLanes), - markNodeAsHoistable(returnFiber), - (workInProgress.stateNode = returnFiber)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + rootContainerInstance = requiredContext( + rootInstanceStackCursor.current + ), + domElement = getOwnerDocumentFromRootContainer( + rootContainerInstance + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((returnFiber = requiredContext(rootInstanceStackCursor.current)), - (prevSibling = getHostContext()), - (returnFiber = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, - returnFiber, - prevSibling, - !1 - )), - didSuspendOrErrorDEV || - ((prevSibling = diffHydratedProperties( - returnFiber, - workInProgress.type, - workInProgress.pendingProps, - prevSibling - )), - null !== prevSibling && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevSibling)), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (prevSibling = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = prevSibling), - (nextHydratableInstance = getNextHydratable( - returnFiber.firstChild - ))) - : (nextHydratableInstance = prevSibling)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var currentRootContainer = requiredContext( + rootInstanceStackCursor.current + ), + currentHostContext = getHostContext(), + instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + currentRootContainer, + currentHostContext, + !1 + )); + if (!didSuspendOrErrorDEV) { + var differences = diffHydratedProperties( + instance, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext + ); + null !== differences && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences); + } + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable( + instance.firstChild + ))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: - return ( - null === current && - isHydrating && - ((prevState = getHostContext()), - (returnFiber = validateDOMNesting( + if (null === current && isHydrating) { + var currentHostContext$jscomp$0 = getHostContext(), + shouldKeepWarning = validateDOMNesting( workInProgress.type, - prevState.ancestorInfo - )), - (prevSibling = nextHydratableInstance), - (nextState = !prevSibling) || - ((nextState = canHydrateInstance( - prevSibling, - workInProgress.type, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== nextState - ? ((workInProgress.stateNode = nextState), - didSuspendOrErrorDEV || - ((prevState = diffHydratedProperties( - nextState, - workInProgress.type, - workInProgress.pendingProps, - prevState - )), - null !== prevState && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevState)), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - nextState.firstChild - )), - (rootOrSingletonContext = !1), - (prevState = !0)) - : (prevState = !1), - (nextState = !prevState)), - nextState && - (returnFiber && - warnNonHydratedInstance(workInProgress, prevSibling), - throwOnHydrationMismatch(workInProgress))), - pushHostContext(workInProgress), - (prevSibling = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (returnFiber = prevState.children), - shouldSetTextContent(prevSibling, prevState) - ? (returnFiber = null) - : null !== nextState && - shouldSetTextContent(prevSibling, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((prevSibling = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes - )), - (HostTransitionContext._currentValue = prevSibling)), - markRef(current, workInProgress), - reconcileChildren( + currentHostContext$jscomp$0.ancestorInfo + ), + nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if (!(JSCompiler_temp$jscomp$0 = !nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== instance$jscomp$0) { + workInProgress.stateNode = instance$jscomp$0; + if (!didSuspendOrErrorDEV) { + var differences$jscomp$0 = diffHydratedProperties( + instance$jscomp$0, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext$jscomp$0 + ); + null !== differences$jscomp$0 && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences$jscomp$0); + } + hydrationParentFiber = workInProgress; + nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + ); + rootOrSingletonContext = !1; + var JSCompiler_inline_result$jscomp$1 = !0; + } else JSCompiler_inline_result$jscomp$1 = !1; + JSCompiler_temp$jscomp$0 = !JSCompiler_inline_result$jscomp$1; + } + JSCompiler_temp$jscomp$0 && + (shouldKeepWarning && + warnNonHydratedInstance(workInProgress, nextInstance), + throwOnHydrationMismatch(workInProgress)); + } + pushHostContext(workInProgress); + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && + (workInProgress.flags |= 32); + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, - returnFiber, + TransitionAwareHostComponent, + null, + null, renderLanes - ), - workInProgress.child + ); + HostTransitionContext._currentValue = newState; + } + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes ); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - ((current = workInProgress.pendingProps), - (renderLanes = getHostContext()), - (returnFiber = renderLanes.ancestorInfo.current), - (current = - null != returnFiber - ? validateTextNesting( - current, - returnFiber.tag, - renderLanes.ancestorInfo.implicitRootScope - ) - : !0), - (renderLanes = nextHydratableInstance), - (returnFiber = !renderLanes) || - ((returnFiber = canHydrateTextInstance( - renderLanes, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== returnFiber - ? ((workInProgress.stateNode = returnFiber), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (returnFiber = !0)) - : (returnFiber = !1), - (returnFiber = !returnFiber)), - returnFiber && - (current && - warnNonHydratedInstance(workInProgress, renderLanes), - throwOnHydrationMismatch(workInProgress))), - null - ); + if (null === current && isHydrating) { + var text = workInProgress.pendingProps, + currentHostContext$jscomp$1 = getHostContext(), + ancestor = currentHostContext$jscomp$1.ancestorInfo.current; + var shouldKeepWarning$jscomp$0 = + null != ancestor + ? validateTextNesting( + text, + ancestor.tag, + currentHostContext$jscomp$1.ancestorInfo.implicitRootScope + ) + : !0; + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$1; + if (!(JSCompiler_temp$jscomp$1 = !nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== textInstance) { + workInProgress.stateNode = textInstance; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + var JSCompiler_inline_result$jscomp$2 = !0; + } else JSCompiler_inline_result$jscomp$2 = !1; + JSCompiler_temp$jscomp$1 = !JSCompiler_inline_result$jscomp$2; + } + JSCompiler_temp$jscomp$1 && + (shouldKeepWarning$jscomp$0 && + warnNonHydratedInstance(workInProgress, nextInstance$jscomp$0), + throwOnHydrationMismatch(workInProgress)); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (returnFiber = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - )) - : reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo ); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: return updateForwardRef( current, @@ -11567,17 +11628,15 @@ renderLanes ); case 7: - return ( - (returnFiber = workInProgress.pendingProps), - markRef(current, workInProgress), - reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -11589,64 +11648,53 @@ workInProgress.child ); case 12: - return ( - (workInProgress.flags |= 4), - (workInProgress.flags |= 2048), - (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = -0), - (returnFiber.passiveEffectDuration = -0), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + workInProgress.flags |= 4; + workInProgress.flags |= 2048; + var stateNode = workInProgress.stateNode; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 10: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevState = prevSibling.value), - "value" in prevSibling || - hasWarnedAboutUsingNoValuePropOnContextProvider || - ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), - console.error( - "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )), - pushProvider(workInProgress, returnFiber, prevState), - reconcileChildren( - current, - workInProgress, - prevSibling.children, - renderLanes - ), - workInProgress.child + var context = workInProgress.type; + var newProps = workInProgress.pendingProps, + newValue = newProps.value; + "value" in newProps || + hasWarnedAboutUsingNoValuePropOnContextProvider || + ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), + console.error( + "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" + )); + pushProvider(workInProgress, context, newValue); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes ); + return workInProgress.child; case 9: - return ( - (prevSibling = workInProgress.type._context), - (returnFiber = workInProgress.pendingProps.children), - "function" !== typeof returnFiber && - console.error( - "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." - ), - prepareToReadContext(workInProgress), - (prevSibling = readContext(prevSibling)), - (returnFiber = callComponentInDEV( - returnFiber, - prevSibling, - void 0 - )), - (workInProgress.flags |= 1), - reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + var context$jscomp$0 = workInProgress.type._context; + var render = workInProgress.pendingProps.children; + "function" !== typeof render && + console.error( + "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." + ); + prepareToReadContext(workInProgress); + var newValue$jscomp$0 = readContext(context$jscomp$0); + var newChildren = callComponentInDEV( + render, + newValue$jscomp$0, + void 0 ); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: return updateMemoComponent( current, @@ -11670,40 +11718,163 @@ renderLanes ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( - renderLanes, - returnFiber - )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$3; case 22: return updateOffscreenComponent( current, @@ -11712,103 +11883,108 @@ workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (returnFiber = readContext(CacheContext)), - null === current - ? ((prevSibling = peekCacheFromPool()), - null === prevSibling && - ((prevSibling = workInProgressRoot), - (prevState = createCache()), - (prevSibling.pooledCache = prevState), - retainCache(prevState), - null !== prevState && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = prevState)), - (workInProgress.memoizedState = { - parent: returnFiber, - cache: prevSibling - }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, prevSibling)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (prevSibling = current.memoizedState), - (prevState = workInProgress.memoizedState), - prevSibling.parent !== returnFiber - ? ((prevSibling = { - parent: returnFiber, - cache: returnFiber - }), - (workInProgress.memoizedState = prevSibling), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - prevSibling), - pushProvider(workInProgress, CacheContext, returnFiber)) - : ((returnFiber = prevState.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) var freshCache = cacheFromPool; + else { + var root$jscomp$0 = workInProgressRoot, + freshCache$jscomp$0 = createCache(); + root$jscomp$0.pooledCache = freshCache$jscomp$0; + retainCache(freshCache$jscomp$0); + null !== freshCache$jscomp$0 && + (root$jscomp$0.pooledCacheLanes |= renderLanes); + freshCache = freshCache$jscomp$0; + } + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 30: - return ( - (returnFiber = workInProgress.pendingProps), - (prevSibling = workInProgress.stateNode), - null != returnFiber.name && "auto" !== returnFiber.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === prevSibling.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (prevSibling.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - void 0 !== returnFiber.className && - ((prevSibling = - "string" === typeof returnFiber.className - ? JSON.stringify(returnFiber.className) - : "{...}"), - didWarnAboutClassNameOnViewTransition[prevSibling] || - ((didWarnAboutClassNameOnViewTransition[prevSibling] = !0), - console.error( - ' doesn\'t accept a "className" prop. It has been renamed to "default".\n- \n+ ', - prevSibling, - prevSibling - ))), - null !== current && current.memoizedProps.name !== returnFiber.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), - reconcileChildren( - current, - workInProgress, - returnFiber.children, - renderLanes - ), - workInProgress.child + var pendingProps = workInProgress.pendingProps, + instance$jscomp$1 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$1.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = + "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$1.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + if (void 0 !== pendingProps.className) { + var example = + "string" === typeof pendingProps.className + ? JSON.stringify(pendingProps.className) + : "{...}"; + didWarnAboutClassNameOnViewTransition[example] || + ((didWarnAboutClassNameOnViewTransition[example] = !0), + console.error( + ' doesn\'t accept a "className" prop. It has been renamed to "default".\n- \n+ ', + example, + example + )); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; case 29: throw workInProgress.pendingProps; } @@ -11964,7 +12140,6 @@ var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -12296,6 +12471,63 @@ } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12303,23 +12535,25 @@ (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12327,11 +12561,11 @@ emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12584,6 +12818,22 @@ case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12644,6 +12894,10 @@ case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13787,16 +14041,19 @@ } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -14168,6 +14425,11 @@ } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -14398,7 +14660,7 @@ null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -14407,7 +14669,7 @@ deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -14519,6 +14781,25 @@ popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + finishedRoot + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -14540,6 +14821,7 @@ } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -14676,13 +14958,13 @@ safelyDetachRef(current, current.return)); flags & 64 && offscreenSubtreeIsHidden && - ((current = finishedWork.updateQueue), - null !== current && - ((flags = current.callbacks), - null !== flags && - ((root = current.shared.hiddenCallbacks), - (current.shared.hiddenCallbacks = - null === root ? flags : root.concat(flags))))); + ((flags = finishedWork.updateQueue), + null !== flags && + ((current = flags.callbacks), + null !== current && + ((root = flags.shared.hiddenCallbacks), + (flags.shared.hiddenCallbacks = + null === root ? current : root.concat(current))))); break; case 26: var hoistableRoot = currentHoistableRoot; @@ -14701,10 +14983,10 @@ if (null === flags) if (null === finishedWork.stateNode) { a: { - current = finishedWork.type; - flags = finishedWork.memoizedProps; + flags = finishedWork.type; + current = finishedWork.memoizedProps; root = hoistableRoot.ownerDocument || hoistableRoot; - b: switch (current) { + b: switch (flags) { case "title": lanes = root.getElementsByTagName("title")[0]; if ( @@ -14714,15 +14996,15 @@ lanes.namespaceURI === SVG_NAMESPACE || lanes.hasAttribute("itemprop") ) - (lanes = root.createElement(current)), + (lanes = root.createElement(flags)), root.head.insertBefore( lanes, root.querySelector("head > title") ); - setInitialProperties(lanes, current, flags); + setInitialProperties(lanes, flags, current); lanes[internalInstanceKey] = finishedWork; markNodeAsHoistable(lanes); - current = lanes; + flags = lanes; break a; case "link": if ( @@ -14730,29 +15012,31 @@ "link", "href", root - ).get(current + (flags.href || ""))) + ).get(flags + (current.href || ""))) ) for (var i = 0; i < hoistableRoot.length; i++) if ( ((lanes = hoistableRoot[i]), lanes.getAttribute("href") === - (null == flags.href || "" === flags.href + (null == current.href || "" === current.href ? null - : flags.href) && + : current.href) && lanes.getAttribute("rel") === - (null == flags.rel ? null : flags.rel) && + (null == current.rel ? null : current.rel) && lanes.getAttribute("title") === - (null == flags.title ? null : flags.title) && + (null == current.title + ? null + : current.title) && lanes.getAttribute("crossorigin") === - (null == flags.crossOrigin + (null == current.crossOrigin ? null - : flags.crossOrigin)) + : current.crossOrigin)) ) { hoistableRoot.splice(i, 1); break b; } - lanes = root.createElement(current); - setInitialProperties(lanes, current, flags); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); root.head.appendChild(lanes); break; case "meta": @@ -14761,53 +15045,55 @@ "meta", "content", root - ).get(current + (flags.content || ""))) + ).get(flags + (current.content || ""))) ) for (i = 0; i < hoistableRoot.length; i++) if ( ((lanes = hoistableRoot[i]), checkAttributeStringCoercion( - flags.content, + current.content, "content" ), lanes.getAttribute("content") === - (null == flags.content + (null == current.content ? null - : "" + flags.content) && + : "" + current.content) && lanes.getAttribute("name") === - (null == flags.name ? null : flags.name) && + (null == current.name + ? null + : current.name) && lanes.getAttribute("property") === - (null == flags.property + (null == current.property ? null - : flags.property) && + : current.property) && lanes.getAttribute("http-equiv") === - (null == flags.httpEquiv + (null == current.httpEquiv ? null - : flags.httpEquiv) && + : current.httpEquiv) && lanes.getAttribute("charset") === - (null == flags.charSet + (null == current.charSet ? null - : flags.charSet)) + : current.charSet)) ) { hoistableRoot.splice(i, 1); break b; } - lanes = root.createElement(current); - setInitialProperties(lanes, current, flags); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); root.head.appendChild(lanes); break; default: throw Error( 'getNodesForType encountered a type it did not expect: "' + - current + + flags + '". This is a bug in React.' ); } lanes[internalInstanceKey] = finishedWork; markNodeAsHoistable(lanes); - current = lanes; + flags = lanes; } - finishedWork.stateNode = current; + finishedWork.stateNode = flags; } else mountHoistable( hoistableRoot, @@ -14944,23 +15230,32 @@ root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: - current = pushMutationContext(); - flags = currentHoistableRoot; + flags = pushMutationContext(); + current = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = flags; + currentHoistableRoot = current; viewTransitionMutationContext && (rootViewTransitionAffected = !0); - viewTransitionMutationContext = current; + viewTransitionMutationContext = flags; break; case 12: - current = pushNestedEffectDurations(); + flags = pushNestedEffectDurations(); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); finishedWork.stateNode.effectDuration += - bubbleNestedEffectDurations(current); + bubbleNestedEffectDurations(flags); + break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -14970,10 +15265,10 @@ (null !== current && null !== current.memoizedState) && (globalMostRecentFallbackTime = now$1()); flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && + ((flags = finishedWork.updateQueue), + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, current))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 22: hoistableRoot = null !== finishedWork.memoizedState; @@ -15063,6 +15358,26 @@ captureCommitPhaseError(lanes, lanes.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + lanes = root; + try { + var instance$jscomp$0 = lanes.stateNode; + hoistableRoot + ? runWithFiberInDEV( + lanes, + hideDehydratedBoundary, + instance$jscomp$0 + ) + : runWithFiberInDEV( + lanes, + unhideDehydratedBoundary, + lanes.stateNode + ); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -15085,21 +15400,21 @@ root = root.sibling; } flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && - ((flags = current.retryQueue), - null !== flags && - ((current.retryQueue = null), - attachSuspenseRetryListeners(finishedWork, flags)))); + ((flags = finishedWork.updateQueue), + null !== flags && + ((current = flags.retryQueue), + null !== current && + ((flags.retryQueue = null), + attachSuspenseRetryListeners(finishedWork, current)))); break; case 19: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && + ((flags = finishedWork.updateQueue), + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, current))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 30: flags & 512 && @@ -15439,6 +15754,16 @@ includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -15688,6 +16013,40 @@ endTime ); break; + case 31: + flags = inHydratedSubtree; + isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null; + prevProfilerEffectDuration = finishedWork.memoizedState; + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + inHydratedSubtree = flags; + break; case 13: flags = inHydratedSubtree; isViewTransitionEligible = @@ -19243,6 +19602,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -22958,24 +23318,28 @@ : container ).removeChild(child); } - function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, + function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), node === SUSPENSE_END_DATA)) { + if ( + ((node = nextNode.data), + node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) + ) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; } else if ( node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || - node === SUSPENSE_FALLBACK_START_DATA + node === SUSPENSE_FALLBACK_START_DATA || + node === ACTIVITY_START_DATA ) depth++; else if (node === PREAMBLE_CONTRIBUTION_HTML) @@ -23001,7 +23365,38 @@ releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); + } + function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && + node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), node === SUSPENSE_END_DATA)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + (node !== SUSPENSE_START_DATA && + node !== SUSPENSE_PENDING_START_DATA && + node !== SUSPENSE_FALLBACK_START_DATA) || + suspenseInstance++; + node = nextNode; + } while (node); + } + function hideDehydratedBoundary(suspenseInstance) { + hideOrUnhideDehydratedBoundary(suspenseInstance, !0); } function hideInstance(instance) { instance = instance.style; @@ -23012,6 +23407,9 @@ function hideTextInstance(textInstance) { textInstance.nodeValue = ""; } + function unhideDehydratedBoundary(dehydratedInstance) { + hideOrUnhideDehydratedBoundary(dehydratedInstance, !1); + } function unhideInstance(instance, props) { props = props[STYLE]; props = @@ -23764,6 +24162,14 @@ } return instance; } + function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; + } function isSuspenseInstanceFallback(instance) { return ( instance.data === SUSPENSE_FALLBACK_START_DATA || @@ -23797,11 +24203,13 @@ nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || + nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING ) break; - if (nodeType === SUSPENSE_END_DATA) return null; + if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA) + return null; } } return node; @@ -23825,7 +24233,9 @@ return { type: JSCompiler_temp_const, props: serverDifferences }; } return 8 === instance.nodeType - ? { type: "Suspense", props: {} } + ? instance.data === ACTIVITY_START_DATA + ? { type: "Activity", props: {} } + : { type: "Suspense", props: {} } : instance.nodeValue; } function diffHydratedTextForDevWarnings(textInstance, text, parentProps) { @@ -23842,26 +24252,29 @@ textInstance) : null; } - function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { - suspenseInstance = suspenseInstance.nextSibling; - for (var depth = 0; suspenseInstance; ) { - if (8 === suspenseInstance.nodeType) { - var data = suspenseInstance.data; - if (data === SUSPENSE_END_DATA) { + function getNextHydratableInstanceAfterHydrationBoundary( + hydrationInstance + ) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) { if (0 === depth) - return getNextHydratable(suspenseInstance.nextSibling); + return getNextHydratable(hydrationInstance.nextSibling); depth--; } else (data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && - data !== SUSPENSE_PENDING_START_DATA) || + data !== SUSPENSE_PENDING_START_DATA && + data !== ACTIVITY_START_DATA) || depth++; } - suspenseInstance = suspenseInstance.nextSibling; + hydrationInstance = hydrationInstance.nextSibling; } return null; } - function getParentSuspenseInstance(targetInstance) { + function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { @@ -23869,11 +24282,14 @@ if ( data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || - data === SUSPENSE_PENDING_START_DATA + data === SUSPENSE_PENDING_START_DATA || + data === ACTIVITY_START_DATA ) { if (0 === depth) return targetInstance; depth--; - } else data === SUSPENSE_END_DATA && depth++; + } else + (data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA) || + depth++; } targetInstance = targetInstance.previousSibling; } @@ -23882,6 +24298,9 @@ function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -24849,12 +25268,21 @@ (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -24949,6 +25377,7 @@ } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -24994,6 +25423,10 @@ targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -25243,17 +25676,18 @@ ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -28807,6 +29241,8 @@ EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", + ACTIVITY_START_DATA = "&", + ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", @@ -29435,11 +29871,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -29476,10 +29912,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-experimental-bc6184dd-20250417", + version: "19.2.0-experimental-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-bc6184dd-20250417" + reconcilerVersion: "19.2.0-experimental-914319ae-20250423" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -29621,7 +30057,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js index 23e610b8bb95a..ef97fe2381e85 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js @@ -60,6 +60,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -788,6 +798,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -883,12 +901,12 @@ function getClosestInstanceFromNode(targetNode) { (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -906,6 +924,7 @@ function getInstanceFromNode(node) { 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -2629,6 +2648,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiberImplClass(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiberImplClass( 4, @@ -2715,6 +2739,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -2812,6 +2844,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2842,25 +2875,14 @@ function popHydrationState(fiber) { fiber = fiber.memoizedState; fiber = null !== fiber ? fiber.dehydrated : null; if (!fiber) throw Error(formatProdErrorMessage(317)); - a: { - fiber = fiber.nextSibling; - for (tag = 0; fiber; ) { - if (8 === fiber.nodeType) - if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { - if (0 === tag) { - nextHydratableInstance = getNextHydratable(fiber.nextSibling); - break a; - } - tag--; - } else - ("$" !== JSCompiler_temp && - "$!" !== JSCompiler_temp && - "$?" !== JSCompiler_temp) || - tag++; - fiber = fiber.nextSibling; - } - nextHydratableInstance = null; - } + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -4472,19 +4494,17 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack() { push(suspenseStackCursor, suspenseStackCursor.current); @@ -6278,6 +6298,7 @@ function throwException( var suspenseBoundary = suspenseHandlerStackCursor.current; if (null !== suspenseBoundary) { switch (suspenseBoundary.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6580,7 +6601,18 @@ function updateOffscreenComponent( renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -6590,16 +6622,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -6634,6 +6656,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7010,39 +7054,28 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - renderLanes = current; - for (current = rootOrSingletonContext; 8 !== renderLanes.nodeType; ) { - if (!current) { - current = null; - break a; - } - renderLanes = getNextHydratable(renderLanes.nextSibling); - if (null === renderLanes) { - current = null; - break a; - } - } - current = renderLanes; - } - null !== current && - ((workInProgress.memoizedState = { - dehydrated: current, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (renderLanes = createFiberImplClass(18, null, null, 0)), - (renderLanes.stateNode = current), - (renderLanes.return = workInProgress), - (workInProgress.child = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else current = null; + (current = nextHydratableInstance) + ? ((current = canHydrateHydrationBoundary( + current, + rootOrSingletonContext + )), + (current = null !== current && "&" !== current.data ? current : null), + null !== current && + ((workInProgress.memoizedState = { + dehydrated: current, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (renderLanes = createFiberFromDehydratedFragment(current)), + (renderLanes.return = workInProgress), + (workInProgress.child = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (current = null); if (null === current) throw throwOnHydrationMismatch(workInProgress); isSuspenseInstanceFallback(current) ? (workInProgress.lanes = 32) @@ -7117,14 +7150,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7177,15 +7210,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7214,12 +7239,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7231,14 +7251,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7246,7 +7266,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7257,22 +7277,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7530,10 +7550,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$109 = workInProgress.memoizedState; + if (null !== state$109) { + if (null !== state$109.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -7553,17 +7581,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$109 = 0 !== (renderLanes & workInProgress.childLanes); + state$109 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$109 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$109) return updateSuspenseListComponent( current, workInProgress, @@ -7577,7 +7605,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$109) break; else return null; case 22: return ( @@ -8023,29 +8051,116 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (lazyComponent = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (lazyComponent = { - mode: lazyComponent.mode, - children: lazyComponent.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - lazyComponent, - renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, lazyComponent)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if ( + ((lazyComponent = current.memoizedState), null !== lazyComponent) + ) + if ( + ((prevState = lazyComponent.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) + ) + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== lazyComponent.retryLane) + ) + throw ( + ((lazyComponent.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = lazyComponent.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -8206,14 +8321,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$119 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$119 = lastTailNode), + for (var lastTailNode$120 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$120 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$119 + null === lastTailNode$120 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$119.sibling = null); + : (lastTailNode$120.sibling = null); } } function bubbleProperties(completedWork) { @@ -8223,19 +8338,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 65011712), - (subtreeFlags |= child$120.flags & 65011712), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (var child$121 = completedWork.child; null !== child$121; ) + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags & 65011712), + (subtreeFlags |= child$121.flags & 65011712), + (child$121.return = completedWork), + (child$121 = child$121.sibling); else - for (child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags), - (subtreeFlags |= child$120.flags), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (child$121 = completedWork.child; null !== child$121; ) + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags), + (subtreeFlags |= child$121.flags), + (child$121.return = completedWork), + (child$121 = child$121.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8244,7 +8359,6 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -8503,6 +8617,41 @@ function completeWork(current, workInProgress, renderLanes) { } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8738,6 +8887,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8790,6 +8950,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8946,8 +9110,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$151) { - captureCommitPhaseError(current, nearestMountedAncestor, error$151); + } catch (error$155) { + captureCommitPhaseError(current, nearestMountedAncestor, error$155); } else ref.current = null; } @@ -9843,11 +10007,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$149) { + } catch (error$153) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$149 + error$153 ); } } @@ -9890,6 +10054,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -10053,7 +10221,7 @@ function commitDeletionEffectsOnFiber( null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -10062,7 +10230,7 @@ function commitDeletionEffectsOnFiber( deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -10150,6 +10318,21 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + retryIfBlockedOn(finishedRoot); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -10167,6 +10350,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10276,112 +10460,111 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return)); - if (flags & 4) - if ( - ((root = null !== current ? current.memoizedState : null), - (flags = finishedWork.memoizedState), - null === current) - ) + if (flags & 4) { + var currentResource = null !== current ? current.memoizedState : null; + flags = finishedWork.memoizedState; + if (null === current) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - root = hoistableRoot.ownerDocument || hoistableRoot; + hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - lanes = root.getElementsByTagName("title")[0]; + currentResource = + hoistableRoot.getElementsByTagName("title")[0]; if ( - !lanes || - lanes[internalHoistableMarker] || - lanes[internalInstanceKey] || - "http://www.w3.org/2000/svg" === lanes.namespaceURI || - lanes.hasAttribute("itemprop") + !currentResource || + currentResource[internalHoistableMarker] || + currentResource[internalInstanceKey] || + "http://www.w3.org/2000/svg" === + currentResource.namespaceURI || + currentResource.hasAttribute("itemprop") ) - (lanes = root.createElement(flags)), - root.head.insertBefore( - lanes, - root.querySelector("head > title") + (currentResource = hoistableRoot.createElement(flags)), + hoistableRoot.head.insertBefore( + currentResource, + hoistableRoot.querySelector("head > title") ); - setInitialProperties(lanes, flags, current); - lanes[internalInstanceKey] = finishedWork; - markNodeAsHoistable(lanes); - flags = lanes; + setInitialProperties(currentResource, flags, current); + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; break a; case "link": - if ( - (hoistableRoot = getHydratableHoistableCache( - "link", - "href", - root - ).get(flags + (current.href || ""))) - ) - for (var i = 0; i < hoistableRoot.length; i++) + var maybeNodes = getHydratableHoistableCache( + "link", + "href", + hoistableRoot + ).get(flags + (current.href || "")); + if (maybeNodes) + for (var i = 0; i < maybeNodes.length; i++) if ( - ((lanes = hoistableRoot[i]), - lanes.getAttribute("href") === + ((currentResource = maybeNodes[i]), + currentResource.getAttribute("href") === (null == current.href || "" === current.href ? null : current.href) && - lanes.getAttribute("rel") === + currentResource.getAttribute("rel") === (null == current.rel ? null : current.rel) && - lanes.getAttribute("title") === + currentResource.getAttribute("title") === (null == current.title ? null : current.title) && - lanes.getAttribute("crossorigin") === + currentResource.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) ) { - hoistableRoot.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - lanes = root.createElement(flags); - setInitialProperties(lanes, flags, current); - root.head.appendChild(lanes); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; case "meta": if ( - (hoistableRoot = getHydratableHoistableCache( + (maybeNodes = getHydratableHoistableCache( "meta", "content", - root + hoistableRoot ).get(flags + (current.content || ""))) ) - for (i = 0; i < hoistableRoot.length; i++) + for (i = 0; i < maybeNodes.length; i++) if ( - ((lanes = hoistableRoot[i]), - lanes.getAttribute("content") === + ((currentResource = maybeNodes[i]), + currentResource.getAttribute("content") === (null == current.content ? null : "" + current.content) && - lanes.getAttribute("name") === + currentResource.getAttribute("name") === (null == current.name ? null : current.name) && - lanes.getAttribute("property") === + currentResource.getAttribute("property") === (null == current.property ? null : current.property) && - lanes.getAttribute("http-equiv") === + currentResource.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - lanes.getAttribute("charset") === + currentResource.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) ) { - hoistableRoot.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - lanes = root.createElement(flags); - setInitialProperties(lanes, flags, current); - root.head.appendChild(lanes); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; default: throw Error(formatProdErrorMessage(468, flags)); } - lanes[internalInstanceKey] = finishedWork; - markNodeAsHoistable(lanes); - flags = lanes; + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; } finishedWork.stateNode = flags; } else @@ -10397,12 +10580,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.memoizedProps ); else - root !== flags - ? (null === root + currentResource !== flags + ? (null === currentResource ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : root.count--, + : currentResource.count--, null === flags ? mountHoistable( hoistableRoot, @@ -10421,6 +10604,7 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.memoizedProps, current.memoizedProps ); + } break; case 27: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -10445,20 +10629,21 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { null === current || safelyDetachRef(current, current.return)); if (finishedWork.flags & 32) { - root = finishedWork.stateNode; + hoistableRoot = finishedWork.stateNode; try { - setTextContent(root, ""), (viewTransitionMutationContext = !0); + setTextContent(hoistableRoot, ""), + (viewTransitionMutationContext = !0); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((root = finishedWork.memoizedProps), + ((hoistableRoot = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - root, - null !== current ? current.memoizedProps : root + hoistableRoot, + null !== current ? current.memoizedProps : hoistableRoot )); flags & 1024 && (needsFormReset = !0); break; @@ -10509,6 +10694,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -10554,12 +10748,13 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { if (null === current) { lanes = current = root; try { - if (((i = lanes.stateNode), hoistableRoot)) { - var style = i.style; - "function" === typeof style.setProperty - ? style.setProperty("display", "none", "important") - : (style.display = "none"); - } else unhideInstance(lanes.stateNode, lanes.memoizedProps); + (currentResource = lanes.stateNode), + hoistableRoot + ? ((maybeNodes = currentResource.style), + "function" === typeof maybeNodes.setProperty + ? maybeNodes.setProperty("display", "none", "important") + : (maybeNodes.display = "none")) + : unhideInstance(lanes.stateNode, lanes.memoizedProps); } catch (error) { captureCommitPhaseError(lanes, lanes.return, error); } @@ -10576,6 +10771,18 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { captureCommitPhaseError(lanes, lanes.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + lanes = root; + try { + (i = lanes.stateNode), + hoistableRoot + ? hideOrUnhideDehydratedBoundary(i, !0) + : hideOrUnhideDehydratedBoundary(lanes.stateNode, !1); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -10674,25 +10881,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$152 = hostParentFiber.stateNode; + var parent$156 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$152, ""), (hostParentFiber.flags &= -33)); - var before$153 = getHostSibling(finishedWork); + (setTextContent(parent$156, ""), (hostParentFiber.flags &= -33)); + var before$157 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$153, - parent$152, + before$157, + parent$156, parentFragmentInstances ); break; case 3: case 4: - var parent$154 = hostParentFiber.stateNode.containerInfo, - before$155 = getHostSibling(finishedWork); + var parent$158 = hostParentFiber.stateNode.containerInfo, + before$159 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$155, - parent$154, + before$159, + parent$158, parentFragmentInstances ); break; @@ -10932,6 +11139,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -11095,6 +11312,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11813,7 +12038,7 @@ function recursivelyInsertClones( if (null === nextPhase) recursivelyInsertNewFiber(deletions, i, parentViewTransition, 5); else { - var nextPhase$178 = deletions.flags; + var nextPhase$183 = deletions.flags; switch (deletions.tag) { case 26: recursivelyInsertClones( @@ -11839,16 +12064,16 @@ function recursivelyInsertClones( (setTextContent(clone, ""), (viewTransitionMutationContext = !0))) : (clone = clone.cloneNode(!1)); - if (nextPhase$178 & 4) { - nextPhase$178 = clone; + if (nextPhase$183 & 4) { + nextPhase$183 = clone; var newProps = deletions.memoizedProps; updateProperties( - nextPhase$178, + nextPhase$183, deletions.type, nextPhase.memoizedProps, newProps ); - nextPhase$178[internalPropsKey] = newProps; + nextPhase$183[internalPropsKey] = newProps; } 1 === visitPhase || 2 === visitPhase ? (appendChild(i, clone), @@ -11867,7 +12092,7 @@ function recursivelyInsertClones( if (null === parentViewTransition) throw Error(formatProdErrorMessage(162)); parentViewTransition = parentViewTransition.cloneNode(!1); - nextPhase$178 & 4 && + nextPhase$183 & 4 && ((parentViewTransition.nodeValue = nextPhase.memoizedProps), (viewTransitionMutationContext = !0)); appendChild(i, parentViewTransition); @@ -11880,7 +12105,7 @@ function recursivelyInsertClones( case 22: null === deletions.memoizedState ? ((nextPhase = - 0 === visitPhase && 0 !== (nextPhase$178 & 8192) + 0 === visitPhase && 0 !== (nextPhase$183 & 8192) ? 1 : visitPhase), recursivelyInsertClones( @@ -11898,8 +12123,8 @@ function recursivelyInsertClones( parentViewTransition = pushMutationContext(); clone = deletions.stateNode; clone.clones = null; - nextPhase$178 = 1 === visitPhase ? 2 : visitPhase; - recursivelyInsertClones(deletions, i, clone, nextPhase$178); + nextPhase$183 = 1 === visitPhase ? 2 : visitPhase; + recursivelyInsertClones(deletions, i, clone, nextPhase$183); viewTransitionMutationContext && (deletions.flags |= 4); 1 === visitPhase ? applyExitViewTransition(deletions) @@ -12628,8 +12853,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$188) { + handleThrow(root, thrownValue$188); } while (1); lanes && root.shellSuspendCounter++; @@ -12748,8 +12973,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$185) { - handleThrow(root, thrownValue$185); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -13337,26 +13562,26 @@ function commitGestureOnRoot(root, finishedWork) { } var rotate = computedStyle.rotate; if ("none" !== rotate && "" !== rotate) { - var parts$263 = rotate.split(" "); + var parts$268 = rotate.split(" "); transform = - 1 === parts$263.length - ? "rotate(" + parts$263[0] + ") " + transform - : 2 === parts$263.length + 1 === parts$268.length + ? "rotate(" + parts$268[0] + ") " + transform + : 2 === parts$268.length ? "rotate" + - parts$263[0].toUpperCase() + + parts$268[0].toUpperCase() + "(" + - parts$263[1] + + parts$268[1] + ") " + transform - : "rotate3d(" + parts$263.join(", ") + ") " + transform; + : "rotate3d(" + parts$268.join(", ") + ") " + transform; } var translate = computedStyle.translate; if ("none" !== translate && "" !== translate) { - var parts$264 = translate.split(" "); + var parts$269 = translate.split(" "); transform = - (3 === parts$264.length ? "translate3d" : "translate") + + (3 === parts$269.length ? "translate3d" : "translate") + "(" + - parts$264.join(", ") + + parts$269.join(", ") + ") " + transform; } @@ -13624,6 +13849,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -13665,14 +13891,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$191 = firstScheduledRoot; null !== root$191; ) { + for (var root$196 = firstScheduledRoot; null !== root$196; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$191.pendingLanes; + var pendingLanes = root$196.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$191.suspendedLanes, - pingedLanes = root$191.pingedLanes; + var suspendedLanes = root$196.suspendedLanes, + pingedLanes = root$196.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -13686,21 +13912,21 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$191, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$196, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$191, - root$191 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$191.cancelPendingCommit || - -1 !== root$191.timeoutHandle + root$196, + root$196 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$196.cancelPendingCommit || + -1 !== root$196.timeoutHandle )), (0 === (JSCompiler_inline_result & 3) && 64 !== JSCompiler_inline_result) || - checkIfRootIsPrerendering(root$191, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$196, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$191, JSCompiler_inline_result)); - root$191 = root$191.next; + performSyncWorkOnRoot(root$196, JSCompiler_inline_result)); + root$196 = root$196.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -13977,20 +14203,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1695 = 0; - i$jscomp$inline_1695 < simpleEventPluginEvents.length; - i$jscomp$inline_1695++ + var i$jscomp$inline_1729 = 0; + i$jscomp$inline_1729 < simpleEventPluginEvents.length; + i$jscomp$inline_1729++ ) { - var eventName$jscomp$inline_1696 = - simpleEventPluginEvents[i$jscomp$inline_1695], - domEventName$jscomp$inline_1697 = - eventName$jscomp$inline_1696.toLowerCase(), - capitalizedEvent$jscomp$inline_1698 = - eventName$jscomp$inline_1696[0].toUpperCase() + - eventName$jscomp$inline_1696.slice(1); + var eventName$jscomp$inline_1730 = + simpleEventPluginEvents[i$jscomp$inline_1729], + domEventName$jscomp$inline_1731 = + eventName$jscomp$inline_1730.toLowerCase(), + capitalizedEvent$jscomp$inline_1732 = + eventName$jscomp$inline_1730[0].toUpperCase() + + eventName$jscomp$inline_1730.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1697, - "on" + capitalizedEvent$jscomp$inline_1698 + domEventName$jscomp$inline_1731, + "on" + capitalizedEvent$jscomp$inline_1732 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15247,34 +15473,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$205 = props[hasSrc]; - if (null != propValue$205) + var propValue$210 = props[hasSrc]; + if (null != propValue$210) switch (hasSrc) { case "name": - hasSrcSet = propValue$205; + hasSrcSet = propValue$210; break; case "type": - propValue = propValue$205; + propValue = propValue$210; break; case "checked": - checked = propValue$205; + checked = propValue$210; break; case "defaultChecked": - defaultChecked = propValue$205; + defaultChecked = propValue$210; break; case "value": - propKey = propValue$205; + propKey = propValue$210; break; case "defaultValue": - defaultValue = propValue$205; + defaultValue = propValue$210; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$205) + if (null != propValue$210) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$205, props, null); + setProp(domElement, tag, hasSrc, propValue$210, props, null); } } initInput( @@ -15413,14 +15639,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$205 in props) - props.hasOwnProperty(propValue$205) && - ((hasSrc = props[propValue$205]), + for (propValue$210 in props) + props.hasOwnProperty(propValue$210) && + ((hasSrc = props[propValue$210]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$205, + propValue$210, hasSrc, props, void 0 @@ -15468,14 +15694,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$222 in nextProps) { - var propKey = nextProps[propKey$222]; - lastProp = lastProps[propKey$222]; + for (var propKey$227 in nextProps) { + var propKey = nextProps[propKey$227]; + lastProp = lastProps[propKey$227]; if ( - nextProps.hasOwnProperty(propKey$222) && + nextProps.hasOwnProperty(propKey$227) && (null != propKey || null != lastProp) ) - switch (propKey$222) { + switch (propKey$227) { case "type": propKey !== lastProp && (viewTransitionMutationContext = !0); type = propKey; @@ -15510,7 +15736,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$222, + propKey$227, propKey, nextProps, lastProp @@ -15529,7 +15755,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$222 = null; + propKey = value = defaultValue = propKey$227 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15561,7 +15787,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && (viewTransitionMutationContext = !0); - propKey$222 = type; + propKey$227 = type; break; case "defaultValue": type !== lastDefaultValue && (viewTransitionMutationContext = !0); @@ -15584,15 +15810,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$222 - ? updateOptions(domElement, !!lastProps, propKey$222, !1) + null != propKey$227 + ? updateOptions(domElement, !!lastProps, propKey$227, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$222 = null; + propKey = propKey$227 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15617,7 +15843,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && (viewTransitionMutationContext = !0); - propKey$222 = name; + propKey$227 = name; break; case "defaultValue": name !== type && (viewTransitionMutationContext = !0); @@ -15632,17 +15858,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$222, propKey); + updateTextarea(domElement, propKey$227, propKey); return; case "option": - for (var propKey$238 in lastProps) + for (var propKey$243 in lastProps) if ( - ((propKey$222 = lastProps[propKey$238]), - lastProps.hasOwnProperty(propKey$238) && - null != propKey$222 && - !nextProps.hasOwnProperty(propKey$238)) + ((propKey$227 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$243)) ) - switch (propKey$238) { + switch (propKey$243) { case "selected": domElement.selected = !1; break; @@ -15650,34 +15876,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$238, + propKey$243, null, nextProps, - propKey$222 + propKey$227 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$222 = nextProps[lastDefaultValue]), + ((propKey$227 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$222 !== propKey && - (null != propKey$222 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$222 !== propKey && (viewTransitionMutationContext = !0); + propKey$227 !== propKey && (viewTransitionMutationContext = !0); domElement.selected = - propKey$222 && - "function" !== typeof propKey$222 && - "symbol" !== typeof propKey$222; + propKey$227 && + "function" !== typeof propKey$227 && + "symbol" !== typeof propKey$227; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$222, + propKey$227, nextProps, propKey ); @@ -15698,24 +15924,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$243 in lastProps) - (propKey$222 = lastProps[propKey$243]), - lastProps.hasOwnProperty(propKey$243) && - null != propKey$222 && - !nextProps.hasOwnProperty(propKey$243) && - setProp(domElement, tag, propKey$243, null, nextProps, propKey$222); + for (var propKey$248 in lastProps) + (propKey$227 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$248) && + setProp(domElement, tag, propKey$248, null, nextProps, propKey$227); for (checked in nextProps) if ( - ((propKey$222 = nextProps[checked]), + ((propKey$227 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$222 !== propKey && - (null != propKey$222 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$222) + if (null != propKey$227) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15723,7 +15949,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$222, + propKey$227, nextProps, propKey ); @@ -15731,49 +15957,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$248 in lastProps) - (propKey$222 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - void 0 !== propKey$222 && - !nextProps.hasOwnProperty(propKey$248) && + for (var propKey$253 in lastProps) + (propKey$227 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + void 0 !== propKey$227 && + !nextProps.hasOwnProperty(propKey$253) && setPropOnCustomElement( domElement, tag, - propKey$248, + propKey$253, void 0, nextProps, - propKey$222 + propKey$227 ); for (defaultChecked in nextProps) - (propKey$222 = nextProps[defaultChecked]), + (propKey$227 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$222 === propKey || - (void 0 === propKey$222 && void 0 === propKey) || + propKey$227 === propKey || + (void 0 === propKey$227 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$222, + propKey$227, nextProps, propKey ); return; } } - for (var propKey$253 in lastProps) - (propKey$222 = lastProps[propKey$253]), - lastProps.hasOwnProperty(propKey$253) && - null != propKey$222 && - !nextProps.hasOwnProperty(propKey$253) && - setProp(domElement, tag, propKey$253, null, nextProps, propKey$222); + for (var propKey$258 in lastProps) + (propKey$227 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$258) && + setProp(domElement, tag, propKey$258, null, nextProps, propKey$227); for (lastProp in nextProps) - (propKey$222 = nextProps[lastProp]), + (propKey$227 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$222 === propKey || - (null == propKey$222 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$222, nextProps, propKey); + propKey$227 === propKey || + (null == propKey$227 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$227, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15859,21 +16085,22 @@ function appendChild(parentInstance, child) { function isSingletonScope(type) { return "head" === type; } -function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, +function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), "/$" === node)) { + if (((node = nextNode.data), "/$" === node || "/&" === node)) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; - } else if ("$" === node || "$?" === node || "$!" === node) depth++; + } else if ("$" === node || "$?" === node || "$!" === node || "&" === node) + depth++; else if ("html" === node) releaseSingletonInstance(parentInstance.ownerDocument.documentElement); else if ("head" === node) { @@ -15895,7 +16122,31 @@ function clearSuspenseBoundary(parentInstance, suspenseInstance) { releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); +} +function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), "/$" === node)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + ("$" !== node && "$?" !== node && "$!" !== node) || suspenseInstance++; + node = nextNode; + } while (node); } function unhideInstance(instance, props) { props = props.style; @@ -16304,20 +16555,20 @@ function startGestureTransition( ))) : (isExitGroupAnim = !0); } - var timing$268 = pseudoElement.getTiming(); + var timing$273 = pseudoElement.getTiming(); anim = rangeEnd - - (("number" === typeof timing$268.duration - ? timing$268.duration + (("number" === typeof timing$273.duration + ? timing$273.duration : 0) + - timing$268.delay) * + timing$273.delay) * longestDuration; - groupName = rangeEnd - timing$268.delay * longestDuration; + groupName = rangeEnd - timing$273.delay * longestDuration; if ( - "reverse" === timing$268.direction || - "alternate-reverse" === timing$268.direction + "reverse" === timing$273.direction || + "alternate-reverse" === timing$273.direction ) - (timing$268 = anim), (anim = groupName), (groupName = timing$268); + (timing$273 = anim), (anim = groupName), (groupName = timing$273); animateGesture( pseudoElement.getKeyframes(), pseudoElement.target, @@ -16739,6 +16990,14 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { } return instance; } +function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; +} function isSuspenseInstanceFallback(instance) { return ( "$!" === instance.data || @@ -16768,25 +17027,43 @@ function getNextHydratable(node) { "$" === nodeType || "$!" === nodeType || "$?" === nodeType || + "&" === nodeType || "F!" === nodeType || "F" === nodeType ) break; - if ("/$" === nodeType) return null; + if ("/$" === nodeType || "/&" === nodeType) return null; } } return node; } var previousHydratableOnEnteringScopedSingleton = null; -function getParentSuspenseInstance(targetInstance) { +function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if ("/$" === data || "/&" === data) { + if (0 === depth) + return getNextHydratable(hydrationInstance.nextSibling); + depth--; + } else + ("$" !== data && "$!" !== data && "$?" !== data && "&" !== data) || + depth++; + } + hydrationInstance = hydrationInstance.nextSibling; + } + return null; +} +function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { var data = targetInstance.data; - if ("$" === data || "$!" === data || "$?" === data) { + if ("$" === data || "$!" === data || "$?" === data || "&" === data) { if (0 === depth) return targetInstance; depth--; - } else "/$" === data && depth++; + } else ("/$" !== data && "/&" !== data) || depth++; } targetInstance = targetInstance.previousSibling; } @@ -17130,26 +17407,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$273 = getResourcesFromRoot( + var styles$278 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$274 = styles$273.get(type); - resource$274 || + resource$279 = styles$278.get(type); + resource$279 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$274 = { + (resource$279 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$273.set(type, resource$274), - (styles$273 = JSCompiler_inline_result.querySelector( + styles$278.set(type, resource$279), + (styles$278 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$273._p && - ((resource$274.instance = styles$273), - (resource$274.state.loading = 5)), + !styles$278._p && + ((resource$279.instance = styles$278), + (resource$279.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -17162,16 +17439,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$273 || + styles$278 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$274.state + resource$279.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$274; + return resource$279; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17268,37 +17545,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$279 = hoistableRoot.querySelector( + var instance$284 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$279) + if (instance$284) return ( (resource.state.loading |= 4), - (resource.instance = instance$279), - markNodeAsHoistable(instance$279), - instance$279 + (resource.instance = instance$284), + markNodeAsHoistable(instance$284), + instance$284 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$279 = ( + instance$284 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$279); - var linkInstance = instance$279; + markNodeAsHoistable(instance$284); + var linkInstance = instance$284; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$279, "link", instance); + setInitialProperties(instance$284, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$279, props.precedence, hoistableRoot); - return (resource.instance = instance$279); + insertStylesheet(instance$284, props.precedence, hoistableRoot); + return (resource.instance = instance$284); case "script": - instance$279 = getScriptKey(props.src); + instance$284 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$279) + getScriptSelectorFromKey(instance$284) )) ) return ( @@ -17307,7 +17584,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$279))) + if ((styleProps = preloadPropsMap.get(instance$284))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17748,12 +18025,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -17844,6 +18130,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -17890,6 +18177,10 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -18150,14 +18441,18 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -18354,16 +18649,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_2012 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2045 = React.version; if ( - "19.2.0-experimental-bc6184dd-20250417" !== - isomorphicReactPackageVersion$jscomp$inline_2012 + "19.2.0-experimental-914319ae-20250423" !== + isomorphicReactPackageVersion$jscomp$inline_2045 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2012, - "19.2.0-experimental-bc6184dd-20250417" + isomorphicReactPackageVersion$jscomp$inline_2045, + "19.2.0-experimental-914319ae-20250423" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -18383,24 +18678,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2626 = { +var internals$jscomp$inline_2681 = { bundleType: 0, - version: "19.2.0-experimental-bc6184dd-20250417", + version: "19.2.0-experimental-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-bc6184dd-20250417" + reconcilerVersion: "19.2.0-experimental-914319ae-20250423" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2627 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2682 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2627.isDisabled && - hook$jscomp$inline_2627.supportsFiber + !hook$jscomp$inline_2682.isDisabled && + hook$jscomp$inline_2682.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2627.inject( - internals$jscomp$inline_2626 + (rendererID = hook$jscomp$inline_2682.inject( + internals$jscomp$inline_2681 )), - (injectedHook = hook$jscomp$inline_2627); + (injectedHook = hook$jscomp$inline_2682); } catch (err) {} } exports.createRoot = function (container, options) { @@ -18492,4 +18787,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js index d1834913c8cd3..aae98bfb21728 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js @@ -146,6 +146,16 @@ } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -1229,6 +1239,16 @@ rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1346,13 +1366,13 @@ (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -1370,6 +1390,7 @@ 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -1906,6 +1927,8 @@ return fiber.type; case 16: return "Lazy"; + case 31: + return "Activity"; case 13: return "Suspense"; case 19: @@ -4304,6 +4327,11 @@ content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -4384,6 +4412,21 @@ (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -4431,6 +4474,12 @@ siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -4554,6 +4603,7 @@ for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -4587,7 +4637,7 @@ diffNode.serverTail.push(description); JSCompiler_temp = "Suspense" === description.type - ? getNextHydratableInstanceAfterSuspenseInstance(JSCompiler_temp) + ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling); } throwOnHydrationMismatch(fiber); @@ -4601,7 +4651,16 @@ "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); nextHydratableInstance = - getNextHydratableInstanceAfterSuspenseInstance(fiber); + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -7005,19 +7064,17 @@ ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current, fiber), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack(fiber) { push(suspenseStackCursor, suspenseStackCursor.current, fiber); @@ -9125,6 +9182,7 @@ var suspenseBoundary = suspenseHandlerStackCursor.current; if (null !== suspenseBoundary) { switch (suspenseBoundary.tag) { + case 31: case 13: return ( null === shellBoundary @@ -9464,7 +9522,18 @@ renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -9476,16 +9545,6 @@ renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -9523,6 +9582,42 @@ propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -10221,74 +10316,54 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2910; - var JSCompiler_object_inline_stack_2909 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2988; + var JSCompiler_object_inline_stack_2987 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2910 = didSuspend) || - (JSCompiler_object_inline_componentStack_2910 = + var JSCompiler_object_inline_digest_2986 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_componentStack_2988 = didSuspend) || + (JSCompiler_object_inline_componentStack_2988 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2910 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2910 = + JSCompiler_object_inline_componentStack_2988 && + ((JSCompiler_object_inline_digest_2986 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_componentStack_2988 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_digest_2986 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - JSCompiler_object_inline_componentStack_2910 = current; - for ( - renderLanes = rootOrSingletonContext; - 8 !== JSCompiler_object_inline_componentStack_2910.nodeType; - - ) { - if (!renderLanes) { - renderLanes = null; - break a; - } - JSCompiler_object_inline_componentStack_2910 = - getNextHydratable( - JSCompiler_object_inline_componentStack_2910.nextSibling - ); - if (null === JSCompiler_object_inline_componentStack_2910) { - renderLanes = null; - break a; - } - } - renderLanes = JSCompiler_object_inline_componentStack_2910; - } - null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { - dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (JSCompiler_object_inline_componentStack_2910 = renderLanes), - (JSCompiler_object_inline_stack_2909 = createFiber( - 18, - null, - null, - NoMode + (current = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + current, + rootOrSingletonContext )), - (JSCompiler_object_inline_stack_2909.stateNode = - JSCompiler_object_inline_componentStack_2910), - (JSCompiler_object_inline_stack_2909.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_stack_2909), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else renderLanes = null; + (renderLanes = + null !== renderLanes && renderLanes.data !== ACTIVITY_START_DATA + ? renderLanes + : null), + null !== renderLanes && + ((JSCompiler_object_inline_componentStack_2988 = { + dehydrated: renderLanes, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }), + (workInProgress.memoizedState = + JSCompiler_object_inline_componentStack_2988), + (JSCompiler_object_inline_componentStack_2988 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_componentStack_2988.return = + workInProgress), + (workInProgress.child = + JSCompiler_object_inline_componentStack_2988), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null); if (null === renderLanes) throw ( (warnNonHydratedInstance(workInProgress, current), @@ -10299,315 +10374,287 @@ : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_message_2907 = - JSCompiler_object_inline_stack_2909.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2909.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_2987.children, + nextFallbackChildren = JSCompiler_object_inline_stack_2987.fallback; + if (JSCompiler_object_inline_digest_2986) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2909 = + (JSCompiler_object_inline_stack_2987 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2907, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_message_2907 = workInProgress.child), - (JSCompiler_object_inline_message_2907.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2907.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2910, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2988, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2909 + JSCompiler_object_inline_stack_2987 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2909.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2987.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2909 = + (JSCompiler_object_inline_stack_2987 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2907, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_message_2907 = workInProgress.child), - (JSCompiler_object_inline_message_2907.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2907.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2910, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2988, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2909 + JSCompiler_object_inline_stack_2987 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2907 + nextPrimaryChildren ); } - var JSCompiler_object_inline_digest_2908 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_digest_2908 && - ((JSCompiler_object_inline_message_2907 = - JSCompiler_object_inline_digest_2908.dehydrated), - null !== JSCompiler_object_inline_message_2907) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2907 = - JSCompiler_object_inline_stack_2909.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2909 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2909.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_message_2907 = - createFiberFromFragment( - JSCompiler_object_inline_message_2907, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_message_2985 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_message_2985) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2987.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_2987 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2987.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_message_2907.flags |= 2), - (JSCompiler_object_inline_stack_2909.return = workInProgress), - (JSCompiler_object_inline_message_2907.return = workInProgress), - (JSCompiler_object_inline_stack_2909.sibling = - JSCompiler_object_inline_message_2907), - (workInProgress.child = JSCompiler_object_inline_stack_2909), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2909 = workInProgress.child), - (JSCompiler_object_inline_stack_2909.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2909.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2910, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2987.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2987.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2987), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2907)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2907)) - ) { - JSCompiler_object_inline_componentStack_2910 = - JSCompiler_object_inline_message_2907.nextSibling && - JSCompiler_object_inline_message_2907.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2910) { - nextFallbackChildren = - JSCompiler_object_inline_componentStack_2910.dgst; - var message = JSCompiler_object_inline_componentStack_2910.msg; - var componentStack = - JSCompiler_object_inline_componentStack_2910.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_componentStack_2910.cstck; - } - JSCompiler_object_inline_message_2907 = message; - JSCompiler_object_inline_digest_2908 = nextFallbackChildren; - JSCompiler_object_inline_stack_2909 = componentStack; - JSCompiler_object_inline_componentStack_2910 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_digest_2908; - componentStack = JSCompiler_object_inline_componentStack_2910; - "POSTPONE" !== nextFallbackChildren && - ((JSCompiler_object_inline_componentStack_2910 = - JSCompiler_object_inline_message_2907 - ? Error(JSCompiler_object_inline_message_2907) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." - )), - (JSCompiler_object_inline_componentStack_2910.stack = - JSCompiler_object_inline_stack_2909 || ""), - (JSCompiler_object_inline_componentStack_2910.digest = - nextFallbackChildren), - (JSCompiler_object_inline_stack_2909 = - void 0 === componentStack ? null : componentStack), - (JSCompiler_object_inline_message_2907 = { - value: JSCompiler_object_inline_componentStack_2910, - source: null, - stack: JSCompiler_object_inline_stack_2909 - }), - "string" === typeof JSCompiler_object_inline_stack_2909 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2910, - JSCompiler_object_inline_message_2907 - ), - queueHydrationError(JSCompiler_object_inline_message_2907)); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + ), + (JSCompiler_object_inline_stack_2987 = workInProgress.child), + (JSCompiler_object_inline_stack_2987.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2987.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2988, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2985)) + ) { + JSCompiler_object_inline_componentStack_2988 = + JSCompiler_object_inline_message_2985.nextSibling && + JSCompiler_object_inline_message_2985.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2988) { + nextPrimaryChildren = + JSCompiler_object_inline_componentStack_2988.dgst; + var message = JSCompiler_object_inline_componentStack_2988.msg; + nextFallbackChildren = + JSCompiler_object_inline_componentStack_2988.stck; + var componentStack = + JSCompiler_object_inline_componentStack_2988.cstck; + } + JSCompiler_object_inline_message_2985 = message; + JSCompiler_object_inline_digest_2986 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2987 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_2988 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_digest_2986; + nextFallbackChildren = JSCompiler_object_inline_message_2985; + componentStack = JSCompiler_object_inline_componentStack_2988; + "POSTPONE" !== nextPrimaryChildren && + ((JSCompiler_object_inline_componentStack_2988 = + nextFallbackChildren + ? Error(nextFallbackChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + )), + (JSCompiler_object_inline_componentStack_2988.stack = + JSCompiler_object_inline_stack_2987 || ""), + (JSCompiler_object_inline_componentStack_2988.digest = + nextPrimaryChildren), + (JSCompiler_object_inline_stack_2987 = + void 0 === componentStack ? null : componentStack), + (nextPrimaryChildren = { + value: JSCompiler_object_inline_componentStack_2988, + source: null, + stack: JSCompiler_object_inline_stack_2987 + }), + "string" === typeof JSCompiler_object_inline_stack_2987 && + CapturedStacks.set( + JSCompiler_object_inline_componentStack_2988, + nextPrimaryChildren + ), + queueHydrationError(nextPrimaryChildren)); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_componentStack_2910 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2910) - ) { - JSCompiler_object_inline_componentStack_2910 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_componentStack_2910 && - ((JSCompiler_object_inline_stack_2909 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2909 = - 0 !== (JSCompiler_object_inline_stack_2909 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2909 - )), - (JSCompiler_object_inline_stack_2909 = - 0 !== - (JSCompiler_object_inline_stack_2909 & - (JSCompiler_object_inline_componentStack_2910.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2909), - 0 !== JSCompiler_object_inline_stack_2909 && - JSCompiler_object_inline_stack_2909 !== - JSCompiler_object_inline_digest_2908.retryLane) - ) - throw ( - ((JSCompiler_object_inline_digest_2908.retryLane = - JSCompiler_object_inline_stack_2909), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2909 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2910, - current, - JSCompiler_object_inline_stack_2909 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_message_2907.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_message_2907.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_digest_2908.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2907.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2909.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_componentStack_2988 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_componentStack_2988) + ) { + JSCompiler_object_inline_componentStack_2988 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_componentStack_2988 && + ((JSCompiler_object_inline_stack_2987 = getBumpedLaneForHydration( + JSCompiler_object_inline_componentStack_2988, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2987 && + JSCompiler_object_inline_stack_2987 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2987), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2987 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_componentStack_2988, + current, + JSCompiler_object_inline_stack_2987 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_message_2985.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_message_2985.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_message_2985.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2987.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_digest_2986) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2907 = - JSCompiler_object_inline_stack_2909.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2987.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2909 = createWorkInProgress( + (JSCompiler_object_inline_message_2985 = componentStack.sibling), + (JSCompiler_object_inline_stack_2987 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2909.children + children: JSCompiler_object_inline_stack_2987.children } )), - (JSCompiler_object_inline_stack_2909.subtreeFlags = + (JSCompiler_object_inline_stack_2987.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_message_2907 = createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_message_2907 + null !== JSCompiler_object_inline_message_2985 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_message_2985, + nextPrimaryChildren )) - : ((JSCompiler_object_inline_message_2907 = createFiberFromFragment( - JSCompiler_object_inline_message_2907, + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_message_2907.flags |= 2)), - (JSCompiler_object_inline_message_2907.return = workInProgress), - (JSCompiler_object_inline_stack_2909.return = workInProgress), - (JSCompiler_object_inline_stack_2909.sibling = - JSCompiler_object_inline_message_2907), - (workInProgress.child = JSCompiler_object_inline_stack_2909), - (JSCompiler_object_inline_stack_2909 = - JSCompiler_object_inline_message_2907), - (JSCompiler_object_inline_message_2907 = workInProgress.child), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2987.return = workInProgress), + (JSCompiler_object_inline_stack_2987.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2987), + (JSCompiler_object_inline_stack_2987 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_message_2985 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_message_2985 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_message_2985, + pool: JSCompiler_object_inline_message_2985 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10615,33 +10662,31 @@ baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_message_2907.memoizedState = - nextFallbackChildren), - (JSCompiler_object_inline_message_2907.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2910, - renderLanes - )), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2988, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2909 + JSCompiler_object_inline_stack_2987 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2909.children + children: JSCompiler_object_inline_stack_2987.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2910 = + ((JSCompiler_object_inline_componentStack_2988 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2910 + null === JSCompiler_object_inline_componentStack_2988 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2910.push(current)); + : JSCompiler_object_inline_componentStack_2988.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11003,6 +11048,14 @@ stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -11081,7 +11134,7 @@ } function beginWork(current, workInProgress, renderLanes) { if (workInProgress._debugNeedsRemount && null !== current) { - renderLanes = createFiberFromTypeAndProps( + var copiedFiber = createFiberFromTypeAndProps( workInProgress.type, workInProgress.key, workInProgress.pendingProps, @@ -11089,19 +11142,19 @@ workInProgress.mode, workInProgress.lanes ); - renderLanes._debugStack = workInProgress._debugStack; - renderLanes._debugTask = workInProgress._debugTask; + copiedFiber._debugStack = workInProgress._debugStack; + copiedFiber._debugTask = workInProgress._debugTask; var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; workInProgress.alternate = null; - renderLanes.index = workInProgress.index; - renderLanes.sibling = workInProgress.sibling; - renderLanes.return = workInProgress.return; - renderLanes.ref = workInProgress.ref; - renderLanes._debugInfo = workInProgress._debugInfo; + copiedFiber.index = workInProgress.index; + copiedFiber.sibling = workInProgress.sibling; + copiedFiber.return = workInProgress.return; + copiedFiber.ref = workInProgress.ref; + copiedFiber._debugInfo = workInProgress._debugInfo; if (workInProgress === returnFiber.child) - returnFiber.child = renderLanes; + returnFiber.child = copiedFiber; else { var prevSibling = returnFiber.child; if (null === prevSibling) @@ -11109,14 +11162,14 @@ for (; prevSibling.sibling !== workInProgress; ) if (((prevSibling = prevSibling.sibling), null === prevSibling)) throw Error("Expected to find the previous sibling."); - prevSibling.sibling = renderLanes; + prevSibling.sibling = copiedFiber; } - workInProgress = returnFiber.deletions; - null === workInProgress + var deletions = returnFiber.deletions; + null === deletions ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) - : workInProgress.push(current); - renderLanes.flags |= 2; - return renderLanes; + : deletions.push(current); + copiedFiber.flags |= 2; + return copiedFiber; } if (null !== current) if ( @@ -11141,92 +11194,95 @@ } else { didReceiveUpdate = !1; - if ((returnFiber = isHydrating)) - warnIfNotHydrating(), - (returnFiber = 0 !== (workInProgress.flags & 1048576)); - returnFiber && - ((returnFiber = workInProgress.index), + var JSCompiler_temp; + if ((JSCompiler_temp = isHydrating)) warnIfNotHydrating(), - pushTreeId(workInProgress, treeForkCount, returnFiber)); + (JSCompiler_temp = 0 !== (workInProgress.flags & 1048576)); + if (JSCompiler_temp) { + var slotIndex = workInProgress.index; + warnIfNotHydrating(); + pushTreeId(workInProgress, treeForkCount, slotIndex); + } } workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - a: if ( - ((returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(workInProgress.elementType)), - (workInProgress.type = current), - "function" === typeof current) - ) - shouldConstruct(current) - ? ((returnFiber = resolveClassComponentProps( - current, - returnFiber - )), - (workInProgress.tag = 1), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ))) - : ((workInProgress.tag = 0), - validateFunctionComponentInDev(workInProgress, current), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ))); - else { - if (void 0 !== current && null !== current) - if ( - ((prevSibling = current.$$typeof), - prevSibling === REACT_FORWARD_REF_TYPE) - ) { - workInProgress.tag = 11; - workInProgress.type = current = - resolveForwardRefForHotReloading(current); - workInProgress = updateForwardRef( - null, - workInProgress, - current, - returnFiber, - renderLanes + a: { + var props = workInProgress.pendingProps; + var Component = callLazyInitInDEV(workInProgress.elementType); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props ); - break a; - } else if (prevSibling === REACT_MEMO_TYPE) { - workInProgress.tag = 14; - workInProgress = updateMemoComponent( + workInProgress.tag = 1; + workInProgress.type = Component = + resolveFunctionForHotReloading(Component); + var JSCompiler_inline_result = updateClassComponent( null, workInProgress, - current, - returnFiber, + Component, + resolvedProps, renderLanes ); - break a; + } else + (workInProgress.tag = 0), + validateFunctionComponentInDev(workInProgress, Component), + (workInProgress.type = Component = + resolveFunctionForHotReloading(Component)), + (JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + props, + renderLanes + )); + else { + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = 11; + workInProgress.type = Component = + resolveForwardRefForHotReloading(Component); + JSCompiler_inline_result = updateForwardRef( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + JSCompiler_inline_result = updateMemoComponent( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } } - workInProgress = ""; - null !== current && - "object" === typeof current && - current.$$typeof === REACT_LAZY_TYPE && - (workInProgress = - " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - current + - ". Lazy element type must resolve to a class or function." + - workInProgress - ); + var hint = ""; + null !== Component && + "object" === typeof Component && + Component.$$typeof === REACT_LAZY_TYPE && + (hint = + " Did you wrap a component in React.lazy() more than once?"); + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + loggedComponent + + ". Lazy element type must resolve to a class or function." + + hint + ); + } } - return workInProgress; + return JSCompiler_inline_result; case 0: return updateFunctionComponent( current, @@ -11236,19 +11292,17 @@ renderLanes ); case 1: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component = workInProgress.type, + _resolvedProps4 = resolveClassComponentProps( + _Component, workInProgress.pendingProps - )), - updateClassComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + ); + return updateClassComponent( + current, + workInProgress, + _Component, + _resolvedProps4, + renderLanes ); case 3: a: { @@ -11260,15 +11314,15 @@ throw Error( "Should have a current fiber. This is a bug in React." ); - returnFiber = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - prevSibling = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, returnFiber, null, renderLanes); - var nextState = workInProgress.memoizedState; - returnFiber = nextState.cache; - pushProvider(workInProgress, CacheContext, returnFiber); - returnFiber !== prevState.cache && + processUpdateQueue(workInProgress, nextProps, null, renderLanes); + var nextState = workInProgress.memoizedState, + nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -11276,296 +11330,303 @@ !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - returnFiber = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: returnFiber, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (returnFiber !== prevSibling) { - prevSibling = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error( "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering." ), workInProgress ); - queueHydrationError(prevSibling); - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; didSuspendOrErrorDEV = !1; hydrationDiffRootDEV = null; rootOrSingletonContext = !0; - current = mountChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - ); - for (workInProgress.child = current; current; ) - (current.flags = (current.flags & -3) | 4096), - (current = current.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), + (node = node.sibling); } - else { + } else { resetHydrationState(); - if (returnFiber === prevSibling) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = + bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } reconcileChildren( current, workInProgress, - returnFiber, + nextChildren, renderLanes ); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (current = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = current) - : isHydrating || - ((current = workInProgress.type), - (renderLanes = workInProgress.pendingProps), - (returnFiber = requiredContext( - rootInstanceStackCursor.current - )), - (returnFiber = - getOwnerDocumentFromRootContainer( - returnFiber - ).createElement(current)), - (returnFiber[internalInstanceKey] = workInProgress), - (returnFiber[internalPropsKey] = renderLanes), - setInitialProperties(returnFiber, current, renderLanes), - markNodeAsHoistable(returnFiber), - (workInProgress.stateNode = returnFiber)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + rootContainerInstance = requiredContext( + rootInstanceStackCursor.current + ), + domElement = getOwnerDocumentFromRootContainer( + rootContainerInstance + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((returnFiber = requiredContext(rootInstanceStackCursor.current)), - (prevSibling = getHostContext()), - (returnFiber = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, - returnFiber, - prevSibling, - !1 - )), - didSuspendOrErrorDEV || - ((prevSibling = diffHydratedProperties( - returnFiber, - workInProgress.type, - workInProgress.pendingProps, - prevSibling - )), - null !== prevSibling && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevSibling)), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (prevSibling = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = prevSibling), - (nextHydratableInstance = getNextHydratable( - returnFiber.firstChild - ))) - : (nextHydratableInstance = prevSibling)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var currentRootContainer = requiredContext( + rootInstanceStackCursor.current + ), + currentHostContext = getHostContext(), + instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + currentRootContainer, + currentHostContext, + !1 + )); + if (!didSuspendOrErrorDEV) { + var differences = diffHydratedProperties( + instance, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext + ); + null !== differences && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences); + } + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable( + instance.firstChild + ))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: - return ( - null === current && - isHydrating && - ((prevState = getHostContext()), - (returnFiber = validateDOMNesting( + if (null === current && isHydrating) { + var currentHostContext$jscomp$0 = getHostContext(), + shouldKeepWarning = validateDOMNesting( workInProgress.type, - prevState.ancestorInfo - )), - (prevSibling = nextHydratableInstance), - (nextState = !prevSibling) || - ((nextState = canHydrateInstance( - prevSibling, - workInProgress.type, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== nextState - ? ((workInProgress.stateNode = nextState), - didSuspendOrErrorDEV || - ((prevState = diffHydratedProperties( - nextState, - workInProgress.type, - workInProgress.pendingProps, - prevState - )), - null !== prevState && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevState)), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - nextState.firstChild - )), - (rootOrSingletonContext = !1), - (prevState = !0)) - : (prevState = !1), - (nextState = !prevState)), - nextState && - (returnFiber && - warnNonHydratedInstance(workInProgress, prevSibling), - throwOnHydrationMismatch(workInProgress))), - pushHostContext(workInProgress), - (prevSibling = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (returnFiber = prevState.children), - shouldSetTextContent(prevSibling, prevState) - ? (returnFiber = null) - : null !== nextState && - shouldSetTextContent(prevSibling, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((prevSibling = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes - )), - (HostTransitionContext._currentValue = prevSibling)), - markRef(current, workInProgress), - reconcileChildren( + currentHostContext$jscomp$0.ancestorInfo + ), + nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if (!(JSCompiler_temp$jscomp$0 = !nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== instance$jscomp$0) { + workInProgress.stateNode = instance$jscomp$0; + if (!didSuspendOrErrorDEV) { + var differences$jscomp$0 = diffHydratedProperties( + instance$jscomp$0, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext$jscomp$0 + ); + null !== differences$jscomp$0 && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences$jscomp$0); + } + hydrationParentFiber = workInProgress; + nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + ); + rootOrSingletonContext = !1; + var JSCompiler_inline_result$jscomp$1 = !0; + } else JSCompiler_inline_result$jscomp$1 = !1; + JSCompiler_temp$jscomp$0 = !JSCompiler_inline_result$jscomp$1; + } + JSCompiler_temp$jscomp$0 && + (shouldKeepWarning && + warnNonHydratedInstance(workInProgress, nextInstance), + throwOnHydrationMismatch(workInProgress)); + } + pushHostContext(workInProgress); + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && + (workInProgress.flags |= 32); + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, - returnFiber, + TransitionAwareHostComponent, + null, + null, renderLanes - ), - workInProgress.child + ); + HostTransitionContext._currentValue = newState; + } + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes ); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - ((current = workInProgress.pendingProps), - (renderLanes = getHostContext()), - (returnFiber = renderLanes.ancestorInfo.current), - (current = - null != returnFiber - ? validateTextNesting( - current, - returnFiber.tag, - renderLanes.ancestorInfo.implicitRootScope - ) - : !0), - (renderLanes = nextHydratableInstance), - (returnFiber = !renderLanes) || - ((returnFiber = canHydrateTextInstance( - renderLanes, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== returnFiber - ? ((workInProgress.stateNode = returnFiber), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (returnFiber = !0)) - : (returnFiber = !1), - (returnFiber = !returnFiber)), - returnFiber && - (current && - warnNonHydratedInstance(workInProgress, renderLanes), - throwOnHydrationMismatch(workInProgress))), - null - ); + if (null === current && isHydrating) { + var text = workInProgress.pendingProps, + currentHostContext$jscomp$1 = getHostContext(), + ancestor = currentHostContext$jscomp$1.ancestorInfo.current; + var shouldKeepWarning$jscomp$0 = + null != ancestor + ? validateTextNesting( + text, + ancestor.tag, + currentHostContext$jscomp$1.ancestorInfo.implicitRootScope + ) + : !0; + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$1; + if (!(JSCompiler_temp$jscomp$1 = !nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== textInstance) { + workInProgress.stateNode = textInstance; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + var JSCompiler_inline_result$jscomp$2 = !0; + } else JSCompiler_inline_result$jscomp$2 = !1; + JSCompiler_temp$jscomp$1 = !JSCompiler_inline_result$jscomp$2; + } + JSCompiler_temp$jscomp$1 && + (shouldKeepWarning$jscomp$0 && + warnNonHydratedInstance(workInProgress, nextInstance$jscomp$0), + throwOnHydrationMismatch(workInProgress)); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (returnFiber = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - )) - : reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo ); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: return updateForwardRef( current, @@ -11575,17 +11636,15 @@ renderLanes ); case 7: - return ( - (returnFiber = workInProgress.pendingProps), - markRef(current, workInProgress), - reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -11597,64 +11656,53 @@ workInProgress.child ); case 12: - return ( - (workInProgress.flags |= 4), - (workInProgress.flags |= 2048), - (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = -0), - (returnFiber.passiveEffectDuration = -0), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + workInProgress.flags |= 4; + workInProgress.flags |= 2048; + var stateNode = workInProgress.stateNode; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 10: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevState = prevSibling.value), - "value" in prevSibling || - hasWarnedAboutUsingNoValuePropOnContextProvider || - ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), - console.error( - "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )), - pushProvider(workInProgress, returnFiber, prevState), - reconcileChildren( - current, - workInProgress, - prevSibling.children, - renderLanes - ), - workInProgress.child + var context = workInProgress.type; + var newProps = workInProgress.pendingProps, + newValue = newProps.value; + "value" in newProps || + hasWarnedAboutUsingNoValuePropOnContextProvider || + ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), + console.error( + "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" + )); + pushProvider(workInProgress, context, newValue); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes ); + return workInProgress.child; case 9: - return ( - (prevSibling = workInProgress.type._context), - (returnFiber = workInProgress.pendingProps.children), - "function" !== typeof returnFiber && - console.error( - "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." - ), - prepareToReadContext(workInProgress), - (prevSibling = readContext(prevSibling)), - (returnFiber = callComponentInDEV( - returnFiber, - prevSibling, - void 0 - )), - (workInProgress.flags |= 1), - reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + var context$jscomp$0 = workInProgress.type._context; + var render = workInProgress.pendingProps.children; + "function" !== typeof render && + console.error( + "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." + ); + prepareToReadContext(workInProgress); + var newValue$jscomp$0 = readContext(context$jscomp$0); + var newChildren = callComponentInDEV( + render, + newValue$jscomp$0, + void 0 ); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: return updateMemoComponent( current, @@ -11678,40 +11726,163 @@ renderLanes ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( - renderLanes, - returnFiber - )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$3; case 22: return updateOffscreenComponent( current, @@ -11720,103 +11891,108 @@ workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (returnFiber = readContext(CacheContext)), - null === current - ? ((prevSibling = peekCacheFromPool()), - null === prevSibling && - ((prevSibling = workInProgressRoot), - (prevState = createCache()), - (prevSibling.pooledCache = prevState), - retainCache(prevState), - null !== prevState && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = prevState)), - (workInProgress.memoizedState = { - parent: returnFiber, - cache: prevSibling - }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, prevSibling)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (prevSibling = current.memoizedState), - (prevState = workInProgress.memoizedState), - prevSibling.parent !== returnFiber - ? ((prevSibling = { - parent: returnFiber, - cache: returnFiber - }), - (workInProgress.memoizedState = prevSibling), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - prevSibling), - pushProvider(workInProgress, CacheContext, returnFiber)) - : ((returnFiber = prevState.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) var freshCache = cacheFromPool; + else { + var root$jscomp$0 = workInProgressRoot, + freshCache$jscomp$0 = createCache(); + root$jscomp$0.pooledCache = freshCache$jscomp$0; + retainCache(freshCache$jscomp$0); + null !== freshCache$jscomp$0 && + (root$jscomp$0.pooledCacheLanes |= renderLanes); + freshCache = freshCache$jscomp$0; + } + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 30: - return ( - (returnFiber = workInProgress.pendingProps), - (prevSibling = workInProgress.stateNode), - null != returnFiber.name && "auto" !== returnFiber.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === prevSibling.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (prevSibling.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - void 0 !== returnFiber.className && - ((prevSibling = - "string" === typeof returnFiber.className - ? JSON.stringify(returnFiber.className) - : "{...}"), - didWarnAboutClassNameOnViewTransition[prevSibling] || - ((didWarnAboutClassNameOnViewTransition[prevSibling] = !0), - console.error( - ' doesn\'t accept a "className" prop. It has been renamed to "default".\n- \n+ ', - prevSibling, - prevSibling - ))), - null !== current && current.memoizedProps.name !== returnFiber.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), - reconcileChildren( - current, - workInProgress, - returnFiber.children, - renderLanes - ), - workInProgress.child + var pendingProps = workInProgress.pendingProps, + instance$jscomp$1 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$1.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = + "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$1.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + if (void 0 !== pendingProps.className) { + var example = + "string" === typeof pendingProps.className + ? JSON.stringify(pendingProps.className) + : "{...}"; + didWarnAboutClassNameOnViewTransition[example] || + ((didWarnAboutClassNameOnViewTransition[example] = !0), + console.error( + ' doesn\'t accept a "className" prop. It has been renamed to "default".\n- \n+ ', + example, + example + )); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; case 29: throw workInProgress.pendingProps; } @@ -11972,7 +12148,6 @@ var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -12304,6 +12479,63 @@ } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12311,23 +12543,25 @@ (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12335,11 +12569,11 @@ emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12592,6 +12826,22 @@ case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12652,6 +12902,10 @@ case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13795,16 +14049,19 @@ } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -14176,6 +14433,11 @@ } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -14406,7 +14668,7 @@ null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -14415,7 +14677,7 @@ deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -14527,6 +14789,25 @@ popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + finishedRoot + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -14548,6 +14829,7 @@ } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -14684,13 +14966,13 @@ safelyDetachRef(current, current.return)); flags & 64 && offscreenSubtreeIsHidden && - ((current = finishedWork.updateQueue), - null !== current && - ((flags = current.callbacks), - null !== flags && - ((root = current.shared.hiddenCallbacks), - (current.shared.hiddenCallbacks = - null === root ? flags : root.concat(flags))))); + ((flags = finishedWork.updateQueue), + null !== flags && + ((current = flags.callbacks), + null !== current && + ((root = flags.shared.hiddenCallbacks), + (flags.shared.hiddenCallbacks = + null === root ? current : root.concat(current))))); break; case 26: var hoistableRoot = currentHoistableRoot; @@ -14709,10 +14991,10 @@ if (null === flags) if (null === finishedWork.stateNode) { a: { - current = finishedWork.type; - flags = finishedWork.memoizedProps; + flags = finishedWork.type; + current = finishedWork.memoizedProps; root = hoistableRoot.ownerDocument || hoistableRoot; - b: switch (current) { + b: switch (flags) { case "title": lanes = root.getElementsByTagName("title")[0]; if ( @@ -14722,15 +15004,15 @@ lanes.namespaceURI === SVG_NAMESPACE || lanes.hasAttribute("itemprop") ) - (lanes = root.createElement(current)), + (lanes = root.createElement(flags)), root.head.insertBefore( lanes, root.querySelector("head > title") ); - setInitialProperties(lanes, current, flags); + setInitialProperties(lanes, flags, current); lanes[internalInstanceKey] = finishedWork; markNodeAsHoistable(lanes); - current = lanes; + flags = lanes; break a; case "link": if ( @@ -14738,29 +15020,31 @@ "link", "href", root - ).get(current + (flags.href || ""))) + ).get(flags + (current.href || ""))) ) for (var i = 0; i < hoistableRoot.length; i++) if ( ((lanes = hoistableRoot[i]), lanes.getAttribute("href") === - (null == flags.href || "" === flags.href + (null == current.href || "" === current.href ? null - : flags.href) && + : current.href) && lanes.getAttribute("rel") === - (null == flags.rel ? null : flags.rel) && + (null == current.rel ? null : current.rel) && lanes.getAttribute("title") === - (null == flags.title ? null : flags.title) && + (null == current.title + ? null + : current.title) && lanes.getAttribute("crossorigin") === - (null == flags.crossOrigin + (null == current.crossOrigin ? null - : flags.crossOrigin)) + : current.crossOrigin)) ) { hoistableRoot.splice(i, 1); break b; } - lanes = root.createElement(current); - setInitialProperties(lanes, current, flags); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); root.head.appendChild(lanes); break; case "meta": @@ -14769,53 +15053,55 @@ "meta", "content", root - ).get(current + (flags.content || ""))) + ).get(flags + (current.content || ""))) ) for (i = 0; i < hoistableRoot.length; i++) if ( ((lanes = hoistableRoot[i]), checkAttributeStringCoercion( - flags.content, + current.content, "content" ), lanes.getAttribute("content") === - (null == flags.content + (null == current.content ? null - : "" + flags.content) && + : "" + current.content) && lanes.getAttribute("name") === - (null == flags.name ? null : flags.name) && + (null == current.name + ? null + : current.name) && lanes.getAttribute("property") === - (null == flags.property + (null == current.property ? null - : flags.property) && + : current.property) && lanes.getAttribute("http-equiv") === - (null == flags.httpEquiv + (null == current.httpEquiv ? null - : flags.httpEquiv) && + : current.httpEquiv) && lanes.getAttribute("charset") === - (null == flags.charSet + (null == current.charSet ? null - : flags.charSet)) + : current.charSet)) ) { hoistableRoot.splice(i, 1); break b; } - lanes = root.createElement(current); - setInitialProperties(lanes, current, flags); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); root.head.appendChild(lanes); break; default: throw Error( 'getNodesForType encountered a type it did not expect: "' + - current + + flags + '". This is a bug in React.' ); } lanes[internalInstanceKey] = finishedWork; markNodeAsHoistable(lanes); - current = lanes; + flags = lanes; } - finishedWork.stateNode = current; + finishedWork.stateNode = flags; } else mountHoistable( hoistableRoot, @@ -14952,23 +15238,32 @@ root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: - current = pushMutationContext(); - flags = currentHoistableRoot; + flags = pushMutationContext(); + current = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = flags; + currentHoistableRoot = current; viewTransitionMutationContext && (rootViewTransitionAffected = !0); - viewTransitionMutationContext = current; + viewTransitionMutationContext = flags; break; case 12: - current = pushNestedEffectDurations(); + flags = pushNestedEffectDurations(); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); finishedWork.stateNode.effectDuration += - bubbleNestedEffectDurations(current); + bubbleNestedEffectDurations(flags); + break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -14978,10 +15273,10 @@ (null !== current && null !== current.memoizedState) && (globalMostRecentFallbackTime = now$1()); flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && + ((flags = finishedWork.updateQueue), + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, current))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 22: hoistableRoot = null !== finishedWork.memoizedState; @@ -15071,6 +15366,26 @@ captureCommitPhaseError(lanes, lanes.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + lanes = root; + try { + var instance$jscomp$0 = lanes.stateNode; + hoistableRoot + ? runWithFiberInDEV( + lanes, + hideDehydratedBoundary, + instance$jscomp$0 + ) + : runWithFiberInDEV( + lanes, + unhideDehydratedBoundary, + lanes.stateNode + ); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -15093,21 +15408,21 @@ root = root.sibling; } flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && - ((flags = current.retryQueue), - null !== flags && - ((current.retryQueue = null), - attachSuspenseRetryListeners(finishedWork, flags)))); + ((flags = finishedWork.updateQueue), + null !== flags && + ((current = flags.retryQueue), + null !== current && + ((flags.retryQueue = null), + attachSuspenseRetryListeners(finishedWork, current)))); break; case 19: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && + ((flags = finishedWork.updateQueue), + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, current))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 30: flags & 512 && @@ -15447,6 +15762,16 @@ includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -15696,6 +16021,40 @@ endTime ); break; + case 31: + flags = inHydratedSubtree; + isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null; + prevProfilerEffectDuration = finishedWork.memoizedState; + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + inHydratedSubtree = flags; + break; case 13: flags = inHydratedSubtree; isViewTransitionEligible = @@ -19251,6 +19610,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -22966,24 +23326,28 @@ : container ).removeChild(child); } - function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, + function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), node === SUSPENSE_END_DATA)) { + if ( + ((node = nextNode.data), + node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) + ) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; } else if ( node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || - node === SUSPENSE_FALLBACK_START_DATA + node === SUSPENSE_FALLBACK_START_DATA || + node === ACTIVITY_START_DATA ) depth++; else if (node === PREAMBLE_CONTRIBUTION_HTML) @@ -23009,7 +23373,38 @@ releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); + } + function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && + node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), node === SUSPENSE_END_DATA)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + (node !== SUSPENSE_START_DATA && + node !== SUSPENSE_PENDING_START_DATA && + node !== SUSPENSE_FALLBACK_START_DATA) || + suspenseInstance++; + node = nextNode; + } while (node); + } + function hideDehydratedBoundary(suspenseInstance) { + hideOrUnhideDehydratedBoundary(suspenseInstance, !0); } function hideInstance(instance) { instance = instance.style; @@ -23020,6 +23415,9 @@ function hideTextInstance(textInstance) { textInstance.nodeValue = ""; } + function unhideDehydratedBoundary(dehydratedInstance) { + hideOrUnhideDehydratedBoundary(dehydratedInstance, !1); + } function unhideInstance(instance, props) { props = props[STYLE]; props = @@ -23772,6 +24170,14 @@ } return instance; } + function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; + } function isSuspenseInstanceFallback(instance) { return ( instance.data === SUSPENSE_FALLBACK_START_DATA || @@ -23805,11 +24211,13 @@ nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || + nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING ) break; - if (nodeType === SUSPENSE_END_DATA) return null; + if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA) + return null; } } return node; @@ -23833,7 +24241,9 @@ return { type: JSCompiler_temp_const, props: serverDifferences }; } return 8 === instance.nodeType - ? { type: "Suspense", props: {} } + ? instance.data === ACTIVITY_START_DATA + ? { type: "Activity", props: {} } + : { type: "Suspense", props: {} } : instance.nodeValue; } function diffHydratedTextForDevWarnings(textInstance, text, parentProps) { @@ -23850,26 +24260,29 @@ textInstance) : null; } - function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { - suspenseInstance = suspenseInstance.nextSibling; - for (var depth = 0; suspenseInstance; ) { - if (8 === suspenseInstance.nodeType) { - var data = suspenseInstance.data; - if (data === SUSPENSE_END_DATA) { + function getNextHydratableInstanceAfterHydrationBoundary( + hydrationInstance + ) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) { if (0 === depth) - return getNextHydratable(suspenseInstance.nextSibling); + return getNextHydratable(hydrationInstance.nextSibling); depth--; } else (data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && - data !== SUSPENSE_PENDING_START_DATA) || + data !== SUSPENSE_PENDING_START_DATA && + data !== ACTIVITY_START_DATA) || depth++; } - suspenseInstance = suspenseInstance.nextSibling; + hydrationInstance = hydrationInstance.nextSibling; } return null; } - function getParentSuspenseInstance(targetInstance) { + function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { @@ -23877,11 +24290,14 @@ if ( data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || - data === SUSPENSE_PENDING_START_DATA + data === SUSPENSE_PENDING_START_DATA || + data === ACTIVITY_START_DATA ) { if (0 === depth) return targetInstance; depth--; - } else data === SUSPENSE_END_DATA && depth++; + } else + (data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA) || + depth++; } targetInstance = targetInstance.previousSibling; } @@ -23890,6 +24306,9 @@ function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -24874,12 +25293,21 @@ (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -24974,6 +25402,7 @@ } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -25019,6 +25448,10 @@ targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -25268,17 +25701,18 @@ ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -28860,6 +29294,8 @@ EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", + ACTIVITY_START_DATA = "&", + ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", @@ -29488,11 +29924,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -29529,10 +29965,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-experimental-bc6184dd-20250417", + version: "19.2.0-experimental-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-bc6184dd-20250417" + reconcilerVersion: "19.2.0-experimental-914319ae-20250423" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -30004,7 +30440,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js index aa0ed52fdd831..907c428399555 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js @@ -64,6 +64,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -853,6 +863,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -978,12 +996,12 @@ function getClosestInstanceFromNode(targetNode) { (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -1001,6 +1019,7 @@ function getInstanceFromNode(node) { 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -2736,6 +2755,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiberImplClass(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiberImplClass( 4, @@ -2822,6 +2846,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -2919,6 +2951,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2949,25 +2982,14 @@ function popHydrationState(fiber) { fiber = fiber.memoizedState; fiber = null !== fiber ? fiber.dehydrated : null; if (!fiber) throw Error(formatProdErrorMessage(317)); - a: { - fiber = fiber.nextSibling; - for (tag = 0; fiber; ) { - if (8 === fiber.nodeType) - if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { - if (0 === tag) { - nextHydratableInstance = getNextHydratable(fiber.nextSibling); - break a; - } - tag--; - } else - ("$" !== JSCompiler_temp && - "$!" !== JSCompiler_temp && - "$?" !== JSCompiler_temp) || - tag++; - fiber = fiber.nextSibling; - } - nextHydratableInstance = null; - } + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -4968,19 +4990,17 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack() { push(suspenseStackCursor, suspenseStackCursor.current); @@ -6782,6 +6802,7 @@ function throwException( var suspenseBoundary = suspenseHandlerStackCursor.current; if (null !== suspenseBoundary) { switch (suspenseBoundary.tag) { + case 31: case 13: return ( null === shellBoundary @@ -7084,7 +7105,18 @@ function updateOffscreenComponent( renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -7094,16 +7126,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -7138,6 +7160,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7513,39 +7557,28 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - renderLanes = current; - for (current = rootOrSingletonContext; 8 !== renderLanes.nodeType; ) { - if (!current) { - current = null; - break a; - } - renderLanes = getNextHydratable(renderLanes.nextSibling); - if (null === renderLanes) { - current = null; - break a; - } - } - current = renderLanes; - } - null !== current && - ((workInProgress.memoizedState = { - dehydrated: current, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (renderLanes = createFiberImplClass(18, null, null, 0)), - (renderLanes.stateNode = current), - (renderLanes.return = workInProgress), - (workInProgress.child = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else current = null; + (current = nextHydratableInstance) + ? ((current = canHydrateHydrationBoundary( + current, + rootOrSingletonContext + )), + (current = null !== current && "&" !== current.data ? current : null), + null !== current && + ((workInProgress.memoizedState = { + dehydrated: current, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (renderLanes = createFiberFromDehydratedFragment(current)), + (renderLanes.return = workInProgress), + (workInProgress.child = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (current = null); if (null === current) throw throwOnHydrationMismatch(workInProgress); isSuspenseInstanceFallback(current) ? (workInProgress.lanes = 32) @@ -7620,14 +7653,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7680,15 +7713,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7717,12 +7742,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7734,14 +7754,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7749,7 +7769,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7760,22 +7780,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -8042,6 +8062,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -8540,29 +8568,116 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (lazyComponent = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (lazyComponent = { - mode: lazyComponent.mode, - children: lazyComponent.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - lazyComponent, - renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, lazyComponent)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if ( + ((lazyComponent = current.memoizedState), null !== lazyComponent) + ) + if ( + ((prevState = lazyComponent.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) + ) + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== lazyComponent.retryLane) + ) + throw ( + ((lazyComponent.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = lazyComponent.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -8723,14 +8838,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$124 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$124 = lastTailNode), + for (var lastTailNode$125 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$125 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$124 + null === lastTailNode$125 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$124.sibling = null); + : (lastTailNode$125.sibling = null); } } function bubbleProperties(completedWork) { @@ -8742,53 +8857,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$126 = completedWork.selfBaseDuration, - child$127 = completedWork.child; - null !== child$127; + var treeBaseDuration$127 = completedWork.selfBaseDuration, + child$128 = completedWork.child; + null !== child$128; ) - (newChildLanes |= child$127.lanes | child$127.childLanes), - (subtreeFlags |= child$127.subtreeFlags & 65011712), - (subtreeFlags |= child$127.flags & 65011712), - (treeBaseDuration$126 += child$127.treeBaseDuration), - (child$127 = child$127.sibling); - completedWork.treeBaseDuration = treeBaseDuration$126; + (newChildLanes |= child$128.lanes | child$128.childLanes), + (subtreeFlags |= child$128.subtreeFlags & 65011712), + (subtreeFlags |= child$128.flags & 65011712), + (treeBaseDuration$127 += child$128.treeBaseDuration), + (child$128 = child$128.sibling); + completedWork.treeBaseDuration = treeBaseDuration$127; } else for ( - treeBaseDuration$126 = completedWork.child; - null !== treeBaseDuration$126; + treeBaseDuration$127 = completedWork.child; + null !== treeBaseDuration$127; ) (newChildLanes |= - treeBaseDuration$126.lanes | treeBaseDuration$126.childLanes), - (subtreeFlags |= treeBaseDuration$126.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$126.flags & 65011712), - (treeBaseDuration$126.return = completedWork), - (treeBaseDuration$126 = treeBaseDuration$126.sibling); + treeBaseDuration$127.lanes | treeBaseDuration$127.childLanes), + (subtreeFlags |= treeBaseDuration$127.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$127.flags & 65011712), + (treeBaseDuration$127.return = completedWork), + (treeBaseDuration$127 = treeBaseDuration$127.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$126 = completedWork.actualDuration; - child$127 = completedWork.selfBaseDuration; + treeBaseDuration$127 = completedWork.actualDuration; + child$128 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$126 += child.actualDuration), - (child$127 += child.treeBaseDuration), + (treeBaseDuration$127 += child.actualDuration), + (child$128 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$126; - completedWork.treeBaseDuration = child$127; + completedWork.actualDuration = treeBaseDuration$127; + completedWork.treeBaseDuration = child$128; } else for ( - treeBaseDuration$126 = completedWork.child; - null !== treeBaseDuration$126; + treeBaseDuration$127 = completedWork.child; + null !== treeBaseDuration$127; ) (newChildLanes |= - treeBaseDuration$126.lanes | treeBaseDuration$126.childLanes), - (subtreeFlags |= treeBaseDuration$126.subtreeFlags), - (subtreeFlags |= treeBaseDuration$126.flags), - (treeBaseDuration$126.return = completedWork), - (treeBaseDuration$126 = treeBaseDuration$126.sibling); + treeBaseDuration$127.lanes | treeBaseDuration$127.childLanes), + (subtreeFlags |= treeBaseDuration$127.subtreeFlags), + (subtreeFlags |= treeBaseDuration$127.flags), + (treeBaseDuration$127.return = completedWork), + (treeBaseDuration$127 = treeBaseDuration$127.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8797,7 +8912,6 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -9056,6 +9170,53 @@ function completeWork(current, workInProgress, renderLanes) { } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -9063,28 +9224,30 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) throw Error(formatProdErrorMessage(318)); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) throw Error(formatProdErrorMessage(317)); - type[internalInstanceKey] = workInProgress; + if (!nextResource) throw Error(formatProdErrorMessage(318)); + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error(formatProdErrorMessage(317)); + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); } else resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -9315,6 +9478,20 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9373,6 +9550,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9539,8 +9720,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$162) { - captureCommitPhaseError(current, nearestMountedAncestor, error$162); + } catch (error$168) { + captureCommitPhaseError(current, nearestMountedAncestor, error$168); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -9611,8 +9792,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$164) { - captureCommitPhaseError(current, nearestMountedAncestor, error$164); + } catch (error$170) { + captureCommitPhaseError(current, nearestMountedAncestor, error$170); } else ref.current = null; } @@ -10288,15 +10469,18 @@ var offscreenSubtreeIsHidden = !1, viewTransitionContextChanged$1 = !1, rootViewTransitionAffected = !1; function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -10546,11 +10730,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$159) { + } catch (error$165) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$165 ); } else { @@ -10567,11 +10751,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$166) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$166 ); } recordEffectDuration(); @@ -10582,11 +10766,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$161) { + } catch (error$167) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$161 + error$167 ); } } @@ -10639,6 +10823,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -10839,7 +11027,7 @@ function commitDeletionEffectsOnFiber( null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -10848,7 +11036,7 @@ function commitDeletionEffectsOnFiber( deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -10950,6 +11138,21 @@ function commitDeletionEffectsOnFiber( popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + retryIfBlockedOn(finishedRoot); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -10967,6 +11170,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -11335,6 +11539,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -11425,6 +11638,18 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { captureCommitPhaseError(lanes, lanes.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + lanes = root; + try { + var instance = lanes.stateNode; + hoistableRoot + ? hideOrUnhideDehydratedBoundary(instance, !0) + : hideOrUnhideDehydratedBoundary(lanes.stateNode, !1); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -11548,25 +11773,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$165 = hostParentFiber.stateNode; + var parent$171 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$165, ""), (hostParentFiber.flags &= -33)); - var before$166 = getHostSibling(finishedWork); + (setTextContent(parent$171, ""), (hostParentFiber.flags &= -33)); + var before$172 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$166, - parent$165, + before$172, + parent$171, parentFragmentInstances ); break; case 3: case 4: - var parent$167 = hostParentFiber.stateNode.containerInfo, - before$168 = getHostSibling(finishedWork); + var parent$173 = hostParentFiber.stateNode.containerInfo, + before$174 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$168, - parent$167, + before$174, + parent$173, parentFragmentInstances ); break; @@ -11841,6 +12066,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -12076,6 +12311,36 @@ function commitPassiveMountOnFiber( endTime ); break; + case 31: + flags = inHydratedSubtree; + isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null; + prevProfilerEffectDuration = finishedWork.memoizedState; + null !== isViewTransitionEligible && null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + null !== isViewTransitionEligible.hydrationErrors && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + inHydratedSubtree = flags; + break; case 13: flags = inHydratedSubtree; isViewTransitionEligible = @@ -13032,7 +13297,7 @@ function recursivelyInsertClones( if (null === nextPhase) recursivelyInsertNewFiber(deletions, i, parentViewTransition, 5); else { - var nextPhase$200 = deletions.flags; + var nextPhase$215 = deletions.flags; switch (deletions.tag) { case 26: recursivelyInsertClones( @@ -13058,16 +13323,16 @@ function recursivelyInsertClones( (setTextContent(clone, ""), (viewTransitionMutationContext = !0))) : (clone = clone.cloneNode(!1)); - if (nextPhase$200 & 4) { - nextPhase$200 = clone; + if (nextPhase$215 & 4) { + nextPhase$215 = clone; var newProps = deletions.memoizedProps; updateProperties( - nextPhase$200, + nextPhase$215, deletions.type, nextPhase.memoizedProps, newProps ); - nextPhase$200[internalPropsKey] = newProps; + nextPhase$215[internalPropsKey] = newProps; } 1 === visitPhase || 2 === visitPhase ? (appendChild(i, clone), @@ -13086,7 +13351,7 @@ function recursivelyInsertClones( if (null === parentViewTransition) throw Error(formatProdErrorMessage(162)); parentViewTransition = parentViewTransition.cloneNode(!1); - nextPhase$200 & 4 && + nextPhase$215 & 4 && ((parentViewTransition.nodeValue = nextPhase.memoizedProps), (viewTransitionMutationContext = !0)); appendChild(i, parentViewTransition); @@ -13099,7 +13364,7 @@ function recursivelyInsertClones( case 22: null === deletions.memoizedState ? ((nextPhase = - 0 === visitPhase && 0 !== (nextPhase$200 & 8192) + 0 === visitPhase && 0 !== (nextPhase$215 & 8192) ? 1 : visitPhase), recursivelyInsertClones( @@ -13117,8 +13382,8 @@ function recursivelyInsertClones( parentViewTransition = pushMutationContext(); clone = deletions.stateNode; clone.clones = null; - nextPhase$200 = 1 === visitPhase ? 2 : visitPhase; - recursivelyInsertClones(deletions, i, clone, nextPhase$200); + nextPhase$215 = 1 === visitPhase ? 2 : visitPhase; + recursivelyInsertClones(deletions, i, clone, nextPhase$215); viewTransitionMutationContext && (deletions.flags |= 4); 1 === visitPhase ? applyExitViewTransition(deletions) @@ -14067,8 +14332,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$207) { - handleThrow(root, thrownValue$207); + } catch (thrownValue$222) { + handleThrow(root, thrownValue$222); } while (1); lanes && root.shellSuspendCounter++; @@ -14193,8 +14458,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$209) { - handleThrow(root, thrownValue$209); + } catch (thrownValue$224) { + handleThrow(root, thrownValue$224); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -14890,26 +15155,26 @@ function commitGestureOnRoot(root, finishedWork) { } var rotate = computedStyle.rotate; if ("none" !== rotate && "" !== rotate) { - var parts$287 = rotate.split(" "); + var parts$302 = rotate.split(" "); transform = - 1 === parts$287.length - ? "rotate(" + parts$287[0] + ") " + transform - : 2 === parts$287.length + 1 === parts$302.length + ? "rotate(" + parts$302[0] + ") " + transform + : 2 === parts$302.length ? "rotate" + - parts$287[0].toUpperCase() + + parts$302[0].toUpperCase() + "(" + - parts$287[1] + + parts$302[1] + ") " + transform - : "rotate3d(" + parts$287.join(", ") + ") " + transform; + : "rotate3d(" + parts$302.join(", ") + ") " + transform; } var translate = computedStyle.translate; if ("none" !== translate && "" !== translate) { - var parts$288 = translate.split(" "); + var parts$303 = translate.split(" "); transform = - (3 === parts$288.length ? "translate3d" : "translate") + + (3 === parts$303.length ? "translate3d" : "translate") + "(" + - parts$288.join(", ") + + parts$303.join(", ") + ") " + transform; } @@ -15224,6 +15489,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -15271,14 +15537,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$215 = firstScheduledRoot; null !== root$215; ) { + for (var root$230 = firstScheduledRoot; null !== root$230; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$215.pendingLanes; + var pendingLanes = root$230.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$215.suspendedLanes, - pingedLanes = root$215.pingedLanes; + var suspendedLanes = root$230.suspendedLanes, + pingedLanes = root$230.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -15292,21 +15558,21 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$215, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$230, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$215, - root$215 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$215.cancelPendingCommit || - -1 !== root$215.timeoutHandle + root$230, + root$230 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$230.cancelPendingCommit || + -1 !== root$230.timeoutHandle )), (0 === (JSCompiler_inline_result & 3) && 64 !== JSCompiler_inline_result) || - checkIfRootIsPrerendering(root$215, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$230, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$215, JSCompiler_inline_result)); - root$215 = root$215.next; + performSyncWorkOnRoot(root$230, JSCompiler_inline_result)); + root$230 = root$230.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -15591,20 +15857,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1881 = 0; - i$jscomp$inline_1881 < simpleEventPluginEvents.length; - i$jscomp$inline_1881++ + var i$jscomp$inline_1929 = 0; + i$jscomp$inline_1929 < simpleEventPluginEvents.length; + i$jscomp$inline_1929++ ) { - var eventName$jscomp$inline_1882 = - simpleEventPluginEvents[i$jscomp$inline_1881], - domEventName$jscomp$inline_1883 = - eventName$jscomp$inline_1882.toLowerCase(), - capitalizedEvent$jscomp$inline_1884 = - eventName$jscomp$inline_1882[0].toUpperCase() + - eventName$jscomp$inline_1882.slice(1); + var eventName$jscomp$inline_1930 = + simpleEventPluginEvents[i$jscomp$inline_1929], + domEventName$jscomp$inline_1931 = + eventName$jscomp$inline_1930.toLowerCase(), + capitalizedEvent$jscomp$inline_1932 = + eventName$jscomp$inline_1930[0].toUpperCase() + + eventName$jscomp$inline_1930.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1883, - "on" + capitalizedEvent$jscomp$inline_1884 + domEventName$jscomp$inline_1931, + "on" + capitalizedEvent$jscomp$inline_1932 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -16861,34 +17127,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$229 = props[hasSrc]; - if (null != propValue$229) + var propValue$244 = props[hasSrc]; + if (null != propValue$244) switch (hasSrc) { case "name": - hasSrcSet = propValue$229; + hasSrcSet = propValue$244; break; case "type": - propValue = propValue$229; + propValue = propValue$244; break; case "checked": - checked = propValue$229; + checked = propValue$244; break; case "defaultChecked": - defaultChecked = propValue$229; + defaultChecked = propValue$244; break; case "value": - propKey = propValue$229; + propKey = propValue$244; break; case "defaultValue": - defaultValue = propValue$229; + defaultValue = propValue$244; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$229) + if (null != propValue$244) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$229, props, null); + setProp(domElement, tag, hasSrc, propValue$244, props, null); } } initInput( @@ -17027,14 +17293,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$229 in props) - props.hasOwnProperty(propValue$229) && - ((hasSrc = props[propValue$229]), + for (propValue$244 in props) + props.hasOwnProperty(propValue$244) && + ((hasSrc = props[propValue$244]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$229, + propValue$244, hasSrc, props, void 0 @@ -17082,14 +17348,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$246 in nextProps) { - var propKey = nextProps[propKey$246]; - lastProp = lastProps[propKey$246]; + for (var propKey$261 in nextProps) { + var propKey = nextProps[propKey$261]; + lastProp = lastProps[propKey$261]; if ( - nextProps.hasOwnProperty(propKey$246) && + nextProps.hasOwnProperty(propKey$261) && (null != propKey || null != lastProp) ) - switch (propKey$246) { + switch (propKey$261) { case "type": propKey !== lastProp && (viewTransitionMutationContext = !0); type = propKey; @@ -17124,7 +17390,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$246, + propKey$261, propKey, nextProps, lastProp @@ -17143,7 +17409,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$246 = null; + propKey = value = defaultValue = propKey$261 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -17175,7 +17441,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && (viewTransitionMutationContext = !0); - propKey$246 = type; + propKey$261 = type; break; case "defaultValue": type !== lastDefaultValue && (viewTransitionMutationContext = !0); @@ -17198,15 +17464,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$246 - ? updateOptions(domElement, !!lastProps, propKey$246, !1) + null != propKey$261 + ? updateOptions(domElement, !!lastProps, propKey$261, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$246 = null; + propKey = propKey$261 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -17231,7 +17497,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && (viewTransitionMutationContext = !0); - propKey$246 = name; + propKey$261 = name; break; case "defaultValue": name !== type && (viewTransitionMutationContext = !0); @@ -17246,17 +17512,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$246, propKey); + updateTextarea(domElement, propKey$261, propKey); return; case "option": - for (var propKey$262 in lastProps) + for (var propKey$277 in lastProps) if ( - ((propKey$246 = lastProps[propKey$262]), - lastProps.hasOwnProperty(propKey$262) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$262)) + ((propKey$261 = lastProps[propKey$277]), + lastProps.hasOwnProperty(propKey$277) && + null != propKey$261 && + !nextProps.hasOwnProperty(propKey$277)) ) - switch (propKey$262) { + switch (propKey$277) { case "selected": domElement.selected = !1; break; @@ -17264,34 +17530,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$262, + propKey$277, null, nextProps, - propKey$246 + propKey$261 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$246 = nextProps[lastDefaultValue]), + ((propKey$261 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$246 !== propKey && - (null != propKey$246 || null != propKey)) + propKey$261 !== propKey && + (null != propKey$261 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$246 !== propKey && (viewTransitionMutationContext = !0); + propKey$261 !== propKey && (viewTransitionMutationContext = !0); domElement.selected = - propKey$246 && - "function" !== typeof propKey$246 && - "symbol" !== typeof propKey$246; + propKey$261 && + "function" !== typeof propKey$261 && + "symbol" !== typeof propKey$261; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$246, + propKey$261, nextProps, propKey ); @@ -17312,24 +17578,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$267 in lastProps) - (propKey$246 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$267) && - setProp(domElement, tag, propKey$267, null, nextProps, propKey$246); + for (var propKey$282 in lastProps) + (propKey$261 = lastProps[propKey$282]), + lastProps.hasOwnProperty(propKey$282) && + null != propKey$261 && + !nextProps.hasOwnProperty(propKey$282) && + setProp(domElement, tag, propKey$282, null, nextProps, propKey$261); for (checked in nextProps) if ( - ((propKey$246 = nextProps[checked]), + ((propKey$261 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$246 !== propKey && - (null != propKey$246 || null != propKey)) + propKey$261 !== propKey && + (null != propKey$261 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$246) + if (null != propKey$261) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -17337,7 +17603,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$246, + propKey$261, nextProps, propKey ); @@ -17345,49 +17611,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$272 in lastProps) - (propKey$246 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - void 0 !== propKey$246 && - !nextProps.hasOwnProperty(propKey$272) && + for (var propKey$287 in lastProps) + (propKey$261 = lastProps[propKey$287]), + lastProps.hasOwnProperty(propKey$287) && + void 0 !== propKey$261 && + !nextProps.hasOwnProperty(propKey$287) && setPropOnCustomElement( domElement, tag, - propKey$272, + propKey$287, void 0, nextProps, - propKey$246 + propKey$261 ); for (defaultChecked in nextProps) - (propKey$246 = nextProps[defaultChecked]), + (propKey$261 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$246 === propKey || - (void 0 === propKey$246 && void 0 === propKey) || + propKey$261 === propKey || + (void 0 === propKey$261 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$246, + propKey$261, nextProps, propKey ); return; } } - for (var propKey$277 in lastProps) - (propKey$246 = lastProps[propKey$277]), - lastProps.hasOwnProperty(propKey$277) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$277) && - setProp(domElement, tag, propKey$277, null, nextProps, propKey$246); + for (var propKey$292 in lastProps) + (propKey$261 = lastProps[propKey$292]), + lastProps.hasOwnProperty(propKey$292) && + null != propKey$261 && + !nextProps.hasOwnProperty(propKey$292) && + setProp(domElement, tag, propKey$292, null, nextProps, propKey$261); for (lastProp in nextProps) - (propKey$246 = nextProps[lastProp]), + (propKey$261 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$246 === propKey || - (null == propKey$246 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$246, nextProps, propKey); + propKey$261 === propKey || + (null == propKey$261 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$261, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -17482,21 +17748,22 @@ function appendChild(parentInstance, child) { function isSingletonScope(type) { return "head" === type; } -function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, +function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), "/$" === node)) { + if (((node = nextNode.data), "/$" === node || "/&" === node)) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; - } else if ("$" === node || "$?" === node || "$!" === node) depth++; + } else if ("$" === node || "$?" === node || "$!" === node || "&" === node) + depth++; else if ("html" === node) releaseSingletonInstance(parentInstance.ownerDocument.documentElement); else if ("head" === node) { @@ -17518,7 +17785,31 @@ function clearSuspenseBoundary(parentInstance, suspenseInstance) { releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); +} +function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), "/$" === node)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + ("$" !== node && "$?" !== node && "$!" !== node) || suspenseInstance++; + node = nextNode; + } while (node); } function unhideInstance(instance, props) { props = props.style; @@ -17927,20 +18218,20 @@ function startGestureTransition( ))) : (isExitGroupAnim = !0); } - var timing$292 = pseudoElement.getTiming(); + var timing$307 = pseudoElement.getTiming(); anim = rangeEnd - - (("number" === typeof timing$292.duration - ? timing$292.duration + (("number" === typeof timing$307.duration + ? timing$307.duration : 0) + - timing$292.delay) * + timing$307.delay) * longestDuration; - groupName = rangeEnd - timing$292.delay * longestDuration; + groupName = rangeEnd - timing$307.delay * longestDuration; if ( - "reverse" === timing$292.direction || - "alternate-reverse" === timing$292.direction + "reverse" === timing$307.direction || + "alternate-reverse" === timing$307.direction ) - (timing$292 = anim), (anim = groupName), (groupName = timing$292); + (timing$307 = anim), (anim = groupName), (groupName = timing$307); animateGesture( pseudoElement.getKeyframes(), pseudoElement.target, @@ -18362,6 +18653,14 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { } return instance; } +function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; +} function isSuspenseInstanceFallback(instance) { return ( "$!" === instance.data || @@ -18391,25 +18690,43 @@ function getNextHydratable(node) { "$" === nodeType || "$!" === nodeType || "$?" === nodeType || + "&" === nodeType || "F!" === nodeType || "F" === nodeType ) break; - if ("/$" === nodeType) return null; + if ("/$" === nodeType || "/&" === nodeType) return null; } } return node; } var previousHydratableOnEnteringScopedSingleton = null; -function getParentSuspenseInstance(targetInstance) { +function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if ("/$" === data || "/&" === data) { + if (0 === depth) + return getNextHydratable(hydrationInstance.nextSibling); + depth--; + } else + ("$" !== data && "$!" !== data && "$?" !== data && "&" !== data) || + depth++; + } + hydrationInstance = hydrationInstance.nextSibling; + } + return null; +} +function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { var data = targetInstance.data; - if ("$" === data || "$!" === data || "$?" === data) { + if ("$" === data || "$!" === data || "$?" === data || "&" === data) { if (0 === depth) return targetInstance; depth--; - } else "/$" === data && depth++; + } else ("/$" !== data && "/&" !== data) || depth++; } targetInstance = targetInstance.previousSibling; } @@ -18753,26 +19070,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$297 = getResourcesFromRoot( + var styles$312 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$298 = styles$297.get(type); - resource$298 || + resource$313 = styles$312.get(type); + resource$313 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$298 = { + (resource$313 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$297.set(type, resource$298), - (styles$297 = JSCompiler_inline_result.querySelector( + styles$312.set(type, resource$313), + (styles$312 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$297._p && - ((resource$298.instance = styles$297), - (resource$298.state.loading = 5)), + !styles$312._p && + ((resource$313.instance = styles$312), + (resource$313.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -18785,16 +19102,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$297 || + styles$312 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$298.state + resource$313.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$298; + return resource$313; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -18891,37 +19208,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$303 = hoistableRoot.querySelector( + var instance$318 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$303) + if (instance$318) return ( (resource.state.loading |= 4), - (resource.instance = instance$303), - markNodeAsHoistable(instance$303), - instance$303 + (resource.instance = instance$318), + markNodeAsHoistable(instance$318), + instance$318 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$303 = ( + instance$318 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$303); - var linkInstance = instance$303; + markNodeAsHoistable(instance$318); + var linkInstance = instance$318; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$303, "link", instance); + setInitialProperties(instance$318, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$303, props.precedence, hoistableRoot); - return (resource.instance = instance$303); + insertStylesheet(instance$318, props.precedence, hoistableRoot); + return (resource.instance = instance$318); case "script": - instance$303 = getScriptKey(props.src); + instance$318 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$303) + getScriptSelectorFromKey(instance$318) )) ) return ( @@ -18930,7 +19247,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$303))) + if ((styleProps = preloadPropsMap.get(instance$318))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -19388,12 +19705,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -19484,6 +19810,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -19530,6 +19857,10 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -19790,14 +20121,18 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -19994,16 +20329,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_2198 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2245 = React.version; if ( - "19.2.0-experimental-bc6184dd-20250417" !== - isomorphicReactPackageVersion$jscomp$inline_2198 + "19.2.0-experimental-914319ae-20250423" !== + isomorphicReactPackageVersion$jscomp$inline_2245 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2198, - "19.2.0-experimental-bc6184dd-20250417" + isomorphicReactPackageVersion$jscomp$inline_2245, + "19.2.0-experimental-914319ae-20250423" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -20023,24 +20358,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2822 = { +var internals$jscomp$inline_2891 = { bundleType: 0, - version: "19.2.0-experimental-bc6184dd-20250417", + version: "19.2.0-experimental-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-bc6184dd-20250417" + reconcilerVersion: "19.2.0-experimental-914319ae-20250423" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2823 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2892 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2823.isDisabled && - hook$jscomp$inline_2823.supportsFiber + !hook$jscomp$inline_2892.isDisabled && + hook$jscomp$inline_2892.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2823.inject( - internals$jscomp$inline_2822 + (rendererID = hook$jscomp$inline_2892.inject( + internals$jscomp$inline_2891 )), - (injectedHook = hook$jscomp$inline_2823); + (injectedHook = hook$jscomp$inline_2892); } catch (err) {} } function noop() {} @@ -20293,7 +20628,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index 91403aee6aff2..5111f069d2de6 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -5495,16 +5495,14 @@ renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--&--\x3e"); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--/&--\x3e"); segment$jscomp$0.lastPushedText = !1; @@ -9358,10 +9356,10 @@ completeSegmentData2 = '" data-pid="', completeSegmentDataEnd = '">', completeBoundaryScript1Full = - '$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()}};$RC("', + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("', completeBoundaryScript1Partial = '$RC("', completeBoundaryWithStylesScript1FullBoth = - '$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("', + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("', completeBoundaryWithStylesScript1FullPartial = '$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("', completeBoundaryWithStylesScript1Partial = '$RR("', @@ -9674,5 +9672,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js index eef76cc323c5d..5a646271c3832 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js @@ -4251,14 +4251,14 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (request.renderState.generateStaticMarkup || + : "hidden" !== props.mode && + (request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--&--\x3e"), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--/&--\x3e"), (type.lastPushedText = !1)); @@ -5932,7 +5932,7 @@ function flushCompletedBoundary(request, destination, boundary) { ? 0 === (completedSegments.instructions & 2) ? ((completedSegments.instructions |= 10), destination.push( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' )) : 0 === (completedSegments.instructions & 8) ? ((completedSegments.instructions |= 8), @@ -5943,7 +5943,7 @@ function flushCompletedBoundary(request, destination, boundary) { : 0 === (completedSegments.instructions & 2) ? ((completedSegments.instructions |= 2), destination.push( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' )) : destination.push('$RC("')) : requiresStyleInsertion @@ -6393,4 +6393,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js index 40967ab4da073..4fc7773219cac 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js @@ -5495,16 +5495,14 @@ renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--&--\x3e"); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--/&--\x3e"); segment$jscomp$0.lastPushedText = !1; @@ -9358,10 +9356,10 @@ completeSegmentData2 = '" data-pid="', completeSegmentDataEnd = '">', completeBoundaryScript1Full = - '$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()}};$RC("', + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("', completeBoundaryScript1Partial = '$RC("', completeBoundaryWithStylesScript1FullBoth = - '$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("', + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("', completeBoundaryWithStylesScript1FullPartial = '$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("', completeBoundaryWithStylesScript1Partial = '$RR("', @@ -9674,5 +9672,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js index 68daaf876d9ce..806a46a693f68 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js @@ -4302,14 +4302,14 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (request.renderState.generateStaticMarkup || + : "hidden" !== props.mode && + (request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--&--\x3e"), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--/&--\x3e"), (type.lastPushedText = !1)); @@ -6021,7 +6021,7 @@ function flushCompletedBoundary(request, destination, boundary) { ? 0 === (completedSegments.instructions & 2) ? ((completedSegments.instructions |= 10), destination.push( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' )) : 0 === (completedSegments.instructions & 8) ? ((completedSegments.instructions |= 8), @@ -6032,7 +6032,7 @@ function flushCompletedBoundary(request, destination, boundary) { : 0 === (completedSegments.instructions & 2) ? ((completedSegments.instructions |= 2), destination.push( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' )) : destination.push('$RC("')) : requiresStyleInsertion @@ -6487,4 +6487,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js index 99fffcf3251d1..745bfbe3e1c44 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js @@ -5840,15 +5840,13 @@ renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { segment$jscomp$0.chunks.push(startActivityBoundary); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; segment$jscomp$0.chunks.push(endActivityBoundary); segment$jscomp$0.lastPushedText = !1; } @@ -8562,11 +8560,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -9801,11 +9799,11 @@ completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'), completeSegmentDataEnd = dataElementQuotedEnd, completeBoundaryScript1Full = stringToPrecomputedChunk( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' ), completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'), completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' ), completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk( '$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("' @@ -10369,5 +10367,5 @@ startWork(request); }); }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js index 63ae21cd747df..c4abe870becbd 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js @@ -2519,11 +2519,11 @@ var completeSegmentScript1Full = stringToPrecomputedChunk( ), completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'), completeBoundaryScript1Full = stringToPrecomputedChunk( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' ), completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'), completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' ), completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk( '$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("' @@ -4822,13 +4822,13 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (type.chunks.push(startActivityBoundary), + : "hidden" !== props.mode && + (type.chunks.push(startActivityBoundary), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), type.chunks.push(endActivityBoundary), (type.lastPushedText = !1)); return; @@ -6934,12 +6934,12 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion, - "19.2.0-experimental-bc6184dd-20250417" + "19.2.0-experimental-914319ae-20250423" ) ); } @@ -7194,4 +7194,4 @@ exports.resumeAndPrerender = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js index 8d67235a226e1..e66fb155dd42b 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js @@ -4302,13 +4302,13 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (type.chunks.push("\x3c!--&--\x3e"), + : "hidden" !== props.mode && + (type.chunks.push("\x3c!--&--\x3e"), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), type.chunks.push("\x3c!--/&--\x3e"), (type.lastPushedText = !1)); return; @@ -5994,7 +5994,7 @@ function flushCompletedBoundary(request, destination, boundary) { ? ((completedSegments.instructions |= 10), writeChunk( destination, - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' )) : 0 === (completedSegments.instructions & 8) ? ((completedSegments.instructions |= 8), @@ -6007,7 +6007,7 @@ function flushCompletedBoundary(request, destination, boundary) { ? ((completedSegments.instructions |= 2), writeChunk( destination, - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' )) : writeChunk(destination, '$RC("')) : requiresStyleInsertion @@ -6400,13 +6400,13 @@ function addToReplayParent(node, parentKeyPath, trackedPostpones) { } var isomorphicReactPackageVersion$jscomp$inline_819 = React.version; if ( - "19.2.0-experimental-bc6184dd-20250417" !== + "19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion$jscomp$inline_819 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_819 + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -6497,4 +6497,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js index 2ff76d1e9c769..336b42918d19c 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js @@ -5856,15 +5856,13 @@ renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { segment$jscomp$0.chunks.push(startActivityBoundary); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; segment$jscomp$0.chunks.push(endActivityBoundary); segment$jscomp$0.lastPushedText = !1; } @@ -8591,11 +8589,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -9824,11 +9822,11 @@ completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'), completeSegmentDataEnd = dataElementQuotedEnd, completeBoundaryScript1Full = stringToPrecomputedChunk( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' ), completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'), completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' ), completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk( '$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("' @@ -10405,5 +10403,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js index 2a5f9a94c1df1..3414af44e2600 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js @@ -2530,11 +2530,11 @@ var completeSegmentScript1Full = stringToPrecomputedChunk( ), completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'), completeBoundaryScript1Full = stringToPrecomputedChunk( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' ), completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'), completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' ), completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk( '$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("' @@ -4882,13 +4882,13 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (type.chunks.push(startActivityBoundary), + : "hidden" !== props.mode && + (type.chunks.push(startActivityBoundary), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), type.chunks.push(endActivityBoundary), (type.lastPushedText = !1)); return; @@ -7047,11 +7047,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -7316,4 +7316,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js index 9579130f83096..f71aff1565096 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js @@ -5738,15 +5738,13 @@ renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { segment$jscomp$0.chunks.push(startActivityBoundary); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; segment$jscomp$0.chunks.push(endActivityBoundary); segment$jscomp$0.lastPushedText = !1; } @@ -8449,11 +8447,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); } function createDrainHandler(destination, request) { @@ -9753,11 +9751,11 @@ completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'), completeSegmentDataEnd = dataElementQuotedEnd, completeBoundaryScript1Full = stringToPrecomputedChunk( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' ), completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'), completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' ), completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk( '$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("' @@ -10249,5 +10247,5 @@ } }; }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js index 61143010508f1..1aa1dcf4ed5d0 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js @@ -2433,11 +2433,11 @@ var completeSegmentScript1Full = stringToPrecomputedChunk( ), completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'), completeBoundaryScript1Full = stringToPrecomputedChunk( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' ), completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'), completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' ), completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk( '$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("' @@ -4762,13 +4762,13 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (type.chunks.push(startActivityBoundary), + : "hidden" !== props.mode && + (type.chunks.push(startActivityBoundary), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), type.chunks.push(endActivityBoundary), (type.lastPushedText = !1)); return; @@ -6922,11 +6922,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -7177,4 +7177,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js index 64745871f1df9..c53318d08085a 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js @@ -146,6 +146,16 @@ } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -1221,6 +1231,16 @@ rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1338,13 +1358,13 @@ (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -1362,6 +1382,7 @@ 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -1939,6 +1960,8 @@ return fiber.type; case 16: return "Lazy"; + case 31: + return "Activity"; case 13: return "Suspense"; case 19: @@ -4337,6 +4360,11 @@ content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -4417,6 +4445,21 @@ (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -4464,6 +4507,12 @@ siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -4587,6 +4636,7 @@ for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -4620,7 +4670,7 @@ diffNode.serverTail.push(description); JSCompiler_temp = "Suspense" === description.type - ? getNextHydratableInstanceAfterSuspenseInstance(JSCompiler_temp) + ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling); } throwOnHydrationMismatch(fiber); @@ -4634,7 +4684,16 @@ "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); nextHydratableInstance = - getNextHydratableInstanceAfterSuspenseInstance(fiber); + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -7038,19 +7097,17 @@ ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current, fiber), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack(fiber) { push(suspenseStackCursor, suspenseStackCursor.current, fiber); @@ -9158,6 +9215,7 @@ var suspenseBoundary = suspenseHandlerStackCursor.current; if (null !== suspenseBoundary) { switch (suspenseBoundary.tag) { + case 31: case 13: return ( null === shellBoundary @@ -9497,7 +9555,18 @@ renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -9509,16 +9578,6 @@ renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -9556,6 +9615,42 @@ propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -10254,74 +10349,54 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2939; - var JSCompiler_object_inline_stack_2938 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_3017; + var JSCompiler_object_inline_stack_3016 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2939 = didSuspend) || - (JSCompiler_object_inline_componentStack_2939 = + var JSCompiler_object_inline_digest_3015 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_componentStack_3017 = didSuspend) || + (JSCompiler_object_inline_componentStack_3017 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2939 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2939 = + JSCompiler_object_inline_componentStack_3017 && + ((JSCompiler_object_inline_digest_3015 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_componentStack_3017 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_digest_3015 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - JSCompiler_object_inline_componentStack_2939 = current; - for ( - renderLanes = rootOrSingletonContext; - 8 !== JSCompiler_object_inline_componentStack_2939.nodeType; - - ) { - if (!renderLanes) { - renderLanes = null; - break a; - } - JSCompiler_object_inline_componentStack_2939 = - getNextHydratable( - JSCompiler_object_inline_componentStack_2939.nextSibling - ); - if (null === JSCompiler_object_inline_componentStack_2939) { - renderLanes = null; - break a; - } - } - renderLanes = JSCompiler_object_inline_componentStack_2939; - } - null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { - dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (JSCompiler_object_inline_componentStack_2939 = renderLanes), - (JSCompiler_object_inline_stack_2938 = createFiber( - 18, - null, - null, - NoMode + (current = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + current, + rootOrSingletonContext )), - (JSCompiler_object_inline_stack_2938.stateNode = - JSCompiler_object_inline_componentStack_2939), - (JSCompiler_object_inline_stack_2938.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_stack_2938), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else renderLanes = null; + (renderLanes = + null !== renderLanes && renderLanes.data !== ACTIVITY_START_DATA + ? renderLanes + : null), + null !== renderLanes && + ((JSCompiler_object_inline_componentStack_3017 = { + dehydrated: renderLanes, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }), + (workInProgress.memoizedState = + JSCompiler_object_inline_componentStack_3017), + (JSCompiler_object_inline_componentStack_3017 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_componentStack_3017.return = + workInProgress), + (workInProgress.child = + JSCompiler_object_inline_componentStack_3017), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null); if (null === renderLanes) throw ( (warnNonHydratedInstance(workInProgress, current), @@ -10332,315 +10407,287 @@ : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_message_2936 = - JSCompiler_object_inline_stack_2938.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2938.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_3016.children, + nextFallbackChildren = JSCompiler_object_inline_stack_3016.fallback; + if (JSCompiler_object_inline_digest_3015) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2938 = + (JSCompiler_object_inline_stack_3016 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2936, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_message_2936 = workInProgress.child), - (JSCompiler_object_inline_message_2936.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2936.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2939, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_3017, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2938 + JSCompiler_object_inline_stack_3016 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2938.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_3016.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2938 = + (JSCompiler_object_inline_stack_3016 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2936, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_message_2936 = workInProgress.child), - (JSCompiler_object_inline_message_2936.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2936.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2939, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_3017, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2938 + JSCompiler_object_inline_stack_3016 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2936 + nextPrimaryChildren ); } - var JSCompiler_object_inline_digest_2937 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_digest_2937 && - ((JSCompiler_object_inline_message_2936 = - JSCompiler_object_inline_digest_2937.dehydrated), - null !== JSCompiler_object_inline_message_2936) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2936 = - JSCompiler_object_inline_stack_2938.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2938 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2938.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_message_2936 = - createFiberFromFragment( - JSCompiler_object_inline_message_2936, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_message_3014 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_message_3014) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_3016.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_3016 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_3016.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_message_2936.flags |= 2), - (JSCompiler_object_inline_stack_2938.return = workInProgress), - (JSCompiler_object_inline_message_2936.return = workInProgress), - (JSCompiler_object_inline_stack_2938.sibling = - JSCompiler_object_inline_message_2936), - (workInProgress.child = JSCompiler_object_inline_stack_2938), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2938 = workInProgress.child), - (JSCompiler_object_inline_stack_2938.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2938.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2939, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_3016.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_3016.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_3016), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2936)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2936)) - ) { - JSCompiler_object_inline_componentStack_2939 = - JSCompiler_object_inline_message_2936.nextSibling && - JSCompiler_object_inline_message_2936.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2939) { - nextFallbackChildren = - JSCompiler_object_inline_componentStack_2939.dgst; - var message = JSCompiler_object_inline_componentStack_2939.msg; - var componentStack = - JSCompiler_object_inline_componentStack_2939.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_componentStack_2939.cstck; - } - JSCompiler_object_inline_message_2936 = message; - JSCompiler_object_inline_digest_2937 = nextFallbackChildren; - JSCompiler_object_inline_stack_2938 = componentStack; - JSCompiler_object_inline_componentStack_2939 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_digest_2937; - componentStack = JSCompiler_object_inline_componentStack_2939; - "POSTPONE" !== nextFallbackChildren && - ((JSCompiler_object_inline_componentStack_2939 = - JSCompiler_object_inline_message_2936 - ? Error(JSCompiler_object_inline_message_2936) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." - )), - (JSCompiler_object_inline_componentStack_2939.stack = - JSCompiler_object_inline_stack_2938 || ""), - (JSCompiler_object_inline_componentStack_2939.digest = - nextFallbackChildren), - (JSCompiler_object_inline_stack_2938 = - void 0 === componentStack ? null : componentStack), - (JSCompiler_object_inline_message_2936 = { - value: JSCompiler_object_inline_componentStack_2939, - source: null, - stack: JSCompiler_object_inline_stack_2938 - }), - "string" === typeof JSCompiler_object_inline_stack_2938 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2939, - JSCompiler_object_inline_message_2936 - ), - queueHydrationError(JSCompiler_object_inline_message_2936)); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + ), + (JSCompiler_object_inline_stack_3016 = workInProgress.child), + (JSCompiler_object_inline_stack_3016.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_3016.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_3017, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback(JSCompiler_object_inline_message_3014)) + ) { + JSCompiler_object_inline_componentStack_3017 = + JSCompiler_object_inline_message_3014.nextSibling && + JSCompiler_object_inline_message_3014.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_3017) { + nextPrimaryChildren = + JSCompiler_object_inline_componentStack_3017.dgst; + var message = JSCompiler_object_inline_componentStack_3017.msg; + nextFallbackChildren = + JSCompiler_object_inline_componentStack_3017.stck; + var componentStack = + JSCompiler_object_inline_componentStack_3017.cstck; + } + JSCompiler_object_inline_message_3014 = message; + JSCompiler_object_inline_digest_3015 = nextPrimaryChildren; + JSCompiler_object_inline_stack_3016 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_3017 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_digest_3015; + nextFallbackChildren = JSCompiler_object_inline_message_3014; + componentStack = JSCompiler_object_inline_componentStack_3017; + "POSTPONE" !== nextPrimaryChildren && + ((JSCompiler_object_inline_componentStack_3017 = + nextFallbackChildren + ? Error(nextFallbackChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + )), + (JSCompiler_object_inline_componentStack_3017.stack = + JSCompiler_object_inline_stack_3016 || ""), + (JSCompiler_object_inline_componentStack_3017.digest = + nextPrimaryChildren), + (JSCompiler_object_inline_stack_3016 = + void 0 === componentStack ? null : componentStack), + (nextPrimaryChildren = { + value: JSCompiler_object_inline_componentStack_3017, + source: null, + stack: JSCompiler_object_inline_stack_3016 + }), + "string" === typeof JSCompiler_object_inline_stack_3016 && + CapturedStacks.set( + JSCompiler_object_inline_componentStack_3017, + nextPrimaryChildren + ), + queueHydrationError(nextPrimaryChildren)); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_componentStack_2939 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2939) - ) { - JSCompiler_object_inline_componentStack_2939 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_componentStack_2939 && - ((JSCompiler_object_inline_stack_2938 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2938 = - 0 !== (JSCompiler_object_inline_stack_2938 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2938 - )), - (JSCompiler_object_inline_stack_2938 = - 0 !== - (JSCompiler_object_inline_stack_2938 & - (JSCompiler_object_inline_componentStack_2939.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2938), - 0 !== JSCompiler_object_inline_stack_2938 && - JSCompiler_object_inline_stack_2938 !== - JSCompiler_object_inline_digest_2937.retryLane) - ) - throw ( - ((JSCompiler_object_inline_digest_2937.retryLane = - JSCompiler_object_inline_stack_2938), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2938 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2939, - current, - JSCompiler_object_inline_stack_2938 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_message_2936.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_message_2936.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_digest_2937.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2936.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2938.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_componentStack_3017 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_componentStack_3017) + ) { + JSCompiler_object_inline_componentStack_3017 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_componentStack_3017 && + ((JSCompiler_object_inline_stack_3016 = getBumpedLaneForHydration( + JSCompiler_object_inline_componentStack_3017, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_3016 && + JSCompiler_object_inline_stack_3016 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_3016), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_3016 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_componentStack_3017, + current, + JSCompiler_object_inline_stack_3016 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_message_3014.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_message_3014.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_message_3014.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_3016.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_digest_3015) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2936 = - JSCompiler_object_inline_stack_2938.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_3016.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2938 = createWorkInProgress( + (JSCompiler_object_inline_message_3014 = componentStack.sibling), + (JSCompiler_object_inline_stack_3016 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2938.children + children: JSCompiler_object_inline_stack_3016.children } )), - (JSCompiler_object_inline_stack_2938.subtreeFlags = + (JSCompiler_object_inline_stack_3016.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_message_2936 = createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_message_2936 + null !== JSCompiler_object_inline_message_3014 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_message_3014, + nextPrimaryChildren )) - : ((JSCompiler_object_inline_message_2936 = createFiberFromFragment( - JSCompiler_object_inline_message_2936, + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_message_2936.flags |= 2)), - (JSCompiler_object_inline_message_2936.return = workInProgress), - (JSCompiler_object_inline_stack_2938.return = workInProgress), - (JSCompiler_object_inline_stack_2938.sibling = - JSCompiler_object_inline_message_2936), - (workInProgress.child = JSCompiler_object_inline_stack_2938), - (JSCompiler_object_inline_stack_2938 = - JSCompiler_object_inline_message_2936), - (JSCompiler_object_inline_message_2936 = workInProgress.child), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_3016.return = workInProgress), + (JSCompiler_object_inline_stack_3016.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_3016), + (JSCompiler_object_inline_stack_3016 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_message_3014 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_message_3014 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_message_3014, + pool: JSCompiler_object_inline_message_3014 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10648,33 +10695,31 @@ baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_message_2936.memoizedState = - nextFallbackChildren), - (JSCompiler_object_inline_message_2936.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2939, - renderLanes - )), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_3017, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2938 + JSCompiler_object_inline_stack_3016 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2938.children + children: JSCompiler_object_inline_stack_3016.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2939 = + ((JSCompiler_object_inline_componentStack_3017 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2939 + null === JSCompiler_object_inline_componentStack_3017 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2939.push(current)); + : JSCompiler_object_inline_componentStack_3017.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11036,6 +11081,14 @@ stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -11114,7 +11167,7 @@ } function beginWork(current, workInProgress, renderLanes) { if (workInProgress._debugNeedsRemount && null !== current) { - renderLanes = createFiberFromTypeAndProps( + var copiedFiber = createFiberFromTypeAndProps( workInProgress.type, workInProgress.key, workInProgress.pendingProps, @@ -11122,19 +11175,19 @@ workInProgress.mode, workInProgress.lanes ); - renderLanes._debugStack = workInProgress._debugStack; - renderLanes._debugTask = workInProgress._debugTask; + copiedFiber._debugStack = workInProgress._debugStack; + copiedFiber._debugTask = workInProgress._debugTask; var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; workInProgress.alternate = null; - renderLanes.index = workInProgress.index; - renderLanes.sibling = workInProgress.sibling; - renderLanes.return = workInProgress.return; - renderLanes.ref = workInProgress.ref; - renderLanes._debugInfo = workInProgress._debugInfo; + copiedFiber.index = workInProgress.index; + copiedFiber.sibling = workInProgress.sibling; + copiedFiber.return = workInProgress.return; + copiedFiber.ref = workInProgress.ref; + copiedFiber._debugInfo = workInProgress._debugInfo; if (workInProgress === returnFiber.child) - returnFiber.child = renderLanes; + returnFiber.child = copiedFiber; else { var prevSibling = returnFiber.child; if (null === prevSibling) @@ -11142,14 +11195,14 @@ for (; prevSibling.sibling !== workInProgress; ) if (((prevSibling = prevSibling.sibling), null === prevSibling)) throw Error("Expected to find the previous sibling."); - prevSibling.sibling = renderLanes; + prevSibling.sibling = copiedFiber; } - workInProgress = returnFiber.deletions; - null === workInProgress + var deletions = returnFiber.deletions; + null === deletions ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) - : workInProgress.push(current); - renderLanes.flags |= 2; - return renderLanes; + : deletions.push(current); + copiedFiber.flags |= 2; + return copiedFiber; } if (null !== current) if ( @@ -11174,92 +11227,95 @@ } else { didReceiveUpdate = !1; - if ((returnFiber = isHydrating)) - warnIfNotHydrating(), - (returnFiber = 0 !== (workInProgress.flags & 1048576)); - returnFiber && - ((returnFiber = workInProgress.index), + var JSCompiler_temp; + if ((JSCompiler_temp = isHydrating)) warnIfNotHydrating(), - pushTreeId(workInProgress, treeForkCount, returnFiber)); + (JSCompiler_temp = 0 !== (workInProgress.flags & 1048576)); + if (JSCompiler_temp) { + var slotIndex = workInProgress.index; + warnIfNotHydrating(); + pushTreeId(workInProgress, treeForkCount, slotIndex); + } } workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - a: if ( - ((returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(workInProgress.elementType)), - (workInProgress.type = current), - "function" === typeof current) - ) - shouldConstruct(current) - ? ((returnFiber = resolveClassComponentProps( - current, - returnFiber - )), - (workInProgress.tag = 1), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ))) - : ((workInProgress.tag = 0), - validateFunctionComponentInDev(workInProgress, current), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ))); - else { - if (void 0 !== current && null !== current) - if ( - ((prevSibling = current.$$typeof), - prevSibling === REACT_FORWARD_REF_TYPE) - ) { - workInProgress.tag = 11; - workInProgress.type = current = - resolveForwardRefForHotReloading(current); - workInProgress = updateForwardRef( - null, - workInProgress, - current, - returnFiber, - renderLanes + a: { + var props = workInProgress.pendingProps; + var Component = callLazyInitInDEV(workInProgress.elementType); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props ); - break a; - } else if (prevSibling === REACT_MEMO_TYPE) { - workInProgress.tag = 14; - workInProgress = updateMemoComponent( + workInProgress.tag = 1; + workInProgress.type = Component = + resolveFunctionForHotReloading(Component); + var JSCompiler_inline_result = updateClassComponent( null, workInProgress, - current, - returnFiber, + Component, + resolvedProps, renderLanes ); - break a; + } else + (workInProgress.tag = 0), + validateFunctionComponentInDev(workInProgress, Component), + (workInProgress.type = Component = + resolveFunctionForHotReloading(Component)), + (JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + props, + renderLanes + )); + else { + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = 11; + workInProgress.type = Component = + resolveForwardRefForHotReloading(Component); + JSCompiler_inline_result = updateForwardRef( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + JSCompiler_inline_result = updateMemoComponent( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } } - workInProgress = ""; - null !== current && - "object" === typeof current && - current.$$typeof === REACT_LAZY_TYPE && - (workInProgress = - " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - current + - ". Lazy element type must resolve to a class or function." + - workInProgress - ); + var hint = ""; + null !== Component && + "object" === typeof Component && + Component.$$typeof === REACT_LAZY_TYPE && + (hint = + " Did you wrap a component in React.lazy() more than once?"); + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + loggedComponent + + ". Lazy element type must resolve to a class or function." + + hint + ); + } } - return workInProgress; + return JSCompiler_inline_result; case 0: return updateFunctionComponent( current, @@ -11269,19 +11325,17 @@ renderLanes ); case 1: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component = workInProgress.type, + _resolvedProps4 = resolveClassComponentProps( + _Component, workInProgress.pendingProps - )), - updateClassComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + ); + return updateClassComponent( + current, + workInProgress, + _Component, + _resolvedProps4, + renderLanes ); case 3: a: { @@ -11293,15 +11347,15 @@ throw Error( "Should have a current fiber. This is a bug in React." ); - returnFiber = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - prevSibling = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, returnFiber, null, renderLanes); - var nextState = workInProgress.memoizedState; - returnFiber = nextState.cache; - pushProvider(workInProgress, CacheContext, returnFiber); - returnFiber !== prevState.cache && + processUpdateQueue(workInProgress, nextProps, null, renderLanes); + var nextState = workInProgress.memoizedState, + nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -11309,296 +11363,303 @@ !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - returnFiber = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: returnFiber, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (returnFiber !== prevSibling) { - prevSibling = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error( "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering." ), workInProgress ); - queueHydrationError(prevSibling); - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; didSuspendOrErrorDEV = !1; hydrationDiffRootDEV = null; rootOrSingletonContext = !0; - current = mountChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - ); - for (workInProgress.child = current; current; ) - (current.flags = (current.flags & -3) | 4096), - (current = current.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), + (node = node.sibling); } - else { + } else { resetHydrationState(); - if (returnFiber === prevSibling) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = + bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } reconcileChildren( current, workInProgress, - returnFiber, + nextChildren, renderLanes ); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (current = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = current) - : isHydrating || - ((current = workInProgress.type), - (renderLanes = workInProgress.pendingProps), - (returnFiber = requiredContext( - rootInstanceStackCursor.current - )), - (returnFiber = - getOwnerDocumentFromRootContainer( - returnFiber - ).createElement(current)), - (returnFiber[internalInstanceKey] = workInProgress), - (returnFiber[internalPropsKey] = renderLanes), - setInitialProperties(returnFiber, current, renderLanes), - markNodeAsHoistable(returnFiber), - (workInProgress.stateNode = returnFiber)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + rootContainerInstance = requiredContext( + rootInstanceStackCursor.current + ), + domElement = getOwnerDocumentFromRootContainer( + rootContainerInstance + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((returnFiber = requiredContext(rootInstanceStackCursor.current)), - (prevSibling = getHostContext()), - (returnFiber = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, - returnFiber, - prevSibling, - !1 - )), - didSuspendOrErrorDEV || - ((prevSibling = diffHydratedProperties( - returnFiber, - workInProgress.type, - workInProgress.pendingProps, - prevSibling - )), - null !== prevSibling && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevSibling)), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (prevSibling = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = prevSibling), - (nextHydratableInstance = getNextHydratable( - returnFiber.firstChild - ))) - : (nextHydratableInstance = prevSibling)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var currentRootContainer = requiredContext( + rootInstanceStackCursor.current + ), + currentHostContext = getHostContext(), + instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + currentRootContainer, + currentHostContext, + !1 + )); + if (!didSuspendOrErrorDEV) { + var differences = diffHydratedProperties( + instance, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext + ); + null !== differences && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences); + } + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable( + instance.firstChild + ))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: - return ( - null === current && - isHydrating && - ((prevState = getHostContext()), - (returnFiber = validateDOMNesting( + if (null === current && isHydrating) { + var currentHostContext$jscomp$0 = getHostContext(), + shouldKeepWarning = validateDOMNesting( workInProgress.type, - prevState.ancestorInfo - )), - (prevSibling = nextHydratableInstance), - (nextState = !prevSibling) || - ((nextState = canHydrateInstance( - prevSibling, - workInProgress.type, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== nextState - ? ((workInProgress.stateNode = nextState), - didSuspendOrErrorDEV || - ((prevState = diffHydratedProperties( - nextState, - workInProgress.type, - workInProgress.pendingProps, - prevState - )), - null !== prevState && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevState)), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - nextState.firstChild - )), - (rootOrSingletonContext = !1), - (prevState = !0)) - : (prevState = !1), - (nextState = !prevState)), - nextState && - (returnFiber && - warnNonHydratedInstance(workInProgress, prevSibling), - throwOnHydrationMismatch(workInProgress))), - pushHostContext(workInProgress), - (prevSibling = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (returnFiber = prevState.children), - shouldSetTextContent(prevSibling, prevState) - ? (returnFiber = null) - : null !== nextState && - shouldSetTextContent(prevSibling, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((prevSibling = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes - )), - (HostTransitionContext._currentValue = prevSibling)), - markRef(current, workInProgress), - reconcileChildren( + currentHostContext$jscomp$0.ancestorInfo + ), + nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if (!(JSCompiler_temp$jscomp$0 = !nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== instance$jscomp$0) { + workInProgress.stateNode = instance$jscomp$0; + if (!didSuspendOrErrorDEV) { + var differences$jscomp$0 = diffHydratedProperties( + instance$jscomp$0, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext$jscomp$0 + ); + null !== differences$jscomp$0 && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences$jscomp$0); + } + hydrationParentFiber = workInProgress; + nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + ); + rootOrSingletonContext = !1; + var JSCompiler_inline_result$jscomp$1 = !0; + } else JSCompiler_inline_result$jscomp$1 = !1; + JSCompiler_temp$jscomp$0 = !JSCompiler_inline_result$jscomp$1; + } + JSCompiler_temp$jscomp$0 && + (shouldKeepWarning && + warnNonHydratedInstance(workInProgress, nextInstance), + throwOnHydrationMismatch(workInProgress)); + } + pushHostContext(workInProgress); + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && + (workInProgress.flags |= 32); + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, - returnFiber, + TransitionAwareHostComponent, + null, + null, renderLanes - ), - workInProgress.child + ); + HostTransitionContext._currentValue = newState; + } + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes ); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - ((current = workInProgress.pendingProps), - (renderLanes = getHostContext()), - (returnFiber = renderLanes.ancestorInfo.current), - (current = - null != returnFiber - ? validateTextNesting( - current, - returnFiber.tag, - renderLanes.ancestorInfo.implicitRootScope - ) - : !0), - (renderLanes = nextHydratableInstance), - (returnFiber = !renderLanes) || - ((returnFiber = canHydrateTextInstance( - renderLanes, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== returnFiber - ? ((workInProgress.stateNode = returnFiber), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (returnFiber = !0)) - : (returnFiber = !1), - (returnFiber = !returnFiber)), - returnFiber && - (current && - warnNonHydratedInstance(workInProgress, renderLanes), - throwOnHydrationMismatch(workInProgress))), - null - ); + if (null === current && isHydrating) { + var text = workInProgress.pendingProps, + currentHostContext$jscomp$1 = getHostContext(), + ancestor = currentHostContext$jscomp$1.ancestorInfo.current; + var shouldKeepWarning$jscomp$0 = + null != ancestor + ? validateTextNesting( + text, + ancestor.tag, + currentHostContext$jscomp$1.ancestorInfo.implicitRootScope + ) + : !0; + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$1; + if (!(JSCompiler_temp$jscomp$1 = !nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== textInstance) { + workInProgress.stateNode = textInstance; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + var JSCompiler_inline_result$jscomp$2 = !0; + } else JSCompiler_inline_result$jscomp$2 = !1; + JSCompiler_temp$jscomp$1 = !JSCompiler_inline_result$jscomp$2; + } + JSCompiler_temp$jscomp$1 && + (shouldKeepWarning$jscomp$0 && + warnNonHydratedInstance(workInProgress, nextInstance$jscomp$0), + throwOnHydrationMismatch(workInProgress)); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (returnFiber = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - )) - : reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo ); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: return updateForwardRef( current, @@ -11608,17 +11669,15 @@ renderLanes ); case 7: - return ( - (returnFiber = workInProgress.pendingProps), - markRef(current, workInProgress), - reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -11630,64 +11689,53 @@ workInProgress.child ); case 12: - return ( - (workInProgress.flags |= 4), - (workInProgress.flags |= 2048), - (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = -0), - (returnFiber.passiveEffectDuration = -0), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + workInProgress.flags |= 4; + workInProgress.flags |= 2048; + var stateNode = workInProgress.stateNode; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 10: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevState = prevSibling.value), - "value" in prevSibling || - hasWarnedAboutUsingNoValuePropOnContextProvider || - ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), - console.error( - "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )), - pushProvider(workInProgress, returnFiber, prevState), - reconcileChildren( - current, - workInProgress, - prevSibling.children, - renderLanes - ), - workInProgress.child + var context = workInProgress.type; + var newProps = workInProgress.pendingProps, + newValue = newProps.value; + "value" in newProps || + hasWarnedAboutUsingNoValuePropOnContextProvider || + ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), + console.error( + "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" + )); + pushProvider(workInProgress, context, newValue); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes ); + return workInProgress.child; case 9: - return ( - (prevSibling = workInProgress.type._context), - (returnFiber = workInProgress.pendingProps.children), - "function" !== typeof returnFiber && - console.error( - "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." - ), - prepareToReadContext(workInProgress), - (prevSibling = readContext(prevSibling)), - (returnFiber = callComponentInDEV( - returnFiber, - prevSibling, - void 0 - )), - (workInProgress.flags |= 1), - reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + var context$jscomp$0 = workInProgress.type._context; + var render = workInProgress.pendingProps.children; + "function" !== typeof render && + console.error( + "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." + ); + prepareToReadContext(workInProgress); + var newValue$jscomp$0 = readContext(context$jscomp$0); + var newChildren = callComponentInDEV( + render, + newValue$jscomp$0, + void 0 ); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: return updateMemoComponent( current, @@ -11711,40 +11759,163 @@ renderLanes ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( - renderLanes, - returnFiber - )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$3; case 22: return updateOffscreenComponent( current, @@ -11753,103 +11924,108 @@ workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (returnFiber = readContext(CacheContext)), - null === current - ? ((prevSibling = peekCacheFromPool()), - null === prevSibling && - ((prevSibling = workInProgressRoot), - (prevState = createCache()), - (prevSibling.pooledCache = prevState), - retainCache(prevState), - null !== prevState && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = prevState)), - (workInProgress.memoizedState = { - parent: returnFiber, - cache: prevSibling - }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, prevSibling)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (prevSibling = current.memoizedState), - (prevState = workInProgress.memoizedState), - prevSibling.parent !== returnFiber - ? ((prevSibling = { - parent: returnFiber, - cache: returnFiber - }), - (workInProgress.memoizedState = prevSibling), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - prevSibling), - pushProvider(workInProgress, CacheContext, returnFiber)) - : ((returnFiber = prevState.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) var freshCache = cacheFromPool; + else { + var root$jscomp$0 = workInProgressRoot, + freshCache$jscomp$0 = createCache(); + root$jscomp$0.pooledCache = freshCache$jscomp$0; + retainCache(freshCache$jscomp$0); + null !== freshCache$jscomp$0 && + (root$jscomp$0.pooledCacheLanes |= renderLanes); + freshCache = freshCache$jscomp$0; + } + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 30: - return ( - (returnFiber = workInProgress.pendingProps), - (prevSibling = workInProgress.stateNode), - null != returnFiber.name && "auto" !== returnFiber.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === prevSibling.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (prevSibling.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - void 0 !== returnFiber.className && - ((prevSibling = - "string" === typeof returnFiber.className - ? JSON.stringify(returnFiber.className) - : "{...}"), - didWarnAboutClassNameOnViewTransition[prevSibling] || - ((didWarnAboutClassNameOnViewTransition[prevSibling] = !0), - console.error( - ' doesn\'t accept a "className" prop. It has been renamed to "default".\n- \n+ ', - prevSibling, - prevSibling - ))), - null !== current && current.memoizedProps.name !== returnFiber.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), - reconcileChildren( - current, - workInProgress, - returnFiber.children, - renderLanes - ), - workInProgress.child + var pendingProps = workInProgress.pendingProps, + instance$jscomp$1 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$1.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = + "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$1.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + if (void 0 !== pendingProps.className) { + var example = + "string" === typeof pendingProps.className + ? JSON.stringify(pendingProps.className) + : "{...}"; + didWarnAboutClassNameOnViewTransition[example] || + ((didWarnAboutClassNameOnViewTransition[example] = !0), + console.error( + ' doesn\'t accept a "className" prop. It has been renamed to "default".\n- \n+ ', + example, + example + )); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; case 29: throw workInProgress.pendingProps; } @@ -12005,7 +12181,6 @@ var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -12337,6 +12512,63 @@ } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12344,23 +12576,25 @@ (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12368,11 +12602,11 @@ emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12625,6 +12859,22 @@ case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12685,6 +12935,10 @@ case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13828,16 +14082,19 @@ } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -14209,6 +14466,11 @@ } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -14439,7 +14701,7 @@ null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -14448,7 +14710,7 @@ deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -14560,6 +14822,25 @@ popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + finishedRoot + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -14581,6 +14862,7 @@ } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -14717,13 +14999,13 @@ safelyDetachRef(current, current.return)); flags & 64 && offscreenSubtreeIsHidden && - ((current = finishedWork.updateQueue), - null !== current && - ((flags = current.callbacks), - null !== flags && - ((root = current.shared.hiddenCallbacks), - (current.shared.hiddenCallbacks = - null === root ? flags : root.concat(flags))))); + ((flags = finishedWork.updateQueue), + null !== flags && + ((current = flags.callbacks), + null !== current && + ((root = flags.shared.hiddenCallbacks), + (flags.shared.hiddenCallbacks = + null === root ? current : root.concat(current))))); break; case 26: var hoistableRoot = currentHoistableRoot; @@ -14742,10 +15024,10 @@ if (null === flags) if (null === finishedWork.stateNode) { a: { - current = finishedWork.type; - flags = finishedWork.memoizedProps; + flags = finishedWork.type; + current = finishedWork.memoizedProps; root = hoistableRoot.ownerDocument || hoistableRoot; - b: switch (current) { + b: switch (flags) { case "title": lanes = root.getElementsByTagName("title")[0]; if ( @@ -14755,15 +15037,15 @@ lanes.namespaceURI === SVG_NAMESPACE || lanes.hasAttribute("itemprop") ) - (lanes = root.createElement(current)), + (lanes = root.createElement(flags)), root.head.insertBefore( lanes, root.querySelector("head > title") ); - setInitialProperties(lanes, current, flags); + setInitialProperties(lanes, flags, current); lanes[internalInstanceKey] = finishedWork; markNodeAsHoistable(lanes); - current = lanes; + flags = lanes; break a; case "link": if ( @@ -14771,29 +15053,31 @@ "link", "href", root - ).get(current + (flags.href || ""))) + ).get(flags + (current.href || ""))) ) for (var i = 0; i < hoistableRoot.length; i++) if ( ((lanes = hoistableRoot[i]), lanes.getAttribute("href") === - (null == flags.href || "" === flags.href + (null == current.href || "" === current.href ? null - : flags.href) && + : current.href) && lanes.getAttribute("rel") === - (null == flags.rel ? null : flags.rel) && + (null == current.rel ? null : current.rel) && lanes.getAttribute("title") === - (null == flags.title ? null : flags.title) && + (null == current.title + ? null + : current.title) && lanes.getAttribute("crossorigin") === - (null == flags.crossOrigin + (null == current.crossOrigin ? null - : flags.crossOrigin)) + : current.crossOrigin)) ) { hoistableRoot.splice(i, 1); break b; } - lanes = root.createElement(current); - setInitialProperties(lanes, current, flags); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); root.head.appendChild(lanes); break; case "meta": @@ -14802,53 +15086,55 @@ "meta", "content", root - ).get(current + (flags.content || ""))) + ).get(flags + (current.content || ""))) ) for (i = 0; i < hoistableRoot.length; i++) if ( ((lanes = hoistableRoot[i]), checkAttributeStringCoercion( - flags.content, + current.content, "content" ), lanes.getAttribute("content") === - (null == flags.content + (null == current.content ? null - : "" + flags.content) && + : "" + current.content) && lanes.getAttribute("name") === - (null == flags.name ? null : flags.name) && + (null == current.name + ? null + : current.name) && lanes.getAttribute("property") === - (null == flags.property + (null == current.property ? null - : flags.property) && + : current.property) && lanes.getAttribute("http-equiv") === - (null == flags.httpEquiv + (null == current.httpEquiv ? null - : flags.httpEquiv) && + : current.httpEquiv) && lanes.getAttribute("charset") === - (null == flags.charSet + (null == current.charSet ? null - : flags.charSet)) + : current.charSet)) ) { hoistableRoot.splice(i, 1); break b; } - lanes = root.createElement(current); - setInitialProperties(lanes, current, flags); + lanes = root.createElement(flags); + setInitialProperties(lanes, flags, current); root.head.appendChild(lanes); break; default: throw Error( 'getNodesForType encountered a type it did not expect: "' + - current + + flags + '". This is a bug in React.' ); } lanes[internalInstanceKey] = finishedWork; markNodeAsHoistable(lanes); - current = lanes; + flags = lanes; } - finishedWork.stateNode = current; + finishedWork.stateNode = flags; } else mountHoistable( hoistableRoot, @@ -14985,23 +15271,32 @@ root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: - current = pushMutationContext(); - flags = currentHoistableRoot; + flags = pushMutationContext(); + current = currentHoistableRoot; currentHoistableRoot = getHoistableRoot( finishedWork.stateNode.containerInfo ); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); - currentHoistableRoot = flags; + currentHoistableRoot = current; viewTransitionMutationContext && (rootViewTransitionAffected = !0); - viewTransitionMutationContext = current; + viewTransitionMutationContext = flags; break; case 12: - current = pushNestedEffectDurations(); + flags = pushNestedEffectDurations(); recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); finishedWork.stateNode.effectDuration += - bubbleNestedEffectDurations(current); + bubbleNestedEffectDurations(flags); + break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -15011,10 +15306,10 @@ (null !== current && null !== current.memoizedState) && (globalMostRecentFallbackTime = now$1()); flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && + ((flags = finishedWork.updateQueue), + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, current))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 22: hoistableRoot = null !== finishedWork.memoizedState; @@ -15104,6 +15399,26 @@ captureCommitPhaseError(lanes, lanes.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + lanes = root; + try { + var instance$jscomp$0 = lanes.stateNode; + hoistableRoot + ? runWithFiberInDEV( + lanes, + hideDehydratedBoundary, + instance$jscomp$0 + ) + : runWithFiberInDEV( + lanes, + unhideDehydratedBoundary, + lanes.stateNode + ); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -15126,21 +15441,21 @@ root = root.sibling; } flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && - ((flags = current.retryQueue), - null !== flags && - ((current.retryQueue = null), - attachSuspenseRetryListeners(finishedWork, flags)))); + ((flags = finishedWork.updateQueue), + null !== flags && + ((current = flags.retryQueue), + null !== current && + ((flags.retryQueue = null), + attachSuspenseRetryListeners(finishedWork, current)))); break; case 19: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && + ((flags = finishedWork.updateQueue), + null !== flags && ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, current))); + attachSuspenseRetryListeners(finishedWork, flags))); break; case 30: flags & 512 && @@ -15480,6 +15795,16 @@ includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -15729,6 +16054,40 @@ endTime ); break; + case 31: + flags = inHydratedSubtree; + isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null; + prevProfilerEffectDuration = finishedWork.memoizedState; + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + inHydratedSubtree = flags; + break; case 13: flags = inHydratedSubtree; isViewTransitionEligible = @@ -19466,6 +19825,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -23181,24 +23541,28 @@ : container ).removeChild(child); } - function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, + function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), node === SUSPENSE_END_DATA)) { + if ( + ((node = nextNode.data), + node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) + ) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; } else if ( node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || - node === SUSPENSE_FALLBACK_START_DATA + node === SUSPENSE_FALLBACK_START_DATA || + node === ACTIVITY_START_DATA ) depth++; else if (node === PREAMBLE_CONTRIBUTION_HTML) @@ -23224,7 +23588,38 @@ releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); + } + function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && + node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), node === SUSPENSE_END_DATA)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + (node !== SUSPENSE_START_DATA && + node !== SUSPENSE_PENDING_START_DATA && + node !== SUSPENSE_FALLBACK_START_DATA) || + suspenseInstance++; + node = nextNode; + } while (node); + } + function hideDehydratedBoundary(suspenseInstance) { + hideOrUnhideDehydratedBoundary(suspenseInstance, !0); } function hideInstance(instance) { instance = instance.style; @@ -23235,6 +23630,9 @@ function hideTextInstance(textInstance) { textInstance.nodeValue = ""; } + function unhideDehydratedBoundary(dehydratedInstance) { + hideOrUnhideDehydratedBoundary(dehydratedInstance, !1); + } function unhideInstance(instance, props) { props = props[STYLE]; props = @@ -23987,6 +24385,14 @@ } return instance; } + function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; + } function isSuspenseInstanceFallback(instance) { return ( instance.data === SUSPENSE_FALLBACK_START_DATA || @@ -24020,11 +24426,13 @@ nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || + nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING ) break; - if (nodeType === SUSPENSE_END_DATA) return null; + if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA) + return null; } } return node; @@ -24048,7 +24456,9 @@ return { type: JSCompiler_temp_const, props: serverDifferences }; } return 8 === instance.nodeType - ? { type: "Suspense", props: {} } + ? instance.data === ACTIVITY_START_DATA + ? { type: "Activity", props: {} } + : { type: "Suspense", props: {} } : instance.nodeValue; } function diffHydratedTextForDevWarnings(textInstance, text, parentProps) { @@ -24065,26 +24475,29 @@ textInstance) : null; } - function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { - suspenseInstance = suspenseInstance.nextSibling; - for (var depth = 0; suspenseInstance; ) { - if (8 === suspenseInstance.nodeType) { - var data = suspenseInstance.data; - if (data === SUSPENSE_END_DATA) { + function getNextHydratableInstanceAfterHydrationBoundary( + hydrationInstance + ) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) { if (0 === depth) - return getNextHydratable(suspenseInstance.nextSibling); + return getNextHydratable(hydrationInstance.nextSibling); depth--; } else (data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && - data !== SUSPENSE_PENDING_START_DATA) || + data !== SUSPENSE_PENDING_START_DATA && + data !== ACTIVITY_START_DATA) || depth++; } - suspenseInstance = suspenseInstance.nextSibling; + hydrationInstance = hydrationInstance.nextSibling; } return null; } - function getParentSuspenseInstance(targetInstance) { + function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { @@ -24092,11 +24505,14 @@ if ( data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || - data === SUSPENSE_PENDING_START_DATA + data === SUSPENSE_PENDING_START_DATA || + data === ACTIVITY_START_DATA ) { if (0 === depth) return targetInstance; depth--; - } else data === SUSPENSE_END_DATA && depth++; + } else + (data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA) || + depth++; } targetInstance = targetInstance.previousSibling; } @@ -24105,6 +24521,9 @@ function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -25124,12 +25543,21 @@ (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -25224,6 +25652,7 @@ } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -25269,6 +25698,10 @@ targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -25518,17 +25951,18 @@ ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -29128,6 +29562,8 @@ EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", + ACTIVITY_START_DATA = "&", + ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", @@ -29756,11 +30192,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-experimental-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-experimental-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-experimental-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-experimental-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -29797,10 +30233,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-experimental-bc6184dd-20250417", + version: "19.2.0-experimental-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-bc6184dd-20250417" + reconcilerVersion: "19.2.0-experimental-914319ae-20250423" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -30108,5 +30544,5 @@ } }; }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js index 8f806d58c770c..b5c00d33b8f5e 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js @@ -60,6 +60,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -788,6 +798,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -883,12 +901,12 @@ function getClosestInstanceFromNode(targetNode) { (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -906,6 +924,7 @@ function getInstanceFromNode(node) { 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -2715,6 +2734,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiberImplClass(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiberImplClass( 4, @@ -2801,6 +2825,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -2898,6 +2930,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2928,25 +2961,14 @@ function popHydrationState(fiber) { fiber = fiber.memoizedState; fiber = null !== fiber ? fiber.dehydrated : null; if (!fiber) throw Error(formatProdErrorMessage(317)); - a: { - fiber = fiber.nextSibling; - for (tag = 0; fiber; ) { - if (8 === fiber.nodeType) - if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { - if (0 === tag) { - nextHydratableInstance = getNextHydratable(fiber.nextSibling); - break a; - } - tag--; - } else - ("$" !== JSCompiler_temp && - "$!" !== JSCompiler_temp && - "$?" !== JSCompiler_temp) || - tag++; - fiber = fiber.nextSibling; - } - nextHydratableInstance = null; - } + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -4558,19 +4580,17 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack() { push(suspenseStackCursor, suspenseStackCursor.current); @@ -6364,6 +6384,7 @@ function throwException( var suspenseBoundary = suspenseHandlerStackCursor.current; if (null !== suspenseBoundary) { switch (suspenseBoundary.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6666,7 +6687,18 @@ function updateOffscreenComponent( renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -6676,16 +6708,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -6720,6 +6742,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7096,39 +7140,28 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - renderLanes = current; - for (current = rootOrSingletonContext; 8 !== renderLanes.nodeType; ) { - if (!current) { - current = null; - break a; - } - renderLanes = getNextHydratable(renderLanes.nextSibling); - if (null === renderLanes) { - current = null; - break a; - } - } - current = renderLanes; - } - null !== current && - ((workInProgress.memoizedState = { - dehydrated: current, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (renderLanes = createFiberImplClass(18, null, null, 0)), - (renderLanes.stateNode = current), - (renderLanes.return = workInProgress), - (workInProgress.child = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else current = null; + (current = nextHydratableInstance) + ? ((current = canHydrateHydrationBoundary( + current, + rootOrSingletonContext + )), + (current = null !== current && "&" !== current.data ? current : null), + null !== current && + ((workInProgress.memoizedState = { + dehydrated: current, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (renderLanes = createFiberFromDehydratedFragment(current)), + (renderLanes.return = workInProgress), + (workInProgress.child = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (current = null); if (null === current) throw throwOnHydrationMismatch(workInProgress); isSuspenseInstanceFallback(current) ? (workInProgress.lanes = 32) @@ -7203,14 +7236,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7263,15 +7296,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7300,12 +7325,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7317,14 +7337,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7332,7 +7352,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7343,22 +7363,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7616,10 +7636,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$109 = workInProgress.memoizedState; + if (null !== state$109) { + if (null !== state$109.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -7639,17 +7667,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$109 = 0 !== (renderLanes & workInProgress.childLanes); + state$109 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$109 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$109) return updateSuspenseListComponent( current, workInProgress, @@ -7663,7 +7691,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$109) break; else return null; case 22: return ( @@ -8109,29 +8137,116 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (lazyComponent = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (lazyComponent = { - mode: lazyComponent.mode, - children: lazyComponent.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - lazyComponent, - renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, lazyComponent)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if ( + ((lazyComponent = current.memoizedState), null !== lazyComponent) + ) + if ( + ((prevState = lazyComponent.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) + ) + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== lazyComponent.retryLane) + ) + throw ( + ((lazyComponent.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = lazyComponent.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -8292,14 +8407,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$119 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$119 = lastTailNode), + for (var lastTailNode$120 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$120 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$119 + null === lastTailNode$120 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$119.sibling = null); + : (lastTailNode$120.sibling = null); } } function bubbleProperties(completedWork) { @@ -8309,19 +8424,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 65011712), - (subtreeFlags |= child$120.flags & 65011712), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (var child$121 = completedWork.child; null !== child$121; ) + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags & 65011712), + (subtreeFlags |= child$121.flags & 65011712), + (child$121.return = completedWork), + (child$121 = child$121.sibling); else - for (child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags), - (subtreeFlags |= child$120.flags), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (child$121 = completedWork.child; null !== child$121; ) + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags), + (subtreeFlags |= child$121.flags), + (child$121.return = completedWork), + (child$121 = child$121.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8330,7 +8445,6 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -8589,6 +8703,41 @@ function completeWork(current, workInProgress, renderLanes) { } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8824,6 +8973,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8876,6 +9036,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9032,8 +9196,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$151) { - captureCommitPhaseError(current, nearestMountedAncestor, error$151); + } catch (error$155) { + captureCommitPhaseError(current, nearestMountedAncestor, error$155); } else ref.current = null; } @@ -9929,11 +10093,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$149) { + } catch (error$153) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$149 + error$153 ); } } @@ -9976,6 +10140,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -10139,7 +10307,7 @@ function commitDeletionEffectsOnFiber( null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -10148,7 +10316,7 @@ function commitDeletionEffectsOnFiber( deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -10236,6 +10404,21 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + retryIfBlockedOn(finishedRoot); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -10253,6 +10436,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10362,112 +10546,111 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return)); - if (flags & 4) - if ( - ((root = null !== current ? current.memoizedState : null), - (flags = finishedWork.memoizedState), - null === current) - ) + if (flags & 4) { + var currentResource = null !== current ? current.memoizedState : null; + flags = finishedWork.memoizedState; + if (null === current) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - root = hoistableRoot.ownerDocument || hoistableRoot; + hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - lanes = root.getElementsByTagName("title")[0]; + currentResource = + hoistableRoot.getElementsByTagName("title")[0]; if ( - !lanes || - lanes[internalHoistableMarker] || - lanes[internalInstanceKey] || - "http://www.w3.org/2000/svg" === lanes.namespaceURI || - lanes.hasAttribute("itemprop") + !currentResource || + currentResource[internalHoistableMarker] || + currentResource[internalInstanceKey] || + "http://www.w3.org/2000/svg" === + currentResource.namespaceURI || + currentResource.hasAttribute("itemprop") ) - (lanes = root.createElement(flags)), - root.head.insertBefore( - lanes, - root.querySelector("head > title") + (currentResource = hoistableRoot.createElement(flags)), + hoistableRoot.head.insertBefore( + currentResource, + hoistableRoot.querySelector("head > title") ); - setInitialProperties(lanes, flags, current); - lanes[internalInstanceKey] = finishedWork; - markNodeAsHoistable(lanes); - flags = lanes; + setInitialProperties(currentResource, flags, current); + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; break a; case "link": - if ( - (hoistableRoot = getHydratableHoistableCache( - "link", - "href", - root - ).get(flags + (current.href || ""))) - ) - for (var i = 0; i < hoistableRoot.length; i++) + var maybeNodes = getHydratableHoistableCache( + "link", + "href", + hoistableRoot + ).get(flags + (current.href || "")); + if (maybeNodes) + for (var i = 0; i < maybeNodes.length; i++) if ( - ((lanes = hoistableRoot[i]), - lanes.getAttribute("href") === + ((currentResource = maybeNodes[i]), + currentResource.getAttribute("href") === (null == current.href || "" === current.href ? null : current.href) && - lanes.getAttribute("rel") === + currentResource.getAttribute("rel") === (null == current.rel ? null : current.rel) && - lanes.getAttribute("title") === + currentResource.getAttribute("title") === (null == current.title ? null : current.title) && - lanes.getAttribute("crossorigin") === + currentResource.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) ) { - hoistableRoot.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - lanes = root.createElement(flags); - setInitialProperties(lanes, flags, current); - root.head.appendChild(lanes); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; case "meta": if ( - (hoistableRoot = getHydratableHoistableCache( + (maybeNodes = getHydratableHoistableCache( "meta", "content", - root + hoistableRoot ).get(flags + (current.content || ""))) ) - for (i = 0; i < hoistableRoot.length; i++) + for (i = 0; i < maybeNodes.length; i++) if ( - ((lanes = hoistableRoot[i]), - lanes.getAttribute("content") === + ((currentResource = maybeNodes[i]), + currentResource.getAttribute("content") === (null == current.content ? null : "" + current.content) && - lanes.getAttribute("name") === + currentResource.getAttribute("name") === (null == current.name ? null : current.name) && - lanes.getAttribute("property") === + currentResource.getAttribute("property") === (null == current.property ? null : current.property) && - lanes.getAttribute("http-equiv") === + currentResource.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - lanes.getAttribute("charset") === + currentResource.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) ) { - hoistableRoot.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - lanes = root.createElement(flags); - setInitialProperties(lanes, flags, current); - root.head.appendChild(lanes); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; default: throw Error(formatProdErrorMessage(468, flags)); } - lanes[internalInstanceKey] = finishedWork; - markNodeAsHoistable(lanes); - flags = lanes; + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; } finishedWork.stateNode = flags; } else @@ -10483,12 +10666,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.memoizedProps ); else - root !== flags - ? (null === root + currentResource !== flags + ? (null === currentResource ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : root.count--, + : currentResource.count--, null === flags ? mountHoistable( hoistableRoot, @@ -10507,6 +10690,7 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.memoizedProps, current.memoizedProps ); + } break; case 27: recursivelyTraverseMutationEffects(root, finishedWork, lanes); @@ -10531,20 +10715,21 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { null === current || safelyDetachRef(current, current.return)); if (finishedWork.flags & 32) { - root = finishedWork.stateNode; + hoistableRoot = finishedWork.stateNode; try { - setTextContent(root, ""), (viewTransitionMutationContext = !0); + setTextContent(hoistableRoot, ""), + (viewTransitionMutationContext = !0); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((root = finishedWork.memoizedProps), + ((hoistableRoot = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - root, - null !== current ? current.memoizedProps : root + hoistableRoot, + null !== current ? current.memoizedProps : hoistableRoot )); flags & 1024 && (needsFormReset = !0); break; @@ -10595,6 +10780,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -10640,12 +10834,13 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { if (null === current) { lanes = current = root; try { - if (((i = lanes.stateNode), hoistableRoot)) { - var style = i.style; - "function" === typeof style.setProperty - ? style.setProperty("display", "none", "important") - : (style.display = "none"); - } else unhideInstance(lanes.stateNode, lanes.memoizedProps); + (currentResource = lanes.stateNode), + hoistableRoot + ? ((maybeNodes = currentResource.style), + "function" === typeof maybeNodes.setProperty + ? maybeNodes.setProperty("display", "none", "important") + : (maybeNodes.display = "none")) + : unhideInstance(lanes.stateNode, lanes.memoizedProps); } catch (error) { captureCommitPhaseError(lanes, lanes.return, error); } @@ -10662,6 +10857,18 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { captureCommitPhaseError(lanes, lanes.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + lanes = root; + try { + (i = lanes.stateNode), + hoistableRoot + ? hideOrUnhideDehydratedBoundary(i, !0) + : hideOrUnhideDehydratedBoundary(lanes.stateNode, !1); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -10760,25 +10967,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$152 = hostParentFiber.stateNode; + var parent$156 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$152, ""), (hostParentFiber.flags &= -33)); - var before$153 = getHostSibling(finishedWork); + (setTextContent(parent$156, ""), (hostParentFiber.flags &= -33)); + var before$157 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$153, - parent$152, + before$157, + parent$156, parentFragmentInstances ); break; case 3: case 4: - var parent$154 = hostParentFiber.stateNode.containerInfo, - before$155 = getHostSibling(finishedWork); + var parent$158 = hostParentFiber.stateNode.containerInfo, + before$159 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$155, - parent$154, + before$159, + parent$158, parentFragmentInstances ); break; @@ -11018,6 +11225,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -11181,6 +11398,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11899,7 +12124,7 @@ function recursivelyInsertClones( if (null === nextPhase) recursivelyInsertNewFiber(deletions, i, parentViewTransition, 5); else { - var nextPhase$178 = deletions.flags; + var nextPhase$183 = deletions.flags; switch (deletions.tag) { case 26: recursivelyInsertClones( @@ -11925,16 +12150,16 @@ function recursivelyInsertClones( (setTextContent(clone, ""), (viewTransitionMutationContext = !0))) : (clone = clone.cloneNode(!1)); - if (nextPhase$178 & 4) { - nextPhase$178 = clone; + if (nextPhase$183 & 4) { + nextPhase$183 = clone; var newProps = deletions.memoizedProps; updateProperties( - nextPhase$178, + nextPhase$183, deletions.type, nextPhase.memoizedProps, newProps ); - nextPhase$178[internalPropsKey] = newProps; + nextPhase$183[internalPropsKey] = newProps; } 1 === visitPhase || 2 === visitPhase ? (appendChild(i, clone), @@ -11953,7 +12178,7 @@ function recursivelyInsertClones( if (null === parentViewTransition) throw Error(formatProdErrorMessage(162)); parentViewTransition = parentViewTransition.cloneNode(!1); - nextPhase$178 & 4 && + nextPhase$183 & 4 && ((parentViewTransition.nodeValue = nextPhase.memoizedProps), (viewTransitionMutationContext = !0)); appendChild(i, parentViewTransition); @@ -11966,7 +12191,7 @@ function recursivelyInsertClones( case 22: null === deletions.memoizedState ? ((nextPhase = - 0 === visitPhase && 0 !== (nextPhase$178 & 8192) + 0 === visitPhase && 0 !== (nextPhase$183 & 8192) ? 1 : visitPhase), recursivelyInsertClones( @@ -11984,8 +12209,8 @@ function recursivelyInsertClones( parentViewTransition = pushMutationContext(); clone = deletions.stateNode; clone.clones = null; - nextPhase$178 = 1 === visitPhase ? 2 : visitPhase; - recursivelyInsertClones(deletions, i, clone, nextPhase$178); + nextPhase$183 = 1 === visitPhase ? 2 : visitPhase; + recursivelyInsertClones(deletions, i, clone, nextPhase$183); viewTransitionMutationContext && (deletions.flags |= 4); 1 === visitPhase ? applyExitViewTransition(deletions) @@ -12900,8 +13125,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$184) { - handleThrow(root, thrownValue$184); + } catch (thrownValue$189) { + handleThrow(root, thrownValue$189); } while (1); lanes && root.shellSuspendCounter++; @@ -13020,8 +13245,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$186) { - handleThrow(root, thrownValue$186); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -13609,26 +13834,26 @@ function commitGestureOnRoot(root, finishedWork) { } var rotate = computedStyle.rotate; if ("none" !== rotate && "" !== rotate) { - var parts$264 = rotate.split(" "); + var parts$269 = rotate.split(" "); transform = - 1 === parts$264.length - ? "rotate(" + parts$264[0] + ") " + transform - : 2 === parts$264.length + 1 === parts$269.length + ? "rotate(" + parts$269[0] + ") " + transform + : 2 === parts$269.length ? "rotate" + - parts$264[0].toUpperCase() + + parts$269[0].toUpperCase() + "(" + - parts$264[1] + + parts$269[1] + ") " + transform - : "rotate3d(" + parts$264.join(", ") + ") " + transform; + : "rotate3d(" + parts$269.join(", ") + ") " + transform; } var translate = computedStyle.translate; if ("none" !== translate && "" !== translate) { - var parts$265 = translate.split(" "); + var parts$270 = translate.split(" "); transform = - (3 === parts$265.length ? "translate3d" : "translate") + + (3 === parts$270.length ? "translate3d" : "translate") + "(" + - parts$265.join(", ") + + parts$270.join(", ") + ") " + transform; } @@ -13896,6 +14121,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -13937,14 +14163,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$192 = firstScheduledRoot; null !== root$192; ) { + for (var root$197 = firstScheduledRoot; null !== root$197; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$192.pendingLanes; + var pendingLanes = root$197.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$192.suspendedLanes, - pingedLanes = root$192.pingedLanes; + var suspendedLanes = root$197.suspendedLanes, + pingedLanes = root$197.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -13958,21 +14184,21 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$192, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$197, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$192, - root$192 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$192.cancelPendingCommit || - -1 !== root$192.timeoutHandle + root$197, + root$197 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$197.cancelPendingCommit || + -1 !== root$197.timeoutHandle )), (0 === (JSCompiler_inline_result & 3) && 64 !== JSCompiler_inline_result) || - checkIfRootIsPrerendering(root$192, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$197, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$192, JSCompiler_inline_result)); - root$192 = root$192.next; + performSyncWorkOnRoot(root$197, JSCompiler_inline_result)); + root$197 = root$197.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -14249,20 +14475,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1724 = 0; - i$jscomp$inline_1724 < simpleEventPluginEvents.length; - i$jscomp$inline_1724++ + var i$jscomp$inline_1758 = 0; + i$jscomp$inline_1758 < simpleEventPluginEvents.length; + i$jscomp$inline_1758++ ) { - var eventName$jscomp$inline_1725 = - simpleEventPluginEvents[i$jscomp$inline_1724], - domEventName$jscomp$inline_1726 = - eventName$jscomp$inline_1725.toLowerCase(), - capitalizedEvent$jscomp$inline_1727 = - eventName$jscomp$inline_1725[0].toUpperCase() + - eventName$jscomp$inline_1725.slice(1); + var eventName$jscomp$inline_1759 = + simpleEventPluginEvents[i$jscomp$inline_1758], + domEventName$jscomp$inline_1760 = + eventName$jscomp$inline_1759.toLowerCase(), + capitalizedEvent$jscomp$inline_1761 = + eventName$jscomp$inline_1759[0].toUpperCase() + + eventName$jscomp$inline_1759.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1726, - "on" + capitalizedEvent$jscomp$inline_1727 + domEventName$jscomp$inline_1760, + "on" + capitalizedEvent$jscomp$inline_1761 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15519,34 +15745,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$206 = props[hasSrc]; - if (null != propValue$206) + var propValue$211 = props[hasSrc]; + if (null != propValue$211) switch (hasSrc) { case "name": - hasSrcSet = propValue$206; + hasSrcSet = propValue$211; break; case "type": - propValue = propValue$206; + propValue = propValue$211; break; case "checked": - checked = propValue$206; + checked = propValue$211; break; case "defaultChecked": - defaultChecked = propValue$206; + defaultChecked = propValue$211; break; case "value": - propKey = propValue$206; + propKey = propValue$211; break; case "defaultValue": - defaultValue = propValue$206; + defaultValue = propValue$211; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$206) + if (null != propValue$211) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$206, props, null); + setProp(domElement, tag, hasSrc, propValue$211, props, null); } } initInput( @@ -15685,14 +15911,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$206 in props) - props.hasOwnProperty(propValue$206) && - ((hasSrc = props[propValue$206]), + for (propValue$211 in props) + props.hasOwnProperty(propValue$211) && + ((hasSrc = props[propValue$211]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$206, + propValue$211, hasSrc, props, void 0 @@ -15740,14 +15966,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$223 in nextProps) { - var propKey = nextProps[propKey$223]; - lastProp = lastProps[propKey$223]; + for (var propKey$228 in nextProps) { + var propKey = nextProps[propKey$228]; + lastProp = lastProps[propKey$228]; if ( - nextProps.hasOwnProperty(propKey$223) && + nextProps.hasOwnProperty(propKey$228) && (null != propKey || null != lastProp) ) - switch (propKey$223) { + switch (propKey$228) { case "type": propKey !== lastProp && (viewTransitionMutationContext = !0); type = propKey; @@ -15782,7 +16008,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$223, + propKey$228, propKey, nextProps, lastProp @@ -15801,7 +16027,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$223 = null; + propKey = value = defaultValue = propKey$228 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15833,7 +16059,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && (viewTransitionMutationContext = !0); - propKey$223 = type; + propKey$228 = type; break; case "defaultValue": type !== lastDefaultValue && (viewTransitionMutationContext = !0); @@ -15856,15 +16082,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$223 - ? updateOptions(domElement, !!lastProps, propKey$223, !1) + null != propKey$228 + ? updateOptions(domElement, !!lastProps, propKey$228, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$223 = null; + propKey = propKey$228 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15889,7 +16115,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && (viewTransitionMutationContext = !0); - propKey$223 = name; + propKey$228 = name; break; case "defaultValue": name !== type && (viewTransitionMutationContext = !0); @@ -15904,17 +16130,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$223, propKey); + updateTextarea(domElement, propKey$228, propKey); return; case "option": - for (var propKey$239 in lastProps) + for (var propKey$244 in lastProps) if ( - ((propKey$223 = lastProps[propKey$239]), - lastProps.hasOwnProperty(propKey$239) && - null != propKey$223 && - !nextProps.hasOwnProperty(propKey$239)) + ((propKey$228 = lastProps[propKey$244]), + lastProps.hasOwnProperty(propKey$244) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$244)) ) - switch (propKey$239) { + switch (propKey$244) { case "selected": domElement.selected = !1; break; @@ -15922,34 +16148,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$239, + propKey$244, null, nextProps, - propKey$223 + propKey$228 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$223 = nextProps[lastDefaultValue]), + ((propKey$228 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$223 !== propKey && - (null != propKey$223 || null != propKey)) + propKey$228 !== propKey && + (null != propKey$228 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$223 !== propKey && (viewTransitionMutationContext = !0); + propKey$228 !== propKey && (viewTransitionMutationContext = !0); domElement.selected = - propKey$223 && - "function" !== typeof propKey$223 && - "symbol" !== typeof propKey$223; + propKey$228 && + "function" !== typeof propKey$228 && + "symbol" !== typeof propKey$228; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$223, + propKey$228, nextProps, propKey ); @@ -15970,24 +16196,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$244 in lastProps) - (propKey$223 = lastProps[propKey$244]), - lastProps.hasOwnProperty(propKey$244) && - null != propKey$223 && - !nextProps.hasOwnProperty(propKey$244) && - setProp(domElement, tag, propKey$244, null, nextProps, propKey$223); + for (var propKey$249 in lastProps) + (propKey$228 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$249) && + setProp(domElement, tag, propKey$249, null, nextProps, propKey$228); for (checked in nextProps) if ( - ((propKey$223 = nextProps[checked]), + ((propKey$228 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$223 !== propKey && - (null != propKey$223 || null != propKey)) + propKey$228 !== propKey && + (null != propKey$228 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$223) + if (null != propKey$228) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15995,7 +16221,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$223, + propKey$228, nextProps, propKey ); @@ -16003,49 +16229,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$249 in lastProps) - (propKey$223 = lastProps[propKey$249]), - lastProps.hasOwnProperty(propKey$249) && - void 0 !== propKey$223 && - !nextProps.hasOwnProperty(propKey$249) && + for (var propKey$254 in lastProps) + (propKey$228 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + void 0 !== propKey$228 && + !nextProps.hasOwnProperty(propKey$254) && setPropOnCustomElement( domElement, tag, - propKey$249, + propKey$254, void 0, nextProps, - propKey$223 + propKey$228 ); for (defaultChecked in nextProps) - (propKey$223 = nextProps[defaultChecked]), + (propKey$228 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$223 === propKey || - (void 0 === propKey$223 && void 0 === propKey) || + propKey$228 === propKey || + (void 0 === propKey$228 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$223, + propKey$228, nextProps, propKey ); return; } } - for (var propKey$254 in lastProps) - (propKey$223 = lastProps[propKey$254]), - lastProps.hasOwnProperty(propKey$254) && - null != propKey$223 && - !nextProps.hasOwnProperty(propKey$254) && - setProp(domElement, tag, propKey$254, null, nextProps, propKey$223); + for (var propKey$259 in lastProps) + (propKey$228 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$259) && + setProp(domElement, tag, propKey$259, null, nextProps, propKey$228); for (lastProp in nextProps) - (propKey$223 = nextProps[lastProp]), + (propKey$228 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$223 === propKey || - (null == propKey$223 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$223, nextProps, propKey); + propKey$228 === propKey || + (null == propKey$228 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$228, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16131,21 +16357,22 @@ function appendChild(parentInstance, child) { function isSingletonScope(type) { return "head" === type; } -function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, +function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), "/$" === node)) { + if (((node = nextNode.data), "/$" === node || "/&" === node)) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; - } else if ("$" === node || "$?" === node || "$!" === node) depth++; + } else if ("$" === node || "$?" === node || "$!" === node || "&" === node) + depth++; else if ("html" === node) releaseSingletonInstance(parentInstance.ownerDocument.documentElement); else if ("head" === node) { @@ -16167,7 +16394,31 @@ function clearSuspenseBoundary(parentInstance, suspenseInstance) { releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); +} +function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), "/$" === node)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + ("$" !== node && "$?" !== node && "$!" !== node) || suspenseInstance++; + node = nextNode; + } while (node); } function unhideInstance(instance, props) { props = props.style; @@ -16576,20 +16827,20 @@ function startGestureTransition( ))) : (isExitGroupAnim = !0); } - var timing$269 = pseudoElement.getTiming(); + var timing$274 = pseudoElement.getTiming(); anim = rangeEnd - - (("number" === typeof timing$269.duration - ? timing$269.duration + (("number" === typeof timing$274.duration + ? timing$274.duration : 0) + - timing$269.delay) * + timing$274.delay) * longestDuration; - groupName = rangeEnd - timing$269.delay * longestDuration; + groupName = rangeEnd - timing$274.delay * longestDuration; if ( - "reverse" === timing$269.direction || - "alternate-reverse" === timing$269.direction + "reverse" === timing$274.direction || + "alternate-reverse" === timing$274.direction ) - (timing$269 = anim), (anim = groupName), (groupName = timing$269); + (timing$274 = anim), (anim = groupName), (groupName = timing$274); animateGesture( pseudoElement.getKeyframes(), pseudoElement.target, @@ -17011,6 +17262,14 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { } return instance; } +function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; +} function isSuspenseInstanceFallback(instance) { return ( "$!" === instance.data || @@ -17040,25 +17299,43 @@ function getNextHydratable(node) { "$" === nodeType || "$!" === nodeType || "$?" === nodeType || + "&" === nodeType || "F!" === nodeType || "F" === nodeType ) break; - if ("/$" === nodeType) return null; + if ("/$" === nodeType || "/&" === nodeType) return null; } } return node; } var previousHydratableOnEnteringScopedSingleton = null; -function getParentSuspenseInstance(targetInstance) { +function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if ("/$" === data || "/&" === data) { + if (0 === depth) + return getNextHydratable(hydrationInstance.nextSibling); + depth--; + } else + ("$" !== data && "$!" !== data && "$?" !== data && "&" !== data) || + depth++; + } + hydrationInstance = hydrationInstance.nextSibling; + } + return null; +} +function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { var data = targetInstance.data; - if ("$" === data || "$!" === data || "$?" === data) { + if ("$" === data || "$!" === data || "$?" === data || "&" === data) { if (0 === depth) return targetInstance; depth--; - } else "/$" === data && depth++; + } else ("/$" !== data && "/&" !== data) || depth++; } targetInstance = targetInstance.previousSibling; } @@ -17446,26 +17723,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$274 = getResourcesFromRoot( + var styles$279 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$275 = styles$274.get(type); - resource$275 || + resource$280 = styles$279.get(type); + resource$280 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$275 = { + (resource$280 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$274.set(type, resource$275), - (styles$274 = JSCompiler_inline_result.querySelector( + styles$279.set(type, resource$280), + (styles$279 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$274._p && - ((resource$275.instance = styles$274), - (resource$275.state.loading = 5)), + !styles$279._p && + ((resource$280.instance = styles$279), + (resource$280.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -17478,16 +17755,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$274 || + styles$279 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$275.state + resource$280.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$275; + return resource$280; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17584,37 +17861,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$280 = hoistableRoot.querySelector( + var instance$285 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$280) + if (instance$285) return ( (resource.state.loading |= 4), - (resource.instance = instance$280), - markNodeAsHoistable(instance$280), - instance$280 + (resource.instance = instance$285), + markNodeAsHoistable(instance$285), + instance$285 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$280 = ( + instance$285 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$280); - var linkInstance = instance$280; + markNodeAsHoistable(instance$285); + var linkInstance = instance$285; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$280, "link", instance); + setInitialProperties(instance$285, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$280, props.precedence, hoistableRoot); - return (resource.instance = instance$280); + insertStylesheet(instance$285, props.precedence, hoistableRoot); + return (resource.instance = instance$285); case "script": - instance$280 = getScriptKey(props.src); + instance$285 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$280) + getScriptSelectorFromKey(instance$285) )) ) return ( @@ -17623,7 +17900,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$280))) + if ((styleProps = preloadPropsMap.get(instance$285))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18064,12 +18341,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -18160,6 +18446,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -18206,6 +18493,10 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -18466,14 +18757,18 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -18670,16 +18965,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_2041 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2074 = React.version; if ( - "19.2.0-experimental-bc6184dd-20250417" !== - isomorphicReactPackageVersion$jscomp$inline_2041 + "19.2.0-experimental-914319ae-20250423" !== + isomorphicReactPackageVersion$jscomp$inline_2074 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2041, - "19.2.0-experimental-bc6184dd-20250417" + isomorphicReactPackageVersion$jscomp$inline_2074, + "19.2.0-experimental-914319ae-20250423" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -18699,24 +18994,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2660 = { +var internals$jscomp$inline_2715 = { bundleType: 0, - version: "19.2.0-experimental-bc6184dd-20250417", + version: "19.2.0-experimental-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-experimental-bc6184dd-20250417" + reconcilerVersion: "19.2.0-experimental-914319ae-20250423" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2661 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2716 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2661.isDisabled && - hook$jscomp$inline_2661.supportsFiber + !hook$jscomp$inline_2716.isDisabled && + hook$jscomp$inline_2716.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2661.inject( - internals$jscomp$inline_2660 + (rendererID = hook$jscomp$inline_2716.inject( + internals$jscomp$inline_2715 )), - (injectedHook = hook$jscomp$inline_2661); + (injectedHook = hook$jscomp$inline_2716); } catch (err) {} } exports.createComponentSelector = function (component) { @@ -18959,4 +19254,4 @@ exports.observeVisibleRects = function ( } }; }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js index 4bdf652a2f63f..ce8c94dfdf140 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js index 0cb6fdb629fd4..ba9fb477a0e6c 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js index f85f893ea0ab3..f865c8afe2903 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.2.0-experimental-bc6184dd-20250417"; + exports.version = "19.2.0-experimental-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js index b50cd8e86f681..5491ec45707a1 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.2.0-experimental-bc6184dd-20250417"; +exports.version = "19.2.0-experimental-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom-experimental/package.json b/packages/next/src/compiled/react-dom-experimental/package.json index a2d413782cd6c..d75b66dd2c45e 100644 --- a/packages/next/src/compiled/react-dom-experimental/package.json +++ b/packages/next/src/compiled/react-dom-experimental/package.json @@ -72,10 +72,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.0.0-experimental-bc6184dd-20250417" + "scheduler": "0.0.0-experimental-914319ae-20250423" }, "peerDependencies": { - "react": "0.0.0-experimental-bc6184dd-20250417" + "react": "0.0.0-experimental-914319ae-20250423" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js index 2584d6a9043b4..59d727ebd8819 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js @@ -146,6 +146,16 @@ } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -1242,6 +1252,16 @@ rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1359,13 +1379,13 @@ (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -1383,6 +1403,7 @@ 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -1914,6 +1935,8 @@ return fiber.type; case 16: return "Lazy"; + case 31: + return "Activity"; case 13: return "Suspense"; case 19: @@ -4293,6 +4316,11 @@ content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -4364,6 +4392,21 @@ (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -4411,6 +4454,12 @@ siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -4533,6 +4582,7 @@ for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -4566,7 +4616,7 @@ diffNode.serverTail.push(description); JSCompiler_temp = "Suspense" === description.type - ? getNextHydratableInstanceAfterSuspenseInstance(JSCompiler_temp) + ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling); } throwOnHydrationMismatch(fiber); @@ -4580,7 +4630,16 @@ "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); nextHydratableInstance = - getNextHydratableInstanceAfterSuspenseInstance(fiber); + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -6479,19 +6538,17 @@ ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current, fiber), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack(fiber) { push(suspenseStackCursor, suspenseStackCursor.current, fiber); @@ -8490,6 +8547,7 @@ sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -8819,7 +8877,18 @@ renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -8831,16 +8900,6 @@ renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -8878,6 +8937,42 @@ propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -9582,72 +9677,51 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2448; - var JSCompiler_object_inline_stack_2449 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2527; + var JSCompiler_object_inline_stack_2528 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2448 = didSuspend) || - (JSCompiler_object_inline_digest_2448 = + var JSCompiler_object_inline_message_2526 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_digest_2527 = didSuspend) || + (JSCompiler_object_inline_digest_2527 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2448 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2448 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2527 && + ((JSCompiler_object_inline_message_2526 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_digest_2527 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_message_2526 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - JSCompiler_object_inline_digest_2448 = current; - for ( - renderLanes = rootOrSingletonContext; - 8 !== JSCompiler_object_inline_digest_2448.nodeType; - - ) { - if (!renderLanes) { - renderLanes = null; - break a; - } - JSCompiler_object_inline_digest_2448 = getNextHydratable( - JSCompiler_object_inline_digest_2448.nextSibling - ); - if (null === JSCompiler_object_inline_digest_2448) { - renderLanes = null; - break a; - } - } - renderLanes = JSCompiler_object_inline_digest_2448; - } - null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { - dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (JSCompiler_object_inline_digest_2448 = renderLanes), - (JSCompiler_object_inline_stack_2449 = createFiber( - 18, - null, - null, - NoMode + (current = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + current, + rootOrSingletonContext )), - (JSCompiler_object_inline_stack_2449.stateNode = - JSCompiler_object_inline_digest_2448), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_stack_2449), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else renderLanes = null; + (renderLanes = + null !== renderLanes && renderLanes.data !== ACTIVITY_START_DATA + ? renderLanes + : null), + null !== renderLanes && + ((JSCompiler_object_inline_digest_2527 = { + dehydrated: renderLanes, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }), + (workInProgress.memoizedState = + JSCompiler_object_inline_digest_2527), + (JSCompiler_object_inline_digest_2527 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_digest_2527.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_2527), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null); if (null === renderLanes) throw ( (warnNonHydratedInstance(workInProgress, current), @@ -9658,305 +9732,266 @@ : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.children; - JSCompiler_object_inline_stack_2449 = - JSCompiler_object_inline_stack_2449.fallback; - if (showFallback) { + var nextPrimaryChildren = JSCompiler_object_inline_stack_2528.children; + JSCompiler_object_inline_stack_2528 = + JSCompiler_object_inline_stack_2528.fallback; + if (JSCompiler_object_inline_message_2526) { reuseSuspenseHandlerOnStack(workInProgress); var mode = workInProgress.mode; - JSCompiler_object_inline_componentStack_2450 = - mountWorkInProgressOffscreenFiber( - { - mode: "hidden", - children: JSCompiler_object_inline_componentStack_2450 - }, - mode - ); - JSCompiler_object_inline_stack_2449 = createFiberFromFragment( - JSCompiler_object_inline_stack_2449, + nextPrimaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: nextPrimaryChildren }, + mode + ); + JSCompiler_object_inline_stack_2528 = createFiberFromFragment( + JSCompiler_object_inline_stack_2528, mode, renderLanes, null ); - JSCompiler_object_inline_componentStack_2450.return = workInProgress; - JSCompiler_object_inline_stack_2449.return = workInProgress; - JSCompiler_object_inline_componentStack_2450.sibling = - JSCompiler_object_inline_stack_2449; - workInProgress.child = JSCompiler_object_inline_componentStack_2450; - JSCompiler_object_inline_componentStack_2450 = workInProgress.child; - JSCompiler_object_inline_componentStack_2450.memoizedState = + nextPrimaryChildren.return = workInProgress; + JSCompiler_object_inline_stack_2528.return = workInProgress; + nextPrimaryChildren.sibling = JSCompiler_object_inline_stack_2528; + workInProgress.child = nextPrimaryChildren; + nextPrimaryChildren = workInProgress.child; + nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes); - JSCompiler_object_inline_componentStack_2450.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2448, - renderLanes - ); + nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2527, + renderLanes + ); workInProgress.memoizedState = SUSPENDED_MARKER; - return JSCompiler_object_inline_stack_2449; + return JSCompiler_object_inline_stack_2528; } pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_componentStack_2450 + nextPrimaryChildren ); } - var JSCompiler_object_inline_message_2447 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_message_2447 && - ((JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_message_2447.dehydrated), - null !== JSCompiler_object_inline_componentStack_2450) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.fallback), - (mode = workInProgress.mode), - (JSCompiler_object_inline_stack_2449 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2449.children - }, - mode - )), - (JSCompiler_object_inline_componentStack_2450 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2450, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_componentStack_2529 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_2529) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2528.fallback), + (mode = workInProgress.mode), + (JSCompiler_object_inline_stack_2528 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2528.children + }, + mode + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, mode, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2450.flags |= 2), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (JSCompiler_object_inline_componentStack_2450.return = - workInProgress), - (JSCompiler_object_inline_stack_2449.sibling = - JSCompiler_object_inline_componentStack_2450), - (workInProgress.child = JSCompiler_object_inline_stack_2449), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2449 = workInProgress.child), - (JSCompiler_object_inline_stack_2449.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2449.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2448, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2528.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2528.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2528), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = - JSCompiler_object_inline_componentStack_2450)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback( - JSCompiler_object_inline_componentStack_2450 - )) - ) { - JSCompiler_object_inline_digest_2448 = - JSCompiler_object_inline_componentStack_2450.nextSibling && - JSCompiler_object_inline_componentStack_2450.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2448) { - mode = JSCompiler_object_inline_digest_2448.dgst; - var message = JSCompiler_object_inline_digest_2448.msg; - var componentStack = JSCompiler_object_inline_digest_2448.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_digest_2448.cstck; - } - JSCompiler_object_inline_message_2447 = message; - JSCompiler_object_inline_digest_2448 = mode; - JSCompiler_object_inline_stack_2449 = componentStack; - JSCompiler_object_inline_componentStack_2450 = - componentStack$jscomp$0; - mode = JSCompiler_object_inline_message_2447; - componentStack = JSCompiler_object_inline_componentStack_2450; - JSCompiler_object_inline_componentStack_2450 = mode - ? Error(mode) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ), + (JSCompiler_object_inline_stack_2528 = workInProgress.child), + (JSCompiler_object_inline_stack_2528.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2528.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2527, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_2529 + )) + ) { + JSCompiler_object_inline_digest_2527 = + JSCompiler_object_inline_componentStack_2529.nextSibling && + JSCompiler_object_inline_componentStack_2529.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2527) { + nextPrimaryChildren = JSCompiler_object_inline_digest_2527.dgst; + var message = JSCompiler_object_inline_digest_2527.msg; + mode = JSCompiler_object_inline_digest_2527.stck; + var componentStack = JSCompiler_object_inline_digest_2527.cstck; + } + JSCompiler_object_inline_message_2526 = message; + JSCompiler_object_inline_digest_2527 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2528 = mode; + JSCompiler_object_inline_componentStack_2529 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_2526; + mode = JSCompiler_object_inline_componentStack_2529; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_2528 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2527; + JSCompiler_object_inline_digest_2527 = + void 0 === mode ? null : mode; + JSCompiler_object_inline_stack_2528 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_2527 + }; + "string" === typeof JSCompiler_object_inline_digest_2527 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_2528 ); - JSCompiler_object_inline_componentStack_2450.stack = - JSCompiler_object_inline_stack_2449 || ""; - JSCompiler_object_inline_componentStack_2450.digest = - JSCompiler_object_inline_digest_2448; - JSCompiler_object_inline_digest_2448 = - void 0 === componentStack ? null : componentStack; - JSCompiler_object_inline_stack_2449 = { - value: JSCompiler_object_inline_componentStack_2450, - source: null, - stack: JSCompiler_object_inline_digest_2448 - }; - "string" === typeof JSCompiler_object_inline_digest_2448 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2450, - JSCompiler_object_inline_stack_2449 - ); - queueHydrationError(JSCompiler_object_inline_stack_2449); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + queueHydrationError(JSCompiler_object_inline_stack_2528); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_digest_2448 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2448) - ) { - JSCompiler_object_inline_digest_2448 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_digest_2448 && - ((JSCompiler_object_inline_stack_2449 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2449 = - 0 !== (JSCompiler_object_inline_stack_2449 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2449 - )), - (JSCompiler_object_inline_stack_2449 = - 0 !== - (JSCompiler_object_inline_stack_2449 & - (JSCompiler_object_inline_digest_2448.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2449), - 0 !== JSCompiler_object_inline_stack_2449 && - JSCompiler_object_inline_stack_2449 !== - JSCompiler_object_inline_message_2447.retryLane) - ) - throw ( - ((JSCompiler_object_inline_message_2447.retryLane = - JSCompiler_object_inline_stack_2449), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2449 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2448, - current, - JSCompiler_object_inline_stack_2449 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_componentStack_2450.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_componentStack_2450.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_message_2447.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_componentStack_2450.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2449.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_digest_2527 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_digest_2527) + ) { + JSCompiler_object_inline_digest_2527 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_digest_2527 && + ((JSCompiler_object_inline_stack_2528 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_2527, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2528 && + JSCompiler_object_inline_stack_2528 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2528), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2528 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_digest_2527, + current, + JSCompiler_object_inline_stack_2528 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_componentStack_2529.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_componentStack_2529.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_componentStack_2529.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2528.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_message_2526) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2528.fallback), (mode = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2449 = createWorkInProgress( + (JSCompiler_object_inline_componentStack_2529 = + componentStack.sibling), + (JSCompiler_object_inline_stack_2528 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2528.children } )), - (JSCompiler_object_inline_stack_2449.subtreeFlags = + (JSCompiler_object_inline_stack_2528.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2450 = - createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_componentStack_2450 - )) - : ((JSCompiler_object_inline_componentStack_2450 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2450, - mode, - renderLanes, - null - )), - (JSCompiler_object_inline_componentStack_2450.flags |= 2)), - (JSCompiler_object_inline_componentStack_2450.return = - workInProgress), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (JSCompiler_object_inline_stack_2449.sibling = - JSCompiler_object_inline_componentStack_2450), - (workInProgress.child = JSCompiler_object_inline_stack_2449), - (JSCompiler_object_inline_stack_2449 = - JSCompiler_object_inline_componentStack_2450), - (JSCompiler_object_inline_componentStack_2450 = workInProgress.child), + null !== JSCompiler_object_inline_componentStack_2529 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_componentStack_2529, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + mode, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2528.return = workInProgress), + (JSCompiler_object_inline_stack_2528.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2528), + (JSCompiler_object_inline_stack_2528 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (mode = current.child.memoizedState), null === mode ? (mode = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = mode.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_componentStack_2529 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_componentStack_2529 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_componentStack_2529, + pool: JSCompiler_object_inline_componentStack_2529 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -9964,31 +9999,30 @@ baseLanes: mode.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_componentStack_2450.memoizedState = mode), - (JSCompiler_object_inline_componentStack_2450.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2448, - renderLanes - )), + (nextPrimaryChildren.memoizedState = mode), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2527, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2528 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2528.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2448 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2448 + ((JSCompiler_object_inline_digest_2527 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2527 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2448.push(current)); + : JSCompiler_object_inline_digest_2527.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10327,6 +10361,14 @@ stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -10542,10 +10584,10 @@ current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; + renderLanes = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - current + + renderLanes + ". Lazy element type must resolve to a class or function." + workInProgress ); @@ -10653,15 +10695,15 @@ didSuspendOrErrorDEV = !1; hydrationDiffRootDEV = null; rootOrSingletonContext = !0; - current = mountChildFibers( + renderLanes = mountChildFibers( workInProgress, null, returnFiber, renderLanes ); - for (workInProgress.child = current; current; ) - (current.flags = (current.flags & -3) | 4096), - (current = current.sibling); + for (workInProgress.child = renderLanes; renderLanes; ) + (renderLanes.flags = (renderLanes.flags & -3) | 4096), + (renderLanes = renderLanes.sibling); } else { resetHydrationState(); @@ -10687,26 +10729,26 @@ return ( markRef(current, workInProgress), null === current - ? (current = getResource( + ? (renderLanes = getResource( workInProgress.type, null, workInProgress.pendingProps, null )) - ? (workInProgress.memoizedState = current) + ? (workInProgress.memoizedState = renderLanes) : isHydrating || - ((current = workInProgress.type), - (renderLanes = workInProgress.pendingProps), + ((renderLanes = workInProgress.type), + (current = workInProgress.pendingProps), (returnFiber = requiredContext( rootInstanceStackCursor.current )), (returnFiber = getOwnerDocumentFromRootContainer( returnFiber - ).createElement(current)), + ).createElement(renderLanes)), (returnFiber[internalInstanceKey] = workInProgress), - (returnFiber[internalPropsKey] = renderLanes), - setInitialProperties(returnFiber, current, renderLanes), + (returnFiber[internalPropsKey] = current), + setInitialProperties(returnFiber, renderLanes, current), markNodeAsHoistable(returnFiber), (workInProgress.stateNode = returnFiber)) : (workInProgress.memoizedState = getResource( @@ -10835,21 +10877,21 @@ return ( null === current && isHydrating && - ((current = workInProgress.pendingProps), - (renderLanes = getHostContext()), - (returnFiber = renderLanes.ancestorInfo.current), - (current = + ((renderLanes = workInProgress.pendingProps), + (current = getHostContext()), + (returnFiber = current.ancestorInfo.current), + (renderLanes = null != returnFiber ? validateTextNesting( - current, + renderLanes, returnFiber.tag, - renderLanes.ancestorInfo.implicitRootScope + current.ancestorInfo.implicitRootScope ) : !0), - (renderLanes = nextHydratableInstance), - (returnFiber = !renderLanes) || + (current = nextHydratableInstance), + (returnFiber = !current) || ((returnFiber = canHydrateTextInstance( - renderLanes, + current, workInProgress.pendingProps, rootOrSingletonContext )), @@ -10861,8 +10903,8 @@ : (returnFiber = !1), (returnFiber = !returnFiber)), returnFiber && - (current && - warnNonHydratedInstance(workInProgress, renderLanes), + (renderLanes && + warnNonHydratedInstance(workInProgress, current), throwOnHydrationMismatch(workInProgress))), null ); @@ -11002,40 +11044,136 @@ renderLanes ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === prevSibling.mode) + mountActivityChildren(workInProgress, prevSibling); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((current = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (current = + null !== current && current.data === ACTIVITY_START_DATA + ? current + : null), + null !== current && + ((returnFiber = { + dehydrated: current, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }), + (workInProgress.memoizedState = returnFiber), + (returnFiber = + createFiberFromDehydratedFragment(current)), + (returnFiber.return = workInProgress), + (workInProgress.child = returnFiber), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (current = null), + null === current) + ) + throw ( + (warnNonHydratedInstance(workInProgress, renderLanes), + throwOnHydrationMismatch(workInProgress)) + ); + workInProgress.lanes = 536870912; + workInProgress = null; + } else + workInProgress = mountActivityChildren( + workInProgress, + prevSibling + ); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + if ( + ((prevState = returnFiber.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) + ) + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else if ( + (warnIfHydrating(), + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((prevState = getBumpedLaneForHydration( + prevSibling, + renderLanes )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + 0 !== prevState && prevState !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(prevSibling, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = returnFiber.treeContext), + (nextHydratableInstance = getNextHydratable( + prevState.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling + )), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -11243,7 +11381,6 @@ var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -11571,6 +11708,63 @@ } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -11578,23 +11772,25 @@ (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -11602,11 +11798,11 @@ emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -11855,6 +12051,22 @@ case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -11915,6 +12127,10 @@ case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -12834,6 +13050,11 @@ } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -13017,7 +13238,7 @@ null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -13026,7 +13247,7 @@ deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -13106,6 +13327,25 @@ } popComponentEffectStart(prevEffectStart); } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + finishedRoot + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -13127,6 +13367,7 @@ } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -13263,59 +13504,61 @@ (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return)); - if (flags & 4) - if ( - ((root = null !== current ? current.memoizedState : null), - (flags = finishedWork.memoizedState), - null === current) - ) + if (flags & 4) { + var currentResource = + null !== current ? current.memoizedState : null; + flags = finishedWork.memoizedState; + if (null === current) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - root = hoistableRoot.ownerDocument || hoistableRoot; + hoistableRoot = + hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - hoistableRoot = root.getElementsByTagName("title")[0]; + currentResource = + hoistableRoot.getElementsByTagName("title")[0]; if ( - !hoistableRoot || - hoistableRoot[internalHoistableMarker] || - hoistableRoot[internalInstanceKey] || - hoistableRoot.namespaceURI === SVG_NAMESPACE || - hoistableRoot.hasAttribute("itemprop") + !currentResource || + currentResource[internalHoistableMarker] || + currentResource[internalInstanceKey] || + currentResource.namespaceURI === SVG_NAMESPACE || + currentResource.hasAttribute("itemprop") ) - (hoistableRoot = root.createElement(flags)), - root.head.insertBefore( - hoistableRoot, - root.querySelector("head > title") + (currentResource = + hoistableRoot.createElement(flags)), + hoistableRoot.head.insertBefore( + currentResource, + hoistableRoot.querySelector("head > title") ); - setInitialProperties(hoistableRoot, flags, current); - hoistableRoot[internalInstanceKey] = finishedWork; - markNodeAsHoistable(hoistableRoot); - flags = hoistableRoot; + setInitialProperties(currentResource, flags, current); + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; break a; case "link": var maybeNodes = getHydratableHoistableCache( "link", "href", - root + hoistableRoot ).get(flags + (current.href || "")); if (maybeNodes) for (var i = 0; i < maybeNodes.length; i++) if ( - ((hoistableRoot = maybeNodes[i]), - hoistableRoot.getAttribute("href") === + ((currentResource = maybeNodes[i]), + currentResource.getAttribute("href") === (null == current.href || "" === current.href ? null : current.href) && - hoistableRoot.getAttribute("rel") === + currentResource.getAttribute("rel") === (null == current.rel ? null : current.rel) && - hoistableRoot.getAttribute("title") === + currentResource.getAttribute("title") === (null == current.title ? null : current.title) && - hoistableRoot.getAttribute("crossorigin") === + currentResource.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) @@ -13323,42 +13566,42 @@ maybeNodes.splice(i, 1); break b; } - hoistableRoot = root.createElement(flags); - setInitialProperties(hoistableRoot, flags, current); - root.head.appendChild(hoistableRoot); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; case "meta": if ( (maybeNodes = getHydratableHoistableCache( "meta", "content", - root + hoistableRoot ).get(flags + (current.content || ""))) ) for (i = 0; i < maybeNodes.length; i++) if ( - ((hoistableRoot = maybeNodes[i]), + ((currentResource = maybeNodes[i]), checkAttributeStringCoercion( current.content, "content" ), - hoistableRoot.getAttribute("content") === + currentResource.getAttribute("content") === (null == current.content ? null : "" + current.content) && - hoistableRoot.getAttribute("name") === + currentResource.getAttribute("name") === (null == current.name ? null : current.name) && - hoistableRoot.getAttribute("property") === + currentResource.getAttribute("property") === (null == current.property ? null : current.property) && - hoistableRoot.getAttribute("http-equiv") === + currentResource.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - hoistableRoot.getAttribute("charset") === + currentResource.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) @@ -13366,9 +13609,9 @@ maybeNodes.splice(i, 1); break b; } - hoistableRoot = root.createElement(flags); - setInitialProperties(hoistableRoot, flags, current); - root.head.appendChild(hoistableRoot); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; default: throw Error( @@ -13377,9 +13620,9 @@ '". This is a bug in React.' ); } - hoistableRoot[internalInstanceKey] = finishedWork; - markNodeAsHoistable(hoistableRoot); - flags = hoistableRoot; + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; } finishedWork.stateNode = flags; } else @@ -13395,12 +13638,12 @@ finishedWork.memoizedProps ); else - root !== flags - ? (null === root + currentResource !== flags + ? (null === currentResource ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : root.count--, + : currentResource.count--, null === flags ? mountHoistable( hoistableRoot, @@ -13419,6 +13662,7 @@ finishedWork.memoizedProps, current.memoizedProps ); + } break; case 27: recursivelyTraverseMutationEffects(root, finishedWork); @@ -13443,20 +13687,20 @@ null === current || safelyDetachRef(current, current.return)); if (finishedWork.flags & 32) { - root = finishedWork.stateNode; + hoistableRoot = finishedWork.stateNode; try { - runWithFiberInDEV(finishedWork, resetTextContent, root); + runWithFiberInDEV(finishedWork, resetTextContent, hoistableRoot); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((root = finishedWork.memoizedProps), + ((hoistableRoot = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - root, - null !== current ? current.memoizedProps : root + hoistableRoot, + null !== current ? current.memoizedProps : hoistableRoot )); flags & 1024 && ((needsFormReset = !0), @@ -13475,12 +13719,12 @@ ); flags = finishedWork.memoizedProps; current = null !== current ? current.memoizedProps : flags; - root = finishedWork.stateNode; + hoistableRoot = finishedWork.stateNode; try { runWithFiberInDEV( finishedWork, commitTextUpdate, - root, + hoistableRoot, current, flags ); @@ -13492,10 +13736,10 @@ case 3: hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - maybeNodes = currentHoistableRoot; + currentResource = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = maybeNodes; + currentHoistableRoot = currentResource; commitReconciliationEffects(finishedWork); if ( flags & 4 && @@ -13531,6 +13775,15 @@ finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -13578,9 +13831,13 @@ if (null === current) { wasHidden = current = root; try { - (maybeNodes = wasHidden.stateNode), + (currentResource = wasHidden.stateNode), hoistableRoot - ? runWithFiberInDEV(wasHidden, hideInstance, maybeNodes) + ? runWithFiberInDEV( + wasHidden, + hideInstance, + currentResource + ) : runWithFiberInDEV( wasHidden, unhideInstance, @@ -13595,19 +13852,43 @@ if (null === current) { wasHidden = root; try { - (i = wasHidden.stateNode), + (maybeNodes = wasHidden.stateNode), hoistableRoot - ? runWithFiberInDEV(wasHidden, hideTextInstance, i) + ? runWithFiberInDEV( + wasHidden, + hideTextInstance, + maybeNodes + ) : runWithFiberInDEV( wasHidden, unhideTextInstance, - i, + maybeNodes, wasHidden.memoizedProps ); } catch (error) { captureCommitPhaseError(wasHidden, wasHidden.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + wasHidden = root; + try { + (i = wasHidden.stateNode), + hoistableRoot + ? runWithFiberInDEV( + wasHidden, + hideDehydratedBoundary, + i + ) + : runWithFiberInDEV( + wasHidden, + unhideDehydratedBoundary, + wasHidden.stateNode + ); + } catch (error) { + captureCommitPhaseError(wasHidden, wasHidden.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -13833,6 +14114,16 @@ includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -13998,6 +14289,14 @@ committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -16034,6 +16333,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -19534,24 +19834,28 @@ : container ).removeChild(child); } - function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, + function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), node === SUSPENSE_END_DATA)) { + if ( + ((node = nextNode.data), + node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) + ) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; } else if ( node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || - node === SUSPENSE_FALLBACK_START_DATA + node === SUSPENSE_FALLBACK_START_DATA || + node === ACTIVITY_START_DATA ) depth++; else if (node === PREAMBLE_CONTRIBUTION_HTML) @@ -19577,7 +19881,38 @@ releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); + } + function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && + node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), node === SUSPENSE_END_DATA)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + (node !== SUSPENSE_START_DATA && + node !== SUSPENSE_PENDING_START_DATA && + node !== SUSPENSE_FALLBACK_START_DATA) || + suspenseInstance++; + node = nextNode; + } while (node); + } + function hideDehydratedBoundary(suspenseInstance) { + hideOrUnhideDehydratedBoundary(suspenseInstance, !0); } function hideInstance(instance) { instance = instance.style; @@ -19588,6 +19923,9 @@ function hideTextInstance(textInstance) { textInstance.nodeValue = ""; } + function unhideDehydratedBoundary(dehydratedInstance) { + hideOrUnhideDehydratedBoundary(dehydratedInstance, !1); + } function unhideInstance(instance, props) { props = props[STYLE]; props = @@ -19710,6 +20048,14 @@ } return instance; } + function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; + } function isSuspenseInstanceFallback(instance) { return ( instance.data === SUSPENSE_FALLBACK_START_DATA || @@ -19743,11 +20089,13 @@ nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || + nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING ) break; - if (nodeType === SUSPENSE_END_DATA) return null; + if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA) + return null; } } return node; @@ -19771,7 +20119,9 @@ return { type: JSCompiler_temp_const, props: serverDifferences }; } return 8 === instance.nodeType - ? { type: "Suspense", props: {} } + ? instance.data === ACTIVITY_START_DATA + ? { type: "Activity", props: {} } + : { type: "Suspense", props: {} } : instance.nodeValue; } function diffHydratedTextForDevWarnings(textInstance, text, parentProps) { @@ -19788,26 +20138,29 @@ textInstance) : null; } - function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { - suspenseInstance = suspenseInstance.nextSibling; - for (var depth = 0; suspenseInstance; ) { - if (8 === suspenseInstance.nodeType) { - var data = suspenseInstance.data; - if (data === SUSPENSE_END_DATA) { + function getNextHydratableInstanceAfterHydrationBoundary( + hydrationInstance + ) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) { if (0 === depth) - return getNextHydratable(suspenseInstance.nextSibling); + return getNextHydratable(hydrationInstance.nextSibling); depth--; } else (data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && - data !== SUSPENSE_PENDING_START_DATA) || + data !== SUSPENSE_PENDING_START_DATA && + data !== ACTIVITY_START_DATA) || depth++; } - suspenseInstance = suspenseInstance.nextSibling; + hydrationInstance = hydrationInstance.nextSibling; } return null; } - function getParentSuspenseInstance(targetInstance) { + function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { @@ -19815,11 +20168,14 @@ if ( data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || - data === SUSPENSE_PENDING_START_DATA + data === SUSPENSE_PENDING_START_DATA || + data === ACTIVITY_START_DATA ) { if (0 === depth) return targetInstance; depth--; - } else data === SUSPENSE_END_DATA && depth++; + } else + (data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA) || + depth++; } targetInstance = targetInstance.previousSibling; } @@ -19828,6 +20184,9 @@ function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -20753,12 +21112,21 @@ (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -20861,6 +21229,7 @@ } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -20906,6 +21275,10 @@ targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -21155,17 +21528,18 @@ ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -24499,6 +24873,8 @@ EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", + ACTIVITY_START_DATA = "&", + ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", @@ -24949,11 +25325,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24990,10 +25366,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-canary-bc6184dd-20250417", + version: "19.2.0-canary-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-bc6184dd-20250417" + reconcilerVersion: "19.2.0-canary-914319ae-20250423" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25137,7 +25513,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.2.0-canary-bc6184dd-20250417"; + exports.version = "19.2.0-canary-914319ae-20250423"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js index cec448e36d6ea..aec8d859220fb 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js @@ -60,6 +60,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -760,6 +770,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -854,12 +872,12 @@ function getClosestInstanceFromNode(targetNode) { (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -877,6 +895,7 @@ function getInstanceFromNode(node) { 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -2016,19 +2035,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$286; + var JSCompiler_inline_result$jscomp$293; if (canUseDOM) { - var isSupported$jscomp$inline_424 = "oninput" in document; - if (!isSupported$jscomp$inline_424) { - var element$jscomp$inline_425 = document.createElement("div"); - element$jscomp$inline_425.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_424 = - "function" === typeof element$jscomp$inline_425.oninput; + var isSupported$jscomp$inline_433 = "oninput" in document; + if (!isSupported$jscomp$inline_433) { + var element$jscomp$inline_434 = document.createElement("div"); + element$jscomp$inline_434.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_433 = + "function" === typeof element$jscomp$inline_434.oninput; } - JSCompiler_inline_result$jscomp$286 = isSupported$jscomp$inline_424; - } else JSCompiler_inline_result$jscomp$286 = !1; + JSCompiler_inline_result$jscomp$293 = isSupported$jscomp$inline_433; + } else JSCompiler_inline_result$jscomp$293 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$286 && + JSCompiler_inline_result$jscomp$293 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -2580,6 +2599,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiberImplClass(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiberImplClass( 4, @@ -2657,6 +2681,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -2753,6 +2785,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2783,25 +2816,14 @@ function popHydrationState(fiber) { fiber = fiber.memoizedState; fiber = null !== fiber ? fiber.dehydrated : null; if (!fiber) throw Error(formatProdErrorMessage(317)); - a: { - fiber = fiber.nextSibling; - for (tag = 0; fiber; ) { - if (8 === fiber.nodeType) - if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { - if (0 === tag) { - nextHydratableInstance = getNextHydratable(fiber.nextSibling); - break a; - } - tag--; - } else - ("$" !== JSCompiler_temp && - "$!" !== JSCompiler_temp && - "$?" !== JSCompiler_temp) || - tag++; - fiber = fiber.nextSibling; - } - nextHydratableInstance = null; - } + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -4190,19 +4212,17 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack() { push(suspenseStackCursor, suspenseStackCursor.current); @@ -5894,6 +5914,7 @@ function throwException( sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6181,7 +6202,18 @@ function updateOffscreenComponent( renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -6191,16 +6223,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -6235,6 +6257,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6611,39 +6655,28 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - renderLanes = current; - for (current = rootOrSingletonContext; 8 !== renderLanes.nodeType; ) { - if (!current) { - current = null; - break a; - } - renderLanes = getNextHydratable(renderLanes.nextSibling); - if (null === renderLanes) { - current = null; - break a; - } - } - current = renderLanes; - } - null !== current && - ((workInProgress.memoizedState = { - dehydrated: current, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (renderLanes = createFiberImplClass(18, null, null, 0)), - (renderLanes.stateNode = current), - (renderLanes.return = workInProgress), - (workInProgress.child = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else current = null; + (current = nextHydratableInstance) + ? ((current = canHydrateHydrationBoundary( + current, + rootOrSingletonContext + )), + (current = null !== current && "&" !== current.data ? current : null), + null !== current && + ((workInProgress.memoizedState = { + dehydrated: current, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (renderLanes = createFiberFromDehydratedFragment(current)), + (renderLanes.return = workInProgress), + (workInProgress.child = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (current = null); if (null === current) throw throwOnHydrationMismatch(workInProgress); isSuspenseInstanceFallback(current) ? (workInProgress.lanes = 32) @@ -6652,36 +6685,42 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } var nextPrimaryChildren = nextProps.children; nextProps = nextProps.fallback; - if (showFallback) { - reuseSuspenseHandlerOnStack(workInProgress); - var mode = workInProgress.mode; - nextPrimaryChildren = mountWorkInProgressOffscreenFiber( - { mode: "hidden", children: nextPrimaryChildren }, - mode - ); - nextProps = createFiberFromFragment(nextProps, mode, renderLanes, null); - nextPrimaryChildren.return = workInProgress; - nextProps.return = workInProgress; - nextPrimaryChildren.sibling = nextProps; - workInProgress.child = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes); - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes + if (showFallback) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = workInProgress.mode), + (nextPrimaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: nextPrimaryChildren }, + showFallback + )), + (nextProps = createFiberFromFragment( + nextProps, + showFallback, + renderLanes, + null + )), + (nextPrimaryChildren.return = workInProgress), + (nextProps.return = workInProgress), + (nextPrimaryChildren.sibling = nextProps), + (workInProgress.child = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + nextProps ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return nextProps; - } pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren); } - mode = current.memoizedState; + var prevState = current.memoizedState; if ( - null !== mode && - ((nextPrimaryChildren = mode.dehydrated), null !== nextPrimaryChildren) + null !== prevState && + ((nextPrimaryChildren = prevState.dehydrated), null !== nextPrimaryChildren) ) { if (didSuspend) workInProgress.flags & 256 @@ -6699,14 +6738,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (mode = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - mode + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - mode, + showFallback, renderLanes, null )), @@ -6758,19 +6797,11 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), - 0 !== nextProps && nextProps !== mode.retryLane) + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== prevState.retryLane) ) throw ( - ((mode.retryLane = nextProps), + ((prevState.retryLane = nextProps), enqueueConcurrentRenderForLane(current, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), SelectiveHydrationException) @@ -6786,7 +6817,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) - : ((current = mode.treeContext), + : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( nextPrimaryChildren.nextSibling )), @@ -6795,12 +6826,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -6812,14 +6838,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (mode = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (prevState = current.child), + (digest = prevState.sibling), + (nextProps = createWorkInProgress(prevState, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = prevState.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -6827,7 +6853,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - mode, + showFallback, renderLanes, null )), @@ -6838,22 +6864,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (mode = current.child.memoizedState), - null === mode - ? (mode = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = mode.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((prevState = showFallback.cachePool), + null !== prevState ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (prevState = + prevState.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (mode = { - baseLanes: mode.baseLanes | renderLanes, - cachePool: showFallback + : prevState)) + : (prevState = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: prevState })), - (nextPrimaryChildren.memoizedState = mode), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7088,10 +7114,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$103 = workInProgress.memoizedState; + if (null !== state$103) { + if (null !== state$103.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -7111,17 +7145,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$103 = 0 !== (renderLanes & workInProgress.childLanes); + state$103 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$103 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$103) return updateSuspenseListComponent( current, workInProgress, @@ -7135,7 +7169,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$103) break; else return null; case 22: return ( @@ -7584,29 +7618,116 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (lazyComponent = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (lazyComponent = { - mode: lazyComponent.mode, - children: lazyComponent.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - lazyComponent, - renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, lazyComponent)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if ( + ((lazyComponent = current.memoizedState), null !== lazyComponent) + ) + if ( + ((prevState = lazyComponent.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) + ) + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== lazyComponent.retryLane) + ) + throw ( + ((lazyComponent.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = lazyComponent.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -7728,14 +7849,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$113 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$113 = lastTailNode), + for (var lastTailNode$114 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$114 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$113 + null === lastTailNode$114 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$113.sibling = null); + : (lastTailNode$114.sibling = null); } } function bubbleProperties(completedWork) { @@ -7745,19 +7866,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$114 = completedWork.child; null !== child$114; ) - (newChildLanes |= child$114.lanes | child$114.childLanes), - (subtreeFlags |= child$114.subtreeFlags & 65011712), - (subtreeFlags |= child$114.flags & 65011712), - (child$114.return = completedWork), - (child$114 = child$114.sibling); + for (var child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags & 65011712), + (subtreeFlags |= child$115.flags & 65011712), + (child$115.return = completedWork), + (child$115 = child$115.sibling); else - for (child$114 = completedWork.child; null !== child$114; ) - (newChildLanes |= child$114.lanes | child$114.childLanes), - (subtreeFlags |= child$114.subtreeFlags), - (subtreeFlags |= child$114.flags), - (child$114.return = completedWork), - (child$114 = child$114.sibling); + for (child$115 = completedWork.child; null !== child$115; ) + (newChildLanes |= child$115.lanes | child$115.childLanes), + (subtreeFlags |= child$115.subtreeFlags), + (subtreeFlags |= child$115.flags), + (child$115.return = completedWork), + (child$115 = child$115.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7766,7 +7887,6 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -8021,6 +8141,41 @@ function completeWork(current, workInProgress, renderLanes) { } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8252,6 +8407,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8304,6 +8470,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8451,8 +8621,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$144) { - captureCommitPhaseError(current, nearestMountedAncestor, error$144); + } catch (error$148) { + captureCommitPhaseError(current, nearestMountedAncestor, error$148); } else ref.current = null; } @@ -8778,11 +8948,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$143) { + } catch (error$147) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$143 + error$147 ); } } @@ -8825,6 +8995,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -8980,7 +9154,7 @@ function commitDeletionEffectsOnFiber( null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -8989,7 +9163,7 @@ function commitDeletionEffectsOnFiber( deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -9060,6 +9234,21 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + retryIfBlockedOn(finishedRoot); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -9077,6 +9266,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9416,6 +9606,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -9495,6 +9694,18 @@ function commitMutationEffectsOnFiber(finishedWork, root) { captureCommitPhaseError(wasHidden, wasHidden.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + wasHidden = root; + try { + var instance = wasHidden.stateNode; + hoistableRoot + ? hideOrUnhideDehydratedBoundary(instance, !0) + : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1); + } catch (error) { + captureCommitPhaseError(wasHidden, wasHidden.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -9564,20 +9775,20 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent); break; case 5: - var parent$145 = hostParentFiber.stateNode; + var parent$149 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$145, ""), (hostParentFiber.flags &= -33)); - var before$146 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$146, parent$145); + (setTextContent(parent$149, ""), (hostParentFiber.flags &= -33)); + var before$150 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$150, parent$149); break; case 3: case 4: - var parent$147 = hostParentFiber.stateNode.containerInfo, - before$148 = getHostSibling(finishedWork); + var parent$151 = hostParentFiber.stateNode.containerInfo, + before$152 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$148, - parent$147 + before$152, + parent$151 ); break; default: @@ -9728,6 +9939,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -9871,6 +10092,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10778,8 +11007,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$168) { - handleThrow(root, thrownValue$168); + } catch (thrownValue$173) { + handleThrow(root, thrownValue$173); } while (1); lanes && root.shellSuspendCounter++; @@ -10898,8 +11127,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$170) { - handleThrow(root, thrownValue$170); + } catch (thrownValue$175) { + handleThrow(root, thrownValue$175); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -11493,6 +11722,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -11534,14 +11764,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$175 = firstScheduledRoot; null !== root$175; ) { + for (var root$180 = firstScheduledRoot; null !== root$180; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$175.pendingLanes; + var pendingLanes = root$180.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$175.suspendedLanes, - pingedLanes = root$175.pingedLanes; + var suspendedLanes = root$180.suspendedLanes, + pingedLanes = root$180.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -11555,20 +11785,20 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$175, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$180, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$175, - root$175 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$175.cancelPendingCommit || - -1 !== root$175.timeoutHandle + root$180, + root$180 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$180.cancelPendingCommit || + -1 !== root$180.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$175, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$180, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$175, JSCompiler_inline_result)); - root$175 = root$175.next; + performSyncWorkOnRoot(root$180, JSCompiler_inline_result)); + root$180 = root$180.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -11809,20 +12039,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1531 = 0; - i$jscomp$inline_1531 < simpleEventPluginEvents.length; - i$jscomp$inline_1531++ + var i$jscomp$inline_1573 = 0; + i$jscomp$inline_1573 < simpleEventPluginEvents.length; + i$jscomp$inline_1573++ ) { - var eventName$jscomp$inline_1532 = - simpleEventPluginEvents[i$jscomp$inline_1531], - domEventName$jscomp$inline_1533 = - eventName$jscomp$inline_1532.toLowerCase(), - capitalizedEvent$jscomp$inline_1534 = - eventName$jscomp$inline_1532[0].toUpperCase() + - eventName$jscomp$inline_1532.slice(1); + var eventName$jscomp$inline_1574 = + simpleEventPluginEvents[i$jscomp$inline_1573], + domEventName$jscomp$inline_1575 = + eventName$jscomp$inline_1574.toLowerCase(), + capitalizedEvent$jscomp$inline_1576 = + eventName$jscomp$inline_1574[0].toUpperCase() + + eventName$jscomp$inline_1574.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1533, - "on" + capitalizedEvent$jscomp$inline_1534 + domEventName$jscomp$inline_1575, + "on" + capitalizedEvent$jscomp$inline_1576 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -12999,34 +13229,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$189 = props[hasSrc]; - if (null != propValue$189) + var propValue$194 = props[hasSrc]; + if (null != propValue$194) switch (hasSrc) { case "name": - hasSrcSet = propValue$189; + hasSrcSet = propValue$194; break; case "type": - propValue = propValue$189; + propValue = propValue$194; break; case "checked": - checked = propValue$189; + checked = propValue$194; break; case "defaultChecked": - defaultChecked = propValue$189; + defaultChecked = propValue$194; break; case "value": - propKey = propValue$189; + propKey = propValue$194; break; case "defaultValue": - defaultValue = propValue$189; + defaultValue = propValue$194; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$189) + if (null != propValue$194) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$189, props, null); + setProp(domElement, tag, hasSrc, propValue$194, props, null); } } initInput( @@ -13165,14 +13395,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$189 in props) - props.hasOwnProperty(propValue$189) && - ((hasSrc = props[propValue$189]), + for (propValue$194 in props) + props.hasOwnProperty(propValue$194) && + ((hasSrc = props[propValue$194]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$189, + propValue$194, hasSrc, props, void 0 @@ -13220,14 +13450,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$206 in nextProps) { - var propKey = nextProps[propKey$206]; - lastProp = lastProps[propKey$206]; + for (var propKey$211 in nextProps) { + var propKey = nextProps[propKey$211]; + lastProp = lastProps[propKey$211]; if ( - nextProps.hasOwnProperty(propKey$206) && + nextProps.hasOwnProperty(propKey$211) && (null != propKey || null != lastProp) ) - switch (propKey$206) { + switch (propKey$211) { case "type": type = propKey; break; @@ -13256,7 +13486,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$206, + propKey$211, propKey, nextProps, lastProp @@ -13275,7 +13505,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$206 = null; + propKey = value = defaultValue = propKey$211 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13306,7 +13536,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$206 = type; + propKey$211 = type; break; case "defaultValue": defaultValue = type; @@ -13327,15 +13557,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$206 - ? updateOptions(domElement, !!lastProps, propKey$206, !1) + null != propKey$211 + ? updateOptions(domElement, !!lastProps, propKey$211, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$206 = null; + propKey = propKey$211 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13359,7 +13589,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$206 = name; + propKey$211 = name; break; case "defaultValue": propKey = name; @@ -13373,17 +13603,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$206, propKey); + updateTextarea(domElement, propKey$211, propKey); return; case "option": - for (var propKey$222 in lastProps) + for (var propKey$227 in lastProps) if ( - ((propKey$206 = lastProps[propKey$222]), - lastProps.hasOwnProperty(propKey$222) && - null != propKey$206 && - !nextProps.hasOwnProperty(propKey$222)) + ((propKey$211 = lastProps[propKey$227]), + lastProps.hasOwnProperty(propKey$227) && + null != propKey$211 && + !nextProps.hasOwnProperty(propKey$227)) ) - switch (propKey$222) { + switch (propKey$227) { case "selected": domElement.selected = !1; break; @@ -13391,33 +13621,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$222, + propKey$227, null, nextProps, - propKey$206 + propKey$211 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$206 = nextProps[lastDefaultValue]), + ((propKey$211 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$206 !== propKey && - (null != propKey$206 || null != propKey)) + propKey$211 !== propKey && + (null != propKey$211 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$206 && - "function" !== typeof propKey$206 && - "symbol" !== typeof propKey$206; + propKey$211 && + "function" !== typeof propKey$211 && + "symbol" !== typeof propKey$211; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$206, + propKey$211, nextProps, propKey ); @@ -13438,24 +13668,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$227 in lastProps) - (propKey$206 = lastProps[propKey$227]), - lastProps.hasOwnProperty(propKey$227) && - null != propKey$206 && - !nextProps.hasOwnProperty(propKey$227) && - setProp(domElement, tag, propKey$227, null, nextProps, propKey$206); + for (var propKey$232 in lastProps) + (propKey$211 = lastProps[propKey$232]), + lastProps.hasOwnProperty(propKey$232) && + null != propKey$211 && + !nextProps.hasOwnProperty(propKey$232) && + setProp(domElement, tag, propKey$232, null, nextProps, propKey$211); for (checked in nextProps) if ( - ((propKey$206 = nextProps[checked]), + ((propKey$211 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$206 !== propKey && - (null != propKey$206 || null != propKey)) + propKey$211 !== propKey && + (null != propKey$211 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$206) + if (null != propKey$211) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13463,7 +13693,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$206, + propKey$211, nextProps, propKey ); @@ -13471,49 +13701,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$232 in lastProps) - (propKey$206 = lastProps[propKey$232]), - lastProps.hasOwnProperty(propKey$232) && - void 0 !== propKey$206 && - !nextProps.hasOwnProperty(propKey$232) && + for (var propKey$237 in lastProps) + (propKey$211 = lastProps[propKey$237]), + lastProps.hasOwnProperty(propKey$237) && + void 0 !== propKey$211 && + !nextProps.hasOwnProperty(propKey$237) && setPropOnCustomElement( domElement, tag, - propKey$232, + propKey$237, void 0, nextProps, - propKey$206 + propKey$211 ); for (defaultChecked in nextProps) - (propKey$206 = nextProps[defaultChecked]), + (propKey$211 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$206 === propKey || - (void 0 === propKey$206 && void 0 === propKey) || + propKey$211 === propKey || + (void 0 === propKey$211 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$206, + propKey$211, nextProps, propKey ); return; } } - for (var propKey$237 in lastProps) - (propKey$206 = lastProps[propKey$237]), - lastProps.hasOwnProperty(propKey$237) && - null != propKey$206 && - !nextProps.hasOwnProperty(propKey$237) && - setProp(domElement, tag, propKey$237, null, nextProps, propKey$206); + for (var propKey$242 in lastProps) + (propKey$211 = lastProps[propKey$242]), + lastProps.hasOwnProperty(propKey$242) && + null != propKey$211 && + !nextProps.hasOwnProperty(propKey$242) && + setProp(domElement, tag, propKey$242, null, nextProps, propKey$211); for (lastProp in nextProps) - (propKey$206 = nextProps[lastProp]), + (propKey$211 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$206 === propKey || - (null == propKey$206 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$206, nextProps, propKey); + propKey$211 === propKey || + (null == propKey$211 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$211, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -13591,21 +13821,22 @@ function handleErrorInNextTick(error) { function isSingletonScope(type) { return "head" === type; } -function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, +function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), "/$" === node)) { + if (((node = nextNode.data), "/$" === node || "/&" === node)) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; - } else if ("$" === node || "$?" === node || "$!" === node) depth++; + } else if ("$" === node || "$?" === node || "$!" === node || "&" === node) + depth++; else if ("html" === node) releaseSingletonInstance(parentInstance.ownerDocument.documentElement); else if ("head" === node) { @@ -13627,7 +13858,31 @@ function clearSuspenseBoundary(parentInstance, suspenseInstance) { releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); +} +function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), "/$" === node)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + ("$" !== node && "$?" !== node && "$!" !== node) || suspenseInstance++; + node = nextNode; + } while (node); } function clearContainerSparingly(container) { var nextNode = container.firstChild; @@ -13731,6 +13986,14 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { } return instance; } +function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; +} function isSuspenseInstanceFallback(instance) { return ( "$!" === instance.data || @@ -13760,25 +14023,43 @@ function getNextHydratable(node) { "$" === nodeType || "$!" === nodeType || "$?" === nodeType || + "&" === nodeType || "F!" === nodeType || "F" === nodeType ) break; - if ("/$" === nodeType) return null; + if ("/$" === nodeType || "/&" === nodeType) return null; } } return node; } var previousHydratableOnEnteringScopedSingleton = null; -function getParentSuspenseInstance(targetInstance) { +function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if ("/$" === data || "/&" === data) { + if (0 === depth) + return getNextHydratable(hydrationInstance.nextSibling); + depth--; + } else + ("$" !== data && "$!" !== data && "$?" !== data && "&" !== data) || + depth++; + } + hydrationInstance = hydrationInstance.nextSibling; + } + return null; +} +function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { var data = targetInstance.data; - if ("$" === data || "$!" === data || "$?" === data) { + if ("$" === data || "$!" === data || "$?" === data || "&" === data) { if (0 === depth) return targetInstance; depth--; - } else "/$" === data && depth++; + } else ("/$" !== data && "/&" !== data) || depth++; } targetInstance = targetInstance.previousSibling; } @@ -14109,26 +14390,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$248 = getResourcesFromRoot( + var styles$253 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$249 = styles$248.get(type); - resource$249 || + resource$254 = styles$253.get(type); + resource$254 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$249 = { + (resource$254 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$248.set(type, resource$249), - (styles$248 = JSCompiler_inline_result.querySelector( + styles$253.set(type, resource$254), + (styles$253 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$248._p && - ((resource$249.instance = styles$248), - (resource$249.state.loading = 5)), + !styles$253._p && + ((resource$254.instance = styles$253), + (resource$254.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14141,16 +14422,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$248 || + styles$253 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$249.state + resource$254.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$249; + return resource$254; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14247,37 +14528,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$254 = hoistableRoot.querySelector( + var instance$259 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$254) + if (instance$259) return ( (resource.state.loading |= 4), - (resource.instance = instance$254), - markNodeAsHoistable(instance$254), - instance$254 + (resource.instance = instance$259), + markNodeAsHoistable(instance$259), + instance$259 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$254 = ( + instance$259 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$254); - var linkInstance = instance$254; + markNodeAsHoistable(instance$259); + var linkInstance = instance$259; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$254, "link", instance); + setInitialProperties(instance$259, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$254, props.precedence, hoistableRoot); - return (resource.instance = instance$254); + insertStylesheet(instance$259, props.precedence, hoistableRoot); + return (resource.instance = instance$259); case "script": - instance$254 = getScriptKey(props.src); + instance$259 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$254) + getScriptSelectorFromKey(instance$259) )) ) return ( @@ -14286,7 +14567,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$254))) + if ((styleProps = preloadPropsMap.get(instance$259))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -14699,12 +14980,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -14795,6 +15085,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -14841,6 +15132,10 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -15101,14 +15396,18 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -15305,16 +15604,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1788 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1829 = React.version; if ( - "19.2.0-canary-bc6184dd-20250417" !== - isomorphicReactPackageVersion$jscomp$inline_1788 + "19.2.0-canary-914319ae-20250423" !== + isomorphicReactPackageVersion$jscomp$inline_1829 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1788, - "19.2.0-canary-bc6184dd-20250417" + isomorphicReactPackageVersion$jscomp$inline_1829, + "19.2.0-canary-914319ae-20250423" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15334,24 +15633,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2262 = { +var internals$jscomp$inline_2318 = { bundleType: 0, - version: "19.2.0-canary-bc6184dd-20250417", + version: "19.2.0-canary-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-bc6184dd-20250417" + reconcilerVersion: "19.2.0-canary-914319ae-20250423" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2263 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2319 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2263.isDisabled && - hook$jscomp$inline_2263.supportsFiber + !hook$jscomp$inline_2319.isDisabled && + hook$jscomp$inline_2319.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2263.inject( - internals$jscomp$inline_2262 + (rendererID = hook$jscomp$inline_2319.inject( + internals$jscomp$inline_2318 )), - (injectedHook = hook$jscomp$inline_2263); + (injectedHook = hook$jscomp$inline_2319); } catch (err) {} } exports.createRoot = function (container, options) { @@ -15443,4 +15742,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.2.0-canary-bc6184dd-20250417"; +exports.version = "19.2.0-canary-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js index 7e132b0835510..aee925976a575 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js @@ -146,6 +146,16 @@ } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -1250,6 +1260,16 @@ rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1367,13 +1387,13 @@ (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -1391,6 +1411,7 @@ 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -1922,6 +1943,8 @@ return fiber.type; case 16: return "Lazy"; + case 31: + return "Activity"; case 13: return "Suspense"; case 19: @@ -4301,6 +4324,11 @@ content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -4372,6 +4400,21 @@ (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -4419,6 +4462,12 @@ siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -4541,6 +4590,7 @@ for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -4574,7 +4624,7 @@ diffNode.serverTail.push(description); JSCompiler_temp = "Suspense" === description.type - ? getNextHydratableInstanceAfterSuspenseInstance(JSCompiler_temp) + ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling); } throwOnHydrationMismatch(fiber); @@ -4588,7 +4638,16 @@ "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); nextHydratableInstance = - getNextHydratableInstanceAfterSuspenseInstance(fiber); + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -6487,19 +6546,17 @@ ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current, fiber), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack(fiber) { push(suspenseStackCursor, suspenseStackCursor.current, fiber); @@ -8498,6 +8555,7 @@ sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -8827,7 +8885,18 @@ renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -8839,16 +8908,6 @@ renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -8886,6 +8945,42 @@ propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -9590,72 +9685,51 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2453; - var JSCompiler_object_inline_stack_2454 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2532; + var JSCompiler_object_inline_stack_2533 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2453 = didSuspend) || - (JSCompiler_object_inline_digest_2453 = + var JSCompiler_object_inline_message_2531 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_digest_2532 = didSuspend) || + (JSCompiler_object_inline_digest_2532 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2453 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2453 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2532 && + ((JSCompiler_object_inline_message_2531 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_digest_2532 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_message_2531 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - JSCompiler_object_inline_digest_2453 = current; - for ( - renderLanes = rootOrSingletonContext; - 8 !== JSCompiler_object_inline_digest_2453.nodeType; - - ) { - if (!renderLanes) { - renderLanes = null; - break a; - } - JSCompiler_object_inline_digest_2453 = getNextHydratable( - JSCompiler_object_inline_digest_2453.nextSibling - ); - if (null === JSCompiler_object_inline_digest_2453) { - renderLanes = null; - break a; - } - } - renderLanes = JSCompiler_object_inline_digest_2453; - } - null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { - dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (JSCompiler_object_inline_digest_2453 = renderLanes), - (JSCompiler_object_inline_stack_2454 = createFiber( - 18, - null, - null, - NoMode + (current = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + current, + rootOrSingletonContext )), - (JSCompiler_object_inline_stack_2454.stateNode = - JSCompiler_object_inline_digest_2453), - (JSCompiler_object_inline_stack_2454.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_stack_2454), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else renderLanes = null; + (renderLanes = + null !== renderLanes && renderLanes.data !== ACTIVITY_START_DATA + ? renderLanes + : null), + null !== renderLanes && + ((JSCompiler_object_inline_digest_2532 = { + dehydrated: renderLanes, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }), + (workInProgress.memoizedState = + JSCompiler_object_inline_digest_2532), + (JSCompiler_object_inline_digest_2532 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_digest_2532.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_2532), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null); if (null === renderLanes) throw ( (warnNonHydratedInstance(workInProgress, current), @@ -9666,305 +9740,266 @@ : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_componentStack_2455 = - JSCompiler_object_inline_stack_2454.children; - JSCompiler_object_inline_stack_2454 = - JSCompiler_object_inline_stack_2454.fallback; - if (showFallback) { + var nextPrimaryChildren = JSCompiler_object_inline_stack_2533.children; + JSCompiler_object_inline_stack_2533 = + JSCompiler_object_inline_stack_2533.fallback; + if (JSCompiler_object_inline_message_2531) { reuseSuspenseHandlerOnStack(workInProgress); var mode = workInProgress.mode; - JSCompiler_object_inline_componentStack_2455 = - mountWorkInProgressOffscreenFiber( - { - mode: "hidden", - children: JSCompiler_object_inline_componentStack_2455 - }, - mode - ); - JSCompiler_object_inline_stack_2454 = createFiberFromFragment( - JSCompiler_object_inline_stack_2454, + nextPrimaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: nextPrimaryChildren }, + mode + ); + JSCompiler_object_inline_stack_2533 = createFiberFromFragment( + JSCompiler_object_inline_stack_2533, mode, renderLanes, null ); - JSCompiler_object_inline_componentStack_2455.return = workInProgress; - JSCompiler_object_inline_stack_2454.return = workInProgress; - JSCompiler_object_inline_componentStack_2455.sibling = - JSCompiler_object_inline_stack_2454; - workInProgress.child = JSCompiler_object_inline_componentStack_2455; - JSCompiler_object_inline_componentStack_2455 = workInProgress.child; - JSCompiler_object_inline_componentStack_2455.memoizedState = + nextPrimaryChildren.return = workInProgress; + JSCompiler_object_inline_stack_2533.return = workInProgress; + nextPrimaryChildren.sibling = JSCompiler_object_inline_stack_2533; + workInProgress.child = nextPrimaryChildren; + nextPrimaryChildren = workInProgress.child; + nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes); - JSCompiler_object_inline_componentStack_2455.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2453, - renderLanes - ); + nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2532, + renderLanes + ); workInProgress.memoizedState = SUSPENDED_MARKER; - return JSCompiler_object_inline_stack_2454; + return JSCompiler_object_inline_stack_2533; } pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_componentStack_2455 + nextPrimaryChildren ); } - var JSCompiler_object_inline_message_2452 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_message_2452 && - ((JSCompiler_object_inline_componentStack_2455 = - JSCompiler_object_inline_message_2452.dehydrated), - null !== JSCompiler_object_inline_componentStack_2455) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2455 = - JSCompiler_object_inline_stack_2454.fallback), - (mode = workInProgress.mode), - (JSCompiler_object_inline_stack_2454 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2454.children - }, - mode - )), - (JSCompiler_object_inline_componentStack_2455 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2455, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_componentStack_2534 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_2534) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2533.fallback), + (mode = workInProgress.mode), + (JSCompiler_object_inline_stack_2533 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2533.children + }, + mode + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, mode, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2455.flags |= 2), - (JSCompiler_object_inline_stack_2454.return = workInProgress), - (JSCompiler_object_inline_componentStack_2455.return = - workInProgress), - (JSCompiler_object_inline_stack_2454.sibling = - JSCompiler_object_inline_componentStack_2455), - (workInProgress.child = JSCompiler_object_inline_stack_2454), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2454 = workInProgress.child), - (JSCompiler_object_inline_stack_2454.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2454.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2453, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2533.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2533.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2533), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = - JSCompiler_object_inline_componentStack_2455)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback( - JSCompiler_object_inline_componentStack_2455 - )) - ) { - JSCompiler_object_inline_digest_2453 = - JSCompiler_object_inline_componentStack_2455.nextSibling && - JSCompiler_object_inline_componentStack_2455.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2453) { - mode = JSCompiler_object_inline_digest_2453.dgst; - var message = JSCompiler_object_inline_digest_2453.msg; - var componentStack = JSCompiler_object_inline_digest_2453.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_digest_2453.cstck; - } - JSCompiler_object_inline_message_2452 = message; - JSCompiler_object_inline_digest_2453 = mode; - JSCompiler_object_inline_stack_2454 = componentStack; - JSCompiler_object_inline_componentStack_2455 = - componentStack$jscomp$0; - mode = JSCompiler_object_inline_message_2452; - componentStack = JSCompiler_object_inline_componentStack_2455; - JSCompiler_object_inline_componentStack_2455 = mode - ? Error(mode) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ), + (JSCompiler_object_inline_stack_2533 = workInProgress.child), + (JSCompiler_object_inline_stack_2533.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2533.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2532, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_2534 + )) + ) { + JSCompiler_object_inline_digest_2532 = + JSCompiler_object_inline_componentStack_2534.nextSibling && + JSCompiler_object_inline_componentStack_2534.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2532) { + nextPrimaryChildren = JSCompiler_object_inline_digest_2532.dgst; + var message = JSCompiler_object_inline_digest_2532.msg; + mode = JSCompiler_object_inline_digest_2532.stck; + var componentStack = JSCompiler_object_inline_digest_2532.cstck; + } + JSCompiler_object_inline_message_2531 = message; + JSCompiler_object_inline_digest_2532 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2533 = mode; + JSCompiler_object_inline_componentStack_2534 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_2531; + mode = JSCompiler_object_inline_componentStack_2534; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_2533 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2532; + JSCompiler_object_inline_digest_2532 = + void 0 === mode ? null : mode; + JSCompiler_object_inline_stack_2533 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_2532 + }; + "string" === typeof JSCompiler_object_inline_digest_2532 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_2533 ); - JSCompiler_object_inline_componentStack_2455.stack = - JSCompiler_object_inline_stack_2454 || ""; - JSCompiler_object_inline_componentStack_2455.digest = - JSCompiler_object_inline_digest_2453; - JSCompiler_object_inline_digest_2453 = - void 0 === componentStack ? null : componentStack; - JSCompiler_object_inline_stack_2454 = { - value: JSCompiler_object_inline_componentStack_2455, - source: null, - stack: JSCompiler_object_inline_digest_2453 - }; - "string" === typeof JSCompiler_object_inline_digest_2453 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2455, - JSCompiler_object_inline_stack_2454 - ); - queueHydrationError(JSCompiler_object_inline_stack_2454); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + queueHydrationError(JSCompiler_object_inline_stack_2533); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_digest_2453 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2453) - ) { - JSCompiler_object_inline_digest_2453 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_digest_2453 && - ((JSCompiler_object_inline_stack_2454 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2454 = - 0 !== (JSCompiler_object_inline_stack_2454 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2454 - )), - (JSCompiler_object_inline_stack_2454 = - 0 !== - (JSCompiler_object_inline_stack_2454 & - (JSCompiler_object_inline_digest_2453.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2454), - 0 !== JSCompiler_object_inline_stack_2454 && - JSCompiler_object_inline_stack_2454 !== - JSCompiler_object_inline_message_2452.retryLane) - ) - throw ( - ((JSCompiler_object_inline_message_2452.retryLane = - JSCompiler_object_inline_stack_2454), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2454 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2453, - current, - JSCompiler_object_inline_stack_2454 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_componentStack_2455.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_componentStack_2455.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_message_2452.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_componentStack_2455.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2454.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_digest_2532 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_digest_2532) + ) { + JSCompiler_object_inline_digest_2532 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_digest_2532 && + ((JSCompiler_object_inline_stack_2533 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_2532, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2533 && + JSCompiler_object_inline_stack_2533 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2533), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2533 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_digest_2532, + current, + JSCompiler_object_inline_stack_2533 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_componentStack_2534.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_componentStack_2534.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_componentStack_2534.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2533.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_message_2531) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2455 = - JSCompiler_object_inline_stack_2454.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2533.fallback), (mode = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2454 = createWorkInProgress( + (JSCompiler_object_inline_componentStack_2534 = + componentStack.sibling), + (JSCompiler_object_inline_stack_2533 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2454.children + children: JSCompiler_object_inline_stack_2533.children } )), - (JSCompiler_object_inline_stack_2454.subtreeFlags = + (JSCompiler_object_inline_stack_2533.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2455 = - createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_componentStack_2455 - )) - : ((JSCompiler_object_inline_componentStack_2455 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2455, - mode, - renderLanes, - null - )), - (JSCompiler_object_inline_componentStack_2455.flags |= 2)), - (JSCompiler_object_inline_componentStack_2455.return = - workInProgress), - (JSCompiler_object_inline_stack_2454.return = workInProgress), - (JSCompiler_object_inline_stack_2454.sibling = - JSCompiler_object_inline_componentStack_2455), - (workInProgress.child = JSCompiler_object_inline_stack_2454), - (JSCompiler_object_inline_stack_2454 = - JSCompiler_object_inline_componentStack_2455), - (JSCompiler_object_inline_componentStack_2455 = workInProgress.child), + null !== JSCompiler_object_inline_componentStack_2534 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_componentStack_2534, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + mode, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2533.return = workInProgress), + (JSCompiler_object_inline_stack_2533.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2533), + (JSCompiler_object_inline_stack_2533 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (mode = current.child.memoizedState), null === mode ? (mode = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = mode.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_componentStack_2534 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_componentStack_2534 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_componentStack_2534, + pool: JSCompiler_object_inline_componentStack_2534 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -9972,31 +10007,30 @@ baseLanes: mode.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_componentStack_2455.memoizedState = mode), - (JSCompiler_object_inline_componentStack_2455.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2453, - renderLanes - )), + (nextPrimaryChildren.memoizedState = mode), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2532, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2454 + JSCompiler_object_inline_stack_2533 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2454.children + children: JSCompiler_object_inline_stack_2533.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2453 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2453 + ((JSCompiler_object_inline_digest_2532 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2532 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2453.push(current)); + : JSCompiler_object_inline_digest_2532.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10335,6 +10369,14 @@ stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -10550,10 +10592,10 @@ current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; + renderLanes = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - current + + renderLanes + ". Lazy element type must resolve to a class or function." + workInProgress ); @@ -10661,15 +10703,15 @@ didSuspendOrErrorDEV = !1; hydrationDiffRootDEV = null; rootOrSingletonContext = !0; - current = mountChildFibers( + renderLanes = mountChildFibers( workInProgress, null, returnFiber, renderLanes ); - for (workInProgress.child = current; current; ) - (current.flags = (current.flags & -3) | 4096), - (current = current.sibling); + for (workInProgress.child = renderLanes; renderLanes; ) + (renderLanes.flags = (renderLanes.flags & -3) | 4096), + (renderLanes = renderLanes.sibling); } else { resetHydrationState(); @@ -10695,26 +10737,26 @@ return ( markRef(current, workInProgress), null === current - ? (current = getResource( + ? (renderLanes = getResource( workInProgress.type, null, workInProgress.pendingProps, null )) - ? (workInProgress.memoizedState = current) + ? (workInProgress.memoizedState = renderLanes) : isHydrating || - ((current = workInProgress.type), - (renderLanes = workInProgress.pendingProps), + ((renderLanes = workInProgress.type), + (current = workInProgress.pendingProps), (returnFiber = requiredContext( rootInstanceStackCursor.current )), (returnFiber = getOwnerDocumentFromRootContainer( returnFiber - ).createElement(current)), + ).createElement(renderLanes)), (returnFiber[internalInstanceKey] = workInProgress), - (returnFiber[internalPropsKey] = renderLanes), - setInitialProperties(returnFiber, current, renderLanes), + (returnFiber[internalPropsKey] = current), + setInitialProperties(returnFiber, renderLanes, current), markNodeAsHoistable(returnFiber), (workInProgress.stateNode = returnFiber)) : (workInProgress.memoizedState = getResource( @@ -10843,21 +10885,21 @@ return ( null === current && isHydrating && - ((current = workInProgress.pendingProps), - (renderLanes = getHostContext()), - (returnFiber = renderLanes.ancestorInfo.current), - (current = + ((renderLanes = workInProgress.pendingProps), + (current = getHostContext()), + (returnFiber = current.ancestorInfo.current), + (renderLanes = null != returnFiber ? validateTextNesting( - current, + renderLanes, returnFiber.tag, - renderLanes.ancestorInfo.implicitRootScope + current.ancestorInfo.implicitRootScope ) : !0), - (renderLanes = nextHydratableInstance), - (returnFiber = !renderLanes) || + (current = nextHydratableInstance), + (returnFiber = !current) || ((returnFiber = canHydrateTextInstance( - renderLanes, + current, workInProgress.pendingProps, rootOrSingletonContext )), @@ -10869,8 +10911,8 @@ : (returnFiber = !1), (returnFiber = !returnFiber)), returnFiber && - (current && - warnNonHydratedInstance(workInProgress, renderLanes), + (renderLanes && + warnNonHydratedInstance(workInProgress, current), throwOnHydrationMismatch(workInProgress))), null ); @@ -11010,40 +11052,136 @@ renderLanes ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === prevSibling.mode) + mountActivityChildren(workInProgress, prevSibling); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((current = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (current = + null !== current && current.data === ACTIVITY_START_DATA + ? current + : null), + null !== current && + ((returnFiber = { + dehydrated: current, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }), + (workInProgress.memoizedState = returnFiber), + (returnFiber = + createFiberFromDehydratedFragment(current)), + (returnFiber.return = workInProgress), + (workInProgress.child = returnFiber), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (current = null), + null === current) + ) + throw ( + (warnNonHydratedInstance(workInProgress, renderLanes), + throwOnHydrationMismatch(workInProgress)) + ); + workInProgress.lanes = 536870912; + workInProgress = null; + } else + workInProgress = mountActivityChildren( + workInProgress, + prevSibling + ); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + if ( + ((prevState = returnFiber.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) + ) + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else if ( + (warnIfHydrating(), + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((prevState = getBumpedLaneForHydration( + prevSibling, + renderLanes )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + 0 !== prevState && prevState !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(prevSibling, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = returnFiber.treeContext), + (nextHydratableInstance = getNextHydratable( + prevState.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling + )), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -11251,7 +11389,6 @@ var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -11579,6 +11716,63 @@ } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -11586,23 +11780,25 @@ (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -11610,11 +11806,11 @@ emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -11863,6 +12059,22 @@ case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -11923,6 +12135,10 @@ case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -12842,6 +13058,11 @@ } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -13025,7 +13246,7 @@ null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -13034,7 +13255,7 @@ deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -13114,6 +13335,25 @@ } popComponentEffectStart(prevEffectStart); } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + finishedRoot + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -13135,6 +13375,7 @@ } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -13271,59 +13512,61 @@ (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return)); - if (flags & 4) - if ( - ((root = null !== current ? current.memoizedState : null), - (flags = finishedWork.memoizedState), - null === current) - ) + if (flags & 4) { + var currentResource = + null !== current ? current.memoizedState : null; + flags = finishedWork.memoizedState; + if (null === current) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - root = hoistableRoot.ownerDocument || hoistableRoot; + hoistableRoot = + hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - hoistableRoot = root.getElementsByTagName("title")[0]; + currentResource = + hoistableRoot.getElementsByTagName("title")[0]; if ( - !hoistableRoot || - hoistableRoot[internalHoistableMarker] || - hoistableRoot[internalInstanceKey] || - hoistableRoot.namespaceURI === SVG_NAMESPACE || - hoistableRoot.hasAttribute("itemprop") + !currentResource || + currentResource[internalHoistableMarker] || + currentResource[internalInstanceKey] || + currentResource.namespaceURI === SVG_NAMESPACE || + currentResource.hasAttribute("itemprop") ) - (hoistableRoot = root.createElement(flags)), - root.head.insertBefore( - hoistableRoot, - root.querySelector("head > title") + (currentResource = + hoistableRoot.createElement(flags)), + hoistableRoot.head.insertBefore( + currentResource, + hoistableRoot.querySelector("head > title") ); - setInitialProperties(hoistableRoot, flags, current); - hoistableRoot[internalInstanceKey] = finishedWork; - markNodeAsHoistable(hoistableRoot); - flags = hoistableRoot; + setInitialProperties(currentResource, flags, current); + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; break a; case "link": var maybeNodes = getHydratableHoistableCache( "link", "href", - root + hoistableRoot ).get(flags + (current.href || "")); if (maybeNodes) for (var i = 0; i < maybeNodes.length; i++) if ( - ((hoistableRoot = maybeNodes[i]), - hoistableRoot.getAttribute("href") === + ((currentResource = maybeNodes[i]), + currentResource.getAttribute("href") === (null == current.href || "" === current.href ? null : current.href) && - hoistableRoot.getAttribute("rel") === + currentResource.getAttribute("rel") === (null == current.rel ? null : current.rel) && - hoistableRoot.getAttribute("title") === + currentResource.getAttribute("title") === (null == current.title ? null : current.title) && - hoistableRoot.getAttribute("crossorigin") === + currentResource.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) @@ -13331,42 +13574,42 @@ maybeNodes.splice(i, 1); break b; } - hoistableRoot = root.createElement(flags); - setInitialProperties(hoistableRoot, flags, current); - root.head.appendChild(hoistableRoot); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; case "meta": if ( (maybeNodes = getHydratableHoistableCache( "meta", "content", - root + hoistableRoot ).get(flags + (current.content || ""))) ) for (i = 0; i < maybeNodes.length; i++) if ( - ((hoistableRoot = maybeNodes[i]), + ((currentResource = maybeNodes[i]), checkAttributeStringCoercion( current.content, "content" ), - hoistableRoot.getAttribute("content") === + currentResource.getAttribute("content") === (null == current.content ? null : "" + current.content) && - hoistableRoot.getAttribute("name") === + currentResource.getAttribute("name") === (null == current.name ? null : current.name) && - hoistableRoot.getAttribute("property") === + currentResource.getAttribute("property") === (null == current.property ? null : current.property) && - hoistableRoot.getAttribute("http-equiv") === + currentResource.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - hoistableRoot.getAttribute("charset") === + currentResource.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) @@ -13374,9 +13617,9 @@ maybeNodes.splice(i, 1); break b; } - hoistableRoot = root.createElement(flags); - setInitialProperties(hoistableRoot, flags, current); - root.head.appendChild(hoistableRoot); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; default: throw Error( @@ -13385,9 +13628,9 @@ '". This is a bug in React.' ); } - hoistableRoot[internalInstanceKey] = finishedWork; - markNodeAsHoistable(hoistableRoot); - flags = hoistableRoot; + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; } finishedWork.stateNode = flags; } else @@ -13403,12 +13646,12 @@ finishedWork.memoizedProps ); else - root !== flags - ? (null === root + currentResource !== flags + ? (null === currentResource ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : root.count--, + : currentResource.count--, null === flags ? mountHoistable( hoistableRoot, @@ -13427,6 +13670,7 @@ finishedWork.memoizedProps, current.memoizedProps ); + } break; case 27: recursivelyTraverseMutationEffects(root, finishedWork); @@ -13451,20 +13695,20 @@ null === current || safelyDetachRef(current, current.return)); if (finishedWork.flags & 32) { - root = finishedWork.stateNode; + hoistableRoot = finishedWork.stateNode; try { - runWithFiberInDEV(finishedWork, resetTextContent, root); + runWithFiberInDEV(finishedWork, resetTextContent, hoistableRoot); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((root = finishedWork.memoizedProps), + ((hoistableRoot = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - root, - null !== current ? current.memoizedProps : root + hoistableRoot, + null !== current ? current.memoizedProps : hoistableRoot )); flags & 1024 && ((needsFormReset = !0), @@ -13483,12 +13727,12 @@ ); flags = finishedWork.memoizedProps; current = null !== current ? current.memoizedProps : flags; - root = finishedWork.stateNode; + hoistableRoot = finishedWork.stateNode; try { runWithFiberInDEV( finishedWork, commitTextUpdate, - root, + hoistableRoot, current, flags ); @@ -13500,10 +13744,10 @@ case 3: hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - maybeNodes = currentHoistableRoot; + currentResource = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = maybeNodes; + currentHoistableRoot = currentResource; commitReconciliationEffects(finishedWork); if ( flags & 4 && @@ -13539,6 +13783,15 @@ finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -13586,9 +13839,13 @@ if (null === current) { wasHidden = current = root; try { - (maybeNodes = wasHidden.stateNode), + (currentResource = wasHidden.stateNode), hoistableRoot - ? runWithFiberInDEV(wasHidden, hideInstance, maybeNodes) + ? runWithFiberInDEV( + wasHidden, + hideInstance, + currentResource + ) : runWithFiberInDEV( wasHidden, unhideInstance, @@ -13603,19 +13860,43 @@ if (null === current) { wasHidden = root; try { - (i = wasHidden.stateNode), + (maybeNodes = wasHidden.stateNode), hoistableRoot - ? runWithFiberInDEV(wasHidden, hideTextInstance, i) + ? runWithFiberInDEV( + wasHidden, + hideTextInstance, + maybeNodes + ) : runWithFiberInDEV( wasHidden, unhideTextInstance, - i, + maybeNodes, wasHidden.memoizedProps ); } catch (error) { captureCommitPhaseError(wasHidden, wasHidden.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + wasHidden = root; + try { + (i = wasHidden.stateNode), + hoistableRoot + ? runWithFiberInDEV( + wasHidden, + hideDehydratedBoundary, + i + ) + : runWithFiberInDEV( + wasHidden, + unhideDehydratedBoundary, + wasHidden.stateNode + ); + } catch (error) { + captureCommitPhaseError(wasHidden, wasHidden.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -13841,6 +14122,16 @@ includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -14006,6 +14297,14 @@ committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -16046,6 +16345,7 @@ function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -19546,24 +19846,28 @@ : container ).removeChild(child); } - function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, + function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), node === SUSPENSE_END_DATA)) { + if ( + ((node = nextNode.data), + node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) + ) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; } else if ( node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || - node === SUSPENSE_FALLBACK_START_DATA + node === SUSPENSE_FALLBACK_START_DATA || + node === ACTIVITY_START_DATA ) depth++; else if (node === PREAMBLE_CONTRIBUTION_HTML) @@ -19589,7 +19893,38 @@ releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); + } + function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && + node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), node === SUSPENSE_END_DATA)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + (node !== SUSPENSE_START_DATA && + node !== SUSPENSE_PENDING_START_DATA && + node !== SUSPENSE_FALLBACK_START_DATA) || + suspenseInstance++; + node = nextNode; + } while (node); + } + function hideDehydratedBoundary(suspenseInstance) { + hideOrUnhideDehydratedBoundary(suspenseInstance, !0); } function hideInstance(instance) { instance = instance.style; @@ -19600,6 +19935,9 @@ function hideTextInstance(textInstance) { textInstance.nodeValue = ""; } + function unhideDehydratedBoundary(dehydratedInstance) { + hideOrUnhideDehydratedBoundary(dehydratedInstance, !1); + } function unhideInstance(instance, props) { props = props[STYLE]; props = @@ -19722,6 +20060,14 @@ } return instance; } + function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; + } function isSuspenseInstanceFallback(instance) { return ( instance.data === SUSPENSE_FALLBACK_START_DATA || @@ -19755,11 +20101,13 @@ nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || + nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING ) break; - if (nodeType === SUSPENSE_END_DATA) return null; + if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA) + return null; } } return node; @@ -19783,7 +20131,9 @@ return { type: JSCompiler_temp_const, props: serverDifferences }; } return 8 === instance.nodeType - ? { type: "Suspense", props: {} } + ? instance.data === ACTIVITY_START_DATA + ? { type: "Activity", props: {} } + : { type: "Suspense", props: {} } : instance.nodeValue; } function diffHydratedTextForDevWarnings(textInstance, text, parentProps) { @@ -19800,26 +20150,29 @@ textInstance) : null; } - function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { - suspenseInstance = suspenseInstance.nextSibling; - for (var depth = 0; suspenseInstance; ) { - if (8 === suspenseInstance.nodeType) { - var data = suspenseInstance.data; - if (data === SUSPENSE_END_DATA) { + function getNextHydratableInstanceAfterHydrationBoundary( + hydrationInstance + ) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) { if (0 === depth) - return getNextHydratable(suspenseInstance.nextSibling); + return getNextHydratable(hydrationInstance.nextSibling); depth--; } else (data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && - data !== SUSPENSE_PENDING_START_DATA) || + data !== SUSPENSE_PENDING_START_DATA && + data !== ACTIVITY_START_DATA) || depth++; } - suspenseInstance = suspenseInstance.nextSibling; + hydrationInstance = hydrationInstance.nextSibling; } return null; } - function getParentSuspenseInstance(targetInstance) { + function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { @@ -19827,11 +20180,14 @@ if ( data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || - data === SUSPENSE_PENDING_START_DATA + data === SUSPENSE_PENDING_START_DATA || + data === ACTIVITY_START_DATA ) { if (0 === depth) return targetInstance; depth--; - } else data === SUSPENSE_END_DATA && depth++; + } else + (data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA) || + depth++; } targetInstance = targetInstance.previousSibling; } @@ -19840,6 +20196,9 @@ function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -20782,12 +21141,21 @@ (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -20890,6 +21258,7 @@ } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -20935,6 +21304,10 @@ targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -21184,17 +21557,18 @@ ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -24556,6 +24930,8 @@ EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", + ACTIVITY_START_DATA = "&", + ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", @@ -25006,11 +25382,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25047,10 +25423,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.2.0-canary-bc6184dd-20250417", + version: "19.2.0-canary-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-bc6184dd-20250417" + reconcilerVersion: "19.2.0-canary-914319ae-20250423" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25524,7 +25900,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-canary-bc6184dd-20250417"; + exports.version = "19.2.0-canary-914319ae-20250423"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js index 4c9e6e7ad5240..846be3ab90c50 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js @@ -64,6 +64,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -812,6 +822,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -936,12 +954,12 @@ function getClosestInstanceFromNode(targetNode) { (null !== parentNode && null !== parentNode.child) ) for ( - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { if ((parentNode = targetNode[internalInstanceKey])) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); + targetNode = getParentHydrationBoundary(targetNode); } return targetInst; } @@ -959,6 +977,7 @@ function getInstanceFromNode(node) { 5 === tag || 6 === tag || 13 === tag || + 31 === tag || 26 === tag || 27 === tag || 3 === tag @@ -2098,19 +2117,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$302; + var JSCompiler_inline_result$jscomp$311; if (canUseDOM) { - var isSupported$jscomp$inline_441 = "oninput" in document; - if (!isSupported$jscomp$inline_441) { - var element$jscomp$inline_442 = document.createElement("div"); - element$jscomp$inline_442.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_441 = - "function" === typeof element$jscomp$inline_442.oninput; + var isSupported$jscomp$inline_452 = "oninput" in document; + if (!isSupported$jscomp$inline_452) { + var element$jscomp$inline_453 = document.createElement("div"); + element$jscomp$inline_453.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_452 = + "function" === typeof element$jscomp$inline_453.oninput; } - JSCompiler_inline_result$jscomp$302 = isSupported$jscomp$inline_441; - } else JSCompiler_inline_result$jscomp$302 = !1; + JSCompiler_inline_result$jscomp$311 = isSupported$jscomp$inline_452; + } else JSCompiler_inline_result$jscomp$311 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$302 && + JSCompiler_inline_result$jscomp$311 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -2674,6 +2693,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiberImplClass(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiberImplClass( 4, @@ -2751,6 +2775,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -2847,6 +2879,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2877,25 +2910,14 @@ function popHydrationState(fiber) { fiber = fiber.memoizedState; fiber = null !== fiber ? fiber.dehydrated : null; if (!fiber) throw Error(formatProdErrorMessage(317)); - a: { - fiber = fiber.nextSibling; - for (tag = 0; fiber; ) { - if (8 === fiber.nodeType) - if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) { - if (0 === tag) { - nextHydratableInstance = getNextHydratable(fiber.nextSibling); - break a; - } - tag--; - } else - ("$" !== JSCompiler_temp && - "$!" !== JSCompiler_temp && - "$?" !== JSCompiler_temp) || - tag++; - fiber = fiber.nextSibling; - } - nextHydratableInstance = null; - } + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else 27 === tag ? ((tag = nextHydratableInstance), @@ -4349,19 +4371,17 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (push(suspenseStackCursor, suspenseStackCursor.current), + 22 === fiber.tag + ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), - null === shellBoundary) - ) { - var current = fiber.alternate; - null !== current && - null !== current.memoizedState && - (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); + null === shellBoundary && (shellBoundary = fiber)) + : reuseSuspenseHandlerOnStack(fiber); } function reuseSuspenseHandlerOnStack() { push(suspenseStackCursor, suspenseStackCursor.current); @@ -6062,6 +6082,7 @@ function throwException( sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6351,7 +6372,18 @@ function updateOffscreenComponent( renderLanes ); } - if (0 === (renderLanes & 536870912) || isHydrating) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -6361,16 +6393,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -6405,6 +6427,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6786,39 +6830,28 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); - if ((current = nextHydratableInstance)) { - a: { - renderLanes = current; - for (current = rootOrSingletonContext; 8 !== renderLanes.nodeType; ) { - if (!current) { - current = null; - break a; - } - renderLanes = getNextHydratable(renderLanes.nextSibling); - if (null === renderLanes) { - current = null; - break a; - } - } - current = renderLanes; - } - null !== current && - ((workInProgress.memoizedState = { - dehydrated: current, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (renderLanes = createFiberImplClass(18, null, null, 0)), - (renderLanes.stateNode = current), - (renderLanes.return = workInProgress), - (workInProgress.child = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null)); - } else current = null; + (current = nextHydratableInstance) + ? ((current = canHydrateHydrationBoundary( + current, + rootOrSingletonContext + )), + (current = null !== current && "&" !== current.data ? current : null), + null !== current && + ((workInProgress.memoizedState = { + dehydrated: current, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (renderLanes = createFiberFromDehydratedFragment(current)), + (renderLanes.return = workInProgress), + (workInProgress.child = renderLanes), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (current = null); if (null === current) throw throwOnHydrationMismatch(workInProgress); isSuspenseInstanceFallback(current) ? (workInProgress.lanes = 32) @@ -6827,36 +6860,42 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } var nextPrimaryChildren = nextProps.children; nextProps = nextProps.fallback; - if (showFallback) { - reuseSuspenseHandlerOnStack(workInProgress); - var mode = workInProgress.mode; - nextPrimaryChildren = mountWorkInProgressOffscreenFiber( - { mode: "hidden", children: nextPrimaryChildren }, - mode - ); - nextProps = createFiberFromFragment(nextProps, mode, renderLanes, null); - nextPrimaryChildren.return = workInProgress; - nextProps.return = workInProgress; - nextPrimaryChildren.sibling = nextProps; - workInProgress.child = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes); - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes + if (showFallback) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (showFallback = workInProgress.mode), + (nextPrimaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: nextPrimaryChildren }, + showFallback + )), + (nextProps = createFiberFromFragment( + nextProps, + showFallback, + renderLanes, + null + )), + (nextPrimaryChildren.return = workInProgress), + (nextProps.return = workInProgress), + (nextPrimaryChildren.sibling = nextProps), + (workInProgress.child = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_temp, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + nextProps ); - workInProgress.memoizedState = SUSPENDED_MARKER; - return nextProps; - } pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren); } - mode = current.memoizedState; + var prevState = current.memoizedState; if ( - null !== mode && - ((nextPrimaryChildren = mode.dehydrated), null !== nextPrimaryChildren) + null !== prevState && + ((nextPrimaryChildren = prevState.dehydrated), null !== nextPrimaryChildren) ) { if (didSuspend) workInProgress.flags & 256 @@ -6874,14 +6913,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (mode = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - mode + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - mode, + showFallback, renderLanes, null )), @@ -6933,19 +6972,11 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), - 0 !== nextProps && nextProps !== mode.retryLane) + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== prevState.retryLane) ) throw ( - ((mode.retryLane = nextProps), + ((prevState.retryLane = nextProps), enqueueConcurrentRenderForLane(current, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), SelectiveHydrationException) @@ -6961,7 +6992,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) - : ((current = mode.treeContext), + : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( nextPrimaryChildren.nextSibling )), @@ -6970,12 +7001,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -6987,14 +7013,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (mode = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (prevState = current.child), + (digest = prevState.sibling), + (nextProps = createWorkInProgress(prevState, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = prevState.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7002,7 +7028,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - mode, + showFallback, renderLanes, null )), @@ -7013,22 +7039,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (mode = current.child.memoizedState), - null === mode - ? (mode = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = mode.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((prevState = showFallback.cachePool), + null !== prevState ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (prevState = + prevState.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (mode = { - baseLanes: mode.baseLanes | renderLanes, - cachePool: showFallback + : prevState)) + : (prevState = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: prevState })), - (nextPrimaryChildren.memoizedState = mode), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7272,6 +7298,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -7775,29 +7809,116 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (lazyComponent = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (lazyComponent = { - mode: lazyComponent.mode, - children: lazyComponent.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - lazyComponent, - renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, lazyComponent)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if ( + ((lazyComponent = current.memoizedState), null !== lazyComponent) + ) + if ( + ((prevState = lazyComponent.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) + ) + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== lazyComponent.retryLane) + ) + throw ( + ((lazyComponent.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = lazyComponent.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -7919,14 +8040,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$116 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$116 = lastTailNode), + for (var lastTailNode$117 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$116 + null === lastTailNode$117 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$116.sibling = null); + : (lastTailNode$117.sibling = null); } } function bubbleProperties(completedWork) { @@ -7938,53 +8059,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$118 = completedWork.selfBaseDuration, - child$119 = completedWork.child; - null !== child$119; + var treeBaseDuration$119 = completedWork.selfBaseDuration, + child$120 = completedWork.child; + null !== child$120; ) - (newChildLanes |= child$119.lanes | child$119.childLanes), - (subtreeFlags |= child$119.subtreeFlags & 65011712), - (subtreeFlags |= child$119.flags & 65011712), - (treeBaseDuration$118 += child$119.treeBaseDuration), - (child$119 = child$119.sibling); - completedWork.treeBaseDuration = treeBaseDuration$118; + (newChildLanes |= child$120.lanes | child$120.childLanes), + (subtreeFlags |= child$120.subtreeFlags & 65011712), + (subtreeFlags |= child$120.flags & 65011712), + (treeBaseDuration$119 += child$120.treeBaseDuration), + (child$120 = child$120.sibling); + completedWork.treeBaseDuration = treeBaseDuration$119; } else for ( - treeBaseDuration$118 = completedWork.child; - null !== treeBaseDuration$118; + treeBaseDuration$119 = completedWork.child; + null !== treeBaseDuration$119; ) (newChildLanes |= - treeBaseDuration$118.lanes | treeBaseDuration$118.childLanes), - (subtreeFlags |= treeBaseDuration$118.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$118.flags & 65011712), - (treeBaseDuration$118.return = completedWork), - (treeBaseDuration$118 = treeBaseDuration$118.sibling); + treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), + (subtreeFlags |= treeBaseDuration$119.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$119.flags & 65011712), + (treeBaseDuration$119.return = completedWork), + (treeBaseDuration$119 = treeBaseDuration$119.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$118 = completedWork.actualDuration; - child$119 = completedWork.selfBaseDuration; + treeBaseDuration$119 = completedWork.actualDuration; + child$120 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$118 += child.actualDuration), - (child$119 += child.treeBaseDuration), + (treeBaseDuration$119 += child.actualDuration), + (child$120 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$118; - completedWork.treeBaseDuration = child$119; + completedWork.actualDuration = treeBaseDuration$119; + completedWork.treeBaseDuration = child$120; } else for ( - treeBaseDuration$118 = completedWork.child; - null !== treeBaseDuration$118; + treeBaseDuration$119 = completedWork.child; + null !== treeBaseDuration$119; ) (newChildLanes |= - treeBaseDuration$118.lanes | treeBaseDuration$118.childLanes), - (subtreeFlags |= treeBaseDuration$118.subtreeFlags), - (subtreeFlags |= treeBaseDuration$118.flags), - (treeBaseDuration$118.return = completedWork), - (treeBaseDuration$118 = treeBaseDuration$118.sibling); + treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), + (subtreeFlags |= treeBaseDuration$119.subtreeFlags), + (subtreeFlags |= treeBaseDuration$119.flags), + (treeBaseDuration$119.return = completedWork), + (treeBaseDuration$119 = treeBaseDuration$119.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7993,7 +8114,6 @@ function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; popTreeContext(workInProgress); switch (workInProgress.tag) { - case 31: case 16: case 15: case 0: @@ -8248,6 +8368,53 @@ function completeWork(current, workInProgress, renderLanes) { } bubbleProperties(workInProgress); return null; + case 31: + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8255,28 +8422,30 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) throw Error(formatProdErrorMessage(318)); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) throw Error(formatProdErrorMessage(317)); - type[internalInstanceKey] = workInProgress; + if (!nextResource) throw Error(formatProdErrorMessage(318)); + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error(formatProdErrorMessage(317)); + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); } else resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -8503,6 +8672,20 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8561,6 +8744,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8775,8 +8962,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$154) { - captureCommitPhaseError(current, nearestMountedAncestor, error$154); + } catch (error$160) { + captureCommitPhaseError(current, nearestMountedAncestor, error$160); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8838,8 +9025,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$155) { - captureCommitPhaseError(current, nearestMountedAncestor, error$155); + } catch (error$161) { + captureCommitPhaseError(current, nearestMountedAncestor, error$161); } else ref.current = null; } @@ -9190,11 +9377,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$151) { + } catch (error$157) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$151 + error$157 ); } else { @@ -9211,11 +9398,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$152) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$152 + error$158 ); } recordEffectDuration(); @@ -9226,11 +9413,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$153) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$153 + error$159 ); } } @@ -9283,6 +9470,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -9440,7 +9631,7 @@ function commitDeletionEffectsOnFiber( null !== hostParent && (hostParentIsContainer ? ((finishedRoot = hostParent), - clearSuspenseBoundary( + clearHydrationBoundary( 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName @@ -9449,7 +9640,7 @@ function commitDeletionEffectsOnFiber( deletedFiber.stateNode ), retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + : clearHydrationBoundary(hostParent, deletedFiber.stateNode)); break; case 4: prevHostParent = hostParent; @@ -9521,6 +9712,21 @@ function commitDeletionEffectsOnFiber( } popComponentEffectStart(prevEffectStart); } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if ( + null === finishedWork.memoizedState && + ((finishedRoot = finishedWork.alternate), + null !== finishedRoot && + ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot)) + ) { + finishedRoot = finishedRoot.dehydrated; + try { + retryIfBlockedOn(finishedRoot); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if ( null === finishedWork.memoizedState && @@ -9538,6 +9744,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9656,58 +9863,57 @@ function commitMutationEffectsOnFiber(finishedWork, root) { (offscreenSubtreeWasHidden || null === current || safelyDetachRef(current, current.return)); - if (flags & 4) - if ( - ((root = null !== current ? current.memoizedState : null), - (flags = finishedWork.memoizedState), - null === current) - ) + if (flags & 4) { + var currentResource = null !== current ? current.memoizedState : null; + flags = finishedWork.memoizedState; + if (null === current) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - root = hoistableRoot.ownerDocument || hoistableRoot; + hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - hoistableRoot = root.getElementsByTagName("title")[0]; + currentResource = + hoistableRoot.getElementsByTagName("title")[0]; if ( - !hoistableRoot || - hoistableRoot[internalHoistableMarker] || - hoistableRoot[internalInstanceKey] || + !currentResource || + currentResource[internalHoistableMarker] || + currentResource[internalInstanceKey] || "http://www.w3.org/2000/svg" === - hoistableRoot.namespaceURI || - hoistableRoot.hasAttribute("itemprop") + currentResource.namespaceURI || + currentResource.hasAttribute("itemprop") ) - (hoistableRoot = root.createElement(flags)), - root.head.insertBefore( - hoistableRoot, - root.querySelector("head > title") + (currentResource = hoistableRoot.createElement(flags)), + hoistableRoot.head.insertBefore( + currentResource, + hoistableRoot.querySelector("head > title") ); - setInitialProperties(hoistableRoot, flags, current); - hoistableRoot[internalInstanceKey] = finishedWork; - markNodeAsHoistable(hoistableRoot); - flags = hoistableRoot; + setInitialProperties(currentResource, flags, current); + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; break a; case "link": var maybeNodes = getHydratableHoistableCache( "link", "href", - root + hoistableRoot ).get(flags + (current.href || "")); if (maybeNodes) for (var i = 0; i < maybeNodes.length; i++) if ( - ((hoistableRoot = maybeNodes[i]), - hoistableRoot.getAttribute("href") === + ((currentResource = maybeNodes[i]), + currentResource.getAttribute("href") === (null == current.href || "" === current.href ? null : current.href) && - hoistableRoot.getAttribute("rel") === + currentResource.getAttribute("rel") === (null == current.rel ? null : current.rel) && - hoistableRoot.getAttribute("title") === + currentResource.getAttribute("title") === (null == current.title ? null : current.title) && - hoistableRoot.getAttribute("crossorigin") === + currentResource.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) @@ -9715,36 +9921,36 @@ function commitMutationEffectsOnFiber(finishedWork, root) { maybeNodes.splice(i, 1); break b; } - hoistableRoot = root.createElement(flags); - setInitialProperties(hoistableRoot, flags, current); - root.head.appendChild(hoistableRoot); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; case "meta": if ( (maybeNodes = getHydratableHoistableCache( "meta", "content", - root + hoistableRoot ).get(flags + (current.content || ""))) ) for (i = 0; i < maybeNodes.length; i++) if ( - ((hoistableRoot = maybeNodes[i]), - hoistableRoot.getAttribute("content") === + ((currentResource = maybeNodes[i]), + currentResource.getAttribute("content") === (null == current.content ? null : "" + current.content) && - hoistableRoot.getAttribute("name") === + currentResource.getAttribute("name") === (null == current.name ? null : current.name) && - hoistableRoot.getAttribute("property") === + currentResource.getAttribute("property") === (null == current.property ? null : current.property) && - hoistableRoot.getAttribute("http-equiv") === + currentResource.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - hoistableRoot.getAttribute("charset") === + currentResource.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) @@ -9752,16 +9958,16 @@ function commitMutationEffectsOnFiber(finishedWork, root) { maybeNodes.splice(i, 1); break b; } - hoistableRoot = root.createElement(flags); - setInitialProperties(hoistableRoot, flags, current); - root.head.appendChild(hoistableRoot); + currentResource = hoistableRoot.createElement(flags); + setInitialProperties(currentResource, flags, current); + hoistableRoot.head.appendChild(currentResource); break; default: throw Error(formatProdErrorMessage(468, flags)); } - hoistableRoot[internalInstanceKey] = finishedWork; - markNodeAsHoistable(hoistableRoot); - flags = hoistableRoot; + currentResource[internalInstanceKey] = finishedWork; + markNodeAsHoistable(currentResource); + flags = currentResource; } finishedWork.stateNode = flags; } else @@ -9777,12 +9983,12 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.memoizedProps ); else - root !== flags - ? (null === root + currentResource !== flags + ? (null === currentResource ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : root.count--, + : currentResource.count--, null === flags ? mountHoistable( hoistableRoot, @@ -9801,6 +10007,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.memoizedProps, current.memoizedProps ); + } break; case 27: recursivelyTraverseMutationEffects(root, finishedWork); @@ -9825,20 +10032,20 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null === current || safelyDetachRef(current, current.return)); if (finishedWork.flags & 32) { - root = finishedWork.stateNode; + hoistableRoot = finishedWork.stateNode; try { - setTextContent(root, ""); + setTextContent(hoistableRoot, ""); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((root = finishedWork.memoizedProps), + ((hoistableRoot = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - root, - null !== current ? current.memoizedProps : root + hoistableRoot, + null !== current ? current.memoizedProps : hoistableRoot )); flags & 1024 && (needsFormReset = !0); break; @@ -9860,10 +10067,10 @@ function commitMutationEffectsOnFiber(finishedWork, root) { case 3: hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - maybeNodes = currentHoistableRoot; + currentResource = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = maybeNodes; + currentHoistableRoot = currentResource; commitReconciliationEffects(finishedWork); if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { @@ -9891,6 +10098,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -9936,21 +10152,21 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) { wasHidden = current = root; try { - if (((maybeNodes = wasHidden.stateNode), hoistableRoot)) - (i = maybeNodes.style), - "function" === typeof i.setProperty - ? i.setProperty("display", "none", "important") - : (i.display = "none"); + if (((currentResource = wasHidden.stateNode), hoistableRoot)) + (maybeNodes = currentResource.style), + "function" === typeof maybeNodes.setProperty + ? maybeNodes.setProperty("display", "none", "important") + : (maybeNodes.display = "none"); else { - var instance = wasHidden.stateNode, - styleProp = wasHidden.memoizedProps.style, + i = wasHidden.stateNode; + var styleProp = wasHidden.memoizedProps.style, display = void 0 !== styleProp && null !== styleProp && styleProp.hasOwnProperty("display") ? styleProp.display : null; - instance.style.display = + i.style.display = null == display || "boolean" === typeof display ? "" : ("" + display).trim(); @@ -9970,6 +10186,18 @@ function commitMutationEffectsOnFiber(finishedWork, root) { captureCommitPhaseError(wasHidden, wasHidden.return, error); } } + } else if (18 === root.tag) { + if (null === current) { + wasHidden = root; + try { + var instance = wasHidden.stateNode; + hoistableRoot + ? hideOrUnhideDehydratedBoundary(instance, !0) + : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1); + } catch (error) { + captureCommitPhaseError(wasHidden, wasHidden.return, error); + } + } } else if ( ((22 !== root.tag && 23 !== root.tag) || null === root.memoizedState || @@ -10040,20 +10268,20 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent); break; case 5: - var parent$156 = hostParentFiber.stateNode; + var parent$162 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$156, ""), (hostParentFiber.flags &= -33)); - var before$157 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$157, parent$156); + (setTextContent(parent$162, ""), (hostParentFiber.flags &= -33)); + var before$163 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$163, parent$162); break; case 3: case 4: - var parent$158 = hostParentFiber.stateNode.containerInfo, - before$159 = getHostSibling(finishedWork); + var parent$164 = hostParentFiber.stateNode.containerInfo, + before$165 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$159, - parent$158 + before$165, + parent$164 ); break; default: @@ -10222,6 +10450,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10376,6 +10614,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11343,8 +11589,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); lanes && root.shellSuspendCounter++; @@ -11471,8 +11717,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$185) { - handleThrow(root, thrownValue$185); + } catch (thrownValue$192) { + handleThrow(root, thrownValue$192); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -12149,6 +12395,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -12196,14 +12443,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$190 = firstScheduledRoot; null !== root$190; ) { + for (var root$197 = firstScheduledRoot; null !== root$197; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$190.pendingLanes; + var pendingLanes = root$197.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$190.suspendedLanes, - pingedLanes = root$190.pingedLanes; + var suspendedLanes = root$197.suspendedLanes, + pingedLanes = root$197.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12217,20 +12464,20 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$190, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$197, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$190, - root$190 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$190.cancelPendingCommit || - -1 !== root$190.timeoutHandle + root$197, + root$197 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$197.cancelPendingCommit || + -1 !== root$197.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$190, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$197, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$190, JSCompiler_inline_result)); - root$190 = root$190.next; + performSyncWorkOnRoot(root$197, JSCompiler_inline_result)); + root$197 = root$197.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12474,20 +12721,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1627 = 0; - i$jscomp$inline_1627 < simpleEventPluginEvents.length; - i$jscomp$inline_1627++ + var i$jscomp$inline_1675 = 0; + i$jscomp$inline_1675 < simpleEventPluginEvents.length; + i$jscomp$inline_1675++ ) { - var eventName$jscomp$inline_1628 = - simpleEventPluginEvents[i$jscomp$inline_1627], - domEventName$jscomp$inline_1629 = - eventName$jscomp$inline_1628.toLowerCase(), - capitalizedEvent$jscomp$inline_1630 = - eventName$jscomp$inline_1628[0].toUpperCase() + - eventName$jscomp$inline_1628.slice(1); + var eventName$jscomp$inline_1676 = + simpleEventPluginEvents[i$jscomp$inline_1675], + domEventName$jscomp$inline_1677 = + eventName$jscomp$inline_1676.toLowerCase(), + capitalizedEvent$jscomp$inline_1678 = + eventName$jscomp$inline_1676[0].toUpperCase() + + eventName$jscomp$inline_1676.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1629, - "on" + capitalizedEvent$jscomp$inline_1630 + domEventName$jscomp$inline_1677, + "on" + capitalizedEvent$jscomp$inline_1678 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13664,34 +13911,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$204 = props[hasSrc]; - if (null != propValue$204) + var propValue$211 = props[hasSrc]; + if (null != propValue$211) switch (hasSrc) { case "name": - hasSrcSet = propValue$204; + hasSrcSet = propValue$211; break; case "type": - propValue = propValue$204; + propValue = propValue$211; break; case "checked": - checked = propValue$204; + checked = propValue$211; break; case "defaultChecked": - defaultChecked = propValue$204; + defaultChecked = propValue$211; break; case "value": - propKey = propValue$204; + propKey = propValue$211; break; case "defaultValue": - defaultValue = propValue$204; + defaultValue = propValue$211; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$204) + if (null != propValue$211) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$204, props, null); + setProp(domElement, tag, hasSrc, propValue$211, props, null); } } initInput( @@ -13830,14 +14077,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$204 in props) - props.hasOwnProperty(propValue$204) && - ((hasSrc = props[propValue$204]), + for (propValue$211 in props) + props.hasOwnProperty(propValue$211) && + ((hasSrc = props[propValue$211]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$204, + propValue$211, hasSrc, props, void 0 @@ -13885,14 +14132,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$221 in nextProps) { - var propKey = nextProps[propKey$221]; - lastProp = lastProps[propKey$221]; + for (var propKey$228 in nextProps) { + var propKey = nextProps[propKey$228]; + lastProp = lastProps[propKey$228]; if ( - nextProps.hasOwnProperty(propKey$221) && + nextProps.hasOwnProperty(propKey$228) && (null != propKey || null != lastProp) ) - switch (propKey$221) { + switch (propKey$228) { case "type": type = propKey; break; @@ -13921,7 +14168,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$221, + propKey$228, propKey, nextProps, lastProp @@ -13940,7 +14187,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$221 = null; + propKey = value = defaultValue = propKey$228 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13971,7 +14218,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$221 = type; + propKey$228 = type; break; case "defaultValue": defaultValue = type; @@ -13992,15 +14239,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$221 - ? updateOptions(domElement, !!lastProps, propKey$221, !1) + null != propKey$228 + ? updateOptions(domElement, !!lastProps, propKey$228, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$221 = null; + propKey = propKey$228 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14024,7 +14271,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$221 = name; + propKey$228 = name; break; case "defaultValue": propKey = name; @@ -14038,17 +14285,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$221, propKey); + updateTextarea(domElement, propKey$228, propKey); return; case "option": - for (var propKey$237 in lastProps) + for (var propKey$244 in lastProps) if ( - ((propKey$221 = lastProps[propKey$237]), - lastProps.hasOwnProperty(propKey$237) && - null != propKey$221 && - !nextProps.hasOwnProperty(propKey$237)) + ((propKey$228 = lastProps[propKey$244]), + lastProps.hasOwnProperty(propKey$244) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$244)) ) - switch (propKey$237) { + switch (propKey$244) { case "selected": domElement.selected = !1; break; @@ -14056,33 +14303,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$237, + propKey$244, null, nextProps, - propKey$221 + propKey$228 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$221 = nextProps[lastDefaultValue]), + ((propKey$228 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$221 !== propKey && - (null != propKey$221 || null != propKey)) + propKey$228 !== propKey && + (null != propKey$228 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$221 && - "function" !== typeof propKey$221 && - "symbol" !== typeof propKey$221; + propKey$228 && + "function" !== typeof propKey$228 && + "symbol" !== typeof propKey$228; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$221, + propKey$228, nextProps, propKey ); @@ -14103,24 +14350,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$242 in lastProps) - (propKey$221 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - null != propKey$221 && - !nextProps.hasOwnProperty(propKey$242) && - setProp(domElement, tag, propKey$242, null, nextProps, propKey$221); + for (var propKey$249 in lastProps) + (propKey$228 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$249) && + setProp(domElement, tag, propKey$249, null, nextProps, propKey$228); for (checked in nextProps) if ( - ((propKey$221 = nextProps[checked]), + ((propKey$228 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$221 !== propKey && - (null != propKey$221 || null != propKey)) + propKey$228 !== propKey && + (null != propKey$228 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$221) + if (null != propKey$228) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14128,7 +14375,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$221, + propKey$228, nextProps, propKey ); @@ -14136,49 +14383,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$247 in lastProps) - (propKey$221 = lastProps[propKey$247]), - lastProps.hasOwnProperty(propKey$247) && - void 0 !== propKey$221 && - !nextProps.hasOwnProperty(propKey$247) && + for (var propKey$254 in lastProps) + (propKey$228 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + void 0 !== propKey$228 && + !nextProps.hasOwnProperty(propKey$254) && setPropOnCustomElement( domElement, tag, - propKey$247, + propKey$254, void 0, nextProps, - propKey$221 + propKey$228 ); for (defaultChecked in nextProps) - (propKey$221 = nextProps[defaultChecked]), + (propKey$228 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$221 === propKey || - (void 0 === propKey$221 && void 0 === propKey) || + propKey$228 === propKey || + (void 0 === propKey$228 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$221, + propKey$228, nextProps, propKey ); return; } } - for (var propKey$252 in lastProps) - (propKey$221 = lastProps[propKey$252]), - lastProps.hasOwnProperty(propKey$252) && - null != propKey$221 && - !nextProps.hasOwnProperty(propKey$252) && - setProp(domElement, tag, propKey$252, null, nextProps, propKey$221); + for (var propKey$259 in lastProps) + (propKey$228 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$259) && + setProp(domElement, tag, propKey$259, null, nextProps, propKey$228); for (lastProp in nextProps) - (propKey$221 = nextProps[lastProp]), + (propKey$228 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$221 === propKey || - (null == propKey$221 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$221, nextProps, propKey); + propKey$228 === propKey || + (null == propKey$228 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$228, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14256,21 +14503,22 @@ function handleErrorInNextTick(error) { function isSingletonScope(type) { return "head" === type; } -function clearSuspenseBoundary(parentInstance, suspenseInstance) { - var node = suspenseInstance, +function clearHydrationBoundary(parentInstance, hydrationInstance) { + var node = hydrationInstance, depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && 8 === nextNode.nodeType) - if (((node = nextNode.data), "/$" === node)) { + if (((node = nextNode.data), "/$" === node || "/&" === node)) { if (0 === depth) { parentInstance.removeChild(nextNode); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); return; } depth--; - } else if ("$" === node || "$?" === node || "$!" === node) depth++; + } else if ("$" === node || "$?" === node || "$!" === node || "&" === node) + depth++; else if ("html" === node) releaseSingletonInstance(parentInstance.ownerDocument.documentElement); else if ("head" === node) { @@ -14292,7 +14540,31 @@ function clearSuspenseBoundary(parentInstance, suspenseInstance) { releaseSingletonInstance(parentInstance.ownerDocument.body); node = nextNode; } while (node); - retryIfBlockedOn(suspenseInstance); + retryIfBlockedOn(hydrationInstance); +} +function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) { + var node = suspenseInstance; + suspenseInstance = 0; + do { + var nextNode = node.nextSibling; + 1 === node.nodeType + ? isHidden + ? ((node._stashedDisplay = node.style.display), + (node.style.display = "none")) + : ((node.style.display = node._stashedDisplay || ""), + "" === node.getAttribute("style") && node.removeAttribute("style")) + : 3 === node.nodeType && + (isHidden + ? ((node._stashedText = node.nodeValue), (node.nodeValue = "")) + : (node.nodeValue = node._stashedText || "")); + if (nextNode && 8 === nextNode.nodeType) + if (((node = nextNode.data), "/$" === node)) + if (0 === suspenseInstance) break; + else suspenseInstance--; + else + ("$" !== node && "$?" !== node && "$!" !== node) || suspenseInstance++; + node = nextNode; + } while (node); } function clearContainerSparingly(container) { var nextNode = container.firstChild; @@ -14396,6 +14668,14 @@ function canHydrateTextInstance(instance, text, inRootOrSingleton) { } return instance; } +function canHydrateHydrationBoundary(instance, inRootOrSingleton) { + for (; 8 !== instance.nodeType; ) { + if (!inRootOrSingleton) return null; + instance = getNextHydratable(instance.nextSibling); + if (null === instance) return null; + } + return instance; +} function isSuspenseInstanceFallback(instance) { return ( "$!" === instance.data || @@ -14425,25 +14705,43 @@ function getNextHydratable(node) { "$" === nodeType || "$!" === nodeType || "$?" === nodeType || + "&" === nodeType || "F!" === nodeType || "F" === nodeType ) break; - if ("/$" === nodeType) return null; + if ("/$" === nodeType || "/&" === nodeType) return null; } } return node; } var previousHydratableOnEnteringScopedSingleton = null; -function getParentSuspenseInstance(targetInstance) { +function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) { + hydrationInstance = hydrationInstance.nextSibling; + for (var depth = 0; hydrationInstance; ) { + if (8 === hydrationInstance.nodeType) { + var data = hydrationInstance.data; + if ("/$" === data || "/&" === data) { + if (0 === depth) + return getNextHydratable(hydrationInstance.nextSibling); + depth--; + } else + ("$" !== data && "$!" !== data && "$?" !== data && "&" !== data) || + depth++; + } + hydrationInstance = hydrationInstance.nextSibling; + } + return null; +} +function getParentHydrationBoundary(targetInstance) { targetInstance = targetInstance.previousSibling; for (var depth = 0; targetInstance; ) { if (8 === targetInstance.nodeType) { var data = targetInstance.data; - if ("$" === data || "$!" === data || "$?" === data) { + if ("$" === data || "$!" === data || "$?" === data || "&" === data) { if (0 === depth) return targetInstance; depth--; - } else "/$" === data && depth++; + } else ("/$" !== data && "/&" !== data) || depth++; } targetInstance = targetInstance.previousSibling; } @@ -14774,26 +15072,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$263 = getResourcesFromRoot( + var styles$270 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$264 = styles$263.get(type); - resource$264 || + resource$271 = styles$270.get(type); + resource$271 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$264 = { + (resource$271 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$263.set(type, resource$264), - (styles$263 = JSCompiler_inline_result.querySelector( + styles$270.set(type, resource$271), + (styles$270 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$263._p && - ((resource$264.instance = styles$263), - (resource$264.state.loading = 5)), + !styles$270._p && + ((resource$271.instance = styles$270), + (resource$271.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14806,16 +15104,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$263 || + styles$270 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$264.state + resource$271.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$264; + return resource$271; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14912,37 +15210,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$269 = hoistableRoot.querySelector( + var instance$276 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$269) + if (instance$276) return ( (resource.state.loading |= 4), - (resource.instance = instance$269), - markNodeAsHoistable(instance$269), - instance$269 + (resource.instance = instance$276), + markNodeAsHoistable(instance$276), + instance$276 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$269 = ( + instance$276 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$269); - var linkInstance = instance$269; + markNodeAsHoistable(instance$276); + var linkInstance = instance$276; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$269, "link", instance); + setInitialProperties(instance$276, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$269, props.precedence, hoistableRoot); - return (resource.instance = instance$269); + insertStylesheet(instance$276, props.precedence, hoistableRoot); + return (resource.instance = instance$276); case "script": - instance$269 = getScriptKey(props.src); + instance$276 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$269) + getScriptSelectorFromKey(instance$276) )) ) return ( @@ -14951,7 +15249,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$269))) + if ((styleProps = preloadPropsMap.get(instance$276))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -15383,12 +15681,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -15479,6 +15786,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -15525,6 +15833,10 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag @@ -15785,14 +16097,18 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } @@ -15989,16 +16305,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1886 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1933 = React.version; if ( - "19.2.0-canary-bc6184dd-20250417" !== - isomorphicReactPackageVersion$jscomp$inline_1886 + "19.2.0-canary-914319ae-20250423" !== + isomorphicReactPackageVersion$jscomp$inline_1933 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1886, - "19.2.0-canary-bc6184dd-20250417" + isomorphicReactPackageVersion$jscomp$inline_1933, + "19.2.0-canary-914319ae-20250423" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16018,17 +16334,17 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1893 = { +var internals$jscomp$inline_1940 = { bundleType: 0, - version: "19.2.0-canary-bc6184dd-20250417", + version: "19.2.0-canary-914319ae-20250423", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-canary-bc6184dd-20250417", + reconcilerVersion: "19.2.0-canary-914319ae-20250423", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$286 = 0; - 31 > index$286; - index$286++ + var map = new Map(), lane = 1, index$293 = 0; + 31 > index$293; + index$293++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16041,16 +16357,16 @@ var internals$jscomp$inline_1893 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2328 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2390 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2328.isDisabled && - hook$jscomp$inline_2328.supportsFiber + !hook$jscomp$inline_2390.isDisabled && + hook$jscomp$inline_2390.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2328.inject( - internals$jscomp$inline_1893 + (rendererID = hook$jscomp$inline_2390.inject( + internals$jscomp$inline_1940 )), - (injectedHook = hook$jscomp$inline_2328); + (injectedHook = hook$jscomp$inline_2390); } catch (err) {} } function noop() {} @@ -16303,7 +16619,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-canary-bc6184dd-20250417"; +exports.version = "19.2.0-canary-914319ae-20250423"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js index 927a41a57d4a8..3444faa103d01 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -5310,16 +5310,14 @@ renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--&--\x3e"); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--/&--\x3e"); segment$jscomp$0.lastPushedText = !1; @@ -8729,10 +8727,10 @@ completeSegmentScript2 = '","', completeSegmentScriptEnd = '")\x3c/script>', completeBoundaryScript1Full = - '$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()}};$RC("', + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("', completeBoundaryScript1Partial = '$RC("', completeBoundaryWithStylesScript1FullBoth = - '$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("', + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("', completeBoundaryWithStylesScript1FullPartial = '$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("', completeBoundaryWithStylesScript1Partial = '$RR("', @@ -9031,5 +9029,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-canary-bc6184dd-20250417"; + exports.version = "19.2.0-canary-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js index 92b6b2ec26356..02b6b940c8a85 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js @@ -4080,14 +4080,14 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (request.renderState.generateStaticMarkup || + : "hidden" !== props.mode && + (request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--&--\x3e"), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--/&--\x3e"), (type.lastPushedText = !1)); @@ -5484,7 +5484,7 @@ function flushCompletedBoundary(request, destination, boundary) { ? 0 === (completedSegments.instructions & 2) ? ((completedSegments.instructions |= 10), destination.push( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' )) : 0 === (completedSegments.instructions & 8) ? ((completedSegments.instructions |= 8), @@ -5495,7 +5495,7 @@ function flushCompletedBoundary(request, destination, boundary) { : 0 === (completedSegments.instructions & 2) ? ((completedSegments.instructions |= 2), destination.push( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' )) : destination.push('$RC("'); completedSegments = i.toString(16); @@ -5886,4 +5886,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-canary-bc6184dd-20250417"; +exports.version = "19.2.0-canary-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js index 7c4afe56a5636..407c89b8377a8 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js @@ -5310,16 +5310,14 @@ renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--&--\x3e"); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--/&--\x3e"); segment$jscomp$0.lastPushedText = !1; @@ -8729,10 +8727,10 @@ completeSegmentScript2 = '","', completeSegmentScriptEnd = '")\x3c/script>', completeBoundaryScript1Full = - '$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()}};$RC("', + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("', completeBoundaryScript1Partial = '$RC("', completeBoundaryWithStylesScript1FullBoth = - '$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("', + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("', completeBoundaryWithStylesScript1FullPartial = '$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("', completeBoundaryWithStylesScript1Partial = '$RR("', @@ -9031,5 +9029,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-canary-bc6184dd-20250417"; + exports.version = "19.2.0-canary-914319ae-20250423"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js index 1dfa18092717d..9117d6621d28d 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js @@ -4127,14 +4127,14 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (request.renderState.generateStaticMarkup || + : "hidden" !== props.mode && + (request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--&--\x3e"), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--/&--\x3e"), (type.lastPushedText = !1)); @@ -5559,7 +5559,7 @@ function flushCompletedBoundary(request, destination, boundary) { ? 0 === (completedSegments.instructions & 2) ? ((completedSegments.instructions |= 10), destination.push( - '$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("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.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("' )) : 0 === (completedSegments.instructions & 8) ? ((completedSegments.instructions |= 8), @@ -5570,7 +5570,7 @@ function flushCompletedBoundary(request, destination, boundary) { : 0 === (completedSegments.instructions & 2) ? ((completedSegments.instructions |= 2), destination.push( - '$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()}};$RC("' + '$RC=function(b,d,e){d=document.getElementById(d);d.parentNode.removeChild(d);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 c=a.data;if("/$"===c||"/&"===c)if(0===f)break;else f--;else"$"!==c&&"$?"!==c&&"$!"!==c&&"&"!==c||f++}c=a.nextSibling;e.removeChild(a);a=c}while(a);for(;d.firstChild;)e.insertBefore(d.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("' )) : destination.push('$RC("'); completedSegments = i.toString(16); @@ -5966,4 +5966,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-canary-bc6184dd-20250417"; +exports.version = "19.2.0-canary-914319ae-20250423"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js index 1309ed1b6d45a..53e30b1986a92 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js @@ -5502,15 +5502,13 @@ renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { segment$jscomp$0.chunks.push(startActivityBoundary); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; segment$jscomp$0.chunks.push(endActivityBoundary); segment$jscomp$0.lastPushedText = !1; } @@ -7744,11 +7742,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-canary-bc6184dd-20250417" !== isomorphicReactPackageVersion) + if ("19.2.0-canary-914319ae-20250423" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-canary-bc6184dd-20250417\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-canary-914319ae-20250423\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react"), @@ -8976,11 +8974,11 @@ stringToPrecomputedChunk('