From eeb46121a5d0dd80aa93966144296b427996f8a0 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Tue, 25 Mar 2025 16:23:29 +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 d004e99367ce7..71a39138b8520 100644 --- a/package.json +++ b/package.json @@ -230,13 +230,13 @@ "react-builtin": "npm:react@19.1.0-canary-db7dfe05-20250319", "react-dom": "19.0.0", "react-dom-builtin": "npm:react-dom@19.1.0-canary-db7dfe05-20250319", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-db7dfe05-20250319", - "react-experimental-builtin": "npm:react@0.0.0-experimental-db7dfe05-20250319", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-740a4f7a-20250325", + "react-experimental-builtin": "npm:react@0.0.0-experimental-740a4f7a-20250325", "react-is-builtin": "npm:react-is@19.1.0-canary-db7dfe05-20250319", "react-server-dom-turbopack": "19.1.0-canary-db7dfe05-20250319", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-db7dfe05-20250319", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-740a4f7a-20250325", "react-server-dom-webpack": "19.1.0-canary-db7dfe05-20250319", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-db7dfe05-20250319", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-740a4f7a-20250325", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -247,7 +247,7 @@ "sass": "1.54.0", "satori": "0.12.1", "scheduler-builtin": "npm:scheduler@0.26.0-canary-db7dfe05-20250319", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-db7dfe05-20250319", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-740a4f7a-20250325", "seedrandom": "3.0.5", "semver": "7.3.7", "shell-quote": "1.7.3", From 2e1e15de4aac1c860d2c1775039f9032ec2dae80 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Tue, 25 Mar 2025 16:23:29 +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 71a39138b8520..6f0aec8342312 100644 --- a/package.json +++ b/package.json @@ -227,15 +227,15 @@ "pretty-ms": "7.0.0", "random-seed": "0.3.0", "react": "19.0.0", - "react-builtin": "npm:react@19.1.0-canary-db7dfe05-20250319", + "react-builtin": "npm:react@19.1.0-canary-740a4f7a-20250325", "react-dom": "19.0.0", - "react-dom-builtin": "npm:react-dom@19.1.0-canary-db7dfe05-20250319", + "react-dom-builtin": "npm:react-dom@19.1.0-canary-740a4f7a-20250325", "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-740a4f7a-20250325", "react-experimental-builtin": "npm:react@0.0.0-experimental-740a4f7a-20250325", - "react-is-builtin": "npm:react-is@19.1.0-canary-db7dfe05-20250319", - "react-server-dom-turbopack": "19.1.0-canary-db7dfe05-20250319", + "react-is-builtin": "npm:react-is@19.1.0-canary-740a4f7a-20250325", + "react-server-dom-turbopack": "19.1.0-canary-740a4f7a-20250325", "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-740a4f7a-20250325", - "react-server-dom-webpack": "19.1.0-canary-db7dfe05-20250319", + "react-server-dom-webpack": "19.1.0-canary-740a4f7a-20250325", "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-740a4f7a-20250325", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", @@ -246,7 +246,7 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.12.1", - "scheduler-builtin": "npm:scheduler@0.26.0-canary-db7dfe05-20250319", + "scheduler-builtin": "npm:scheduler@0.26.0-canary-740a4f7a-20250325", "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-740a4f7a-20250325", "seedrandom": "3.0.5", "semver": "7.3.7", @@ -289,10 +289,10 @@ "@types/react": "19.0.8", "@types/react-dom": "19.0.3", "jest-snapshot": "30.0.0-alpha.6", - "react": "19.1.0-canary-db7dfe05-20250319", - "react-dom": "19.1.0-canary-db7dfe05-20250319", - "react-is": "19.1.0-canary-db7dfe05-20250319", - "scheduler": "0.26.0-canary-db7dfe05-20250319" + "react": "19.1.0-canary-740a4f7a-20250325", + "react-dom": "19.1.0-canary-740a4f7a-20250325", + "react-is": "19.1.0-canary-740a4f7a-20250325", + "scheduler": "0.26.0-canary-740a4f7a-20250325" }, "patchedDependencies": { "webpack-sources@3.2.3": "patches/webpack-sources@3.2.3.patch", From 242c1060e8d04198b225db038a3ba449cca64756 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Tue, 25 Mar 2025 16:23:29 +0000 Subject: [PATCH 3/6] Updated peer dependency references in apps From f626fc269eedf84b3964d847b4401f5fe42fd34f Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Tue, 25 Mar 2025 16:23:29 +0000 Subject: [PATCH 4/6] Updated peer dependency references in libraries From 57fc3ab1ee49151f94e8ca524d1145893a8553d9 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Tue, 25 Mar 2025 16:23:43 +0000 Subject: [PATCH 5/6] Update lockfile --- pnpm-lock.yaml | 458 ++++++++++++++++++++++++------------------------- 1 file changed, 229 insertions(+), 229 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49d721e19f024..a2ca7ca7f1116 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,10 +16,10 @@ overrides: '@types/react': 19.0.8 '@types/react-dom': 19.0.3 jest-snapshot: 30.0.0-alpha.6 - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 - react-is: 19.1.0-canary-db7dfe05-20250319 - scheduler: 0.26.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 + react-is: 19.1.0-canary-740a4f7a-20250325 + scheduler: 0.26.0-canary-740a4f7a-20250325 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.0.8)(react@19.1.0-canary-db7dfe05-20250319) + version: 11.11.1(@types/react@19.0.8)(react@19.1.0-canary-740a4f7a-20250325) '@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.1.0-canary-db7dfe05-20250319) + version: 2.2.1(react@19.1.0-canary-740a4f7a-20250325) '@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)) '@testing-library/react': specifier: ^15.0.5 - version: 15.0.7(@types/react@19.0.8)(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319) + version: 15.0.7(@types/react@19.0.8)(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325) '@types/busboy': specifier: 1.5.3 version: 1.5.3 @@ -472,44 +472,44 @@ importers: specifier: 0.3.0 version: 0.3.0 react: - specifier: 19.1.0-canary-db7dfe05-20250319 - version: 19.1.0-canary-db7dfe05-20250319 + specifier: 19.1.0-canary-740a4f7a-20250325 + version: 19.1.0-canary-740a4f7a-20250325 react-builtin: - specifier: npm:react@19.1.0-canary-db7dfe05-20250319 - version: react@19.1.0-canary-db7dfe05-20250319 + specifier: npm:react@19.1.0-canary-740a4f7a-20250325 + version: react@19.1.0-canary-740a4f7a-20250325 react-dom: - specifier: 19.1.0-canary-db7dfe05-20250319 - version: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + specifier: 19.1.0-canary-740a4f7a-20250325 + version: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) react-dom-builtin: - specifier: npm:react-dom@19.1.0-canary-db7dfe05-20250319 - version: react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + specifier: npm:react-dom@19.1.0-canary-740a4f7a-20250325 + version: react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) react-dom-experimental-builtin: - specifier: npm:react-dom@0.0.0-experimental-db7dfe05-20250319 - version: react-dom@0.0.0-experimental-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + specifier: npm:react-dom@0.0.0-experimental-740a4f7a-20250325 + version: react-dom@0.0.0-experimental-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) react-experimental-builtin: - specifier: npm:react@0.0.0-experimental-db7dfe05-20250319 - version: react@0.0.0-experimental-db7dfe05-20250319 + specifier: npm:react@0.0.0-experimental-740a4f7a-20250325 + version: react@0.0.0-experimental-740a4f7a-20250325 react-is-builtin: - specifier: npm:react-is@19.1.0-canary-db7dfe05-20250319 - version: react-is@19.1.0-canary-db7dfe05-20250319 + specifier: npm:react-is@19.1.0-canary-740a4f7a-20250325 + version: react-is@19.1.0-canary-740a4f7a-20250325 react-server-dom-turbopack: - specifier: 19.1.0-canary-db7dfe05-20250319 - version: 19.1.0-canary-db7dfe05-20250319(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319) + specifier: 19.1.0-canary-740a4f7a-20250325 + version: 19.1.0-canary-740a4f7a-20250325(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325) react-server-dom-turbopack-experimental: - specifier: npm:react-server-dom-turbopack@0.0.0-experimental-db7dfe05-20250319 - version: react-server-dom-turbopack@0.0.0-experimental-db7dfe05-20250319(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319) + specifier: npm:react-server-dom-turbopack@0.0.0-experimental-740a4f7a-20250325 + version: react-server-dom-turbopack@0.0.0-experimental-740a4f7a-20250325(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325) react-server-dom-webpack: - specifier: 19.1.0-canary-db7dfe05-20250319 - version: 19.1.0-canary-db7dfe05-20250319(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))) + specifier: 19.1.0-canary-740a4f7a-20250325 + version: 19.1.0-canary-740a4f7a-20250325(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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-db7dfe05-20250319 - version: react-server-dom-webpack@0.0.0-experimental-db7dfe05-20250319(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))) + specifier: npm:react-server-dom-webpack@0.0.0-experimental-740a4f7a-20250325 + version: react-server-dom-webpack@0.0.0-experimental-740a4f7a-20250325(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-ff628334-20250205)(react@19.1.0-canary-db7dfe05-20250319) + version: 1.0.8(react-is@19.1.0-canary-ff628334-20250205)(react@19.1.0-canary-740a4f7a-20250325) react-virtualized: specifier: 9.22.3 - version: 9.22.3(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319) + version: 9.22.3(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325) relay-compiler: specifier: 13.0.2 version: 13.0.2 @@ -532,11 +532,11 @@ importers: specifier: 0.12.1 version: 0.12.1 scheduler-builtin: - specifier: npm:scheduler@0.26.0-canary-db7dfe05-20250319 - version: scheduler@0.26.0-canary-db7dfe05-20250319 + specifier: npm:scheduler@0.26.0-canary-740a4f7a-20250325 + version: scheduler@0.26.0-canary-740a4f7a-20250325 scheduler-experimental-builtin: - specifier: npm:scheduler@0.0.0-experimental-db7dfe05-20250319 - version: scheduler@0.0.0-experimental-db7dfe05-20250319 + specifier: npm:scheduler@0.0.0-experimental-740a4f7a-20250325 + version: scheduler@0.0.0-experimental-740a4f7a-20250325 seedrandom: specifier: 3.0.5 version: 3.0.5 @@ -551,16 +551,16 @@ importers: version: 6.0.0 styled-components: specifier: 6.0.0-rc.3 - version: 6.0.0-rc.3(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319) + version: 6.0.0-rc.3(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325) styled-jsx: specifier: 5.1.6 - version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.1.0-canary-db7dfe05-20250319) + version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.1.0-canary-740a4f7a-20250325) styled-jsx-plugin-postcss: specifier: 3.0.2 version: 3.0.2 swr: specifier: ^2.2.4 - version: 2.2.4(react@19.1.0-canary-db7dfe05-20250319) + version: 2.2.4(react@19.1.0-canary-740a4f7a-20250325) tailwindcss: specifier: 3.2.7 version: 3.2.7(postcss@8.4.31) @@ -908,17 +908,17 @@ importers: specifier: 8.4.31 version: 8.4.31 react: - specifier: 19.1.0-canary-db7dfe05-20250319 - version: 19.1.0-canary-db7dfe05-20250319 + specifier: 19.1.0-canary-740a4f7a-20250325 + version: 19.1.0-canary-740a4f7a-20250325 react-dom: - specifier: 19.1.0-canary-db7dfe05-20250319 - version: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + specifier: 19.1.0-canary-740a4f7a-20250325 + version: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) 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.1.0-canary-db7dfe05-20250319) + version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.1.0-canary-740a4f7a-20250325) optionalDependencies: sharp: specifier: ^0.33.5 @@ -1049,13 +1049,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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3)) + version: 8.6.0(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(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.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.2.8(@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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + version: 8.6.0(@rspack/core@1.2.8(@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.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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)) @@ -1529,7 +1529,7 @@ importers: version: 1.0.35 unistore: specifier: 3.4.1 - version: 3.4.1(react@19.1.0-canary-db7dfe05-20250319) + version: 3.4.1(react@19.1.0-canary-740a4f7a-20250325) util: specifier: 0.12.4 version: 0.12.4 @@ -1699,8 +1699,8 @@ importers: packages/third-parties: dependencies: react: - specifier: 19.1.0-canary-db7dfe05-20250319 - version: 19.1.0-canary-db7dfe05-20250319 + specifier: 19.1.0-canary-740a4f7a-20250325 + version: 19.1.0-canary-740a4f7a-20250325 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.1.0-canary-db7dfe05-20250319 - version: 19.1.0-canary-db7dfe05-20250319 + specifier: 19.1.0-canary-740a4f7a-20250325 + version: 19.1.0-canary-740a4f7a-20250325 react-test-renderer: specifier: 18.2.0 - version: 18.2.0(react@19.1.0-canary-db7dfe05-20250319) + version: 18.2.0(react@19.1.0-canary-740a4f7a-20250325) styled-jsx: specifier: ^5.1.2 - version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.1.0-canary-db7dfe05-20250319) + version: 5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.1.0-canary-740a4f7a-20250325) turbopack/packages/devlow-bench: dependencies: @@ -3509,7 +3509,7 @@ packages: resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: '@types/react': '*' - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true @@ -3526,7 +3526,7 @@ packages: '@emotion/use-insertion-effect-with-fallbacks@1.0.1': resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 '@emotion/utils@1.2.1': resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} @@ -4025,14 +4025,14 @@ packages: '@floating-ui/react-dom@2.1.0': resolution: {integrity: sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 '@floating-ui/react@0.26.16': resolution: {integrity: sha512-HEf43zxZNAI/E781QIVpYSF3K2VH4TTYZpqecjdsFkjsaU1EbaWcM++kw0HXFffj7gDUcBFevX8s0rQGQpxkow==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 '@floating-ui/utils@0.2.2': resolution: {integrity: sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==} @@ -4720,13 +4720,13 @@ packages: resolution: {integrity: sha512-l9ypojKN3PjwO1CSLIsqxi7mA25+7w+xc71Q+JuCCREI0tuGwkZsKbIOpuTATIJOjPh8ycLiW7QxX1LYsRTq6w==} peerDependencies: '@mantine/hooks': 7.10.1 - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 '@mantine/hooks@7.11.2': resolution: {integrity: sha512-jhyVe/sbDEG2U8rr2lMecUPgQxcfr5hh9HazqGfkS7ZRIMDO7uJ947yAcTMGGkp5Lxtt5TBFt1Cb6tiB2/1agg==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 '@mapbox/node-pre-gyp@1.0.5': resolution: {integrity: sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==} @@ -4743,13 +4743,13 @@ packages: '@mdx-js/react@2.2.1': resolution: {integrity: sha512-YdXcMcEnqZhzql98RNrqYo9cEhTTesBiCclEtoiQUbJwx87q9453GTapYU6kJ8ZZ2ek1Vp25SiAXEFy5O/eAPw==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 '@mdx-js/react@3.1.0': resolution: {integrity: sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==} peerDependencies: '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 '@module-federation/error-codes@0.11.0': resolution: {integrity: sha512-IyN5fi3KvB9WFeXeCVMdaGl/VI/Dejrx6Gqxrq5V74Tj7Us2VfcGyOUU7+AEue52gmq7qpIe0ctbr79RF16mWg==} @@ -5505,8 +5505,8 @@ packages: '@storybook/blocks@8.6.0': resolution: {integrity: sha512-3PNxlB5Ooj8CIhttbDxeV6kW7ui+2GEdTngtqhnsUHVjzeTKpilsk2lviOeUzqlyq5FDK+rhpZ3L3DJ9pDvioA==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 storybook: ^8.6.0 peerDependenciesMeta: react: @@ -5556,8 +5556,8 @@ packages: resolution: {integrity: sha512-Nz/UzeYQdUZUhacrPyfkiiysSjydyjgg/p0P9HxB4p/WaJUUjMAcaoaLgy3EXx61zZJ3iD36WPuDkZs5QYrA0A==} engines: {node: '>=14.0.0'} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 '@storybook/instrumenter@8.6.0': resolution: {integrity: sha512-eEY/Hfa3Vj5Nv4vHRHlSqjoyW6oAKNK3rKIXfL/eawQwb7rKhzijDLG5YBH44Hh7dEPIqUp0LEdgpyIY7GXezg==} @@ -5573,8 +5573,8 @@ packages: resolution: {integrity: sha512-04T86VG0UJtiozgZkTR5sY1qM3E0Rgwqwllvyy7kFFdkV+Sv/VsPjW9sC38s9C8FtCYRL8pJZz81ey3oylpIMA==} engines: {node: '>=18.0.0'} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 storybook: ^8.6.0 typescript: '*' peerDependenciesMeta: @@ -5595,16 +5595,16 @@ packages: '@storybook/react-dom-shim@8.6.0': resolution: {integrity: sha512-5Y+vMHhcx0xnaNsLQMbkmjc3zkDn/fGBNsiLH2e4POvW3ZQvOxjoyxAsEQaKwLtFgsdCFSd2tR89F6ItYrA2JQ==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 storybook: ^8.6.0 '@storybook/react-webpack5@8.6.0': resolution: {integrity: sha512-2L9CYDPn1OL0B8K5EU/Wpo9Slg8f0vkYPaPioQnmcK3Q4SJR4JAuDVWHUtNdxhaPOkHIy887Tfrf6BEC/blMaQ==} engines: {node: '>=18.0.0'} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 storybook: ^8.6.0 typescript: '>= 4.2.x' peerDependenciesMeta: @@ -5616,8 +5616,8 @@ packages: engines: {node: '>=18.0.0'} peerDependencies: '@storybook/test': 8.6.0 - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 storybook: ^8.6.0 typescript: '>= 4.2.x' peerDependenciesMeta: @@ -5853,8 +5853,8 @@ packages: engines: {node: '>=18'} peerDependencies: '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true @@ -11936,7 +11936,7 @@ packages: lucide-react@0.383.0: resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} @@ -14425,23 +14425,23 @@ packages: resolution: {integrity: sha512-APPU8HB2uZnpl6Vt/+0AFoVYgSRtfiP6FLrZgPPTDmqSb2R4qZRbgd0A3VzIFxDt5e+Fozjx79WjLWnF69DK8g==} engines: {node: '>=16.14.0'} - react-dom@0.0.0-experimental-db7dfe05-20250319: - resolution: {integrity: sha512-kq2LDqKf5UgW4yUQv6VTf2SxSyyqyyoFz25vOp72LDxOyauQBC6hrSfCU4OnWPBiGjid4mCdOOcflNTydjjmOQ==} + react-dom@0.0.0-experimental-740a4f7a-20250325: + resolution: {integrity: sha512-a7jAcg/LT/wNwkduY2fYMUnukAWqVy1d+abZxWVVD8bSspcLIod3mNfyc/qkPodjoNHaNSje4U3k0wpGVJaqGQ==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 - react-dom@19.1.0-canary-db7dfe05-20250319: - resolution: {integrity: sha512-zeQoqTpmP3lhYwmx1xBfLSleo8pCBItqnJ0/vSW0CrPzSRkVMJtMnIz0onm7lxHENs0yhE4pVTYyKkbOiHmkKQ==} + react-dom@19.1.0-canary-740a4f7a-20250325: + resolution: {integrity: sha512-VOgDwlUVUeR3ftklks9hOvpVezHJaBSoPMDszSKtrQmBA4iKEwfIzMkE5utYqKOCtTkKNA5i8+xrfl2uhBqDqA==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 react-dom@19.1.0-canary-ff628334-20250205: resolution: {integrity: sha512-O/FFWzQNHqKLavROUliPXDPAwJcjwDcFbZmg2YfsWtSDJj1pRFTNzYvOUChC/hgBQiIM5rAiznQjBw2D9naH1g==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 - react-is@19.1.0-canary-db7dfe05-20250319: - resolution: {integrity: sha512-lJR6XJFNNdVm0Gn5WcQU3qjG9aiwkJg5z6uOifZDz7o7sIcPDDL2mugmCF4qIjxVOyzBeGL9yP0CIUHQRtUeCA==} + react-is@19.1.0-canary-740a4f7a-20250325: + resolution: {integrity: sha512-BnXTHTG+qk9blTMfkOLuaO2+MGKH3xQW7rQNffpURSMT3TJ9AldDfpDaz2I9JOs1dFsniK7JV3anY/TT6479WQ==} react-is@19.1.0-canary-ff628334-20250205: resolution: {integrity: sha512-tydzrH7c0S7kxlrN/Si8T4uoOWV3gMtNfTLfW3XubcKNzZwN//JEfzE1fe82nkmw7Gy2wpN6Gg+gMvOpKmiAtw==} @@ -14452,8 +14452,8 @@ packages: react-number-format@5.4.0: resolution: {integrity: sha512-NWdICrqLhI7rAS8yUeLVd6Wr4cN7UjJ9IBTS0f/a9i7UB4x4Ti70kGnksBtZ7o4Z7YRbvCMMR/jQmkoOBa/4fg==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 react-refresh@0.12.0: resolution: {integrity: sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==} @@ -14464,7 +14464,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true @@ -14474,58 +14474,58 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true - react-server-dom-turbopack@0.0.0-experimental-db7dfe05-20250319: - resolution: {integrity: sha512-vFIQ923UyVpvMsVRvw7TuGiqKIeJSrebEBJTjSZjZs/sI7KAoiEoZ3btuB4r4qK7nGi1QPozJmPnhsp5MebYYQ==} + react-server-dom-turbopack@0.0.0-experimental-740a4f7a-20250325: + resolution: {integrity: sha512-v5FGOULp5Uz054/C/ABMzyHjwsD+YwJHcCleWvhZ9Rz5zsXxfrjNa6AUziAEWX5+Vgbo6xR96/+1A4rE9b7NbQ==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 - react-server-dom-turbopack@19.1.0-canary-db7dfe05-20250319: - resolution: {integrity: sha512-K4geB5szPTEMRIRt7yP/ONi7NuJ86BIPKa+2iyNeOgevLrd2dT3hL1xa6oiPiSLI5jaW1wGt+NYLt0lZwA69SQ==} + react-server-dom-turbopack@19.1.0-canary-740a4f7a-20250325: + resolution: {integrity: sha512-mtEfHJqwgwuQGw+VhL7OUdeO4D2FbS7e6c38JdgEI+TcSZWSQs3/7X61ZhiJ6gAjZdO8w4SeSWtSwuqzcVi/+g==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 - react-server-dom-webpack@0.0.0-experimental-db7dfe05-20250319: - resolution: {integrity: sha512-k/ngwoovjq9Ghs6w3xHT/AgJeSXw3bWzGi+Wnlh6LTBDlRJbwh73j2oDQCPDai45eOamPqm0Jl3YPscv31sNvA==} + react-server-dom-webpack@0.0.0-experimental-740a4f7a-20250325: + resolution: {integrity: sha512-S7e6HyUg+ZGwNOP9hG1W8d/whIMlHoWhukgDWxPAGJH8u7RelOFIe6I8araHSG57NmDLmLbt+E0so/1i1e5/6w==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 webpack: 5.98.0 - react-server-dom-webpack@19.1.0-canary-db7dfe05-20250319: - resolution: {integrity: sha512-FIGIsjcHIV3FmLnvWYU3aBturknAvP1s3Ei0dqwMAw6I7HHORfCSky/LF3mVFMfZsvSX6ap3Uyp6x0h7BaLMuQ==} + react-server-dom-webpack@19.1.0-canary-740a4f7a-20250325: + resolution: {integrity: sha512-AGH5DGpCQIvPhcduKaOkXgKBamtliPr1nEjvVHmJ56pmAinIsB1sVEvpE0K23huNs/vz0D7mZEhi4OLW6fcnLQ==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 webpack: 5.98.0 react-shallow-renderer@16.15.0: resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 react-ssr-prepass@1.0.8: resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-is: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-is: 19.1.0-canary-740a4f7a-20250325 react-style-singleton@2.2.1: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true @@ -14533,26 +14533,26 @@ packages: react-test-renderer@18.2.0: resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 react-textarea-autosize@8.5.3: resolution: {integrity: sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==} engines: {node: '>=10'} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 react-virtualized@9.22.3: resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 - react@0.0.0-experimental-db7dfe05-20250319: - resolution: {integrity: sha512-pyxPY41aYLuqJzjaiUY74jjDn+AKcAIFJyvd4DGEfsFj9Dzrqga3DaU8oK51BLrZ2dVSPYpkeZdOf6AP2f1ciQ==} + react@0.0.0-experimental-740a4f7a-20250325: + resolution: {integrity: sha512-H4Ywh6kZG5mMvXkCzoYhnyYcbsxHGdTax6TWCAiEz+AZTMoONMjisjkBb4gQoUgCKAMqup5MvjJL882a/JaZzQ==} engines: {node: '>=0.10.0'} - react@19.1.0-canary-db7dfe05-20250319: - resolution: {integrity: sha512-MAxari1p2tYwX6QyB70VYVt5GzdaRrdIdosGtvKwMbgqnFBJob7zrBQsG0d3qyDswLapsRdP1h+eHyGQDEFgZQ==} + react@19.1.0-canary-740a4f7a-20250325: + resolution: {integrity: sha512-WQPywHsPBVwdOdJsnk20l9sAWHMJSWlP7M+In9x8aFkeR05I6HoNB2tQpHHtVDMak+kRbDm3oetfjYZDVBw8iQ==} engines: {node: '>=0.10.0'} react@19.1.0-canary-ff628334-20250205: @@ -15101,11 +15101,11 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.0.0-experimental-db7dfe05-20250319: - resolution: {integrity: sha512-FLfOJC1Zv2nLRylFIdGmkGqomvdfvrZDp+vPXifFSLrzHPa0l4AhUGg+8NNXkEU24SVn7JxiIBrCJr4QW3LpYQ==} + scheduler@0.0.0-experimental-740a4f7a-20250325: + resolution: {integrity: sha512-QVllNBwd82cAqQ70UvLDptMBsmJ++4bQWppysQdbU+tlMGBMYgK3yuZIHII9/AfO5MNCqcs3kUcWuA0W5SNPLg==} - scheduler@0.26.0-canary-db7dfe05-20250319: - resolution: {integrity: sha512-tw8d5Zh7D86tUwpEbkWr4jw8l4Q7NV+8fVokeyf65qNI1rXU5Wvp2E8RsNM4Ti/2Lxj73oJ5fD+Q3iixdGUEPw==} + scheduler@0.26.0-canary-740a4f7a-20250325: + resolution: {integrity: sha512-1n6fGtT4LwzNyghwaTNAmcrMdq10RNNG9ly0oMlc/84Eq6kI0rlAhBl1Lim1xltij9Wcv8ZvDRPEZFRRGQqtRA==} schema-utils@2.7.1: resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} @@ -15746,8 +15746,8 @@ packages: engines: {node: '>= 16'} peerDependencies: babel-plugin-styled-components: '>= 2' - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: babel-plugin-styled-components: optional: true @@ -15761,7 +15761,7 @@ packages: peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@babel/core': optional: true @@ -15845,7 +15845,7 @@ packages: swr@2.2.4: resolution: {integrity: sha512-njiZ/4RiIhoOlAaLYDqwz5qH/KZXVilRLvomrx83HjzCWTfa+InyfAjv05PSFxnmLzZkNO9ZfvgoqzAaEI4sGQ==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 symbol-observable@1.0.1: resolution: {integrity: sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==} @@ -16642,7 +16642,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true @@ -16650,13 +16650,13 @@ packages: use-composed-ref@1.3.0: resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 use-isomorphic-layout-effect@1.1.2: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true @@ -16665,7 +16665,7 @@ packages: resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} peerDependencies: '@types/react': '*' - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true @@ -16675,7 +16675,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 peerDependenciesMeta: '@types/react': optional: true @@ -16683,7 +16683,7 @@ packages: use-sync-external-store@1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -19492,17 +19492,17 @@ snapshots: '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.1(@types/react@19.0.8)(react@19.1.0-canary-db7dfe05-20250319)': + '@emotion/react@11.11.1(@types/react@19.0.8)(react@19.1.0-canary-740a4f7a-20250325)': 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.1.0-canary-db7dfe05-20250319) + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.1.0-canary-740a4f7a-20250325) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 hoist-non-react-statics: 3.3.2 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 optionalDependencies: '@types/react': 19.0.8 transitivePeerDependencies: @@ -19520,9 +19520,9 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.1.0-canary-db7dfe05-20250319)': + '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.1.0-canary-740a4f7a-20250325)': dependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 '@emotion/utils@1.2.1': {} @@ -21066,11 +21066,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.2.1(react@19.1.0-canary-db7dfe05-20250319)': + '@mdx-js/react@2.2.1(react@19.1.0-canary-740a4f7a-20250325)': dependencies: '@types/mdx': 2.0.3 '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 '@mdx-js/react@2.2.1(react@19.1.0-canary-ff628334-20250205)': dependencies: @@ -21078,11 +21078,11 @@ snapshots: '@types/react': 19.0.8 react: 19.1.0-canary-ff628334-20250205 - '@mdx-js/react@3.1.0(@types/react@19.0.8)(react@19.1.0-canary-db7dfe05-20250319)': + '@mdx-js/react@3.1.0(@types/react@19.0.8)(react@19.1.0-canary-740a4f7a-20250325)': dependencies: '@types/mdx': 2.0.3 '@types/react': 19.0.8 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 '@module-federation/error-codes@0.11.0': {} @@ -21882,12 +21882,12 @@ snapshots: '@storybook/addon-docs@8.6.0(@types/react@19.0.8)(storybook@8.6.0(prettier@3.3.3))': dependencies: - '@mdx-js/react': 3.1.0(@types/react@19.0.8)(react@19.1.0-canary-db7dfe05-20250319) - '@storybook/blocks': 8.6.0(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3)) + '@mdx-js/react': 3.1.0(@types/react@19.0.8)(react@19.1.0-canary-740a4f7a-20250325) + '@storybook/blocks': 8.6.0(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3)) - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + '@storybook/react-dom-shim': 8.6.0(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(storybook@8.6.0(prettier@3.3.3)) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) storybook: 8.6.0(prettier@3.3.3) ts-dedent: 2.2.0 transitivePeerDependencies: @@ -21952,14 +21952,14 @@ snapshots: - '@swc/helpers' - webpack - '@storybook/blocks@8.6.0(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3))': + '@storybook/blocks@8.6.0(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(storybook@8.6.0(prettier@3.3.3))': dependencies: - '@storybook/icons': 1.3.0(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319) + '@storybook/icons': 1.3.0(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325) storybook: 8.6.0(prettier@3.3.3) ts-dedent: 2.2.0 optionalDependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) '@storybook/builder-webpack5@8.6.0(@rspack/core@1.2.8(@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: @@ -22038,10 +22038,10 @@ snapshots: '@storybook/global@5.0.0': {} - '@storybook/icons@1.3.0(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)': + '@storybook/icons@1.3.0(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)': dependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) '@storybook/instrumenter@8.6.0(storybook@8.6.0(prettier@3.3.3))': dependencies: @@ -22053,17 +22053,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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(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.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(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.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 react-docgen: 7.1.0 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) resolve: 1.22.8 semver: 7.6.3 storybook: 8.6.0(prettier@3.3.3) @@ -22097,19 +22097,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@storybook/react-dom-shim@8.6.0(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3))': + '@storybook/react-dom-shim@8.6.0(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(storybook@8.6.0(prettier@3.3.3))': dependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) storybook: 8.6.0(prettier@3.3.3) - '@storybook/react-webpack5@8.6.0(@rspack/core@1.2.8(@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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': + '@storybook/react-webpack5@8.6.0(@rspack/core@1.2.8(@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.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2)': dependencies: '@storybook/builder-webpack5': 8.6.0(@rspack/core@1.2.8(@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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + '@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.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(storybook@8.6.0(prettier@3.3.3))(typescript@5.8.2) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) storybook: 8.6.0(prettier@3.3.3) optionalDependencies: typescript: 5.8.2 @@ -22122,16 +22122,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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(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.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(storybook@8.6.0(prettier@3.3.3)) + '@storybook/react-dom-shim': 8.6.0(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(storybook@8.6.0(prettier@3.3.3)) '@storybook/theming': 8.6.0(storybook@8.6.0(prettier@3.3.3)) - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) storybook: 8.6.0(prettier@3.3.3) optionalDependencies: '@storybook/test': 8.6.0(storybook@8.6.0(prettier@3.3.3)) @@ -22405,13 +22405,13 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 - '@testing-library/react@15.0.7(@types/react@19.0.8)(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)': + '@testing-library/react@15.0.7(@types/react@19.0.8)(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)': dependencies: '@babel/runtime': 7.22.5 '@testing-library/dom': 10.1.0 '@types/react-dom': 19.0.3(@types/react@19.0.8) - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) optionalDependencies: '@types/react': 19.0.8 @@ -28088,7 +28088,7 @@ snapshots: hoist-non-react-statics@3.3.2: dependencies: - react-is: 19.1.0-canary-db7dfe05-20250319 + react-is: 19.1.0-canary-740a4f7a-20250325 homedir-polyfill@1.0.3: dependencies: @@ -32980,25 +32980,25 @@ snapshots: dependencies: ansi-regex: 5.0.1 ansi-styles: 5.2.0 - react-is: 19.1.0-canary-db7dfe05-20250319 + react-is: 19.1.0-canary-740a4f7a-20250325 pretty-format@29.5.0: dependencies: '@jest/schemas': 29.4.3 ansi-styles: 5.2.0 - react-is: 19.1.0-canary-db7dfe05-20250319 + react-is: 19.1.0-canary-740a4f7a-20250325 pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 19.1.0-canary-db7dfe05-20250319 + react-is: 19.1.0-canary-740a4f7a-20250325 pretty-format@30.0.0-alpha.6: dependencies: '@jest/schemas': 30.0.0-alpha.6 ansi-styles: 5.2.0 - react-is: 19.1.0-canary-db7dfe05-20250319 + react-is: 19.1.0-canary-740a4f7a-20250325 pretty-ms@7.0.0: dependencies: @@ -33061,7 +33061,7 @@ snapshots: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react-is: 19.1.0-canary-db7dfe05-20250319 + react-is: 19.1.0-canary-740a4f7a-20250325 property-information@5.6.0: dependencies: @@ -33268,22 +33268,22 @@ snapshots: transitivePeerDependencies: - supports-color - react-dom@0.0.0-experimental-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319): + react-dom@0.0.0-experimental-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325): dependencies: - react: 19.1.0-canary-db7dfe05-20250319 - scheduler: 0.26.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + scheduler: 0.26.0-canary-740a4f7a-20250325 - react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319): + react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325): dependencies: - react: 19.1.0-canary-db7dfe05-20250319 - scheduler: 0.26.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + scheduler: 0.26.0-canary-740a4f7a-20250325 react-dom@19.1.0-canary-ff628334-20250205(react@19.1.0-canary-ff628334-20250205): dependencies: react: 19.1.0-canary-ff628334-20250205 - scheduler: 0.26.0-canary-db7dfe05-20250319 + scheduler: 0.26.0-canary-740a4f7a-20250325 - react-is@19.1.0-canary-db7dfe05-20250319: {} + react-is@19.1.0-canary-740a4f7a-20250325: {} react-is@19.1.0-canary-ff628334-20250205: {} @@ -33316,48 +33316,48 @@ snapshots: optionalDependencies: '@types/react': 19.0.8 - react-server-dom-turbopack@0.0.0-experimental-db7dfe05-20250319(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319): + react-server-dom-turbopack@0.0.0-experimental-740a4f7a-20250325(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) - react-server-dom-turbopack@19.1.0-canary-db7dfe05-20250319(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319): + react-server-dom-turbopack@19.1.0-canary-740a4f7a-20250325(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) - react-server-dom-webpack@0.0.0-experimental-db7dfe05-20250319(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): + react-server-dom-webpack@0.0.0-experimental-740a4f7a-20250325(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) 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.1.0-canary-db7dfe05-20250319(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319)(webpack@5.98.0(@swc/core@1.9.3(@swc/helpers@0.5.15))): + react-server-dom-webpack@19.1.0-canary-740a4f7a-20250325(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325)(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.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) 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.1.0-canary-db7dfe05-20250319): + react-shallow-renderer@16.15.0(react@19.1.0-canary-740a4f7a-20250325): dependencies: object-assign: 4.1.1 - react: 19.1.0-canary-db7dfe05-20250319 - react-is: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-is: 19.1.0-canary-740a4f7a-20250325 - react-ssr-prepass@1.0.8(react-is@19.1.0-canary-ff628334-20250205)(react@19.1.0-canary-db7dfe05-20250319): + react-ssr-prepass@1.0.8(react-is@19.1.0-canary-ff628334-20250205)(react@19.1.0-canary-740a4f7a-20250325): dependencies: object-is: 1.0.2 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 react-is: 19.1.0-canary-ff628334-20250205 react-style-singleton@2.2.1(@types/react@19.0.8)(react@19.1.0-canary-ff628334-20250205): @@ -33369,12 +33369,12 @@ snapshots: optionalDependencies: '@types/react': 19.0.8 - react-test-renderer@18.2.0(react@19.1.0-canary-db7dfe05-20250319): + react-test-renderer@18.2.0(react@19.1.0-canary-740a4f7a-20250325): dependencies: - react: 19.1.0-canary-db7dfe05-20250319 - react-is: 19.1.0-canary-db7dfe05-20250319 - react-shallow-renderer: 16.15.0(react@19.1.0-canary-db7dfe05-20250319) - scheduler: 0.26.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 + react-is: 19.1.0-canary-740a4f7a-20250325 + react-shallow-renderer: 16.15.0(react@19.1.0-canary-740a4f7a-20250325) + scheduler: 0.26.0-canary-740a4f7a-20250325 react-textarea-autosize@8.5.3(@types/react@19.0.8)(react@19.1.0-canary-ff628334-20250205): dependencies: @@ -33385,20 +33385,20 @@ snapshots: transitivePeerDependencies: - '@types/react' - react-virtualized@9.22.3(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319): + react-virtualized@9.22.3(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325): 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.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) react-lifecycles-compat: 3.0.4 - react@0.0.0-experimental-db7dfe05-20250319: {} + react@0.0.0-experimental-740a4f7a-20250325: {} - react@19.1.0-canary-db7dfe05-20250319: {} + react@19.1.0-canary-740a4f7a-20250325: {} react@19.1.0-canary-ff628334-20250205: {} @@ -34158,9 +34158,9 @@ snapshots: dependencies: xmlchars: 2.2.0 - scheduler@0.0.0-experimental-db7dfe05-20250319: {} + scheduler@0.0.0-experimental-740a4f7a-20250325: {} - scheduler@0.26.0-canary-db7dfe05-20250319: {} + scheduler@0.26.0-canary-740a4f7a-20250325: {} schema-utils@2.7.1: dependencies: @@ -34917,7 +34917,7 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-components@6.0.0-rc.3(react-dom@19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319))(react@19.1.0-canary-db7dfe05-20250319): + styled-components@6.0.0-rc.3(react-dom@19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325))(react@19.1.0-canary-740a4f7a-20250325): dependencies: '@babel/cli': 7.21.5(@babel/core@7.22.5) '@babel/core': 7.22.5 @@ -34932,8 +34932,8 @@ snapshots: '@emotion/unitless': 0.8.1 css-to-react-native: 3.2.0 postcss: 8.4.31 - react: 19.1.0-canary-db7dfe05-20250319 - react-dom: 19.1.0-canary-db7dfe05-20250319(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + react-dom: 19.1.0-canary-740a4f7a-20250325(react@19.1.0-canary-740a4f7a-20250325) shallowequal: 1.1.0 stylis: 4.2.0 tslib: 2.5.3 @@ -34945,10 +34945,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.1.0-canary-db7dfe05-20250319): + styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.1.0-canary-740a4f7a-20250325): dependencies: client-only: 0.0.1 - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 optionalDependencies: '@babel/core': 7.22.5 babel-plugin-macros: 3.1.0 @@ -35044,11 +35044,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.1.0-canary-db7dfe05-20250319): + swr@2.2.4(react@19.1.0-canary-740a4f7a-20250325): dependencies: client-only: 0.0.1 - react: 19.1.0-canary-db7dfe05-20250319 - use-sync-external-store: 1.2.0(react@19.1.0-canary-db7dfe05-20250319) + react: 19.1.0-canary-740a4f7a-20250325 + use-sync-external-store: 1.2.0(react@19.1.0-canary-740a4f7a-20250325) symbol-observable@1.0.1: {} @@ -35847,9 +35847,9 @@ snapshots: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 - unistore@3.4.1(react@19.1.0-canary-db7dfe05-20250319): + unistore@3.4.1(react@19.1.0-canary-740a4f7a-20250325): optionalDependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 universal-github-app-jwt@1.1.1: dependencies: @@ -35975,9 +35975,9 @@ snapshots: optionalDependencies: '@types/react': 19.0.8 - use-sync-external-store@1.2.0(react@19.1.0-canary-db7dfe05-20250319): + use-sync-external-store@1.2.0(react@19.1.0-canary-740a4f7a-20250325): dependencies: - react: 19.1.0-canary-db7dfe05-20250319 + react: 19.1.0-canary-740a4f7a-20250325 util-deprecate@1.0.2: {} From 1bf28ac230aee8e3ceae6c511332abb55c3880da Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Tue, 25 Mar 2025 16:24:20 +0000 Subject: [PATCH 6/6] ncc-compiled --- .../cjs/react-dom-client.development.js | 23464 ++++++++-------- .../cjs/react-dom-client.production.js | 9364 +++--- .../cjs/react-dom-profiling.development.js | 23464 ++++++++-------- .../cjs/react-dom-profiling.profiling.js | 19444 ++++++------- ...t-dom-server-legacy.browser.development.js | 23 +- ...ct-dom-server-legacy.browser.production.js | 2 +- ...eact-dom-server-legacy.node.development.js | 23 +- ...react-dom-server-legacy.node.production.js | 2 +- .../react-dom-server.browser.development.js | 31 +- .../react-dom-server.browser.production.js | 6 +- .../cjs/react-dom-server.bun.production.js | 6 +- .../cjs/react-dom-server.edge.development.js | 31 +- .../cjs/react-dom-server.edge.production.js | 6 +- .../cjs/react-dom-server.node.development.js | 31 +- .../cjs/react-dom-server.node.production.js | 6 +- .../react-dom-unstable_testing.development.js | 23455 +++++++-------- .../react-dom-unstable_testing.production.js | 9349 +++--- .../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 | 19841 +++++++------ .../cjs/react-dom-client.production.js | 14825 +++++----- .../cjs/react-dom-profiling.development.js | 19841 +++++++------ .../cjs/react-dom-profiling.profiling.js | 7490 +++-- ...t-dom-server-legacy.browser.development.js | 23 +- ...ct-dom-server-legacy.browser.production.js | 2 +- ...eact-dom-server-legacy.node.development.js | 23 +- ...react-dom-server-legacy.node.production.js | 2 +- .../react-dom-server.browser.development.js | 27 +- .../react-dom-server.browser.production.js | 6 +- .../cjs/react-dom-server.bun.production.js | 6 +- .../cjs/react-dom-server.edge.development.js | 27 +- .../cjs/react-dom-server.edge.production.js | 6 +- .../cjs/react-dom-server.node.development.js | 27 +- .../cjs/react-dom-server.node.production.js | 6 +- .../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-jsx-dev-runtime.development.js | 25 +- ...sx-dev-runtime.react-server.development.js | 41 +- .../cjs/react-jsx-runtime.development.js | 33 +- ...ct-jsx-runtime.react-server.development.js | 41 +- .../cjs/react.development.js | 52 +- .../cjs/react.production.js | 2 +- .../cjs/react.react-server.development.js | 50 +- .../cjs/react.react-server.production.js | 2 +- .../react-is/cjs/react-is.development.js | 2 - .../react-is/cjs/react-is.production.js | 2 - .../next/src/compiled/react-is/package.json | 2 +- ...om-turbopack-client.browser.development.js | 4 +- ...om-turbopack-server.browser.development.js | 97 +- ...r-dom-turbopack-server.edge.development.js | 97 +- ...r-dom-turbopack-server.node.development.js | 97 +- .../package.json | 4 +- ...om-turbopack-client.browser.development.js | 4 +- ...om-turbopack-server.browser.development.js | 97 +- ...r-dom-turbopack-server.edge.development.js | 97 +- ...r-dom-turbopack-server.node.development.js | 97 +- .../react-server-dom-turbopack/package.json | 4 +- ...-dom-webpack-client.browser.development.js | 4 +- ...-dom-webpack-server.browser.development.js | 97 +- ...ver-dom-webpack-server.edge.development.js | 97 +- ...ver-dom-webpack-server.node.development.js | 97 +- ...bpack-server.node.unbundled.development.js | 97 +- .../package.json | 4 +- ...-dom-webpack-client.browser.development.js | 4 +- ...-dom-webpack-server.browser.development.js | 97 +- ...ver-dom-webpack-server.edge.development.js | 97 +- ...ver-dom-webpack-server.node.development.js | 97 +- ...bpack-server.node.unbundled.development.js | 97 +- .../react-server-dom-webpack/package.json | 4 +- .../cjs/react-jsx-dev-runtime.development.js | 25 +- ...sx-dev-runtime.react-server.development.js | 41 +- .../cjs/react-jsx-runtime.development.js | 33 +- ...ct-jsx-runtime.react-server.development.js | 41 +- .../compiled/react/cjs/react.development.js | 51 +- .../compiled/react/cjs/react.production.js | 2 +- .../cjs/react.react-server.development.js | 52 +- .../cjs/react.react-server.production.js | 2 +- .../next/src/compiled/unistore/unistore.js | 2 +- 84 files changed, 87746 insertions(+), 85028 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 da531ee036314..e91d8692b08a9 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 @@ -73,9 +73,6 @@ function shouldErrorImpl() { return null; } - function createFiber(tag, pendingProps, key, mode) { - return new FiberNode(tag, pendingProps, key, mode); - } function warnForMissingKey() {} function warnInvalidHookAccess() { console.error( @@ -95,6 +92,9 @@ }); return array.sort().join(", "); } + function createFiber(tag, pendingProps, key, mode) { + return new FiberNode(tag, pendingProps, key, mode); + } function scheduleRoot(root, element) { root.context === emptyContextObject && (updateContainerImpl(root.current, 2, element, root, null, null), @@ -236,6 +236,16 @@ } return null; } + function traverseFragmentInstanceChildren(child, fn, a, b, c) { + for (; null !== child; ) { + if (5 === child.tag) { + if (fn(child.stateNode, a, b, c)) break; + } else + (22 === child.tag && null !== child.memoizedState) || + traverseFragmentInstanceChildren(child.child, fn, a, b, c); + child = child.sibling; + } + } function getIteratorFn(maybeIterable) { if (null === maybeIterable || "object" !== typeof maybeIterable) return null; @@ -3968,11998 +3978,12003 @@ staleFamilies ); } - function startUpdateTimerByLane(lane) { - var JSCompiler_temp; - (JSCompiler_temp = 0 !== (lane & 3)) || - (JSCompiler_temp = 0 !== (lane & 60)); - if (JSCompiler_temp) - 0 > blockingUpdateTime && - ((blockingUpdateTime = now()), - (executionContext & (RenderContext | CommitContext)) !== NoContext && - (blockingSpawnedUpdate = !0), - (lane = resolveEventTimeStamp()), - (JSCompiler_temp = resolveEventType()), - lane !== blockingEventTime || JSCompiler_temp !== blockingEventType - ? (blockingEventIsRepeat = !1) - : null !== JSCompiler_temp && (blockingSpawnedUpdate = !0), - (blockingEventTime = lane), - (blockingEventType = JSCompiler_temp)); - else if ( - 0 !== (lane & 4194048) && - 0 > transitionUpdateTime && - ((transitionUpdateTime = now()), 0 > transitionStartTime) - ) { - lane = resolveEventTimeStamp(); - JSCompiler_temp = resolveEventType(); - if ( - lane !== transitionEventTime || - JSCompiler_temp !== transitionEventType - ) - transitionEventIsRepeat = !1; - transitionEventTime = lane; - transitionEventType = JSCompiler_temp; - } - } - function pushNestedEffectDurations() { - var prevEffectDuration = profilerEffectDuration; - profilerEffectDuration = 0; - return prevEffectDuration; - } - function popNestedEffectDurations(prevEffectDuration) { - var elapsedTime = profilerEffectDuration; - profilerEffectDuration = prevEffectDuration; - return elapsedTime; - } - function bubbleNestedEffectDurations(prevEffectDuration) { - var elapsedTime = profilerEffectDuration; - profilerEffectDuration += prevEffectDuration; - return elapsedTime; - } - function resetComponentEffectTimers() { - componentEffectEndTime = componentEffectStartTime = -1.1; - } - function pushComponentEffectStart() { - var prevEffectStart = componentEffectStartTime; - componentEffectStartTime = -1.1; - componentEffectDuration = -0; - return prevEffectStart; - } - function popComponentEffectStart(prevEffectStart) { - 0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart); - } - function pushComponentEffectErrors() { - var prevErrors = componentEffectErrors; - componentEffectErrors = null; - return prevErrors; - } - function startProfilerTimer(fiber) { - profilerStartTime = now(); - 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); - } - function stopProfilerTimerIfRunningAndRecordDuration(fiber) { - if (0 <= profilerStartTime) { - var elapsedTime = now() - profilerStartTime; - fiber.actualDuration += elapsedTime; - fiber.selfBaseDuration = elapsedTime; - profilerStartTime = -1; - } + function FiberNode(tag, pendingProps, key, mode) { + this.tag = tag; + this.key = key; + this.sibling = + this.child = + this.return = + this.stateNode = + this.type = + this.elementType = + null; + this.index = 0; + this.refCleanup = this.ref = null; + this.pendingProps = pendingProps; + this.dependencies = + this.memoizedState = + this.updateQueue = + this.memoizedProps = + null; + this.mode = mode; + this.subtreeFlags = this.flags = 0; + this.deletions = null; + this.childLanes = this.lanes = 0; + this.alternate = null; + this.actualDuration = -0; + this.actualStartTime = -1.1; + this.treeBaseDuration = this.selfBaseDuration = -0; + this._debugTask = + this._debugStack = + this._debugOwner = + this._debugInfo = + null; + this._debugNeedsRemount = !1; + this._debugHookTypes = null; + hasBadMapPolyfill || + "function" !== typeof Object.preventExtensions || + Object.preventExtensions(this); } - function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) { - if (0 <= profilerStartTime) { - var elapsedTime = now() - profilerStartTime; - fiber.actualDuration += elapsedTime; - profilerStartTime = -1; - } + function shouldConstruct(Component) { + Component = Component.prototype; + return !(!Component || !Component.isReactComponent); } - function recordEffectDuration() { - if (0 <= profilerStartTime) { - var endTime = now(), - elapsedTime = endTime - profilerStartTime; - profilerStartTime = -1; - profilerEffectDuration += elapsedTime; - componentEffectDuration += elapsedTime; - componentEffectEndTime = endTime; + function createWorkInProgress(current, pendingProps) { + var workInProgress = current.alternate; + null === workInProgress + ? ((workInProgress = createFiber( + current.tag, + pendingProps, + current.key, + current.mode + )), + (workInProgress.elementType = current.elementType), + (workInProgress.type = current.type), + (workInProgress.stateNode = current.stateNode), + (workInProgress._debugOwner = current._debugOwner), + (workInProgress._debugStack = current._debugStack), + (workInProgress._debugTask = current._debugTask), + (workInProgress._debugHookTypes = current._debugHookTypes), + (workInProgress.alternate = current), + (current.alternate = workInProgress)) + : ((workInProgress.pendingProps = pendingProps), + (workInProgress.type = current.type), + (workInProgress.flags = 0), + (workInProgress.subtreeFlags = 0), + (workInProgress.deletions = null), + (workInProgress.actualDuration = -0), + (workInProgress.actualStartTime = -1.1)); + workInProgress.flags = current.flags & 65011712; + workInProgress.childLanes = current.childLanes; + workInProgress.lanes = current.lanes; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; + pendingProps = current.dependencies; + workInProgress.dependencies = + null === pendingProps + ? null + : { + lanes: pendingProps.lanes, + firstContext: pendingProps.firstContext, + _debugThenableState: pendingProps._debugThenableState + }; + workInProgress.sibling = current.sibling; + workInProgress.index = current.index; + workInProgress.ref = current.ref; + workInProgress.refCleanup = current.refCleanup; + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + workInProgress._debugInfo = current._debugInfo; + workInProgress._debugNeedsRemount = current._debugNeedsRemount; + switch (workInProgress.tag) { + case 0: + case 15: + workInProgress.type = resolveFunctionForHotReloading(current.type); + break; + case 1: + workInProgress.type = resolveFunctionForHotReloading(current.type); + break; + case 11: + workInProgress.type = resolveForwardRefForHotReloading(current.type); } + return workInProgress; } - function recordEffectError(errorInfo) { - null === componentEffectErrors && (componentEffectErrors = []); - componentEffectErrors.push(errorInfo); - null === commitErrors && (commitErrors = []); - commitErrors.push(errorInfo); - } - function startEffectTimer() { - profilerStartTime = now(); - 0 > componentEffectStartTime && - (componentEffectStartTime = profilerStartTime); - } - function transferActualDuration(fiber) { - for (var child = fiber.child; child; ) - (fiber.actualDuration += child.actualDuration), (child = child.sibling); + function resetWorkInProgress(workInProgress, renderLanes) { + workInProgress.flags &= 65011714; + var current = workInProgress.alternate; + null === current + ? ((workInProgress.childLanes = 0), + (workInProgress.lanes = renderLanes), + (workInProgress.child = null), + (workInProgress.subtreeFlags = 0), + (workInProgress.memoizedProps = null), + (workInProgress.memoizedState = null), + (workInProgress.updateQueue = null), + (workInProgress.dependencies = null), + (workInProgress.stateNode = null), + (workInProgress.selfBaseDuration = 0), + (workInProgress.treeBaseDuration = 0)) + : ((workInProgress.childLanes = current.childLanes), + (workInProgress.lanes = current.lanes), + (workInProgress.child = current.child), + (workInProgress.subtreeFlags = 0), + (workInProgress.deletions = null), + (workInProgress.memoizedProps = current.memoizedProps), + (workInProgress.memoizedState = current.memoizedState), + (workInProgress.updateQueue = current.updateQueue), + (workInProgress.type = current.type), + (renderLanes = current.dependencies), + (workInProgress.dependencies = + null === renderLanes + ? null + : { + lanes: renderLanes.lanes, + firstContext: renderLanes.firstContext, + _debugThenableState: renderLanes._debugThenableState + }), + (workInProgress.selfBaseDuration = current.selfBaseDuration), + (workInProgress.treeBaseDuration = current.treeBaseDuration)); + return workInProgress; } - function setCurrentTrackFromLanes(lanes) { - reusableLaneDevToolDetails.track = - lanes & 127 - ? "Blocking" - : lanes & 4194176 - ? "Transition" - : lanes & 62914560 - ? "Suspense" - : lanes & 2080374784 - ? "Idle" - : "Other"; - } - function logComponentRender(fiber, startTime, endTime, wasHydrated) { - var name = getComponentNameFromFiber(fiber); - if (null !== name && supportsUserTiming) { - var selfTime = fiber.actualDuration; - if (null === fiber.alternate || fiber.alternate.child !== fiber.child) - for (fiber = fiber.child; null !== fiber; fiber = fiber.sibling) - selfTime -= fiber.actualDuration; - reusableComponentDevToolDetails.color = - 0.5 > selfTime - ? wasHydrated - ? "tertiary-light" - : "primary-light" - : 10 > selfTime - ? wasHydrated - ? "tertiary" - : "primary" - : 100 > selfTime - ? wasHydrated - ? "tertiary-dark" - : "primary-dark" - : "error"; - reusableComponentOptions.start = startTime; - reusableComponentOptions.end = endTime; - performance.measure(name, reusableComponentOptions); - } - } - function logComponentErrored(fiber, startTime, endTime, errors) { - if (supportsUserTiming) { - var name = getComponentNameFromFiber(fiber); - if (null !== name) { - for (var properties = [], i = 0; i < errors.length; i++) { - var error = errors[i].value; - properties.push([ - "Error", - "object" === typeof error && - null !== error && - "string" === typeof error.message - ? String(error.message) - : String(error) - ]); - } - performance.measure(name, { - start: startTime, - end: endTime, - detail: { - devtools: { - color: "error", - track: COMPONENTS_TRACK, - tooltipText: - 13 === fiber.tag - ? "Hydration failed" - : "Error boundary caught an error", - properties: properties - } - } - }); - } - } - } - function logComponentEffect(fiber, startTime, endTime, selfTime, errors) { - if (null !== errors) { - if ( - supportsUserTiming && - ((selfTime = getComponentNameFromFiber(fiber)), null !== selfTime) - ) { - fiber = []; - for (var i = 0; i < errors.length; i++) { - var error = errors[i].value; - fiber.push([ - "Error", - "object" === typeof error && - null !== error && - "string" === typeof error.message - ? String(error.message) - : String(error) - ]); - } - performance.measure(selfTime, { - start: startTime, - end: endTime, - detail: { - devtools: { - color: "error", - track: COMPONENTS_TRACK, - tooltipText: "A lifecycle or effect errored", - properties: fiber + function createFiberFromTypeAndProps( + type, + key, + pendingProps, + owner, + mode, + lanes + ) { + var fiberTag = 0, + resolvedType = type; + if ("function" === typeof type) + shouldConstruct(type) && (fiberTag = 1), + (resolvedType = resolveFunctionForHotReloading(resolvedType)); + else if ("string" === typeof type) + (fiberTag = getHostContext()), + (fiberTag = isHostHoistableType(type, pendingProps, fiberTag) + ? 26 + : "html" === type || "head" === type || "body" === type + ? 27 + : 5); + else + a: switch (type) { + case REACT_ACTIVITY_TYPE: + return ( + (key = createFiber(31, pendingProps, key, mode)), + (key.elementType = REACT_ACTIVITY_TYPE), + (key.lanes = lanes), + key + ); + case REACT_FRAGMENT_TYPE: + return createFiberFromFragment( + pendingProps.children, + mode, + lanes, + key + ); + case REACT_STRICT_MODE_TYPE: + fiberTag = 8; + mode |= StrictLegacyMode; + mode |= StrictEffectsMode; + break; + case REACT_PROFILER_TYPE: + return ( + (type = pendingProps), + (owner = mode), + "string" !== typeof type.id && + console.error( + 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', + typeof type.id + ), + (key = createFiber(12, type, key, owner | ProfileMode)), + (key.elementType = REACT_PROFILER_TYPE), + (key.lanes = lanes), + (key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }), + key + ); + case REACT_SUSPENSE_TYPE: + return ( + (key = createFiber(13, pendingProps, key, mode)), + (key.elementType = REACT_SUSPENSE_TYPE), + (key.lanes = lanes), + key + ); + case REACT_SUSPENSE_LIST_TYPE: + return ( + (key = createFiber(19, pendingProps, key, mode)), + (key.elementType = REACT_SUSPENSE_LIST_TYPE), + (key.lanes = lanes), + key + ); + case REACT_LEGACY_HIDDEN_TYPE: + case REACT_VIEW_TRANSITION_TYPE: + return ( + (key = createFiber(30, pendingProps, key, mode)), + (key.elementType = REACT_VIEW_TRANSITION_TYPE), + (key.lanes = lanes), + (key.stateNode = { + autoName: null, + paired: null, + clones: null, + ref: null + }), + key + ); + default: + if ("object" === typeof type && null !== type) + switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + case REACT_CONTEXT_TYPE: + fiberTag = 10; + break a; + case REACT_CONSUMER_TYPE: + fiberTag = 9; + break a; + case REACT_FORWARD_REF_TYPE: + fiberTag = 11; + resolvedType = resolveForwardRefForHotReloading(resolvedType); + break a; + case REACT_MEMO_TYPE: + fiberTag = 14; + break a; + case REACT_LAZY_TYPE: + fiberTag = 16; + resolvedType = null; + break a; } - } - }); + resolvedType = ""; + if ( + void 0 === type || + ("object" === typeof type && + null !== type && + 0 === Object.keys(type).length) + ) + resolvedType += + " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + null === type + ? (pendingProps = "null") + : isArrayImpl(type) + ? (pendingProps = "array") + : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE + ? ((pendingProps = + "<" + + (getComponentNameFromType(type.type) || "Unknown") + + " />"), + (resolvedType = + " Did you accidentally export a JSX literal instead of a component?")) + : (pendingProps = typeof type); + (fiberTag = owner ? getComponentNameFromOwner(owner) : null) && + (resolvedType += + "\n\nCheck the render method of `" + fiberTag + "`."); + fiberTag = 29; + pendingProps = Error( + "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + + (pendingProps + "." + resolvedType) + ); + resolvedType = null; } - } else - (errors = getComponentNameFromFiber(fiber)), - null !== errors && - supportsUserTiming && - ((reusableComponentDevToolDetails.color = - 1 > selfTime - ? "secondary-light" - : 100 > selfTime - ? "secondary" - : 500 > selfTime - ? "secondary-dark" - : "error"), - (reusableComponentOptions.start = startTime), - (reusableComponentOptions.end = endTime), - performance.measure(errors, reusableComponentOptions)); + key = createFiber(fiberTag, pendingProps, key, mode); + key.elementType = type; + key.type = resolvedType; + key.lanes = lanes; + key._debugOwner = owner; + return key; } - function logRenderPhase(startTime, endTime, lanes) { - supportsUserTiming && - ((reusableLaneDevToolDetails.color = - (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"), - (reusableLaneOptions.start = startTime), - (reusableLaneOptions.end = endTime), - performance.measure( - (lanes & 536870912) === lanes - ? "Prepared" - : (lanes & 201326741) === lanes - ? "Hydrated" - : "Render", - reusableLaneOptions - )); + function createFiberFromElement(element, mode, lanes) { + mode = createFiberFromTypeAndProps( + element.type, + element.key, + element.props, + element._owner, + mode, + lanes + ); + mode._debugOwner = element._owner; + mode._debugStack = element._debugStack; + mode._debugTask = element._debugTask; + return mode; } - function logSuspendedRenderPhase(startTime, endTime, lanes) { - supportsUserTiming && - ((reusableLaneDevToolDetails.color = - (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"), - (reusableLaneOptions.start = startTime), - (reusableLaneOptions.end = endTime), - performance.measure("Prewarm", reusableLaneOptions)); + function createFiberFromFragment(elements, mode, lanes, key) { + elements = createFiber(7, elements, key, mode); + elements.lanes = lanes; + return elements; } - function logSuspendedWithDelayPhase(startTime, endTime, lanes) { - supportsUserTiming && - ((reusableLaneDevToolDetails.color = - (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"), - (reusableLaneOptions.start = startTime), - (reusableLaneOptions.end = endTime), - performance.measure("Suspended", reusableLaneOptions)); + function createFiberFromText(content, mode, lanes) { + content = createFiber(6, content, null, mode); + content.lanes = lanes; + return content; } - function logRecoveredRenderPhase( - startTime, - endTime, - lanes, - recoverableErrors, - hydrationFailed - ) { - if (supportsUserTiming) { - lanes = []; - for (var i = 0; i < recoverableErrors.length; i++) { - var error = recoverableErrors[i].value; - lanes.push([ - "Recoverable Error", - "object" === typeof error && - null !== error && - "string" === typeof error.message - ? String(error.message) - : String(error) - ]); - } - performance.measure("Recovered", { - start: startTime, - end: endTime, - detail: { - devtools: { - color: "primary-dark", - track: reusableLaneDevToolDetails.track, - trackGroup: LANES_TRACK_GROUP, - tooltipText: hydrationFailed - ? "Hydration Failed" - : "Recovered after Error", - properties: lanes - } - } - }); - } + function createFiberFromPortal(portal, mode, lanes) { + mode = createFiber( + 4, + null !== portal.children ? portal.children : [], + portal.key, + mode + ); + mode.lanes = lanes; + mode.stateNode = { + containerInfo: portal.containerInfo, + pendingChildren: null, + implementation: portal.implementation + }; + return mode; } - function logErroredRenderPhase(startTime, endTime) { - supportsUserTiming && - ((reusableLaneDevToolDetails.color = "error"), - (reusableLaneOptions.start = startTime), - (reusableLaneOptions.end = endTime), - performance.measure("Errored", reusableLaneOptions)); + function getTreeId() { + var overflow = treeContextOverflow, + idWithLeadingBit = treeContextId; + return ( + ( + idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1)) + ).toString(32) + overflow + ); } - function logSuspenseThrottlePhase(startTime, endTime) { - supportsUserTiming && - ((reusableLaneDevToolDetails.color = "secondary-light"), - (reusableLaneOptions.start = startTime), - (reusableLaneOptions.end = endTime), - performance.measure("Throttled", reusableLaneOptions)); + function pushTreeFork(workInProgress, totalChildren) { + warnIfNotHydrating(); + forkStack[forkStackIndex++] = treeForkCount; + forkStack[forkStackIndex++] = treeForkProvider; + treeForkProvider = workInProgress; + treeForkCount = totalChildren; } - function logSuspendedCommitPhase(startTime, endTime) { - supportsUserTiming && - ((reusableLaneDevToolDetails.color = "secondary-light"), - (reusableLaneOptions.start = startTime), - (reusableLaneOptions.end = endTime), - performance.measure("Suspended", reusableLaneOptions)); + function pushTreeId(workInProgress, totalChildren, index) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextProvider = workInProgress; + var baseIdWithLeadingBit = treeContextId; + workInProgress = treeContextOverflow; + var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1; + baseIdWithLeadingBit &= ~(1 << baseLength); + index += 1; + var length = 32 - clz32(totalChildren) + baseLength; + if (30 < length) { + var numberOfOverflowBits = baseLength - (baseLength % 5); + length = ( + baseIdWithLeadingBit & + ((1 << numberOfOverflowBits) - 1) + ).toString(32); + baseIdWithLeadingBit >>= numberOfOverflowBits; + baseLength -= numberOfOverflowBits; + treeContextId = + (1 << (32 - clz32(totalChildren) + baseLength)) | + (index << baseLength) | + baseIdWithLeadingBit; + treeContextOverflow = length + workInProgress; + } else + (treeContextId = + (1 << length) | (index << baseLength) | baseIdWithLeadingBit), + (treeContextOverflow = workInProgress); } - function logCommitErrored(startTime, endTime, errors, passive) { - if (supportsUserTiming) { - for (var properties = [], i = 0; i < errors.length; i++) { - var error = errors[i].value; - properties.push([ - "Error", - "object" === typeof error && - null !== error && - "string" === typeof error.message - ? String(error.message) - : String(error) - ]); - } - performance.measure("Errored", { - start: startTime, - end: endTime, - detail: { - devtools: { - color: "error", - track: reusableLaneDevToolDetails.track, - trackGroup: LANES_TRACK_GROUP, - tooltipText: passive - ? "Remaining Effects Errored" - : "Commit Errored", - properties: properties - } - } - }); - } + function pushMaterializedTreeId(workInProgress) { + warnIfNotHydrating(); + null !== workInProgress.return && + (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0)); } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber$1 = null; - isDisallowedContextReadInDEV = !1; + function popTreeContext(workInProgress) { + for (; workInProgress === treeForkProvider; ) + (treeForkProvider = forkStack[--forkStackIndex]), + (forkStack[forkStackIndex] = null), + (treeForkCount = forkStack[--forkStackIndex]), + (forkStack[forkStackIndex] = null); + for (; workInProgress === treeContextProvider; ) + (treeContextProvider = idStack[--idStackIndex]), + (idStack[idStackIndex] = null), + (treeContextOverflow = idStack[--idStackIndex]), + (idStack[idStackIndex] = null), + (treeContextId = idStack[--idStackIndex]), + (idStack[idStackIndex] = null); } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue, providerFiber); - context._currentValue = nextValue; - push(rendererCursorDEV, context._currentRenderer, providerFiber); - void 0 !== context._currentRenderer && - null !== context._currentRenderer && - context._currentRenderer !== rendererSigil && + function warnIfNotHydrating() { + isHydrating || console.error( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + "Expected to be hydrating. This is a bug in React. Please file an issue." ); - context._currentRenderer = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue = valueCursor.current; - var currentRenderer = rendererCursorDEV.current; - pop(rendererCursorDEV, providerFiber); - context._currentRenderer = currentRenderer; - pop(valueCursor, providerFiber); } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; + function buildHydrationDiffNode(fiber, distanceFromLeaf) { + if (null === fiber.return) { + if (null === hydrationDiffRootDEV) + hydrationDiffRootDEV = { + fiber: fiber, + children: [], + serverProps: void 0, + serverTail: [], + distanceFromLeaf: distanceFromLeaf + }; + else { + if (hydrationDiffRootDEV.fiber !== fiber) + throw Error( + "Saw multiple hydration diff roots in a pass. This is a bug in React." + ); + hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf && + (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf); + } + return hydrationDiffRootDEV; } - parent !== propagationRoot && - console.error( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + var siblings = buildHydrationDiffNode( + fiber.return, + distanceFromLeaf + 1 + ).children; + if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber) + return ( + (siblings = siblings[siblings.length - 1]), + siblings.distanceFromLeaf > distanceFromLeaf && + (siblings.distanceFromLeaf = distanceFromLeaf), + siblings ); + distanceFromLeaf = { + fiber: fiber, + children: [], + serverProps: void 0, + serverTail: [], + distanceFromLeaf: distanceFromLeaf + }; + siblings.push(distanceFromLeaf); + return distanceFromLeaf; } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress + function warnNonHydratedInstance(fiber, rejectedCandidate) { + didSuspendOrErrorDEV || + ((fiber = buildHydrationDiffNode(fiber, 0)), + (fiber.serverProps = null), + null !== rejectedCandidate && + ((rejectedCandidate = + describeHydratableInstanceForDevWarnings(rejectedCandidate)), + fiber.serverTail.push(rejectedCandidate))); + } + function throwOnHydrationMismatch(fiber) { + var diff = "", + diffRoot = hydrationDiffRootDEV; + null !== diffRoot && + ((hydrationDiffRootDEV = null), (diff = describeDiff(diffRoot))); + queueHydrationError( + createCapturedValueAtFiber( + Error( + "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" + + diff + ), + fiber + ) + ); + throw HydrationMismatchException; + } + function prepareToHydrateHostInstance(fiber) { + var didHydrate = fiber.stateNode; + var type = fiber.type, + props = fiber.memoizedProps; + didHydrate[internalInstanceKey] = fiber; + didHydrate[internalPropsKey] = props; + validatePropertiesInDevelopment(type, props); + switch (type) { + case "dialog": + listenToNonDelegatedEvent("cancel", didHydrate); + listenToNonDelegatedEvent("close", didHydrate); + break; + case "iframe": + case "object": + case "embed": + listenToNonDelegatedEvent("load", didHydrate); + break; + case "video": + case "audio": + for (type = 0; type < mediaEventTypes.length; type++) + listenToNonDelegatedEvent(mediaEventTypes[type], didHydrate); + break; + case "source": + listenToNonDelegatedEvent("error", didHydrate); + break; + case "img": + case "image": + case "link": + listenToNonDelegatedEvent("error", didHydrate); + listenToNonDelegatedEvent("load", didHydrate); + break; + case "details": + listenToNonDelegatedEvent("toggle", didHydrate); + break; + case "input": + checkControlledValueProps("input", props); + listenToNonDelegatedEvent("invalid", didHydrate); + validateInputProps(didHydrate, props); + initInput( + didHydrate, + props.value, + props.defaultValue, + props.checked, + props.defaultChecked, + props.type, + props.name, + !0 ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; + track(didHydrate); + break; + case "option": + validateOptionProps(didHydrate, props); + break; + case "select": + checkControlledValueProps("select", props); + listenToNonDelegatedEvent("invalid", didHydrate); + validateSelectProps(didHydrate, props); + break; + case "textarea": + checkControlledValueProps("textarea", props), + listenToNonDelegatedEvent("invalid", didHydrate), + validateTextareaProps(didHydrate, props), + initTextarea( + didHydrate, + props.value, + props.defaultValue, + props.children + ), + track(didHydrate); } + type = props.children; + ("string" !== typeof type && + "number" !== typeof type && + "bigint" !== typeof type) || + didHydrate.textContent === "" + type || + !0 === props.suppressHydrationWarning || + checkForUnmatchedText(didHydrate.textContent, type) + ? (null != props.popover && + (listenToNonDelegatedEvent("beforetoggle", didHydrate), + listenToNonDelegatedEvent("toggle", didHydrate)), + null != props.onScroll && + listenToNonDelegatedEvent("scroll", didHydrate), + null != props.onScrollEnd && + (listenToNonDelegatedEvent("scrollend", didHydrate), + listenToNonDelegatedEvent("scroll", didHydrate)), + null != props.onClick && (didHydrate.onclick = noop$1), + (didHydrate = !0)) + : (didHydrate = !1); + didHydrate || throwOnHydrationMismatch(fiber); } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + function popToNextHostParent(fiber) { + for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) + switch (hydrationParentFiber.tag) { + case 5: + case 13: + rootOrSingletonContext = !1; + return; + case 27: + case 3: + rootOrSingletonContext = !0; + return; + default: + hydrationParentFiber = hydrationParentFiber.return; } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + function popHydrationState(fiber) { + if (fiber !== hydrationParentFiber) return !1; + if (!isHydrating) + return popToNextHostParent(fiber), (isHydrating = !0), !1; + var tag = fiber.tag, + JSCompiler_temp; + if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) { + if ((JSCompiler_temp = 5 === tag)) + (JSCompiler_temp = fiber.type), + (JSCompiler_temp = + !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) || + shouldSetTextContent(fiber.type, fiber.memoizedProps)); + JSCompiler_temp = !JSCompiler_temp; } - return !1; + if (JSCompiler_temp && nextHydratableInstance) { + for (JSCompiler_temp = nextHydratableInstance; JSCompiler_temp; ) { + var diffNode = buildHydrationDiffNode(fiber, 0), + description = + describeHydratableInstanceForDevWarnings(JSCompiler_temp); + diffNode.serverTail.push(description); + JSCompiler_temp = + "Suspense" === description.type + ? getNextHydratableInstanceAfterSuspenseInstance(JSCompiler_temp) + : getNextHydratable(JSCompiler_temp.nextSibling); + } + throwOnHydrationMismatch(fiber); + } + popToNextHostParent(fiber); + if (13 === 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 = + getNextHydratableInstanceAfterSuspenseInstance(fiber); + } else + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); + return !0; } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber$1 = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); + function resetHydrationState() { + nextHydratableInstance = hydrationParentFiber = null; + didSuspendOrErrorDEV = isHydrating = !1; } - function readContext(context) { - isDisallowedContextReadInDEV && - console.error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber$1, context); + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); + function queueHydrationError(error) { + null === hydrationErrors + ? (hydrationErrors = [error]) + : hydrationErrors.push(error); } - function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + function emitPendingHydrationWarnings() { + var diffRoot = hydrationDiffRootDEV; + if (null !== diffRoot) { + hydrationDiffRootDEV = null; + for (var diff = describeDiff(diffRoot); 0 < diffRoot.children.length; ) + diffRoot = diffRoot.children[0]; + runWithFiberInDEV(diffRoot.fiber, function () { + console.error( + "A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s", + "https://react.dev/link/hydration-mismatch", + diff ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function entangleAsyncAction(transition, thenable) { - if (null === currentEntangledListeners) { - var entangledListeners = (currentEntangledListeners = []); - currentEntangledPendingCount = 0; - currentEntangledLane = requestTransitionLane(); - currentEntangledActionThenable = { - status: "pending", - value: void 0, - then: function (resolve) { - entangledListeners.push(resolve); - } - }; + }); } - currentEntangledPendingCount++; - thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); - return thenable; } - function pingEngtangledActionScope() { - if ( - 0 === --currentEntangledPendingCount && - (-1 < transitionUpdateTime || (transitionStartTime = -1.1), - null !== currentEntangledListeners) - ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); - } + function getViewTransitionName(props, instance) { + return null != props.name && "auto" !== props.name + ? props.name + : instance.autoName; } - function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); + function getClassNameByType(classByType) { + if (null == classByType || "string" === typeof classByType) + return classByType; + var className = null, + activeTypes = pendingTransitionTypes; + if (null !== activeTypes) + for (var i = 0; i < activeTypes.length; i++) { + var match = classByType[activeTypes[i]]; + if (null != match) { + if ("none" === match) return "none"; + className = null == className ? match : className + (" " + match); } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); } - ); - return thenableWithOverride; - } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; + return null == className ? classByType.default : className; } - function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); + function getViewTransitionClassName(defaultClass, eventClass) { + defaultClass = getClassNameByType(defaultClass); + eventClass = getClassNameByType(eventClass); + return null == eventClass + ? defaultClass + : "none" === eventClass + ? eventClass + : null != defaultClass && "none" !== defaultClass + ? defaultClass + " " + eventClass + : eventClass; } - function createUpdate(lane) { - return { - lane: lane, - tag: UpdateState, - payload: null, - callback: null, - next: null - }; + function setCurrentTrackFromLanes(lanes) { + reusableLaneDevToolDetails.track = + lanes & 127 + ? "Blocking" + : lanes & 4194176 + ? "Transition" + : lanes & 62914560 + ? "Suspense" + : lanes & 2080374784 + ? "Idle" + : "Other"; } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if ( - currentlyProcessingQueue === updateQueue && - !didWarnUpdateInsideUpdate - ) { - var componentName = getComponentNameFromFiber(fiber); - console.error( - "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", - componentName - ); - didWarnUpdateInsideUpdate = !0; - } - if ((executionContext & RenderContext) !== NoContext) - return ( - (componentName = updateQueue.pending), - null === componentName - ? (update.next = update) - : ((update.next = componentName.next), - (componentName.next = update)), - (updateQueue.pending = update), - (update = getRootForUpdatedFiber(fiber)), - markUpdateLaneFromFiberToRoot(fiber, null, lane), - update - ); - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); - } - function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); + function logComponentRender(fiber, startTime, endTime, wasHydrated) { + var name = getComponentNameFromFiber(fiber); + if (null !== name && supportsUserTiming) { + var selfTime = fiber.actualDuration; + if (null === fiber.alternate || fiber.alternate.child !== fiber.child) + for (fiber = fiber.child; null !== fiber; fiber = fiber.sibling) + selfTime -= fiber.actualDuration; + reusableComponentDevToolDetails.color = + 0.5 > selfTime + ? wasHydrated + ? "tertiary-light" + : "primary-light" + : 10 > selfTime + ? wasHydrated + ? "tertiary" + : "primary" + : 100 > selfTime + ? wasHydrated + ? "tertiary-dark" + : "primary-dark" + : "error"; + reusableComponentOptions.start = startTime; + reusableComponentOptions.end = endTime; + performance.measure(name, reusableComponentOptions); } } - function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; - if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast - ? (newFirst = newLast = clone) - : (newLast = newLast.next = clone); - queue = queue.next; - } while (null !== queue); - null === newLast - ? (newFirst = newLast = capturedUpdate) - : (newLast = newLast.next = capturedUpdate); - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current.shared, - callbacks: current.callbacks - }; - workInProgress.updateQueue = queue; - return; + function logComponentErrored(fiber, startTime, endTime, errors) { + if (supportsUserTiming) { + var name = getComponentNameFromFiber(fiber); + if (null !== name) { + for (var properties = [], i = 0; i < errors.length; i++) { + var error = errors[i].value; + properties.push([ + "Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ]); + } + performance.measure(name, { + start: startTime, + end: endTime, + detail: { + devtools: { + color: "error", + track: COMPONENTS_TRACK, + tooltipText: + 13 === fiber.tag + ? "Hydration failed" + : "Error boundary caught an error", + properties: properties + } + } + }); + } } - workInProgress = queue.lastBaseUpdate; - null === workInProgress - ? (queue.firstBaseUpdate = capturedUpdate) - : (workInProgress.next = capturedUpdate); - queue.lastBaseUpdate = capturedUpdate; } - function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } + function logComponentEffect(fiber, startTime, endTime, selfTime, errors) { + if (null !== errors) { + if ( + supportsUserTiming && + ((selfTime = getComponentNameFromFiber(fiber)), null !== selfTime) + ) { + fiber = []; + for (var i = 0; i < errors.length; i++) { + var error = errors[i].value; + fiber.push([ + "Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ]); + } + performance.measure(selfTime, { + start: startTime, + end: endTime, + detail: { + devtools: { + color: "error", + track: COMPONENTS_TRACK, + tooltipText: "A lifecycle or effect errored", + properties: fiber + } + } + }); + } + } else + (errors = getComponentNameFromFiber(fiber)), + null !== errors && + supportsUserTiming && + ((reusableComponentDevToolDetails.color = + 1 > selfTime + ? "secondary-light" + : 100 > selfTime + ? "secondary" + : 500 > selfTime + ? "secondary-dark" + : "error"), + (reusableComponentOptions.start = startTime), + (reusableComponentOptions.end = endTime), + performance.measure(errors, reusableComponentOptions)); } - function processUpdateQueue( - workInProgress, - props, - instance$jscomp$0, - renderLanes + function logRenderPhase(startTime, endTime, lanes) { + supportsUserTiming && + ((reusableLaneDevToolDetails.color = + (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"), + (reusableLaneOptions.start = startTime), + (reusableLaneOptions.end = endTime), + performance.measure( + (lanes & 536870912) === lanes + ? "Prepared" + : (lanes & 201326741) === lanes + ? "Hydrated" + : "Render", + reusableLaneOptions + )); + } + function logSuspendedRenderPhase(startTime, endTime, lanes) { + supportsUserTiming && + ((reusableLaneDevToolDetails.color = + (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"), + (reusableLaneOptions.start = startTime), + (reusableLaneOptions.end = endTime), + performance.measure("Prewarm", reusableLaneOptions)); + } + function logSuspendedWithDelayPhase(startTime, endTime, lanes) { + supportsUserTiming && + ((reusableLaneDevToolDetails.color = + (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"), + (reusableLaneOptions.start = startTime), + (reusableLaneOptions.end = endTime), + performance.measure("Suspended", reusableLaneOptions)); + } + function logRecoveredRenderPhase( + startTime, + endTime, + lanes, + recoverableErrors, + hydrationFailed ) { - didReadFromEntangledAsyncAction = !1; - var queue = workInProgress.updateQueue; - hasForceUpdate = !1; - currentlyProcessingQueue = queue.shared; - var firstBaseUpdate = queue.firstBaseUpdate, - lastBaseUpdate = queue.lastBaseUpdate, - pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, - firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate - ? (firstBaseUpdate = firstPendingUpdate) - : (lastBaseUpdate.next = firstPendingUpdate); - lastBaseUpdate = lastPendingUpdate; - var current = workInProgress.alternate; - null !== current && - ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && - (null === pendingQueue - ? (current.firstBaseUpdate = firstPendingUpdate) - : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, - isHiddenUpdate = updateLane !== pendingQueue.lane; - if ( - isHiddenUpdate - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - 0 !== updateLane && - updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - null !== current && - (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - updateLane = workInProgress; - var partialState = pendingQueue; - var nextProps = props, - instance = instance$jscomp$0; - switch (partialState.tag) { - case ReplaceState: - partialState = partialState.payload; - if ("function" === typeof partialState) { - isDisallowedContextReadInDEV = !0; - var nextState = partialState.call( - instance, - newState, - nextProps - ); - if (updateLane.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - partialState.call(instance, newState, nextProps); - } finally { - setIsStrictModeForDevtools(!1); - } - } - isDisallowedContextReadInDEV = !1; - newState = nextState; - break a; - } - newState = partialState; - break a; - case CaptureUpdate: - updateLane.flags = (updateLane.flags & -65537) | 128; - case UpdateState: - nextState = partialState.payload; - if ("function" === typeof nextState) { - isDisallowedContextReadInDEV = !0; - partialState = nextState.call( - instance, - newState, - nextProps - ); - if (updateLane.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - nextState.call(instance, newState, nextProps); - } finally { - setIsStrictModeForDevtools(!1); - } - } - isDisallowedContextReadInDEV = !1; - } else partialState = nextState; - if (null === partialState || void 0 === partialState) break a; - newState = assign({}, newState, partialState); - break a; - case ForceUpdate: - hasForceUpdate = !0; - } + if (supportsUserTiming) { + lanes = []; + for (var i = 0; i < recoverableErrors.length; i++) { + var error = recoverableErrors[i].value; + lanes.push([ + "Recoverable Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ]); + } + performance.measure("Recovered", { + start: startTime, + end: endTime, + detail: { + devtools: { + color: "primary-dark", + track: reusableLaneDevToolDetails.track, + trackGroup: LANES_TRACK_GROUP, + tooltipText: hydrationFailed + ? "Hydration Failed" + : "Recovered after Error", + properties: lanes } - updateLane = pendingQueue.callback; - null !== updateLane && - ((workInProgress.flags |= 64), - isHiddenUpdate && (workInProgress.flags |= 8192), - (isHiddenUpdate = queue.callbacks), - null === isHiddenUpdate - ? (queue.callbacks = [updateLane]) - : isHiddenUpdate.push(updateLane)); - } else - (isHiddenUpdate = { - lane: updateLane, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: pendingQueue.callback, - next: null - }), - null === current - ? ((firstPendingUpdate = current = isHiddenUpdate), - (lastPendingUpdate = newState)) - : (current = current.next = isHiddenUpdate), - (lastBaseUpdate |= updateLane); - pendingQueue = pendingQueue.next; - if (null === pendingQueue) - if (((pendingQueue = queue.shared.pending), null === pendingQueue)) - break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress.lanes = lastBaseUpdate; - workInProgress.memoizedState = newState; + } + }); } - currentlyProcessingQueue = null; } - function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error( - "Invalid argument passed as callback. Expected a function. Instead received: " + - callback - ); - callback.call(context); + function logErroredRenderPhase(startTime, endTime) { + supportsUserTiming && + ((reusableLaneDevToolDetails.color = "error"), + (reusableLaneOptions.start = startTime), + (reusableLaneOptions.end = endTime), + performance.measure("Errored", reusableLaneOptions)); } - function commitHiddenCallbacks(updateQueue, context) { - var hiddenCallbacks = updateQueue.shared.hiddenCallbacks; - if (null !== hiddenCallbacks) - for ( - updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; - updateQueue < hiddenCallbacks.length; - updateQueue++ - ) - callCallback(hiddenCallbacks[updateQueue], context); + function logSuspenseThrottlePhase(startTime, endTime) { + supportsUserTiming && + ((reusableLaneDevToolDetails.color = "secondary-light"), + (reusableLaneOptions.start = startTime), + (reusableLaneOptions.end = endTime), + performance.measure("Throttled", reusableLaneOptions)); } - function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); + function logSuspendedCommitPhase(startTime, endTime) { + supportsUserTiming && + ((reusableLaneDevToolDetails.color = "secondary-light"), + (reusableLaneOptions.start = startTime), + (reusableLaneOptions.end = endTime), + performance.measure("Suspended", reusableLaneOptions)); } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; + function logCommitErrored(startTime, endTime, errors, passive) { + if (supportsUserTiming) { + for (var properties = [], i = 0; i < errors.length; i++) { + var error = errors[i].value; + properties.push([ + "Error", + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error) + ]); + } + performance.measure("Errored", { + start: startTime, + end: endTime, + detail: { + devtools: { + color: "error", + track: reusableLaneDevToolDetails.track, + trackGroup: LANES_TRACK_GROUP, + tooltipText: passive + ? "Remaining Effects Errored" + : "Commit Errored", + properties: properties + } + } + }); + } } - function retainCache(cache) { - cache.controller.signal.aborted && - console.warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - console.warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + push(rendererCursorDEV, context._currentRenderer, providerFiber); + void 0 !== context._currentRenderer && + null !== context._currentRenderer && + context._currentRenderer !== rendererSigil && + console.error( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." ); - 0 === cache.refCount && - scheduleCallback$2(NormalPriority, function () { - cache.controller.abort(); - }); + context._currentRenderer = rendererSigil; } - function warnOnInvalidCallback(callback) { - if (null !== callback && "function" !== typeof callback) { - var key = String(callback); - didWarnOnInvalidCallback.has(key) || - (didWarnOnInvalidCallback.add(key), - console.error( - "Expected the last optional `callback` argument to be a function. Instead received: %s.", - callback - )); - } + function popProvider(context, providerFiber) { + context._currentValue = valueCursor.current; + var currentRenderer = rendererCursorDEV.current; + pop(rendererCursorDEV, providerFiber); + context._currentRenderer = currentRenderer; + pop(valueCursor, providerFiber); } - function applyDerivedStateFromProps( - workInProgress, - ctor, - getDerivedStateFromProps, - nextProps + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot ) { - var prevState = workInProgress.memoizedState, - partialState = getDerivedStateFromProps(nextProps, prevState); - if (workInProgress.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - partialState = getDerivedStateFromProps(nextProps, prevState); - } finally { - setIsStrictModeForDevtools(!1); - } + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; } - void 0 === partialState && - ((ctor = getComponentNameFromType(ctor) || "Component"), - didWarnAboutUndefinedDerivedState.has(ctor) || - (didWarnAboutUndefinedDerivedState.add(ctor), - console.error( - "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", - ctor - ))); - prevState = - null === partialState || void 0 === partialState - ? prevState - : assign({}, prevState, partialState); - workInProgress.memoizedState = prevState; - 0 === workInProgress.lanes && - (workInProgress.updateQueue.baseState = prevState); + parent !== propagationRoot && + console.error( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); } - function checkShouldComponentUpdate( + function propagateContextChanges( workInProgress, - ctor, - oldProps, - newProps, - oldState, - newState, - nextContext + contexts, + renderLanes, + forcePropagateEntireTree ) { - var instance = workInProgress.stateNode; - if ("function" === typeof instance.shouldComponentUpdate) { - oldProps = instance.shouldComponentUpdate( - newProps, - newState, - nextContext - ); - if (workInProgress.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - oldProps = instance.shouldComponentUpdate( - newProps, - newState, - nextContext - ); - } finally { - setIsStrictModeForDevtools(!1); + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; } - } - void 0 === oldProps && - console.error( - "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", - getComponentNameFromType(ctor) || "Component" + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress ); - return oldProps; + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } - return ctor.prototype && ctor.prototype.isPureReactComponent - ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) - : !0; } - function callComponentWillReceiveProps( + function propagateParentContextChanges( + current, workInProgress, - instance, - newProps, - nextContext + renderLanes, + forcePropagateEntireTree ) { - var oldState = instance.state; - "function" === typeof instance.componentWillReceiveProps && - instance.componentWillReceiveProps(newProps, nextContext); - "function" === typeof instance.UNSAFE_componentWillReceiveProps && - instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); - instance.state !== oldState && - ((workInProgress = - getComponentNameFromFiber(workInProgress) || "Component"), - didWarnAboutStateAssignmentForComponent.has(workInProgress) || - (didWarnAboutStateAssignmentForComponent.add(workInProgress), - console.error( - "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", - workInProgress - )), - classComponentUpdater.enqueueReplaceState( - instance, - instance.state, - null - )); - } - function resolveClassComponentProps(Component, baseProps) { - var newProps = baseProps; - if ("ref" in baseProps) { - newProps = {}; - for (var propName in baseProps) - "ref" !== propName && (newProps[propName] = baseProps[propName]); + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; + + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); + } + parent = parent.return; } - if ((Component = Component.defaultProps)) { - newProps === baseProps && (newProps = assign({}, newProps)); - for (var _propName in Component) - void 0 === newProps[_propName] && - (newProps[_propName] = Component[_propName]); + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; + } + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; } - return newProps; + return !1; } - function getTreeId() { - var overflow = treeContextOverflow, - idWithLeadingBit = treeContextId; - return ( - ( - idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1)) - ).toString(32) + overflow - ); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function pushTreeFork(workInProgress, totalChildren) { - warnIfNotHydrating(); - forkStack[forkStackIndex++] = treeForkCount; - forkStack[forkStackIndex++] = treeForkProvider; - treeForkProvider = workInProgress; - treeForkCount = totalChildren; + function readContext(context) { + isDisallowedContextReadInDEV && + console.error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function pushTreeId(workInProgress, totalChildren, index) { - warnIfNotHydrating(); - idStack[idStackIndex++] = treeContextId; - idStack[idStackIndex++] = treeContextOverflow; - idStack[idStackIndex++] = treeContextProvider; - treeContextProvider = workInProgress; - var baseIdWithLeadingBit = treeContextId; - workInProgress = treeContextOverflow; - var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1; - baseIdWithLeadingBit &= ~(1 << baseLength); - index += 1; - var length = 32 - clz32(totalChildren) + baseLength; - if (30 < length) { - var numberOfOverflowBits = baseLength - (baseLength % 5); - length = ( - baseIdWithLeadingBit & - ((1 << numberOfOverflowBits) - 1) - ).toString(32); - baseIdWithLeadingBit >>= numberOfOverflowBits; - baseLength -= numberOfOverflowBits; - treeContextId = - (1 << (32 - clz32(totalChildren) + baseLength)) | - (index << baseLength) | - baseIdWithLeadingBit; - treeContextOverflow = length + workInProgress; - } else - (treeContextId = - (1 << length) | (index << baseLength) | baseIdWithLeadingBit), - (treeContextOverflow = workInProgress); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } - function pushMaterializedTreeId(workInProgress) { - warnIfNotHydrating(); - null !== workInProgress.return && - (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0)); + function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; } - function popTreeContext(workInProgress) { - for (; workInProgress === treeForkProvider; ) - (treeForkProvider = forkStack[--forkStackIndex]), - (forkStack[forkStackIndex] = null), - (treeForkCount = forkStack[--forkStackIndex]), - (forkStack[forkStackIndex] = null); - for (; workInProgress === treeContextProvider; ) - (treeContextProvider = idStack[--idStackIndex]), - (idStack[idStackIndex] = null), - (treeContextOverflow = idStack[--idStackIndex]), - (idStack[idStackIndex] = null), - (treeContextId = idStack[--idStackIndex]), - (idStack[idStackIndex] = null); + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; } - function warnIfNotHydrating() { - isHydrating || - console.error( - "Expected to be hydrating. This is a bug in React. Please file an issue." + function retainCache(cache) { + cache.controller.signal.aborted && + console.warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." ); + cache.refCount++; } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + console.warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } - function noop$3() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - console.error( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop$3, noop$3), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) - thenable.then(noop$3, noop$3); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; + function startUpdateTimerByLane(lane) { + var JSCompiler_temp; + (JSCompiler_temp = 0 !== (lane & 3)) || + (JSCompiler_temp = 0 !== (lane & 60)); + if (JSCompiler_temp) + 0 > blockingUpdateTime && + ((blockingUpdateTime = now()), + (executionContext & (RenderContext | CommitContext)) !== NoContext && + (blockingSpawnedUpdate = !0), + (lane = resolveEventTimeStamp()), + (JSCompiler_temp = resolveEventType()), + lane !== blockingEventTime || JSCompiler_temp !== blockingEventType + ? (blockingEventIsRepeat = !1) + : null !== JSCompiler_temp && (blockingSpawnedUpdate = !0), + (blockingEventTime = lane), + (blockingEventType = JSCompiler_temp)); + else if ( + 0 !== (lane & 4194048) && + 0 > transitionUpdateTime && + ((transitionUpdateTime = now()), 0 > transitionStartTime) + ) { + lane = resolveEventTimeStamp(); + JSCompiler_temp = resolveEventType(); + if ( + lane !== transitionEventTime || + JSCompiler_temp !== transitionEventType + ) + transitionEventIsRepeat = !1; + transitionEventTime = lane; + transitionEventType = JSCompiler_temp; } } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; } - function pushHiddenContext(fiber, context) { - var prevEntangledRenderLanes = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); - push(currentTreeHiddenStackCursor, context, fiber); - entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; } - function reuseHiddenContextOnStack(fiber) { - push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); - push( - currentTreeHiddenStackCursor, - currentTreeHiddenStackCursor.current, - fiber - ); + function resetComponentEffectTimers() { + componentEffectEndTime = componentEffectStartTime = -1.1; } - function popHiddenContext(fiber) { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor, fiber); - pop(prevEntangledRenderLanesCursor, fiber); + function pushComponentEffectStart() { + var prevEffectStart = componentEffectStartTime; + componentEffectStartTime = -1.1; + componentEffectDuration = -0; + return prevEffectStart; } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; + function popComponentEffectStart(prevEffectStart) { + 0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart); } - function pushTransition(offscreenWorkInProgress, prevCachePool) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + function pushComponentEffectErrors() { + var prevErrors = componentEffectErrors; + componentEffectErrors = null; + return prevErrors; } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + function startProfilerTimer(fiber) { + profilerStartTime = now(); + 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); } - function scheduleGesture( - root, - provider, - initialDirection, - rangePrevious, - rangeCurrent, - rangeNext - ) { - for (var prev = root.pendingGestures; null !== prev; ) { - if (prev.provider === provider) return prev.count++, prev; - var next = prev.next; - if (null === next) break; - prev = next; + function stopProfilerTimerIfRunningAndRecordDuration(fiber) { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + fiber.actualDuration += elapsedTime; + fiber.selfBaseDuration = elapsedTime; + profilerStartTime = -1; } - var isFlippedDirection = rangePrevious > rangeNext; - next = subscribeToGestureDirection( - provider, - rangeCurrent, - function (direction) { - isFlippedDirection && (direction = !direction); - gesture.direction !== direction && - ((gesture.direction = direction), - null === gesture.prev && - root.pendingGestures !== gesture && - ((direction = root.pendingGestures), - (gesture.next = direction), - null !== direction && (direction.prev = gesture), - (root.pendingGestures = gesture), - (root.pendingLanes |= 64), - ensureRootIsScheduled(root))); - } - ); - var gesture = { - provider: provider, - count: 1, - direction: initialDirection, - rangePrevious: rangePrevious, - rangeCurrent: rangeCurrent, - rangeNext: rangeNext, - cancel: next, - running: null, - prev: prev, - next: null - }; - null === prev ? (root.pendingGestures = gesture) : (prev.next = gesture); - ensureRootIsScheduled(root); - return gesture; } - function deleteScheduledGesture(root, gesture) { - null === gesture.prev - ? (root.pendingGestures === gesture && - ((root.pendingGestures = gesture.next), - null === root.pendingGestures && (root.pendingLanes &= -65)), - root.stoppingGestures === gesture && - (root.stoppingGestures = gesture.next)) - : ((gesture.prev.next = gesture.next), - null !== gesture.next && (gesture.next.prev = gesture.prev), - (gesture.prev = null), - (gesture.next = null)); + function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + fiber.actualDuration += elapsedTime; + profilerStartTime = -1; + } } - function stopCompletedGestures(root) { - var gesture = root.stoppingGestures; - for (root.stoppingGestures = null; null !== gesture; ) - null !== gesture.running && - (gesture.running.skipTransition(), (gesture.running = null)), - (root = gesture.next), - (gesture.next = null), - (gesture.prev = null), - (gesture = root); + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var endTime = now(), + elapsedTime = endTime - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; + componentEffectDuration += elapsedTime; + componentEffectEndTime = endTime; + } } - function mountHookTypesDev() { - var hookName = currentHookNameInDev; - null === hookTypesDev - ? (hookTypesDev = [hookName]) - : hookTypesDev.push(hookName); + function recordEffectError(errorInfo) { + null === componentEffectErrors && (componentEffectErrors = []); + componentEffectErrors.push(errorInfo); + null === commitErrors && (commitErrors = []); + commitErrors.push(errorInfo); } - function updateHookTypesDev() { - var hookName = currentHookNameInDev; + function startEffectTimer() { + profilerStartTime = now(); + 0 > componentEffectStartTime && + (componentEffectStartTime = profilerStartTime); + } + function transferActualDuration(fiber) { + for (var child = fiber.child; child; ) + (fiber.actualDuration += child.actualDuration), (child = child.sibling); + } + function entangleAsyncAction(transition, thenable) { + if (null === currentEntangledListeners) { + var entangledListeners = (currentEntangledListeners = []); + currentEntangledPendingCount = 0; + currentEntangledLane = requestTransitionLane(); + currentEntangledActionThenable = { + status: "pending", + value: void 0, + then: function (resolve) { + entangledListeners.push(resolve); + } + }; + } + currentEntangledPendingCount++; + thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); + return thenable; + } + function pingEngtangledActionScope() { if ( - null !== hookTypesDev && - (hookTypesUpdateIndexDev++, - hookTypesDev[hookTypesUpdateIndexDev] !== hookName) + 0 === --currentEntangledPendingCount && + (-1 < transitionUpdateTime || (transitionStartTime = -1.1), + null !== currentEntangledListeners) ) { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber); - if ( - !didWarnAboutMismatchedHooksForComponent.has(componentName) && - (didWarnAboutMismatchedHooksForComponent.add(componentName), - null !== hookTypesDev) - ) { - for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { - var oldHookName = hookTypesDev[i], - newHookName = - i === hookTypesUpdateIndexDev ? hookName : oldHookName; - for ( - oldHookName = i + 1 + ". " + oldHookName; - 30 > oldHookName.length; - - ) - oldHookName += " "; - oldHookName += newHookName + "\n"; - table += oldHookName; + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } + } + function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); } - console.error( - "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - componentName, - table - ); + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); } - } + ); + return thenableWithOverride; } - function checkDepsAreArrayDev(deps) { - void 0 === deps || - null === deps || - isArrayImpl(deps) || - console.error( - "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", - currentHookNameInDev, - typeof deps - ); + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } - function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber); - didWarnAboutUseFormState.has(componentName) || - (didWarnAboutUseFormState.add(componentName), - console.error( - "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.", - componentName - )); + function pushTransition(offscreenWorkInProgress, prevCachePool) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); } - function throwInvalidHookError() { - throw Error( - "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." - ); + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; } - function areHookInputsEqual(nextDeps, prevDeps) { - if (ignorePreviousDependencies) return !1; - if (null === prevDeps) - return ( - console.error( - "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", - currentHookNameInDev - ), - !1 - ); - nextDeps.length !== prevDeps.length && - console.error( - "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", - currentHookNameInDev, - "[" + prevDeps.join(", ") + "]", - "[" + nextDeps.join(", ") + "]" - ); - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) - if (!objectIs(nextDeps[i], prevDeps[i])) return !1; - return !0; + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; } - function renderWithHooks( - current, - workInProgress, - Component, - props, - secondArg, - nextRenderLanes - ) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber = workInProgress; - hookTypesDev = null !== current ? current._debugHookTypes : null; - hookTypesUpdateIndexDev = -1; - ignorePreviousDependencies = - null !== current && current.type !== workInProgress.type; - if ( - "[object AsyncFunction]" === - Object.prototype.toString.call(Component) || - "[object AsyncGeneratorFunction]" === - Object.prototype.toString.call(Component) - ) - (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), - didWarnAboutAsyncClientComponent.has(nextRenderLanes) || - (didWarnAboutAsyncClientComponent.add(nextRenderLanes), + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop$3() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), console.error( - "%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.", - null === nextRenderLanes - ? "An unknown Component" - : "<" + nextRenderLanes + ">" - )); - workInProgress.memoizedState = null; - workInProgress.updateQueue = null; - workInProgress.lanes = 0; - ReactSharedInternals.H = - null !== current && null !== current.memoizedState - ? HooksDispatcherOnUpdateInDEV - : null !== hookTypesDev - ? HooksDispatcherOnMountWithHookTypesInDEV - : HooksDispatcherOnMountInDEV; - shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = - (workInProgress.mode & StrictLegacyMode) !== NoMode; - var children = callComponentInDEV(Component, props, secondArg); - shouldDoubleInvokeUserFnsInHooksDEV = !1; - didScheduleRenderPhaseUpdateDuringThisPass && - (children = renderWithHooksAgain( - workInProgress, - Component, - props, - secondArg - )); - if (nextRenderLanes) { - setIsStrictModeForDevtools(!0); - try { - children = renderWithHooksAgain( - workInProgress, - Component, - props, - secondArg + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop$3, noop$3), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) ); - } finally { - setIsStrictModeForDevtools(!1); - } + default: + if ("string" === typeof thenable.status) + thenable.then(noop$3, noop$3); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; } - finishRenderingHooks(current, workInProgress); - return children; } - function finishRenderingHooks(current, workInProgress) { - workInProgress._debugHookTypes = hookTypesDev; - null === workInProgress.dependencies - ? null !== thenableState$1 && - (workInProgress.dependencies = { - lanes: 0, - firstContext: null, - _debugThenableState: thenableState$1 - }) - : (workInProgress.dependencies._debugThenableState = thenableState$1); - ReactSharedInternals.H = ContextOnlyDispatcher; - var didRenderTooFewHooks = - null !== currentHook && null !== currentHook.next; - renderLanes = 0; - hookTypesDev = - currentHookNameInDev = - workInProgressHook = - currentHook = - currentlyRenderingFiber = - null; - hookTypesUpdateIndexDev = -1; - null !== current && - (current.flags & 65011712) !== (workInProgress.flags & 65011712) && - console.error( - "Internal React error: Expected static flag was missing. Please notify the React team." + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." ); - didScheduleRenderPhaseUpdate = !1; - thenableIndexCounter$1 = 0; - thenableState$1 = null; - if (didRenderTooFewHooks) + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) throw Error( - "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." ); - null === current || - didReceiveUpdate || - ((current = current.dependencies), - null !== current && - checkIfContextChanged(current) && - (didReceiveUpdate = !0)); - needsToResetSuspendedThenableDEV - ? ((needsToResetSuspendedThenableDEV = !1), (current = !0)) - : (current = !1); - current && - ((workInProgress = - getComponentNameFromFiber(workInProgress) || "Unknown"), - didWarnAboutUseWrappedInTryCatch.has(workInProgress) || - didWarnAboutAsyncClientComponent.has(workInProgress) || - (didWarnAboutUseWrappedInTryCatch.add(workInProgress), - console.error( - "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary." - ))); } - function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber = workInProgress; - var numberOfReRenders = 0; - do { - didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); - thenableIndexCounter$1 = 0; - didScheduleRenderPhaseUpdateDuringThisPass = !1; - if (numberOfReRenders >= RE_RENDER_LIMIT) - throw Error( - "Too many re-renders. React limits the number of renders to prevent an infinite loop." - ); - numberOfReRenders += 1; - ignorePreviousDependencies = !1; - workInProgressHook = currentHook = null; - if (null != workInProgress.updateQueue) { - var children = workInProgress.updateQueue; - children.lastEffect = null; - children.events = null; - children.stores = null; - null != children.memoCache && (children.memoCache.index = 0); - } - hookTypesUpdateIndexDev = -1; - ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; - children = callComponentInDEV(Component, props, secondArg); - } while (didScheduleRenderPhaseUpdateDuringThisPass); - return children; + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; } - function TransitionAwareHostComponent() { - var dispatcher = ReactSharedInternals.H, - maybeThenable = dispatcher.useState()[0]; - maybeThenable = - "function" === typeof maybeThenable.then - ? useThenable(maybeThenable) - : maybeThenable; - dispatcher = dispatcher.useState()[0]; - (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber.flags |= 1024); - return maybeThenable; + function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); } - function checkDidRenderIdHook() { - var didRenderIdHook = 0 !== localIdCounter; - localIdCounter = 0; - return didRenderIdHook; - } - function bailoutHooks(current, workInProgress, lanes) { - workInProgress.updateQueue = current.updateQueue; - workInProgress.flags = - (workInProgress.mode & StrictEffectsMode) !== NoMode - ? workInProgress.flags & -402655237 - : workInProgress.flags & -2053; - current.lanes &= ~lanes; - } - function resetHooksOnUnwind(workInProgress) { - if (didScheduleRenderPhaseUpdate) { - for ( - workInProgress = workInProgress.memoizedState; - null !== workInProgress; - - ) { - var queue = workInProgress.queue; - null !== queue && (queue.pending = null); - workInProgress = workInProgress.next; - } - didScheduleRenderPhaseUpdate = !1; - } - renderLanes = 0; - hookTypesDev = - workInProgressHook = - currentHook = - currentlyRenderingFiber = - null; - hookTypesUpdateIndexDev = -1; - currentHookNameInDev = null; - didScheduleRenderPhaseUpdateDuringThisPass = !1; - thenableIndexCounter$1 = localIdCounter = 0; - thenableState$1 = null; - } - function mountWorkInProgressHook() { - var hook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, + function createUpdate(lane) { + return { + lane: lane, + tag: UpdateState, + payload: null, + callback: null, next: null }; - null === workInProgressHook - ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) - : (workInProgressHook = workInProgressHook.next = hook); - return workInProgressHook; } - function updateWorkInProgressHook() { - if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber.alternate; - nextCurrentHook = - null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; - } else nextCurrentHook = currentHook.next; - var nextWorkInProgressHook = - null === workInProgressHook - ? currentlyRenderingFiber.memoizedState - : workInProgressHook.next; - if (null !== nextWorkInProgressHook) - (workInProgressHook = nextWorkInProgressHook), - (currentHook = nextCurrentHook); - else { - if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber.alternate) - throw Error( - "Update hook called on initial render. This is likely a bug in React. Please file an issue." - ); - throw Error("Rendered more hooks than during the previous render."); - } - currentHook = nextCurrentHook; - nextCurrentHook = { - memoizedState: currentHook.memoizedState, - baseState: currentHook.baseState, - baseQueue: currentHook.baseQueue, - queue: currentHook.queue, - next: null - }; - null === workInProgressHook - ? (currentlyRenderingFiber.memoizedState = workInProgressHook = - nextCurrentHook) - : (workInProgressHook = workInProgressHook.next = nextCurrentHook); + function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if ( + currentlyProcessingQueue === updateQueue && + !didWarnUpdateInsideUpdate + ) { + var componentName = getComponentNameFromFiber(fiber); + console.error( + "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", + componentName + ); + didWarnUpdateInsideUpdate = !0; } - return workInProgressHook; + if ((executionContext & RenderContext) !== NoContext) + return ( + (componentName = updateQueue.pending), + null === componentName + ? (update.next = update) + : ((update.next = componentName.next), + (componentName.next = update)), + (updateQueue.pending = update), + (update = getRootForUpdatedFiber(fiber)), + markUpdateLaneFromFiberToRoot(fiber, null, lane), + update + ); + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); } - function createFunctionComponentUpdateQueue() { - return { lastEffect: null, events: null, stores: null, memoCache: null }; + function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } } - function useThenable(thenable) { - var index = thenableIndexCounter$1; - thenableIndexCounter$1 += 1; - null === thenableState$1 && (thenableState$1 = createThenableState()); - thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber; - null === - (null === workInProgressHook - ? index.memoizedState - : workInProgressHook.next) && - ((index = index.alternate), - (ReactSharedInternals.H = - null !== index && null !== index.memoizedState - ? HooksDispatcherOnUpdateInDEV - : HooksDispatcherOnMountInDEV)); - return thenable; + function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { + do { + var clone = { + lane: queue.lane, + tag: queue.tag, + payload: queue.payload, + callback: null, + next: null + }; + null === newLast + ? (newFirst = newLast = clone) + : (newLast = newLast.next = clone); + queue = queue.next; + } while (null !== queue); + null === newLast + ? (newFirst = newLast = capturedUpdate) + : (newLast = newLast.next = capturedUpdate); + } else newFirst = newLast = capturedUpdate; + queue = { + baseState: current.baseState, + firstBaseUpdate: newFirst, + lastBaseUpdate: newLast, + shared: current.shared, + callbacks: current.callbacks + }; + workInProgress.updateQueue = queue; + return; + } + workInProgress = queue.lastBaseUpdate; + null === workInProgress + ? (queue.firstBaseUpdate = capturedUpdate) + : (workInProgress.next = capturedUpdate); + queue.lastBaseUpdate = capturedUpdate; } - function use(usable) { - if (null !== usable && "object" === typeof usable) { - if ("function" === typeof usable.then) return useThenable(usable); - if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable); + function suspendIfUpdateReadFromEntangledAsyncAction() { + if (didReadFromEntangledAsyncAction) { + var entangledActionThenable = currentEntangledActionThenable; + if (null !== entangledActionThenable) throw entangledActionThenable; } - throw Error("An unsupported type was passed to use(): " + String(usable)); } - function useMemoCache(size) { - var memoCache = null, - updateQueue = currentlyRenderingFiber.updateQueue; - null !== updateQueue && (memoCache = updateQueue.memoCache); - if (null == memoCache) { - var current = currentlyRenderingFiber.alternate; + function processUpdateQueue( + workInProgress, + props, + instance$jscomp$0, + renderLanes + ) { + didReadFromEntangledAsyncAction = !1; + var queue = workInProgress.updateQueue; + hasForceUpdate = !1; + currentlyProcessingQueue = queue.shared; + var firstBaseUpdate = queue.firstBaseUpdate, + lastBaseUpdate = queue.lastBaseUpdate, + pendingQueue = queue.shared.pending; + if (null !== pendingQueue) { + queue.shared.pending = null; + var lastPendingUpdate = pendingQueue, + firstPendingUpdate = lastPendingUpdate.next; + lastPendingUpdate.next = null; + null === lastBaseUpdate + ? (firstBaseUpdate = firstPendingUpdate) + : (lastBaseUpdate.next = firstPendingUpdate); + lastBaseUpdate = lastPendingUpdate; + var current = workInProgress.alternate; null !== current && ((current = current.updateQueue), - null !== current && - ((current = current.memoCache), - null != current && - (memoCache = { - data: current.data.map(function (array) { - return array.slice(); - }), - index: 0 - }))); + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && + (null === pendingQueue + ? (current.firstBaseUpdate = firstPendingUpdate) + : (pendingQueue.next = firstPendingUpdate), + (current.lastBaseUpdate = lastPendingUpdate))); } - null == memoCache && (memoCache = { data: [], index: 0 }); - null === updateQueue && - ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber.updateQueue = updateQueue)); - updateQueue.memoCache = memoCache; - updateQueue = memoCache.data[memoCache.index]; - if (void 0 === updateQueue || ignorePreviousDependencies) - for ( - updateQueue = memoCache.data[memoCache.index] = Array(size), - current = 0; - current < size; - current++ - ) - updateQueue[current] = REACT_MEMO_CACHE_SENTINEL; - else - updateQueue.length !== size && - console.error( - "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.", - updateQueue.length, - size - ); - memoCache.index++; - return updateQueue; - } - function basicStateReducer(state, action) { - return "function" === typeof action ? action(state) : action; - } - function mountReducer(reducer, initialArg, init) { - var hook = mountWorkInProgressHook(); - if (void 0 !== init) { - var initialState = init(initialArg); - if (shouldDoubleInvokeUserFnsInHooksDEV) { - setIsStrictModeForDevtools(!0); - try { - init(initialArg); - } finally { - setIsStrictModeForDevtools(!1); - } - } - } else initialState = initialArg; - hook.memoizedState = hook.baseState = initialState; - reducer = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: reducer, - lastRenderedState: initialState - }; - hook.queue = reducer; - reducer = reducer.dispatch = dispatchReducerAction.bind( - null, - currentlyRenderingFiber, - reducer - ); - return [hook.memoizedState, reducer]; - } - function updateReducer(reducer) { - var hook = updateWorkInProgressHook(); - return updateReducerImpl(hook, currentHook, reducer); - } - function updateReducerImpl(hook, current, reducer) { - var queue = hook.queue; - if (null === queue) - throw Error( - "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)" - ); - queue.lastRenderedReducer = reducer; - var baseQueue = hook.baseQueue, - pendingQueue = queue.pending; - if (null !== pendingQueue) { - if (null !== baseQueue) { - var baseFirst = baseQueue.next; - baseQueue.next = pendingQueue.next; - pendingQueue.next = baseFirst; - } - current.baseQueue !== baseQueue && - console.error( - "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React." - ); - current.baseQueue = baseQueue = pendingQueue; - queue.pending = null; - } - pendingQueue = hook.baseState; - if (null === baseQueue) hook.memoizedState = pendingQueue; - else { - current = baseQueue.next; - var newBaseQueueFirst = (baseFirst = null), - newBaseQueueLast = null, - update = current, - didReadFromEntangledAsyncAction = !1; + if (null !== firstBaseUpdate) { + var newState = queue.baseState; + lastBaseUpdate = 0; + current = firstPendingUpdate = lastPendingUpdate = null; + pendingQueue = firstBaseUpdate; do { - var updateLane = update.lane & -536870913; + var updateLane = pendingQueue.lane & -536870913, + isHiddenUpdate = updateLane !== pendingQueue.lane; if ( - updateLane !== update.lane + isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane ) { - var revertLane = update.revertLane; - if (0 === revertLane) - null !== newBaseQueueLast && - (newBaseQueueLast = newBaseQueueLast.next = - { - lane: 0, - revertLane: 0, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), - updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - else if ((renderLanes & revertLane) === revertLane) { - update = update.next; - revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - continue; - } else - (updateLane = { - lane: 0, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), - null === newBaseQueueLast - ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), - (baseFirst = pendingQueue)) - : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber.lanes |= revertLane), - (workInProgressRootSkippedLanes |= revertLane); - updateLane = update.action; - shouldDoubleInvokeUserFnsInHooksDEV && - reducer(pendingQueue, updateLane); - pendingQueue = update.hasEagerState - ? update.eagerState - : reducer(pendingQueue, updateLane); + 0 !== updateLane && + updateLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + null !== current && + (current = current.next = + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); + a: { + updateLane = workInProgress; + var partialState = pendingQueue; + var nextProps = props, + instance = instance$jscomp$0; + switch (partialState.tag) { + case ReplaceState: + partialState = partialState.payload; + if ("function" === typeof partialState) { + isDisallowedContextReadInDEV = !0; + var nextState = partialState.call( + instance, + newState, + nextProps + ); + if (updateLane.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + partialState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } + isDisallowedContextReadInDEV = !1; + newState = nextState; + break a; + } + newState = partialState; + break a; + case CaptureUpdate: + updateLane.flags = (updateLane.flags & -65537) | 128; + case UpdateState: + nextState = partialState.payload; + if ("function" === typeof nextState) { + isDisallowedContextReadInDEV = !0; + partialState = nextState.call( + instance, + newState, + nextProps + ); + if (updateLane.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + nextState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } + isDisallowedContextReadInDEV = !1; + } else partialState = nextState; + if (null === partialState || void 0 === partialState) break a; + newState = assign({}, newState, partialState); + break a; + case ForceUpdate: + hasForceUpdate = !0; + } + } + updateLane = pendingQueue.callback; + null !== updateLane && + ((workInProgress.flags |= 64), + isHiddenUpdate && (workInProgress.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); } else - (revertLane = { + (isHiddenUpdate = { lane: updateLane, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: pendingQueue.callback, next: null }), - null === newBaseQueueLast - ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), - (baseFirst = pendingQueue)) - : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber.lanes |= updateLane), - (workInProgressRootSkippedLanes |= updateLane); - update = update.next; - } while (null !== update && update !== current); - null === newBaseQueueLast - ? (baseFirst = pendingQueue) - : (newBaseQueueLast.next = newBaseQueueFirst); - if ( - !objectIs(pendingQueue, hook.memoizedState) && - ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction && - ((reducer = currentEntangledActionThenable), null !== reducer)) - ) - throw reducer; - hook.memoizedState = pendingQueue; - hook.baseState = baseFirst; - hook.baseQueue = newBaseQueueLast; - queue.lastRenderedState = pendingQueue; + null === current + ? ((firstPendingUpdate = current = isHiddenUpdate), + (lastPendingUpdate = newState)) + : (current = current.next = isHiddenUpdate), + (lastBaseUpdate |= updateLane); + pendingQueue = pendingQueue.next; + if (null === pendingQueue) + if (((pendingQueue = queue.shared.pending), null === pendingQueue)) + break; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress.lanes = lastBaseUpdate; + workInProgress.memoizedState = newState; } - null === baseQueue && (queue.lanes = 0); - return [hook.memoizedState, queue.dispatch]; + currentlyProcessingQueue = null; } - function rerenderReducer(reducer) { - var hook = updateWorkInProgressHook(), - queue = hook.queue; - if (null === queue) + function callCallback(callback, context) { + if ("function" !== typeof callback) throw Error( - "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)" + "Invalid argument passed as callback. Expected a function. Instead received: " + + callback ); - queue.lastRenderedReducer = reducer; - var dispatch = queue.dispatch, - lastRenderPhaseUpdate = queue.pending, - newState = hook.memoizedState; - if (null !== lastRenderPhaseUpdate) { - queue.pending = null; - var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next); - do - (newState = reducer(newState, update.action)), (update = update.next); - while (update !== lastRenderPhaseUpdate); - objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0); - hook.memoizedState = newState; - null === hook.baseQueue && (hook.baseState = newState); - queue.lastRenderedState = newState; - } - return [newState, dispatch]; + callback.call(context); } - function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber, - hook = mountWorkInProgressHook(); - if (isHydrating) { - if (void 0 === getServerSnapshot) - throw Error( - "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering." - ); - var nextSnapshot = getServerSnapshot(); - didWarnUncachedGetSnapshot || - nextSnapshot === getServerSnapshot() || - (console.error( - "The result of getServerSnapshot should be cached to avoid an infinite loop" - ), - (didWarnUncachedGetSnapshot = !0)); - } else { - nextSnapshot = getSnapshot(); - didWarnUncachedGetSnapshot || - ((getServerSnapshot = getSnapshot()), - objectIs(nextSnapshot, getServerSnapshot) || - (console.error( - "The result of getSnapshot should be cached to avoid an infinite loop" - ), - (didWarnUncachedGetSnapshot = !0))); - if (null === workInProgressRoot) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - 0 !== (workInProgressRootRenderLanes & 124) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - } - hook.memoizedState = nextSnapshot; - getServerSnapshot = { value: nextSnapshot, getSnapshot: getSnapshot }; - hook.queue = getServerSnapshot; - mountEffect( - subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe), - [subscribe] - ); - fiber.flags |= 2048; - pushSimpleEffect( - HasEffect | Passive, - createEffectInstance(), - updateStoreInstance.bind( - null, - fiber, - getServerSnapshot, - nextSnapshot, - getSnapshot - ), - null - ); - return nextSnapshot; + function commitHiddenCallbacks(updateQueue, context) { + var hiddenCallbacks = updateQueue.shared.hiddenCallbacks; + if (null !== hiddenCallbacks) + for ( + updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; + updateQueue < hiddenCallbacks.length; + updateQueue++ + ) + callCallback(hiddenCallbacks[updateQueue], context); } - function updateSyncExternalStore( - subscribe, - getSnapshot, - getServerSnapshot - ) { - var fiber = currentlyRenderingFiber, - hook = updateWorkInProgressHook(), - isHydrating$jscomp$0 = isHydrating; - if (isHydrating$jscomp$0) { - if (void 0 === getServerSnapshot) - throw Error( - "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering." - ); - getServerSnapshot = getServerSnapshot(); - } else if ( - ((getServerSnapshot = getSnapshot()), !didWarnUncachedGetSnapshot) - ) { - var cachedSnapshot = getSnapshot(); - objectIs(getServerSnapshot, cachedSnapshot) || - (console.error( - "The result of getSnapshot should be cached to avoid an infinite loop" - ), - (didWarnUncachedGetSnapshot = !0)); - } - if ( - (cachedSnapshot = !objectIs( - (currentHook || hook).memoizedState, - getServerSnapshot - )) - ) - (hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0); - hook = hook.queue; - var create = subscribeToStore.bind(null, fiber, hook, subscribe); - updateEffectImpl(2048, Passive, create, [subscribe]); - if ( - hook.getSnapshot !== getSnapshot || - cachedSnapshot || - (null !== workInProgressHook && - workInProgressHook.memoizedState.tag & HasEffect) - ) { - fiber.flags |= 2048; - pushSimpleEffect( - HasEffect | Passive, - createEffectInstance(), - updateStoreInstance.bind( - null, - fiber, - hook, - getServerSnapshot, - getSnapshot - ), - null - ); - if (null === workInProgressRoot) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - isHydrating$jscomp$0 || - 0 !== (renderLanes & 124) || - pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); - } - return getServerSnapshot; + function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); } - function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { - fiber.flags |= 16384; - fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber.updateQueue; - null === getSnapshot - ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber.updateQueue = getSnapshot), - (getSnapshot.stores = [fiber])) - : ((renderedSnapshot = getSnapshot.stores), - null === renderedSnapshot - ? (getSnapshot.stores = [fiber]) - : renderedSnapshot.push(fiber)); + function pushHiddenContext(fiber, context) { + var prevEntangledRenderLanes = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); + push(currentTreeHiddenStackCursor, context, fiber); + entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; } - function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) { - inst.value = nextSnapshot; - inst.getSnapshot = getSnapshot; - checkIfSnapshotChanged(inst) && forceStoreRerender(fiber); + function reuseHiddenContextOnStack(fiber) { + push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); + push( + currentTreeHiddenStackCursor, + currentTreeHiddenStackCursor.current, + fiber + ); } - function subscribeToStore(fiber, inst, subscribe) { - return subscribe(function () { - checkIfSnapshotChanged(inst) && forceStoreRerender(fiber); - }); + function popHiddenContext(fiber) { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor, fiber); + pop(prevEntangledRenderLanesCursor, fiber); } - function checkIfSnapshotChanged(inst) { - var latestGetSnapshot = inst.getSnapshot; - inst = inst.value; - try { - var nextValue = latestGetSnapshot(); - return !objectIs(inst, nextValue); - } catch (error) { - return !0; + function scheduleGesture( + root, + provider, + initialDirection, + rangePrevious, + rangeCurrent, + rangeNext + ) { + for (var prev = root.pendingGestures; null !== prev; ) { + if (prev.provider === provider) return prev.count++, prev; + var next = prev.next; + if (null === next) break; + prev = next; } - } - function forceStoreRerender(fiber) { - var root = enqueueConcurrentRenderForLane(fiber, 2); - null !== root && scheduleUpdateOnFiber(root, fiber, 2); - } - function mountStateImpl(initialState) { - var hook = mountWorkInProgressHook(); - if ("function" === typeof initialState) { - var initialStateInitializer = initialState; - initialState = initialStateInitializer(); - if (shouldDoubleInvokeUserFnsInHooksDEV) { - setIsStrictModeForDevtools(!0); - try { - initialStateInitializer(); - } finally { - setIsStrictModeForDevtools(!1); - } + var isFlippedDirection = rangePrevious > rangeNext; + next = subscribeToGestureDirection( + provider, + rangeCurrent, + function (direction) { + isFlippedDirection && (direction = !direction); + gesture.direction !== direction && + ((gesture.direction = direction), + null === gesture.prev && + root.pendingGestures !== gesture && + ((direction = root.pendingGestures), + (gesture.next = direction), + null !== direction && (direction.prev = gesture), + (root.pendingGestures = gesture), + (root.pendingLanes |= 64), + ensureRootIsScheduled(root))); } - } - hook.memoizedState = hook.baseState = initialState; - hook.queue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialState - }; - return hook; - } - function mountState(initialState) { - initialState = mountStateImpl(initialState); - var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); - queue.dispatch = dispatch; - return [initialState.memoizedState, dispatch]; - } - function mountOptimistic(passthrough) { - var hook = mountWorkInProgressHook(); - hook.memoizedState = hook.baseState = passthrough; - var queue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: null, - lastRenderedState: null - }; - hook.queue = queue; - hook = dispatchOptimisticSetState.bind( - null, - currentlyRenderingFiber, - !0, - queue ); - queue.dispatch = hook; - return [passthrough, hook]; + var gesture = { + provider: provider, + count: 1, + direction: initialDirection, + rangePrevious: rangePrevious, + rangeCurrent: rangeCurrent, + rangeNext: rangeNext, + cancel: next, + running: null, + prev: prev, + next: null + }; + null === prev ? (root.pendingGestures = gesture) : (prev.next = gesture); + ensureRootIsScheduled(root); + return gesture; } - function updateOptimistic(passthrough, reducer) { - var hook = updateWorkInProgressHook(); - return updateOptimisticImpl(hook, currentHook, passthrough, reducer); + function deleteScheduledGesture(root, gesture) { + null === gesture.prev + ? (root.pendingGestures === gesture && + ((root.pendingGestures = gesture.next), + null === root.pendingGestures && (root.pendingLanes &= -65)), + root.stoppingGestures === gesture && + (root.stoppingGestures = gesture.next)) + : ((gesture.prev.next = gesture.next), + null !== gesture.next && (gesture.next.prev = gesture.prev), + (gesture.prev = null), + (gesture.next = null)); } - function updateOptimisticImpl(hook, current, passthrough, reducer) { - hook.baseState = passthrough; - return updateReducerImpl( - hook, - currentHook, - "function" === typeof reducer ? reducer : basicStateReducer - ); + function stopCompletedGestures(root) { + var gesture = root.stoppingGestures; + for (root.stoppingGestures = null; null !== gesture; ) + null !== gesture.running && + (gesture.running.skipTransition(), (gesture.running = null)), + (root = gesture.next), + (gesture.next = null), + (gesture.prev = null), + (gesture = root); } - function rerenderOptimistic(passthrough, reducer) { - var hook = updateWorkInProgressHook(); - if (null !== currentHook) - return updateOptimisticImpl(hook, currentHook, passthrough, reducer); - hook.baseState = passthrough; - return [passthrough, hook.queue.dispatch]; + function mountHookTypesDev() { + var hookName = currentHookNameInDev; + null === hookTypesDev + ? (hookTypesDev = [hookName]) + : hookTypesDev.push(hookName); } - function dispatchActionState( - fiber, - actionQueue, - setPendingState, - setState, - payload - ) { - if (isRenderPhaseUpdate(fiber)) - throw Error("Cannot update form state while rendering."); - fiber = actionQueue.action; - if (null !== fiber) { - var actionNode = { - payload: payload, - action: fiber, - next: null, - isTransition: !0, - status: "pending", - value: null, - reason: null, - listeners: [], - then: function (listener) { - actionNode.listeners.push(listener); + function updateHookTypesDev() { + var hookName = currentHookNameInDev; + if ( + null !== hookTypesDev && + (hookTypesUpdateIndexDev++, + hookTypesDev[hookTypesUpdateIndexDev] !== hookName) + ) { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); + if ( + !didWarnAboutMismatchedHooksForComponent.has(componentName) && + (didWarnAboutMismatchedHooksForComponent.add(componentName), + null !== hookTypesDev) + ) { + for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i], + newHookName = + i === hookTypesUpdateIndexDev ? hookName : oldHookName; + for ( + oldHookName = i + 1 + ". " + oldHookName; + 30 > oldHookName.length; + + ) + oldHookName += " "; + oldHookName += newHookName + "\n"; + table += oldHookName; } - }; - null !== ReactSharedInternals.T - ? setPendingState(!0) - : (actionNode.isTransition = !1); - setState(actionNode); - setPendingState = actionQueue.pending; - null === setPendingState - ? ((actionNode.next = actionQueue.pending = actionNode), - runActionStateAction(actionQueue, actionNode)) - : ((actionNode.next = setPendingState.next), - (actionQueue.pending = setPendingState.next = actionNode)); - } - } - function runActionStateAction(actionQueue, node) { - var action = node.action, - payload = node.payload, - prevState = actionQueue.state; - if (node.isTransition) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - ReactSharedInternals.T._updatedFibers = new Set(); - try { - var returnValue = action(prevState, payload), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - handleActionReturnValue(actionQueue, node, returnValue); - } catch (error) { - onActionError(actionQueue, node, error); - } finally { - (ReactSharedInternals.T = prevTransition), - null === prevTransition && - currentTransition._updatedFibers && - ((actionQueue = currentTransition._updatedFibers.size), - currentTransition._updatedFibers.clear(), - 10 < actionQueue && - console.warn( - "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." - )); - } - } else - try { - (currentTransition = action(prevState, payload)), - handleActionReturnValue(actionQueue, node, currentTransition); - } catch (error$3) { - onActionError(actionQueue, node, error$3); + console.error( + "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + componentName, + table + ); } - } - function handleActionReturnValue(actionQueue, node, returnValue) { - null !== returnValue && - "object" === typeof returnValue && - "function" === typeof returnValue.then - ? (returnValue.then( - function (nextState) { - onActionSuccess(actionQueue, node, nextState); - }, - function (error) { - return onActionError(actionQueue, node, error); - } - ), - node.isTransition || - console.error( - "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop." - )) - : onActionSuccess(actionQueue, node, returnValue); - } - function onActionSuccess(actionQueue, actionNode, nextState) { - actionNode.status = "fulfilled"; - actionNode.value = nextState; - notifyActionListeners(actionNode); - actionQueue.state = nextState; - actionNode = actionQueue.pending; - null !== actionNode && - ((nextState = actionNode.next), - nextState === actionNode - ? (actionQueue.pending = null) - : ((nextState = nextState.next), - (actionNode.next = nextState), - runActionStateAction(actionQueue, nextState))); - } - function onActionError(actionQueue, actionNode, error) { - var last = actionQueue.pending; - actionQueue.pending = null; - if (null !== last) { - last = last.next; - do - (actionNode.status = "rejected"), - (actionNode.reason = error), - notifyActionListeners(actionNode), - (actionNode = actionNode.next); - while (actionNode !== last); } - actionQueue.action = null; } - function notifyActionListeners(actionNode) { - actionNode = actionNode.listeners; - for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); + function checkDepsAreArrayDev(deps) { + void 0 === deps || + null === deps || + isArrayImpl(deps) || + console.error( + "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", + currentHookNameInDev, + typeof deps + ); } - function actionStateReducer(oldState, newState) { - return newState; + function warnOnUseFormStateInDev() { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); + didWarnAboutUseFormState.has(componentName) || + (didWarnAboutUseFormState.add(componentName), + console.error( + "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.", + componentName + )); } - function mountActionState(action, initialStateProp) { - if (isHydrating) { - var ssrFormState = workInProgressRoot.formState; - if (null !== ssrFormState) { - a: { - var isMatching = currentlyRenderingFiber; - if (isHydrating) { - if (nextHydratableInstance) { - b: { - var markerInstance = nextHydratableInstance; - for ( - var inRootOrSingleton = rootOrSingletonContext; - 8 !== markerInstance.nodeType; - - ) { - if (!inRootOrSingleton) { - markerInstance = null; - break b; - } - markerInstance = getNextHydratable( - markerInstance.nextSibling - ); - if (null === markerInstance) { - markerInstance = null; - break b; - } - } - inRootOrSingleton = markerInstance.data; - markerInstance = - inRootOrSingleton === FORM_STATE_IS_MATCHING || - inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING - ? markerInstance - : null; - } - if (markerInstance) { - nextHydratableInstance = getNextHydratable( - markerInstance.nextSibling - ); - isMatching = markerInstance.data === FORM_STATE_IS_MATCHING; - break a; - } - } - throwOnHydrationMismatch(isMatching); - } - isMatching = !1; - } - isMatching && (initialStateProp = ssrFormState[0]); - } - } - ssrFormState = mountWorkInProgressHook(); - ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp; - isMatching = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: actionStateReducer, - lastRenderedState: initialStateProp - }; - ssrFormState.queue = isMatching; - ssrFormState = dispatchSetState.bind( - null, - currentlyRenderingFiber, - isMatching - ); - isMatching.dispatch = ssrFormState; - isMatching = mountStateImpl(!1); - inRootOrSingleton = dispatchOptimisticSetState.bind( - null, - currentlyRenderingFiber, - !1, - isMatching.queue - ); - isMatching = mountWorkInProgressHook(); - markerInstance = { - state: initialStateProp, - dispatch: null, - action: action, - pending: null - }; - isMatching.queue = markerInstance; - ssrFormState = dispatchActionState.bind( - null, - currentlyRenderingFiber, - markerInstance, - inRootOrSingleton, - ssrFormState + function throwInvalidHookError() { + throw Error( + "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." ); - markerInstance.dispatch = ssrFormState; - isMatching.memoizedState = action; - return [initialStateProp, ssrFormState, !1]; } - function updateActionState(action) { - var stateHook = updateWorkInProgressHook(); - return updateActionStateImpl(stateHook, currentHook, action); + function areHookInputsEqual(nextDeps, prevDeps) { + if (ignorePreviousDependencies) return !1; + if (null === prevDeps) + return ( + console.error( + "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", + currentHookNameInDev + ), + !1 + ); + nextDeps.length !== prevDeps.length && + console.error( + "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", + currentHookNameInDev, + "[" + prevDeps.join(", ") + "]", + "[" + nextDeps.join(", ") + "]" + ); + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) + if (!objectIs(nextDeps[i], prevDeps[i])) return !1; + return !0; } - function updateActionStateImpl(stateHook, currentStateHook, action) { - currentStateHook = updateReducerImpl( - stateHook, - currentStateHook, - actionStateReducer - )[0]; - stateHook = updateReducer(basicStateReducer)[0]; + function renderWithHooks( + current, + workInProgress, + Component, + props, + secondArg, + nextRenderLanes + ) { + renderLanes = nextRenderLanes; + currentlyRenderingFiber = workInProgress; + hookTypesDev = null !== current ? current._debugHookTypes : null; + hookTypesUpdateIndexDev = -1; + ignorePreviousDependencies = + null !== current && current.type !== workInProgress.type; if ( - "object" === typeof currentStateHook && - null !== currentStateHook && - "function" === typeof currentStateHook.then + "[object AsyncFunction]" === + Object.prototype.toString.call(Component) || + "[object AsyncGeneratorFunction]" === + Object.prototype.toString.call(Component) ) + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), + didWarnAboutAsyncClientComponent.has(nextRenderLanes) || + (didWarnAboutAsyncClientComponent.add(nextRenderLanes), + console.error( + "%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.", + null === nextRenderLanes + ? "An unknown Component" + : "<" + nextRenderLanes + ">" + )); + workInProgress.memoizedState = null; + workInProgress.updateQueue = null; + workInProgress.lanes = 0; + ReactSharedInternals.H = + null !== current && null !== current.memoizedState + ? HooksDispatcherOnUpdateInDEV + : null !== hookTypesDev + ? HooksDispatcherOnMountWithHookTypesInDEV + : HooksDispatcherOnMountInDEV; + shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = + (workInProgress.mode & StrictLegacyMode) !== NoMode; + var children = callComponentInDEV(Component, props, secondArg); + shouldDoubleInvokeUserFnsInHooksDEV = !1; + didScheduleRenderPhaseUpdateDuringThisPass && + (children = renderWithHooksAgain( + workInProgress, + Component, + props, + secondArg + )); + if (nextRenderLanes) { + setIsStrictModeForDevtools(!0); try { - var state = useThenable(currentStateHook); - } catch (x) { - if (x === SuspenseException) throw SuspenseActionException; - throw x; + children = renderWithHooksAgain( + workInProgress, + Component, + props, + secondArg + ); + } finally { + setIsStrictModeForDevtools(!1); } - else state = currentStateHook; - currentStateHook = updateWorkInProgressHook(); - var actionQueue = currentStateHook.queue, - dispatch = actionQueue.dispatch; - action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber.flags |= 2048), - pushSimpleEffect( - HasEffect | Passive, - createEffectInstance(), - actionStateActionEffect.bind(null, actionQueue, action), - null - )); - return [state, dispatch, stateHook]; + } + finishRenderingHooks(current, workInProgress); + return children; } - function actionStateActionEffect(actionQueue, action) { - actionQueue.action = action; + function finishRenderingHooks(current, workInProgress) { + workInProgress._debugHookTypes = hookTypesDev; + null === workInProgress.dependencies + ? null !== thenableState$1 && + (workInProgress.dependencies = { + lanes: 0, + firstContext: null, + _debugThenableState: thenableState$1 + }) + : (workInProgress.dependencies._debugThenableState = thenableState$1); + ReactSharedInternals.H = ContextOnlyDispatcher; + var didRenderTooFewHooks = + null !== currentHook && null !== currentHook.next; + renderLanes = 0; + hookTypesDev = + currentHookNameInDev = + workInProgressHook = + currentHook = + currentlyRenderingFiber = + null; + hookTypesUpdateIndexDev = -1; + null !== current && + (current.flags & 65011712) !== (workInProgress.flags & 65011712) && + console.error( + "Internal React error: Expected static flag was missing. Please notify the React team." + ); + didScheduleRenderPhaseUpdate = !1; + thenableIndexCounter$1 = 0; + thenableState$1 = null; + if (didRenderTooFewHooks) + throw Error( + "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." + ); + null === current || + didReceiveUpdate || + ((current = current.dependencies), + null !== current && + checkIfContextChanged(current) && + (didReceiveUpdate = !0)); + needsToResetSuspendedThenableDEV + ? ((needsToResetSuspendedThenableDEV = !1), (current = !0)) + : (current = !1); + current && + ((workInProgress = + getComponentNameFromFiber(workInProgress) || "Unknown"), + didWarnAboutUseWrappedInTryCatch.has(workInProgress) || + didWarnAboutAsyncClientComponent.has(workInProgress) || + (didWarnAboutUseWrappedInTryCatch.add(workInProgress), + console.error( + "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary." + ))); } - function rerenderActionState(action) { - var stateHook = updateWorkInProgressHook(), - currentStateHook = currentHook; - if (null !== currentStateHook) - return updateActionStateImpl(stateHook, currentStateHook, action); - updateWorkInProgressHook(); - stateHook = stateHook.memoizedState; - currentStateHook = updateWorkInProgressHook(); - var dispatch = currentStateHook.queue.dispatch; - currentStateHook.memoizedState = action; - return [stateHook, dispatch, !1]; - } - function pushSimpleEffect(tag, inst, create, createDeps) { - tag = { - tag: tag, - create: create, - deps: createDeps, - inst: inst, - next: null - }; - inst = currentlyRenderingFiber.updateQueue; - null === inst && - ((inst = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber.updateQueue = inst)); - create = inst.lastEffect; - null === create - ? (inst.lastEffect = tag.next = tag) - : ((createDeps = create.next), - (create.next = tag), - (tag.next = createDeps), - (inst.lastEffect = tag)); - return tag; + function renderWithHooksAgain(workInProgress, Component, props, secondArg) { + currentlyRenderingFiber = workInProgress; + var numberOfReRenders = 0; + do { + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); + thenableIndexCounter$1 = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; + if (numberOfReRenders >= RE_RENDER_LIMIT) + throw Error( + "Too many re-renders. React limits the number of renders to prevent an infinite loop." + ); + numberOfReRenders += 1; + ignorePreviousDependencies = !1; + workInProgressHook = currentHook = null; + if (null != workInProgress.updateQueue) { + var children = workInProgress.updateQueue; + children.lastEffect = null; + children.events = null; + children.stores = null; + null != children.memoCache && (children.memoCache.index = 0); + } + hookTypesUpdateIndexDev = -1; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; + children = callComponentInDEV(Component, props, secondArg); + } while (didScheduleRenderPhaseUpdateDuringThisPass); + return children; } - function createEffectInstance() { - return { destroy: void 0, resource: void 0 }; + function TransitionAwareHostComponent() { + var dispatcher = ReactSharedInternals.H, + maybeThenable = dispatcher.useState()[0]; + maybeThenable = + "function" === typeof maybeThenable.then + ? useThenable(maybeThenable) + : maybeThenable; + dispatcher = dispatcher.useState()[0]; + (null !== currentHook ? currentHook.memoizedState : null) !== + dispatcher && (currentlyRenderingFiber.flags |= 1024); + return maybeThenable; } - function mountRef(initialValue) { - var hook = mountWorkInProgressHook(); - initialValue = { current: initialValue }; - return (hook.memoizedState = initialValue); + function checkDidRenderIdHook() { + var didRenderIdHook = 0 !== localIdCounter; + localIdCounter = 0; + return didRenderIdHook; } - function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) { - var hook = mountWorkInProgressHook(); - createDeps = void 0 === createDeps ? null : createDeps; - currentlyRenderingFiber.flags |= fiberFlags; - hook.memoizedState = pushSimpleEffect( - HasEffect | hookFlags, - createEffectInstance(), - create, - createDeps - ); + function bailoutHooks(current, workInProgress, lanes) { + workInProgress.updateQueue = current.updateQueue; + workInProgress.flags = + (workInProgress.mode & StrictEffectsMode) !== NoMode + ? workInProgress.flags & -402655237 + : workInProgress.flags & -2053; + current.lanes &= ~lanes; } - function updateEffectImpl(fiberFlags, hookFlags, create, deps) { - var hook = updateWorkInProgressHook(); - deps = void 0 === deps ? null : deps; - var inst = hook.memoizedState.inst; - null !== currentHook && - null !== deps && - areHookInputsEqual(deps, currentHook.memoizedState.deps) - ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber.flags |= fiberFlags), - (hook.memoizedState = pushSimpleEffect( - HasEffect | hookFlags, - inst, - create, - deps - ))); + function resetHooksOnUnwind(workInProgress) { + if (didScheduleRenderPhaseUpdate) { + for ( + workInProgress = workInProgress.memoizedState; + null !== workInProgress; + + ) { + var queue = workInProgress.queue; + null !== queue && (queue.pending = null); + workInProgress = workInProgress.next; + } + didScheduleRenderPhaseUpdate = !1; + } + renderLanes = 0; + hookTypesDev = + workInProgressHook = + currentHook = + currentlyRenderingFiber = + null; + hookTypesUpdateIndexDev = -1; + currentHookNameInDev = null; + didScheduleRenderPhaseUpdateDuringThisPass = !1; + thenableIndexCounter$1 = localIdCounter = 0; + thenableState$1 = null; } - function mountEffect(create, createDeps) { - (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode - ? mountEffectImpl(276826112, Passive, create, createDeps) - : mountEffectImpl(8390656, Passive, create, createDeps); + function mountWorkInProgressHook() { + var hook = { + memoizedState: null, + baseState: null, + baseQueue: null, + queue: null, + next: null + }; + null === workInProgressHook + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) + : (workInProgressHook = workInProgressHook.next = hook); + return workInProgressHook; } - function useEffectEventImpl(payload) { - currentlyRenderingFiber.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber.updateQueue; - if (null === componentUpdateQueue) - (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber.updateQueue = componentUpdateQueue), - (componentUpdateQueue.events = [payload]); + function updateWorkInProgressHook() { + if (null === currentHook) { + var nextCurrentHook = currentlyRenderingFiber.alternate; + nextCurrentHook = + null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; + } else nextCurrentHook = currentHook.next; + var nextWorkInProgressHook = + null === workInProgressHook + ? currentlyRenderingFiber.memoizedState + : workInProgressHook.next; + if (null !== nextWorkInProgressHook) + (workInProgressHook = nextWorkInProgressHook), + (currentHook = nextCurrentHook); else { - var events = componentUpdateQueue.events; - null === events - ? (componentUpdateQueue.events = [payload]) - : events.push(payload); + if (null === nextCurrentHook) { + if (null === currentlyRenderingFiber.alternate) + throw Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); + throw Error("Rendered more hooks than during the previous render."); + } + currentHook = nextCurrentHook; + nextCurrentHook = { + memoizedState: currentHook.memoizedState, + baseState: currentHook.baseState, + baseQueue: currentHook.baseQueue, + queue: currentHook.queue, + next: null + }; + null === workInProgressHook + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = + nextCurrentHook) + : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } + return workInProgressHook; } - function mountEvent(callback) { - var hook = mountWorkInProgressHook(), - ref = { impl: callback }; - hook.memoizedState = ref; - return function () { - if ((executionContext & RenderContext) !== NoContext) - throw Error( - "A function wrapped in useEffectEvent can't be called during rendering." - ); - return ref.impl.apply(void 0, arguments); - }; - } - function updateEvent(callback) { - var ref = updateWorkInProgressHook().memoizedState; - useEffectEventImpl({ ref: ref, nextImpl: callback }); - return function () { - if ((executionContext & RenderContext) !== NoContext) - throw Error( - "A function wrapped in useEffectEvent can't be called during rendering." - ); - return ref.impl.apply(void 0, arguments); - }; + function createFunctionComponentUpdateQueue() { + return { lastEffect: null, events: null, stores: null, memoCache: null }; } - function mountLayoutEffect(create, deps) { - var fiberFlags = 4194308; - (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && - (fiberFlags |= 134217728); - return mountEffectImpl(fiberFlags, Layout, create, deps); + function useThenable(thenable) { + var index = thenableIndexCounter$1; + thenableIndexCounter$1 += 1; + null === thenableState$1 && (thenableState$1 = createThenableState()); + thenable = trackUsedThenable(thenableState$1, thenable, index); + index = currentlyRenderingFiber; + null === + (null === workInProgressHook + ? index.memoizedState + : workInProgressHook.next) && + ((index = index.alternate), + (ReactSharedInternals.H = + null !== index && null !== index.memoizedState + ? HooksDispatcherOnUpdateInDEV + : HooksDispatcherOnMountInDEV)); + return thenable; } - function imperativeHandleEffect(create, ref) { - if ("function" === typeof ref) { - create = create(); - var refCleanup = ref(create); - return function () { - "function" === typeof refCleanup ? refCleanup() : ref(null); - }; + function use(usable) { + if (null !== usable && "object" === typeof usable) { + if ("function" === typeof usable.then) return useThenable(usable); + if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable); } - if (null !== ref && void 0 !== ref) - return ( - ref.hasOwnProperty("current") || - console.error( - "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", - "an object with keys {" + Object.keys(ref).join(", ") + "}" - ), - (create = create()), - (ref.current = create), - function () { - ref.current = null; - } - ); + throw Error("An unsupported type was passed to use(): " + String(usable)); } - function mountImperativeHandle(ref, create, deps) { - "function" !== typeof create && - console.error( - "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", - null !== create ? typeof create : "null" - ); - deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; - var fiberFlags = 4194308; - (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && - (fiberFlags |= 134217728); - mountEffectImpl( - fiberFlags, - Layout, - imperativeHandleEffect.bind(null, create, ref), - deps - ); - } - function updateImperativeHandle(ref, create, deps) { - "function" !== typeof create && - console.error( - "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", - null !== create ? typeof create : "null" - ); - deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; - updateEffectImpl( - 4, - Layout, - imperativeHandleEffect.bind(null, create, ref), - deps - ); - } - function mountCallback(callback, deps) { - mountWorkInProgressHook().memoizedState = [ - callback, - void 0 === deps ? null : deps - ]; - return callback; - } - function updateCallback(callback, deps) { - var hook = updateWorkInProgressHook(); - deps = void 0 === deps ? null : deps; - var prevState = hook.memoizedState; - if (null !== deps && areHookInputsEqual(deps, prevState[1])) - return prevState[0]; - hook.memoizedState = [callback, deps]; - return callback; - } - function mountMemo(nextCreate, deps) { - var hook = mountWorkInProgressHook(); - deps = void 0 === deps ? null : deps; - var nextValue = nextCreate(); - if (shouldDoubleInvokeUserFnsInHooksDEV) { - setIsStrictModeForDevtools(!0); - try { - nextCreate(); - } finally { - setIsStrictModeForDevtools(!1); - } + function useMemoCache(size) { + var memoCache = null, + updateQueue = currentlyRenderingFiber.updateQueue; + null !== updateQueue && (memoCache = updateQueue.memoCache); + if (null == memoCache) { + var current = currentlyRenderingFiber.alternate; + null !== current && + ((current = current.updateQueue), + null !== current && + ((current = current.memoCache), + null != current && + (memoCache = { + data: current.data.map(function (array) { + return array.slice(); + }), + index: 0 + }))); } - hook.memoizedState = [nextValue, deps]; - return nextValue; + null == memoCache && (memoCache = { data: [], index: 0 }); + null === updateQueue && + ((updateQueue = createFunctionComponentUpdateQueue()), + (currentlyRenderingFiber.updateQueue = updateQueue)); + updateQueue.memoCache = memoCache; + updateQueue = memoCache.data[memoCache.index]; + if (void 0 === updateQueue || ignorePreviousDependencies) + for ( + updateQueue = memoCache.data[memoCache.index] = Array(size), + current = 0; + current < size; + current++ + ) + updateQueue[current] = REACT_MEMO_CACHE_SENTINEL; + else + updateQueue.length !== size && + console.error( + "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.", + updateQueue.length, + size + ); + memoCache.index++; + return updateQueue; } - function updateMemo(nextCreate, deps) { - var hook = updateWorkInProgressHook(); - deps = void 0 === deps ? null : deps; - var prevState = hook.memoizedState; - if (null !== deps && areHookInputsEqual(deps, prevState[1])) - return prevState[0]; - prevState = nextCreate(); - if (shouldDoubleInvokeUserFnsInHooksDEV) { - setIsStrictModeForDevtools(!0); - try { - nextCreate(); - } finally { - setIsStrictModeForDevtools(!1); - } - } - hook.memoizedState = [prevState, deps]; - return prevState; + function basicStateReducer(state, action) { + return "function" === typeof action ? action(state) : action; } - function mountDeferredValue(value, initialValue) { + function mountReducer(reducer, initialArg, init) { var hook = mountWorkInProgressHook(); - return mountDeferredValueImpl(hook, value, initialValue); - } - function updateDeferredValue(value, initialValue) { - var hook = updateWorkInProgressHook(); - return updateDeferredValueImpl( - hook, - currentHook.memoizedState, - value, - initialValue + if (void 0 !== init) { + var initialState = init(initialArg); + if (shouldDoubleInvokeUserFnsInHooksDEV) { + setIsStrictModeForDevtools(!0); + try { + init(initialArg); + } finally { + setIsStrictModeForDevtools(!1); + } + } + } else initialState = initialArg; + hook.memoizedState = hook.baseState = initialState; + reducer = { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: reducer, + lastRenderedState: initialState + }; + hook.queue = reducer; + reducer = reducer.dispatch = dispatchReducerAction.bind( + null, + currentlyRenderingFiber, + reducer ); + return [hook.memoizedState, reducer]; } - function rerenderDeferredValue(value, initialValue) { + function updateReducer(reducer) { var hook = updateWorkInProgressHook(); - return null === currentHook - ? mountDeferredValueImpl(hook, value, initialValue) - : updateDeferredValueImpl( - hook, - currentHook.memoizedState, - value, - initialValue - ); - } - function mountDeferredValueImpl(hook, value, initialValue) { - if (void 0 === initialValue || 0 !== (renderLanes & 1073741824)) - return (hook.memoizedState = value); - hook.memoizedState = initialValue; - hook = requestDeferredLane(); - currentlyRenderingFiber.lanes |= hook; - workInProgressRootSkippedLanes |= hook; - return initialValue; + return updateReducerImpl(hook, currentHook, reducer); } - function updateDeferredValueImpl(hook, prevValue, value, initialValue) { - if (objectIs(value, prevValue)) return value; - if (null !== currentTreeHiddenStackCursor.current) - return ( - (hook = mountDeferredValueImpl(hook, value, initialValue)), - objectIs(hook, prevValue) || (didReceiveUpdate = !0), - hook + function updateReducerImpl(hook, current, reducer) { + var queue = hook.queue; + if (null === queue) + throw Error( + "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)" ); - if (0 === (renderLanes & 42)) - return (didReceiveUpdate = !0), (hook.memoizedState = value); - hook = requestDeferredLane(); - currentlyRenderingFiber.lanes |= hook; - workInProgressRootSkippedLanes |= hook; - return prevValue; - } - function startTransition( - fiber, - queue, - pendingState, - finishedState, - callback - ) { - var previousPriority = ReactDOMSharedInternals.p; - ReactDOMSharedInternals.p = - 0 !== previousPriority && previousPriority < ContinuousEventPriority - ? previousPriority - : ContinuousEventPriority; - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - dispatchOptimisticSetState(fiber, !1, queue, pendingState); - currentTransition._updatedFibers = new Set(); - try { - var returnValue = callback(), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - if ( - null !== returnValue && - "object" === typeof returnValue && - "function" === typeof returnValue.then - ) { - var thenableForFinishedState = chainThenableValue( - returnValue, - finishedState - ); - dispatchSetStateInternal( - fiber, - queue, - thenableForFinishedState, - requestUpdateLane(fiber) - ); - } else - dispatchSetStateInternal( - fiber, - queue, - finishedState, - requestUpdateLane(fiber) + queue.lastRenderedReducer = reducer; + var baseQueue = hook.baseQueue, + pendingQueue = queue.pending; + if (null !== pendingQueue) { + if (null !== baseQueue) { + var baseFirst = baseQueue.next; + baseQueue.next = pendingQueue.next; + pendingQueue.next = baseFirst; + } + current.baseQueue !== baseQueue && + console.error( + "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React." ); - } catch (error) { - dispatchSetStateInternal( - fiber, - queue, - { then: function () {}, status: "rejected", reason: error }, - requestUpdateLane(fiber) - ); - } finally { - (ReactDOMSharedInternals.p = previousPriority), - (ReactSharedInternals.T = prevTransition), - null === prevTransition && - currentTransition._updatedFibers && - ((fiber = currentTransition._updatedFibers.size), - currentTransition._updatedFibers.clear(), - 10 < fiber && - console.warn( - "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." - )); + current.baseQueue = baseQueue = pendingQueue; + queue.pending = null; + } + pendingQueue = hook.baseState; + if (null === baseQueue) hook.memoizedState = pendingQueue; + else { + current = baseQueue.next; + var newBaseQueueFirst = (baseFirst = null), + newBaseQueueLast = null, + update = current, + didReadFromEntangledAsyncAction = !1; + do { + var updateLane = update.lane & -536870913; + if ( + updateLane !== update.lane + ? (workInProgressRootRenderLanes & updateLane) === updateLane + : (renderLanes & updateLane) === updateLane + ) { + var revertLane = update.revertLane; + if (0 === revertLane) + null !== newBaseQueueLast && + (newBaseQueueLast = newBaseQueueLast.next = + { + lane: 0, + revertLane: 0, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + updateLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + else if ((renderLanes & revertLane) === revertLane) { + update = update.next; + revertLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + continue; + } else + (updateLane = { + lane: 0, + revertLane: update.revertLane, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + null === newBaseQueueLast + ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), + (baseFirst = pendingQueue)) + : (newBaseQueueLast = newBaseQueueLast.next = updateLane), + (currentlyRenderingFiber.lanes |= revertLane), + (workInProgressRootSkippedLanes |= revertLane); + updateLane = update.action; + shouldDoubleInvokeUserFnsInHooksDEV && + reducer(pendingQueue, updateLane); + pendingQueue = update.hasEagerState + ? update.eagerState + : reducer(pendingQueue, updateLane); + } else + (revertLane = { + lane: updateLane, + revertLane: update.revertLane, + action: update.action, + hasEagerState: update.hasEagerState, + eagerState: update.eagerState, + next: null + }), + null === newBaseQueueLast + ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), + (baseFirst = pendingQueue)) + : (newBaseQueueLast = newBaseQueueLast.next = revertLane), + (currentlyRenderingFiber.lanes |= updateLane), + (workInProgressRootSkippedLanes |= updateLane); + update = update.next; + } while (null !== update && update !== current); + null === newBaseQueueLast + ? (baseFirst = pendingQueue) + : (newBaseQueueLast.next = newBaseQueueFirst); + if ( + !objectIs(pendingQueue, hook.memoizedState) && + ((didReceiveUpdate = !0), + didReadFromEntangledAsyncAction && + ((reducer = currentEntangledActionThenable), null !== reducer)) + ) + throw reducer; + hook.memoizedState = pendingQueue; + hook.baseState = baseFirst; + hook.baseQueue = newBaseQueueLast; + queue.lastRenderedState = pendingQueue; } + null === baseQueue && (queue.lanes = 0); + return [hook.memoizedState, queue.dispatch]; } - function startHostTransition(formFiber, pendingState, action, formData) { - if (5 !== formFiber.tag) + function rerenderReducer(reducer) { + var hook = updateWorkInProgressHook(), + queue = hook.queue; + if (null === queue) throw Error( - "Expected the form instance to be a HostComponent. This is a bug in React." + "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)" ); - var queue = ensureFormComponentIsStateful(formFiber).queue; - startTransition( - formFiber, - queue, - pendingState, - NotPendingTransition, - null === action - ? noop$2 - : function () { - requestFormReset$1(formFiber); - return action(formData); - } - ); - } - function ensureFormComponentIsStateful(formFiber) { - var existingStateHook = formFiber.memoizedState; - if (null !== existingStateHook) return existingStateHook; - existingStateHook = { - memoizedState: NotPendingTransition, - baseState: NotPendingTransition, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: NotPendingTransition - }, - next: null - }; - var initialResetState = {}; - existingStateHook.next = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }, - next: null - }; - formFiber.memoizedState = existingStateHook; - formFiber = formFiber.alternate; - null !== formFiber && (formFiber.memoizedState = existingStateHook); - return existingStateHook; + queue.lastRenderedReducer = reducer; + var dispatch = queue.dispatch, + lastRenderPhaseUpdate = queue.pending, + newState = hook.memoizedState; + if (null !== lastRenderPhaseUpdate) { + queue.pending = null; + var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next); + do + (newState = reducer(newState, update.action)), (update = update.next); + while (update !== lastRenderPhaseUpdate); + objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0); + hook.memoizedState = newState; + null === hook.baseQueue && (hook.baseState = newState); + queue.lastRenderedState = newState; + } + return [newState, dispatch]; } - function requestFormReset$1(formFiber) { - null === ReactSharedInternals.T && - console.error( - "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition." - ); - var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; - dispatchSetStateInternal( - formFiber, - resetStateQueue, - {}, - requestUpdateLane(formFiber) + function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { + var fiber = currentlyRenderingFiber, + hook = mountWorkInProgressHook(); + if (isHydrating) { + if (void 0 === getServerSnapshot) + throw Error( + "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering." + ); + var nextSnapshot = getServerSnapshot(); + didWarnUncachedGetSnapshot || + nextSnapshot === getServerSnapshot() || + (console.error( + "The result of getServerSnapshot should be cached to avoid an infinite loop" + ), + (didWarnUncachedGetSnapshot = !0)); + } else { + nextSnapshot = getSnapshot(); + didWarnUncachedGetSnapshot || + ((getServerSnapshot = getSnapshot()), + objectIs(nextSnapshot, getServerSnapshot) || + (console.error( + "The result of getSnapshot should be cached to avoid an infinite loop" + ), + (didWarnUncachedGetSnapshot = !0))); + if (null === workInProgressRoot) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + 0 !== (workInProgressRootRenderLanes & 124) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + } + hook.memoizedState = nextSnapshot; + getServerSnapshot = { value: nextSnapshot, getSnapshot: getSnapshot }; + hook.queue = getServerSnapshot; + mountEffect( + subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe), + [subscribe] ); - } - function mountTransition() { - var stateHook = mountStateImpl(!1); - stateHook = startTransition.bind( - null, - currentlyRenderingFiber, - stateHook.queue, - !0, - !1 + fiber.flags |= 2048; + pushSimpleEffect( + HasEffect | Passive, + createEffectInstance(), + updateStoreInstance.bind( + null, + fiber, + getServerSnapshot, + nextSnapshot, + getSnapshot + ), + null ); - mountWorkInProgressHook().memoizedState = stateHook; - return [!1, stateHook]; - } - function updateTransition() { - var booleanOrThenable = updateReducer(basicStateReducer)[0], - start = updateWorkInProgressHook().memoizedState; - return [ - "boolean" === typeof booleanOrThenable - ? booleanOrThenable - : useThenable(booleanOrThenable), - start - ]; + return nextSnapshot; } - function rerenderTransition() { - var booleanOrThenable = rerenderReducer(basicStateReducer)[0], - start = updateWorkInProgressHook().memoizedState; - return [ - "boolean" === typeof booleanOrThenable - ? booleanOrThenable - : useThenable(booleanOrThenable), - start - ]; + function updateSyncExternalStore( + subscribe, + getSnapshot, + getServerSnapshot + ) { + var fiber = currentlyRenderingFiber, + hook = updateWorkInProgressHook(), + isHydrating$jscomp$0 = isHydrating; + if (isHydrating$jscomp$0) { + if (void 0 === getServerSnapshot) + throw Error( + "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering." + ); + getServerSnapshot = getServerSnapshot(); + } else if ( + ((getServerSnapshot = getSnapshot()), !didWarnUncachedGetSnapshot) + ) { + var cachedSnapshot = getSnapshot(); + objectIs(getServerSnapshot, cachedSnapshot) || + (console.error( + "The result of getSnapshot should be cached to avoid an infinite loop" + ), + (didWarnUncachedGetSnapshot = !0)); + } + if ( + (cachedSnapshot = !objectIs( + (currentHook || hook).memoizedState, + getServerSnapshot + )) + ) + (hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0); + hook = hook.queue; + var create = subscribeToStore.bind(null, fiber, hook, subscribe); + updateEffectImpl(2048, Passive, create, [subscribe]); + if ( + hook.getSnapshot !== getSnapshot || + cachedSnapshot || + (null !== workInProgressHook && + workInProgressHook.memoizedState.tag & HasEffect) + ) { + fiber.flags |= 2048; + pushSimpleEffect( + HasEffect | Passive, + createEffectInstance(), + updateStoreInstance.bind( + null, + fiber, + hook, + getServerSnapshot, + getSnapshot + ), + null + ); + if (null === workInProgressRoot) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + isHydrating$jscomp$0 || + 0 !== (renderLanes & 124) || + pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); + } + return getServerSnapshot; } - function useHostTransitionStatus() { - return readContext(HostTransitionContext); + function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { + fiber.flags |= 16384; + fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; + getSnapshot = currentlyRenderingFiber.updateQueue; + null === getSnapshot + ? ((getSnapshot = createFunctionComponentUpdateQueue()), + (currentlyRenderingFiber.updateQueue = getSnapshot), + (getSnapshot.stores = [fiber])) + : ((renderedSnapshot = getSnapshot.stores), + null === renderedSnapshot + ? (getSnapshot.stores = [fiber]) + : renderedSnapshot.push(fiber)); } - function mountId() { - var hook = mountWorkInProgressHook(), - identifierPrefix = workInProgressRoot.identifierPrefix; - if (isHydrating) { - var treeId = getTreeId(); - identifierPrefix = "\u00ab" + identifierPrefix + "R" + treeId; - treeId = localIdCounter++; - 0 < treeId && (identifierPrefix += "H" + treeId.toString(32)); - identifierPrefix += "\u00bb"; - } else - (treeId = globalClientIdCounter$1++), - (identifierPrefix = - "\u00ab" + identifierPrefix + "r" + treeId.toString(32) + "\u00bb"); - return (hook.memoizedState = identifierPrefix); + function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) { + inst.value = nextSnapshot; + inst.getSnapshot = getSnapshot; + checkIfSnapshotChanged(inst) && forceStoreRerender(fiber); } - function mountRefresh() { - return (mountWorkInProgressHook().memoizedState = refreshCache.bind( - null, - currentlyRenderingFiber - )); + function subscribeToStore(fiber, inst, subscribe) { + return subscribe(function () { + checkIfSnapshotChanged(inst) && forceStoreRerender(fiber); + }); } - function refreshCache(fiber, seedKey, seedValue) { - for (var provider = fiber.return; null !== provider; ) { - switch (provider.tag) { - case 24: - case 3: - var lane = requestUpdateLane(provider); - fiber = createUpdate(lane); - var root = enqueueUpdate(provider, fiber, lane); - null !== root && - (startUpdateTimerByLane(lane), - scheduleUpdateOnFiber(root, provider, lane), - entangleTransitions(root, provider, lane)); - provider = createCache(); - null !== seedKey && - void 0 !== seedKey && - null !== root && - provider.data.set(seedKey, seedValue); - fiber.payload = { cache: provider }; - return; - } - provider = provider.return; + function checkIfSnapshotChanged(inst) { + var latestGetSnapshot = inst.getSnapshot; + inst = inst.value; + try { + var nextValue = latestGetSnapshot(); + return !objectIs(inst, nextValue); + } catch (error) { + return !0; } } - function dispatchReducerAction(fiber, queue, action) { - var args = arguments; - "function" === typeof args[3] && - console.error( - "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." - ); - args = requestUpdateLane(fiber); - var update = { - lane: args, - revertLane: 0, - action: action, - hasEagerState: !1, - eagerState: null, - next: null - }; - isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, update) - : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), - null !== update && - (startUpdateTimerByLane(args), - scheduleUpdateOnFiber(update, fiber, args), - entangleTransitionUpdate(update, queue, args))); - } - function dispatchSetState(fiber, queue, action) { - var args = arguments; - "function" === typeof args[3] && - console.error( - "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." - ); - args = requestUpdateLane(fiber); - dispatchSetStateInternal(fiber, queue, action, args) && - startUpdateTimerByLane(args); + function forceStoreRerender(fiber) { + var root = enqueueConcurrentRenderForLane(fiber, 2); + null !== root && scheduleUpdateOnFiber(root, fiber, 2); } - function dispatchSetStateInternal(fiber, queue, action, lane) { - var update = { - lane: lane, - revertLane: 0, - action: action, - hasEagerState: !1, - eagerState: null, - next: null - }; - if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update); - else { - var alternate = fiber.alternate; - if ( - 0 === fiber.lanes && - (null === alternate || 0 === alternate.lanes) && - ((alternate = queue.lastRenderedReducer), null !== alternate) - ) { - var prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + function mountStateImpl(initialState) { + var hook = mountWorkInProgressHook(); + if ("function" === typeof initialState) { + var initialStateInitializer = initialState; + initialState = initialStateInitializer(); + if (shouldDoubleInvokeUserFnsInHooksDEV) { + setIsStrictModeForDevtools(!0); try { - var currentState = queue.lastRenderedState, - eagerState = alternate(currentState, action); - update.hasEagerState = !0; - update.eagerState = eagerState; - if (objectIs(eagerState, currentState)) - return ( - enqueueUpdate$1(fiber, queue, update, 0), - null === workInProgressRoot && - finishQueueingConcurrentUpdates(), - !1 - ); - } catch (error) { + initialStateInitializer(); } finally { - ReactSharedInternals.H = prevDispatcher; + setIsStrictModeForDevtools(!1); } } - action = enqueueConcurrentHookUpdate(fiber, queue, update, lane); - if (null !== action) - return ( - scheduleUpdateOnFiber(action, fiber, lane), - entangleTransitionUpdate(action, queue, lane), - !0 - ); } - return !1; - } - function dispatchOptimisticSetState( - fiber, - throwIfDuringRender, - queue, - action - ) { - null === ReactSharedInternals.T && - 0 === currentEntangledLane && - console.error( - "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition." - ); - action = { - lane: 2, - revertLane: requestTransitionLane(), - action: action, - hasEagerState: !1, - eagerState: null, - next: null + hook.memoizedState = hook.baseState = initialState; + hook.queue = { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialState }; - if (isRenderPhaseUpdate(fiber)) { - if (throwIfDuringRender) - throw Error("Cannot update optimistic state while rendering."); - console.error("Cannot call startTransition while rendering."); - } else - (throwIfDuringRender = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - 2 - )), - null !== throwIfDuringRender && - (startUpdateTimerByLane(2), - scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2)); - } - function isRenderPhaseUpdate(fiber) { - var alternate = fiber.alternate; - return ( - fiber === currentlyRenderingFiber || - (null !== alternate && alternate === currentlyRenderingFiber) - ); - } - function enqueueRenderPhaseUpdate(queue, update) { - didScheduleRenderPhaseUpdateDuringThisPass = - didScheduleRenderPhaseUpdate = !0; - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; - } - function entangleTransitionUpdate(root, queue, lane) { - if (0 !== (lane & 4194048)) { - var queueLanes = queue.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - queue.lanes = lane; - markRootEntangled(root, lane); - } + return hook; } - function startGesture(fiber, queue, gestureProvider, gestureOptions) { - var root = enqueueGestureRender(fiber); - if (null === root) return function () {}; - fiber = getCurrentGestureOffset(gestureProvider); - var range = gestureOptions && gestureOptions.range, - rangePrevious = range ? range[0] : 0, - rangeCurrent = range ? range[1] : fiber; - range = range ? range[2] : 100; - ((rangePrevious > rangeCurrent && range > rangeCurrent) || - (rangePrevious < rangeCurrent && range < rangeCurrent)) && - console.error( - 'The range of a gesture needs "previous" and "next" to be on either side of the "current" offset. Both cannot be above current and both cannot be below current.' - ); - var isFlippedDirection = rangePrevious > range, - update = { - gesture: scheduleGesture( - root, - gestureProvider, - fiber < rangeCurrent - ? isFlippedDirection - : fiber > rangeCurrent - ? !isFlippedDirection - : gestureOptions && "next" === gestureOptions.direction - ? !0 - : gestureOptions && "previous" === gestureOptions.direction - ? !1 - : queue.initialDirection, - rangePrevious, - rangeCurrent, - range - ), - prev: null, - next: queue.pending - }; - null !== queue.pending && (queue.pending.prev = update); - queue.pending = update; - return function () { - if (null === update.prev) - if (queue.pending === update) queue.pending = update.next; - else return; - else - (update.prev.next = update.next), - null !== update.next && (update.next.prev = update.prev), - (update.prev = null), - (update.next = null); - var gesture = update.gesture; - gesture.count--; - if (0 === gesture.count) { - var cancelDirectionSubscription = gesture.cancel; - cancelDirectionSubscription(); - deleteScheduledGesture(root, gesture); - cancelDirectionSubscription = gesture.running; - if (null !== cancelDirectionSubscription) { - var pendingLanesExcludingGestureLane = root.pendingLanes & -65; - 0 !== (pendingLanesExcludingGestureLane & 124) || - 0 !== (pendingLanesExcludingGestureLane & 4194048) - ? ((cancelDirectionSubscription = root.stoppingGestures), - null !== cancelDirectionSubscription && - ((gesture.next = cancelDirectionSubscription), - (cancelDirectionSubscription.prev = gesture)), - (root.stoppingGestures = gesture)) - : ((gesture.running = null), - cancelDirectionSubscription.skipTransition()); - } - } - }; + function mountState(initialState) { + initialState = mountStateImpl(initialState); + var queue = initialState.queue, + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); + queue.dispatch = dispatch; + return [initialState.memoizedState, dispatch]; } - function mountSwipeTransition(previous, current) { - previous = { + function mountOptimistic(passthrough) { + var hook = mountWorkInProgressHook(); + hook.memoizedState = hook.baseState = passthrough; + var queue = { pending: null, + lanes: 0, dispatch: null, - initialDirection: previous === current + lastRenderedReducer: null, + lastRenderedState: null }; - var startGestureOnHook = (previous.dispatch = startGesture.bind( + hook.queue = queue; + hook = dispatchOptimisticSetState.bind( null, currentlyRenderingFiber, - previous - )); - mountWorkInProgressHook().queue = previous; - return [current, startGestureOnHook]; - } - function updateSwipeTransition(previous, current, next) { - var queue = updateWorkInProgressHook().queue, - startGestureOnHook = queue.dispatch, - rootRenderLanes = workInProgressRootRenderLanes, - value = current; - if (null !== queue.pending) { - if (64 === rootRenderLanes) { - rootRenderLanes = workInProgressRoot; - if (null === rootRenderLanes) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - rootRenderLanes = rootRenderLanes.pendingGestures; - if (null !== rootRenderLanes) - for (var update = queue.pending; null !== update; ) { - if (rootRenderLanes === update.gesture) { - value = rootRenderLanes.direction ? next : previous; - break; - } - update = update.next; - } - didReceiveUpdate = !0; - } - currentlyRenderingFiber.lanes |= 64; - } - queue.initialDirection = previous === current; - return [value, startGestureOnHook]; - } - function pushDebugInfo(debugInfo) { - var previousDebugInfo = currentDebugInfo; - null != debugInfo && - (currentDebugInfo = - null === previousDebugInfo - ? debugInfo - : previousDebugInfo.concat(debugInfo)); - return previousDebugInfo; - } - function validateFragmentProps(element, fiber, returnFiber) { - for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) { - var key = keys[i]; - if ("children" !== key && "key" !== key) { - null === fiber && - ((fiber = createFiberFromElement(element, returnFiber.mode, 0)), - (fiber._debugInfo = currentDebugInfo), - (fiber.return = returnFiber)); - runWithFiberInDEV( - fiber, - function (erroredKey) { - console.error( - "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", - erroredKey - ); - }, - key - ); - break; - } - } - } - function unwrapThenable(thenable) { - var index = thenableIndexCounter; - thenableIndexCounter += 1; - null === thenableState && (thenableState = createThenableState()); - return trackUsedThenable(thenableState, thenable, index); + !0, + queue + ); + queue.dispatch = hook; + return [passthrough, hook]; } - function coerceRef(workInProgress, element) { - element = element.props.ref; - workInProgress.ref = void 0 !== element ? element : null; + function updateOptimistic(passthrough, reducer) { + var hook = updateWorkInProgressHook(); + return updateOptimisticImpl(hook, currentHook, passthrough, reducer); } - function throwOnInvalidObjectType(returnFiber, newChild) { - if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) - throw Error( - 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' - ); - returnFiber = Object.prototype.toString.call(newChild); - throw Error( - "Objects are not valid as a React child (found: " + - ("[object Object]" === returnFiber - ? "object with keys {" + Object.keys(newChild).join(", ") + "}" - : returnFiber) + - "). If you meant to render a collection of children, use an array instead." + function updateOptimisticImpl(hook, current, passthrough, reducer) { + hook.baseState = passthrough; + return updateReducerImpl( + hook, + currentHook, + "function" === typeof reducer ? reducer : basicStateReducer ); } - function warnOnFunctionType(returnFiber, invalidChild) { - var parentName = getComponentNameFromFiber(returnFiber) || "Component"; - ownerHasFunctionTypeWarning[parentName] || - ((ownerHasFunctionTypeWarning[parentName] = !0), - (invalidChild = - invalidChild.displayName || invalidChild.name || "Component"), - 3 === returnFiber.tag - ? console.error( - "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)", - invalidChild, - invalidChild, - invalidChild - ) - : console.error( - "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}", - invalidChild, - invalidChild, - parentName, - invalidChild, - parentName - )); + function rerenderOptimistic(passthrough, reducer) { + var hook = updateWorkInProgressHook(); + if (null !== currentHook) + return updateOptimisticImpl(hook, currentHook, passthrough, reducer); + hook.baseState = passthrough; + return [passthrough, hook.queue.dispatch]; } - function warnOnSymbolType(returnFiber, invalidChild) { - var parentName = getComponentNameFromFiber(returnFiber) || "Component"; - ownerHasSymbolTypeWarning[parentName] || - ((ownerHasSymbolTypeWarning[parentName] = !0), - (invalidChild = String(invalidChild)), - 3 === returnFiber.tag - ? console.error( - "Symbols are not valid as a React child.\n root.render(%s)", - invalidChild - ) - : console.error( - "Symbols are not valid as a React child.\n <%s>%s", - parentName, - invalidChild, - parentName - )); + function dispatchActionState( + fiber, + actionQueue, + setPendingState, + setState, + payload + ) { + if (isRenderPhaseUpdate(fiber)) + throw Error("Cannot update form state while rendering."); + fiber = actionQueue.action; + if (null !== fiber) { + var actionNode = { + payload: payload, + action: fiber, + next: null, + isTransition: !0, + status: "pending", + value: null, + reason: null, + listeners: [], + then: function (listener) { + actionNode.listeners.push(listener); + } + }; + null !== ReactSharedInternals.T + ? setPendingState(!0) + : (actionNode.isTransition = !1); + setState(actionNode); + setPendingState = actionQueue.pending; + null === setPendingState + ? ((actionNode.next = actionQueue.pending = actionNode), + runActionStateAction(actionQueue, actionNode)) + : ((actionNode.next = setPendingState.next), + (actionQueue.pending = setPendingState.next = actionNode)); + } } - function createChildReconciler(shouldTrackSideEffects) { - function deleteChild(returnFiber, childToDelete) { - if (shouldTrackSideEffects) { - var deletions = returnFiber.deletions; - null === deletions - ? ((returnFiber.deletions = [childToDelete]), - (returnFiber.flags |= 16)) - : deletions.push(childToDelete); + function runActionStateAction(actionQueue, node) { + var action = node.action, + payload = node.payload, + prevState = actionQueue.state; + if (node.isTransition) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + ReactSharedInternals.T = currentTransition; + ReactSharedInternals.T._updatedFibers = new Set(); + try { + var returnValue = action(prevState, payload), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + (ReactSharedInternals.T = prevTransition), + null === prevTransition && + currentTransition._updatedFibers && + ((actionQueue = currentTransition._updatedFibers.size), + currentTransition._updatedFibers.clear(), + 10 < actionQueue && + console.warn( + "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." + )); } + } else + try { + (currentTransition = action(prevState, payload)), + handleActionReturnValue(actionQueue, node, currentTransition); + } catch (error$4) { + onActionError(actionQueue, node, error$4); + } + } + function handleActionReturnValue(actionQueue, node, returnValue) { + null !== returnValue && + "object" === typeof returnValue && + "function" === typeof returnValue.then + ? (returnValue.then( + function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, + function (error) { + return onActionError(actionQueue, node, error); + } + ), + node.isTransition || + console.error( + "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop." + )) + : onActionSuccess(actionQueue, node, returnValue); + } + function onActionSuccess(actionQueue, actionNode, nextState) { + actionNode.status = "fulfilled"; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; + actionNode = actionQueue.pending; + null !== actionNode && + ((nextState = actionNode.next), + nextState === actionNode + ? (actionQueue.pending = null) + : ((nextState = nextState.next), + (actionNode.next = nextState), + runActionStateAction(actionQueue, nextState))); + } + function onActionError(actionQueue, actionNode, error) { + var last = actionQueue.pending; + actionQueue.pending = null; + if (null !== last) { + last = last.next; + do + (actionNode.status = "rejected"), + (actionNode.reason = error), + notifyActionListeners(actionNode), + (actionNode = actionNode.next); + while (actionNode !== last); } - function deleteRemainingChildren(returnFiber, currentFirstChild) { - if (!shouldTrackSideEffects) return null; - for (; null !== currentFirstChild; ) - deleteChild(returnFiber, currentFirstChild), - (currentFirstChild = currentFirstChild.sibling); - return null; - } - function mapRemainingChildren(currentFirstChild) { - for (var existingChildren = new Map(); null !== currentFirstChild; ) - null !== currentFirstChild.key - ? existingChildren.set(currentFirstChild.key, currentFirstChild) - : existingChildren.set(currentFirstChild.index, currentFirstChild), - (currentFirstChild = currentFirstChild.sibling); - return existingChildren; - } - function useFiber(fiber, pendingProps) { - fiber = createWorkInProgress(fiber, pendingProps); - fiber.index = 0; - fiber.sibling = null; - return fiber; - } - function placeChild(newFiber, lastPlacedIndex, newIndex) { - newFiber.index = newIndex; - if (!shouldTrackSideEffects) - return (newFiber.flags |= 1048576), lastPlacedIndex; - newIndex = newFiber.alternate; - if (null !== newIndex) - return ( - (newIndex = newIndex.index), - newIndex < lastPlacedIndex - ? ((newFiber.flags |= 67108866), lastPlacedIndex) - : newIndex - ); - newFiber.flags |= 67108866; - return lastPlacedIndex; - } - function placeSingleChild(newFiber) { - shouldTrackSideEffects && - null === newFiber.alternate && - (newFiber.flags |= 67108866); - return newFiber; - } - function updateTextNode(returnFiber, current, textContent, lanes) { - if (null === current || 6 !== current.tag) - return ( - (current = createFiberFromText( - textContent, - returnFiber.mode, - lanes - )), - (current.return = returnFiber), - (current._debugOwner = returnFiber), - (current._debugTask = returnFiber._debugTask), - (current._debugInfo = currentDebugInfo), - current - ); - current = useFiber(current, textContent); - current.return = returnFiber; - current._debugInfo = currentDebugInfo; - return current; + actionQueue.action = null; + } + function notifyActionListeners(actionNode) { + actionNode = actionNode.listeners; + for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); + } + function actionStateReducer(oldState, newState) { + return newState; + } + function mountActionState(action, initialStateProp) { + if (isHydrating) { + var ssrFormState = workInProgressRoot.formState; + if (null !== ssrFormState) { + a: { + var isMatching = currentlyRenderingFiber; + if (isHydrating) { + if (nextHydratableInstance) { + b: { + var markerInstance = nextHydratableInstance; + for ( + var inRootOrSingleton = rootOrSingletonContext; + 8 !== markerInstance.nodeType; + + ) { + if (!inRootOrSingleton) { + markerInstance = null; + break b; + } + markerInstance = getNextHydratable( + markerInstance.nextSibling + ); + if (null === markerInstance) { + markerInstance = null; + break b; + } + } + inRootOrSingleton = markerInstance.data; + markerInstance = + inRootOrSingleton === FORM_STATE_IS_MATCHING || + inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING + ? markerInstance + : null; + } + if (markerInstance) { + nextHydratableInstance = getNextHydratable( + markerInstance.nextSibling + ); + isMatching = markerInstance.data === FORM_STATE_IS_MATCHING; + break a; + } + } + throwOnHydrationMismatch(isMatching); + } + isMatching = !1; + } + isMatching && (initialStateProp = ssrFormState[0]); + } } - function updateElement(returnFiber, current, element, lanes) { - var elementType = element.type; - if (elementType === REACT_FRAGMENT_TYPE) - return ( - (current = updateFragment( - returnFiber, - current, - element.props.children, - lanes, - element.key - )), - validateFragmentProps(element, current, returnFiber), - current - ); - if ( - null !== current && - (current.elementType === elementType || - isCompatibleFamilyForHotReloading(current, element) || - ("object" === typeof elementType && - null !== elementType && - elementType.$$typeof === REACT_LAZY_TYPE && - callLazyInitInDEV(elementType) === current.type)) - ) - return ( - (current = useFiber(current, element.props)), - coerceRef(current, element), - (current.return = returnFiber), - (current._debugOwner = element._owner), - (current._debugInfo = currentDebugInfo), - current - ); - current = createFiberFromElement(element, returnFiber.mode, lanes); - coerceRef(current, element); - current.return = returnFiber; - current._debugInfo = currentDebugInfo; - return current; + ssrFormState = mountWorkInProgressHook(); + ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp; + isMatching = { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: actionStateReducer, + lastRenderedState: initialStateProp + }; + ssrFormState.queue = isMatching; + ssrFormState = dispatchSetState.bind( + null, + currentlyRenderingFiber, + isMatching + ); + isMatching.dispatch = ssrFormState; + isMatching = mountStateImpl(!1); + inRootOrSingleton = dispatchOptimisticSetState.bind( + null, + currentlyRenderingFiber, + !1, + isMatching.queue + ); + isMatching = mountWorkInProgressHook(); + markerInstance = { + state: initialStateProp, + dispatch: null, + action: action, + pending: null + }; + isMatching.queue = markerInstance; + ssrFormState = dispatchActionState.bind( + null, + currentlyRenderingFiber, + markerInstance, + inRootOrSingleton, + ssrFormState + ); + markerInstance.dispatch = ssrFormState; + isMatching.memoizedState = action; + return [initialStateProp, ssrFormState, !1]; + } + function updateActionState(action) { + var stateHook = updateWorkInProgressHook(); + return updateActionStateImpl(stateHook, currentHook, action); + } + function updateActionStateImpl(stateHook, currentStateHook, action) { + currentStateHook = updateReducerImpl( + stateHook, + currentStateHook, + actionStateReducer + )[0]; + stateHook = updateReducer(basicStateReducer)[0]; + if ( + "object" === typeof currentStateHook && + null !== currentStateHook && + "function" === typeof currentStateHook.then + ) + try { + var state = useThenable(currentStateHook); + } catch (x) { + if (x === SuspenseException) throw SuspenseActionException; + throw x; + } + else state = currentStateHook; + currentStateHook = updateWorkInProgressHook(); + var actionQueue = currentStateHook.queue, + dispatch = actionQueue.dispatch; + action !== currentStateHook.memoizedState && + ((currentlyRenderingFiber.flags |= 2048), + pushSimpleEffect( + HasEffect | Passive, + createEffectInstance(), + actionStateActionEffect.bind(null, actionQueue, action), + null + )); + return [state, dispatch, stateHook]; + } + function actionStateActionEffect(actionQueue, action) { + actionQueue.action = action; + } + function rerenderActionState(action) { + var stateHook = updateWorkInProgressHook(), + currentStateHook = currentHook; + if (null !== currentStateHook) + return updateActionStateImpl(stateHook, currentStateHook, action); + updateWorkInProgressHook(); + stateHook = stateHook.memoizedState; + currentStateHook = updateWorkInProgressHook(); + var dispatch = currentStateHook.queue.dispatch; + currentStateHook.memoizedState = action; + return [stateHook, dispatch, !1]; + } + function pushSimpleEffect(tag, inst, create, createDeps) { + tag = { + tag: tag, + create: create, + deps: createDeps, + inst: inst, + next: null + }; + inst = currentlyRenderingFiber.updateQueue; + null === inst && + ((inst = createFunctionComponentUpdateQueue()), + (currentlyRenderingFiber.updateQueue = inst)); + create = inst.lastEffect; + null === create + ? (inst.lastEffect = tag.next = tag) + : ((createDeps = create.next), + (create.next = tag), + (tag.next = createDeps), + (inst.lastEffect = tag)); + return tag; + } + function createEffectInstance() { + return { destroy: void 0, resource: void 0 }; + } + function mountRef(initialValue) { + var hook = mountWorkInProgressHook(); + initialValue = { current: initialValue }; + return (hook.memoizedState = initialValue); + } + function mountEffectImpl(fiberFlags, hookFlags, create, createDeps) { + var hook = mountWorkInProgressHook(); + createDeps = void 0 === createDeps ? null : createDeps; + currentlyRenderingFiber.flags |= fiberFlags; + hook.memoizedState = pushSimpleEffect( + HasEffect | hookFlags, + createEffectInstance(), + create, + createDeps + ); + } + function updateEffectImpl(fiberFlags, hookFlags, create, deps) { + var hook = updateWorkInProgressHook(); + deps = void 0 === deps ? null : deps; + var inst = hook.memoizedState.inst; + null !== currentHook && + null !== deps && + areHookInputsEqual(deps, currentHook.memoizedState.deps) + ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) + : ((currentlyRenderingFiber.flags |= fiberFlags), + (hook.memoizedState = pushSimpleEffect( + HasEffect | hookFlags, + inst, + create, + deps + ))); + } + function mountEffect(create, createDeps) { + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode + ? mountEffectImpl(276826112, Passive, create, createDeps) + : mountEffectImpl(8390656, Passive, create, createDeps); + } + function useEffectEventImpl(payload) { + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; + if (null === componentUpdateQueue) + (componentUpdateQueue = createFunctionComponentUpdateQueue()), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), + (componentUpdateQueue.events = [payload]); + else { + var events = componentUpdateQueue.events; + null === events + ? (componentUpdateQueue.events = [payload]) + : events.push(payload); } - function updatePortal(returnFiber, current, portal, lanes) { - if ( - null === current || - 4 !== current.tag || - current.stateNode.containerInfo !== portal.containerInfo || - current.stateNode.implementation !== portal.implementation - ) - return ( - (current = createFiberFromPortal(portal, returnFiber.mode, lanes)), - (current.return = returnFiber), - (current._debugInfo = currentDebugInfo), - current + } + function mountEvent(callback) { + var hook = mountWorkInProgressHook(), + ref = { impl: callback }; + hook.memoizedState = ref; + return function () { + if ((executionContext & RenderContext) !== NoContext) + throw Error( + "A function wrapped in useEffectEvent can't be called during rendering." ); - current = useFiber(current, portal.children || []); - current.return = returnFiber; - current._debugInfo = currentDebugInfo; - return current; - } - function updateFragment(returnFiber, current, fragment, lanes, key) { - if (null === current || 7 !== current.tag) - return ( - (current = createFiberFromFragment( - fragment, - returnFiber.mode, - lanes, - key - )), - (current.return = returnFiber), - (current._debugOwner = returnFiber), - (current._debugTask = returnFiber._debugTask), - (current._debugInfo = currentDebugInfo), - current + return ref.impl.apply(void 0, arguments); + }; + } + function updateEvent(callback) { + var ref = updateWorkInProgressHook().memoizedState; + useEffectEventImpl({ ref: ref, nextImpl: callback }); + return function () { + if ((executionContext & RenderContext) !== NoContext) + throw Error( + "A function wrapped in useEffectEvent can't be called during rendering." ); - current = useFiber(current, fragment); - current.return = returnFiber; - current._debugInfo = currentDebugInfo; - return current; + return ref.impl.apply(void 0, arguments); + }; + } + function mountLayoutEffect(create, deps) { + var fiberFlags = 4194308; + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (fiberFlags |= 134217728); + return mountEffectImpl(fiberFlags, Layout, create, deps); + } + function imperativeHandleEffect(create, ref) { + if ("function" === typeof ref) { + create = create(); + var refCleanup = ref(create); + return function () { + "function" === typeof refCleanup ? refCleanup() : ref(null); + }; } - function createChild(returnFiber, newChild, lanes) { - if ( - ("string" === typeof newChild && "" !== newChild) || - "number" === typeof newChild || - "bigint" === typeof newChild - ) - return ( - (newChild = createFiberFromText( - "" + newChild, - returnFiber.mode, - lanes - )), - (newChild.return = returnFiber), - (newChild._debugOwner = returnFiber), - (newChild._debugTask = returnFiber._debugTask), - (newChild._debugInfo = currentDebugInfo), - newChild - ); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return ( - (lanes = createFiberFromElement( - newChild, - returnFiber.mode, - lanes - )), - coerceRef(lanes, newChild), - (lanes.return = returnFiber), - (returnFiber = pushDebugInfo(newChild._debugInfo)), - (lanes._debugInfo = currentDebugInfo), - (currentDebugInfo = returnFiber), - lanes - ); - case REACT_PORTAL_TYPE: - return ( - (newChild = createFiberFromPortal( - newChild, - returnFiber.mode, - lanes - )), - (newChild.return = returnFiber), - (newChild._debugInfo = currentDebugInfo), - newChild - ); - case REACT_LAZY_TYPE: - var _prevDebugInfo = pushDebugInfo(newChild._debugInfo); - newChild = callLazyInitInDEV(newChild); - returnFiber = createChild(returnFiber, newChild, lanes); - currentDebugInfo = _prevDebugInfo; - return returnFiber; + if (null !== ref && void 0 !== ref) + return ( + ref.hasOwnProperty("current") || + console.error( + "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", + "an object with keys {" + Object.keys(ref).join(", ") + "}" + ), + (create = create()), + (ref.current = create), + function () { + ref.current = null; } - if ( - isArrayImpl(newChild) || - getIteratorFn(newChild) || - "function" === typeof newChild[ASYNC_ITERATOR] - ) - return ( - (lanes = createFiberFromFragment( - newChild, - returnFiber.mode, - lanes, - null - )), - (lanes.return = returnFiber), - (lanes._debugOwner = returnFiber), - (lanes._debugTask = returnFiber._debugTask), - (returnFiber = pushDebugInfo(newChild._debugInfo)), - (lanes._debugInfo = currentDebugInfo), - (currentDebugInfo = returnFiber), - lanes - ); - if ("function" === typeof newChild.then) - return ( - (_prevDebugInfo = pushDebugInfo(newChild._debugInfo)), - (returnFiber = createChild( - returnFiber, - unwrapThenable(newChild), - lanes - )), - (currentDebugInfo = _prevDebugInfo), - returnFiber - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return createChild( - returnFiber, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); + ); + } + function mountImperativeHandle(ref, create, deps) { + "function" !== typeof create && + console.error( + "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", + null !== create ? typeof create : "null" + ); + deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; + var fiberFlags = 4194308; + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (fiberFlags |= 134217728); + mountEffectImpl( + fiberFlags, + Layout, + imperativeHandleEffect.bind(null, create, ref), + deps + ); + } + function updateImperativeHandle(ref, create, deps) { + "function" !== typeof create && + console.error( + "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", + null !== create ? typeof create : "null" + ); + deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; + updateEffectImpl( + 4, + Layout, + imperativeHandleEffect.bind(null, create, ref), + deps + ); + } + function mountCallback(callback, deps) { + mountWorkInProgressHook().memoizedState = [ + callback, + void 0 === deps ? null : deps + ]; + return callback; + } + function updateCallback(callback, deps) { + var hook = updateWorkInProgressHook(); + deps = void 0 === deps ? null : deps; + var prevState = hook.memoizedState; + if (null !== deps && areHookInputsEqual(deps, prevState[1])) + return prevState[0]; + hook.memoizedState = [callback, deps]; + return callback; + } + function mountMemo(nextCreate, deps) { + var hook = mountWorkInProgressHook(); + deps = void 0 === deps ? null : deps; + var nextValue = nextCreate(); + if (shouldDoubleInvokeUserFnsInHooksDEV) { + setIsStrictModeForDevtools(!0); + try { + nextCreate(); + } finally { + setIsStrictModeForDevtools(!1); } - "function" === typeof newChild && - warnOnFunctionType(returnFiber, newChild); - "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild); - return null; } - function updateSlot(returnFiber, oldFiber, newChild, lanes) { - var key = null !== oldFiber ? oldFiber.key : null; - if ( - ("string" === typeof newChild && "" !== newChild) || - "number" === typeof newChild || - "bigint" === typeof newChild - ) - return null !== key - ? null - : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return newChild.key === key - ? ((key = pushDebugInfo(newChild._debugInfo)), - (returnFiber = updateElement( - returnFiber, - oldFiber, - newChild, - lanes - )), - (currentDebugInfo = key), - returnFiber) - : null; - case REACT_PORTAL_TYPE: - return newChild.key === key - ? updatePortal(returnFiber, oldFiber, newChild, lanes) - : null; - case REACT_LAZY_TYPE: - return ( - (key = pushDebugInfo(newChild._debugInfo)), - (newChild = callLazyInitInDEV(newChild)), - (returnFiber = updateSlot( - returnFiber, - oldFiber, - newChild, - lanes - )), - (currentDebugInfo = key), - returnFiber - ); - } - if ( - isArrayImpl(newChild) || - getIteratorFn(newChild) || - "function" === typeof newChild[ASYNC_ITERATOR] - ) { - if (null !== key) return null; - key = pushDebugInfo(newChild._debugInfo); - returnFiber = updateFragment( - returnFiber, - oldFiber, - newChild, - lanes, - null - ); - currentDebugInfo = key; - return returnFiber; - } - if ("function" === typeof newChild.then) - return ( - (key = pushDebugInfo(newChild._debugInfo)), - (returnFiber = updateSlot( - returnFiber, - oldFiber, - unwrapThenable(newChild), - lanes - )), - (currentDebugInfo = key), - returnFiber - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return updateSlot( - returnFiber, - oldFiber, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); + hook.memoizedState = [nextValue, deps]; + return nextValue; + } + function updateMemo(nextCreate, deps) { + var hook = updateWorkInProgressHook(); + deps = void 0 === deps ? null : deps; + var prevState = hook.memoizedState; + if (null !== deps && areHookInputsEqual(deps, prevState[1])) + return prevState[0]; + prevState = nextCreate(); + if (shouldDoubleInvokeUserFnsInHooksDEV) { + setIsStrictModeForDevtools(!0); + try { + nextCreate(); + } finally { + setIsStrictModeForDevtools(!1); } - "function" === typeof newChild && - warnOnFunctionType(returnFiber, newChild); - "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild); - return null; } - function updateFromMap( - existingChildren, - returnFiber, - newIdx, - newChild, - lanes - ) { - if ( - ("string" === typeof newChild && "" !== newChild) || - "number" === typeof newChild || - "bigint" === typeof newChild - ) - return ( - (existingChildren = existingChildren.get(newIdx) || null), - updateTextNode(returnFiber, existingChildren, "" + newChild, lanes) + hook.memoizedState = [prevState, deps]; + return prevState; + } + function mountDeferredValue(value, initialValue) { + var hook = mountWorkInProgressHook(); + return mountDeferredValueImpl(hook, value, initialValue); + } + function updateDeferredValue(value, initialValue) { + var hook = updateWorkInProgressHook(); + return updateDeferredValueImpl( + hook, + currentHook.memoizedState, + value, + initialValue + ); + } + function rerenderDeferredValue(value, initialValue) { + var hook = updateWorkInProgressHook(); + return null === currentHook + ? mountDeferredValueImpl(hook, value, initialValue) + : updateDeferredValueImpl( + hook, + currentHook.memoizedState, + value, + initialValue ); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return ( - (newIdx = - existingChildren.get( - null === newChild.key ? newIdx : newChild.key - ) || null), - (existingChildren = pushDebugInfo(newChild._debugInfo)), - (returnFiber = updateElement( - returnFiber, - newIdx, - newChild, - lanes - )), - (currentDebugInfo = existingChildren), - returnFiber - ); - case REACT_PORTAL_TYPE: - return ( - (existingChildren = - existingChildren.get( - null === newChild.key ? newIdx : newChild.key - ) || null), - updatePortal(returnFiber, existingChildren, newChild, lanes) - ); - case REACT_LAZY_TYPE: - var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo); - newChild = callLazyInitInDEV(newChild); - returnFiber = updateFromMap( - existingChildren, - returnFiber, - newIdx, - newChild, - lanes - ); - currentDebugInfo = _prevDebugInfo7; - return returnFiber; - } - if ( - isArrayImpl(newChild) || - getIteratorFn(newChild) || - "function" === typeof newChild[ASYNC_ITERATOR] - ) - return ( - (newIdx = existingChildren.get(newIdx) || null), - (existingChildren = pushDebugInfo(newChild._debugInfo)), - (returnFiber = updateFragment( - returnFiber, - newIdx, - newChild, - lanes, - null - )), - (currentDebugInfo = existingChildren), - returnFiber - ); - if ("function" === typeof newChild.then) - return ( - (_prevDebugInfo7 = pushDebugInfo(newChild._debugInfo)), - (returnFiber = updateFromMap( - existingChildren, - returnFiber, - newIdx, - unwrapThenable(newChild), - lanes - )), - (currentDebugInfo = _prevDebugInfo7), - returnFiber - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return updateFromMap( - existingChildren, - returnFiber, - newIdx, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); - } - "function" === typeof newChild && - warnOnFunctionType(returnFiber, newChild); - "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild); - return null; - } - function warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys) { - if ("object" !== typeof child || null === child) return knownKeys; - switch (child.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - warnForMissingKey(returnFiber, workInProgress, child); - var key = child.key; - if ("string" !== typeof key) break; - if (null === knownKeys) { - knownKeys = new Set(); - knownKeys.add(key); - break; - } - if (!knownKeys.has(key)) { - knownKeys.add(key); - break; - } - runWithFiberInDEV(workInProgress, function () { - console.error( - "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.", - key - ); - }); - break; - case REACT_LAZY_TYPE: - (child = callLazyInitInDEV(child)), - warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys); - } - return knownKeys; - } - function reconcileChildrenArray( - returnFiber, - currentFirstChild, - newChildren, - lanes - ) { - for ( - var knownKeys = null, - resultingFirstChild = null, - previousNewFiber = null, - oldFiber = currentFirstChild, - newIdx = (currentFirstChild = 0), - nextOldFiber = null; - null !== oldFiber && newIdx < newChildren.length; - newIdx++ + } + function mountDeferredValueImpl(hook, value, initialValue) { + if (void 0 === initialValue || 0 !== (renderLanes & 1073741824)) + return (hook.memoizedState = value); + hook.memoizedState = initialValue; + hook = requestDeferredLane(); + currentlyRenderingFiber.lanes |= hook; + workInProgressRootSkippedLanes |= hook; + return initialValue; + } + function updateDeferredValueImpl(hook, prevValue, value, initialValue) { + if (objectIs(value, prevValue)) return value; + if (null !== currentTreeHiddenStackCursor.current) + return ( + (hook = mountDeferredValueImpl(hook, value, initialValue)), + objectIs(hook, prevValue) || (didReceiveUpdate = !0), + hook + ); + if (0 === (renderLanes & 42)) + return (didReceiveUpdate = !0), (hook.memoizedState = value); + hook = requestDeferredLane(); + currentlyRenderingFiber.lanes |= hook; + workInProgressRootSkippedLanes |= hook; + return prevValue; + } + function startTransition( + fiber, + queue, + pendingState, + finishedState, + callback + ) { + var previousPriority = ReactDOMSharedInternals.p; + ReactDOMSharedInternals.p = + 0 !== previousPriority && previousPriority < ContinuousEventPriority + ? previousPriority + : ContinuousEventPriority; + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + ReactSharedInternals.T = currentTransition; + dispatchOptimisticSetState(fiber, !1, queue, pendingState); + currentTransition._updatedFibers = new Set(); + try { + var returnValue = callback(), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + if ( + null !== returnValue && + "object" === typeof returnValue && + "function" === typeof returnValue.then ) { - oldFiber.index > newIdx - ? ((nextOldFiber = oldFiber), (oldFiber = null)) - : (nextOldFiber = oldFiber.sibling); - var newFiber = updateSlot( - returnFiber, - oldFiber, - newChildren[newIdx], - lanes + var thenableForFinishedState = chainThenableValue( + returnValue, + finishedState ); - if (null === newFiber) { - null === oldFiber && (oldFiber = nextOldFiber); - break; - } - knownKeys = warnOnInvalidKey( - returnFiber, - newFiber, - newChildren[newIdx], - knownKeys + dispatchSetStateInternal( + fiber, + queue, + thenableForFinishedState, + requestUpdateLane(fiber) ); - shouldTrackSideEffects && - oldFiber && - null === newFiber.alternate && - deleteChild(returnFiber, oldFiber); - currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); - null === previousNewFiber - ? (resultingFirstChild = newFiber) - : (previousNewFiber.sibling = newFiber); - previousNewFiber = newFiber; - oldFiber = nextOldFiber; - } - if (newIdx === newChildren.length) - return ( - deleteRemainingChildren(returnFiber, oldFiber), - isHydrating && pushTreeFork(returnFiber, newIdx), - resultingFirstChild + } else + dispatchSetStateInternal( + fiber, + queue, + finishedState, + requestUpdateLane(fiber) ); - if (null === oldFiber) { - for (; newIdx < newChildren.length; newIdx++) - (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)), - null !== oldFiber && - ((knownKeys = warnOnInvalidKey( - returnFiber, - oldFiber, - newChildren[newIdx], - knownKeys - )), - (currentFirstChild = placeChild( - oldFiber, - currentFirstChild, - newIdx - )), - null === previousNewFiber - ? (resultingFirstChild = oldFiber) - : (previousNewFiber.sibling = oldFiber), - (previousNewFiber = oldFiber)); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - for ( - oldFiber = mapRemainingChildren(oldFiber); - newIdx < newChildren.length; - newIdx++ - ) - (nextOldFiber = updateFromMap( - oldFiber, - returnFiber, - newIdx, - newChildren[newIdx], - lanes - )), - null !== nextOldFiber && - ((knownKeys = warnOnInvalidKey( - returnFiber, - nextOldFiber, - newChildren[newIdx], - knownKeys - )), - shouldTrackSideEffects && - null !== nextOldFiber.alternate && - oldFiber.delete( - null === nextOldFiber.key ? newIdx : nextOldFiber.key - ), - (currentFirstChild = placeChild( - nextOldFiber, - currentFirstChild, - newIdx - )), - null === previousNewFiber - ? (resultingFirstChild = nextOldFiber) - : (previousNewFiber.sibling = nextOldFiber), - (previousNewFiber = nextOldFiber)); - shouldTrackSideEffects && - oldFiber.forEach(function (child) { - return deleteChild(returnFiber, child); - }); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; + } catch (error) { + dispatchSetStateInternal( + fiber, + queue, + { then: function () {}, status: "rejected", reason: error }, + requestUpdateLane(fiber) + ); + } finally { + (ReactDOMSharedInternals.p = previousPriority), + (ReactSharedInternals.T = prevTransition), + null === prevTransition && + currentTransition._updatedFibers && + ((fiber = currentTransition._updatedFibers.size), + currentTransition._updatedFibers.clear(), + 10 < fiber && + console.warn( + "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." + )); } - function reconcileChildrenAsyncIteratable( - returnFiber, - currentFirstChild, - newChildrenIterable, - lanes - ) { - var newChildren = newChildrenIterable[ASYNC_ITERATOR](); - newChildren !== newChildrenIterable || - (0 === returnFiber.tag && - "[object AsyncGeneratorFunction]" === - Object.prototype.toString.call(returnFiber.type) && - "[object AsyncGenerator]" === - Object.prototype.toString.call(newChildren)) || - (didWarnAboutGenerators || - console.error( - "Using AsyncIterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You can use an AsyncIterable that can iterate multiple times over the same items." - ), - (didWarnAboutGenerators = !0)); - if (null == newChildren) - throw Error("An iterable object provided no iterator."); - return reconcileChildrenIterator( - returnFiber, - currentFirstChild, - { - next: function () { - return unwrapThenable(newChildren.next()); + } + function startHostTransition(formFiber, pendingState, action, formData) { + if (5 !== formFiber.tag) + throw Error( + "Expected the form instance to be a HostComponent. This is a bug in React." + ); + var queue = ensureFormComponentIsStateful(formFiber).queue; + startTransition( + formFiber, + queue, + pendingState, + NotPendingTransition, + null === action + ? noop$2 + : function () { + requestFormReset$1(formFiber); + return action(formData); } - }, - lanes + ); + } + function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + if (null !== existingStateHook) return existingStateHook; + existingStateHook = { + memoizedState: NotPendingTransition, + baseState: NotPendingTransition, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: NotPendingTransition + }, + next: null + }; + var initialResetState = {}; + existingStateHook.next = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }, + next: null + }; + formFiber.memoizedState = existingStateHook; + formFiber = formFiber.alternate; + null !== formFiber && (formFiber.memoizedState = existingStateHook); + return existingStateHook; + } + function requestFormReset$1(formFiber) { + null === ReactSharedInternals.T && + console.error( + "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition." ); + var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetStateInternal( + formFiber, + resetStateQueue, + {}, + requestUpdateLane(formFiber) + ); + } + function mountTransition() { + var stateHook = mountStateImpl(!1); + stateHook = startTransition.bind( + null, + currentlyRenderingFiber, + stateHook.queue, + !0, + !1 + ); + mountWorkInProgressHook().memoizedState = stateHook; + return [!1, stateHook]; + } + function updateTransition() { + var booleanOrThenable = updateReducer(basicStateReducer)[0], + start = updateWorkInProgressHook().memoizedState; + return [ + "boolean" === typeof booleanOrThenable + ? booleanOrThenable + : useThenable(booleanOrThenable), + start + ]; + } + function rerenderTransition() { + var booleanOrThenable = rerenderReducer(basicStateReducer)[0], + start = updateWorkInProgressHook().memoizedState; + return [ + "boolean" === typeof booleanOrThenable + ? booleanOrThenable + : useThenable(booleanOrThenable), + start + ]; + } + function useHostTransitionStatus() { + return readContext(HostTransitionContext); + } + function mountId() { + var hook = mountWorkInProgressHook(), + identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + identifierPrefix = "\u00ab" + identifierPrefix + "R" + treeId; + treeId = localIdCounter++; + 0 < treeId && (identifierPrefix += "H" + treeId.toString(32)); + identifierPrefix += "\u00bb"; + } else + (treeId = globalClientIdCounter++), + (identifierPrefix = + "\u00ab" + identifierPrefix + "r" + treeId.toString(32) + "\u00bb"); + return (hook.memoizedState = identifierPrefix); + } + function mountRefresh() { + return (mountWorkInProgressHook().memoizedState = refreshCache.bind( + null, + currentlyRenderingFiber + )); + } + function refreshCache(fiber, seedKey, seedValue) { + for (var provider = fiber.return; null !== provider; ) { + switch (provider.tag) { + case 24: + case 3: + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); + var root = enqueueUpdate(provider, fiber, lane); + null !== root && + (startUpdateTimerByLane(lane), + scheduleUpdateOnFiber(root, provider, lane), + entangleTransitions(root, provider, lane)); + provider = createCache(); + null !== seedKey && + void 0 !== seedKey && + null !== root && + provider.data.set(seedKey, seedValue); + fiber.payload = { cache: provider }; + return; + } + provider = provider.return; } - function reconcileChildrenIterator( - returnFiber, - currentFirstChild, - newChildren, - lanes - ) { - if (null == newChildren) - throw Error("An iterable object provided no iterator."); - for ( - var resultingFirstChild = null, - previousNewFiber = null, - oldFiber = currentFirstChild, - newIdx = (currentFirstChild = 0), - nextOldFiber = null, - knownKeys = null, - step = newChildren.next(); - null !== oldFiber && !step.done; - newIdx++, step = newChildren.next() - ) { - oldFiber.index > newIdx - ? ((nextOldFiber = oldFiber), (oldFiber = null)) - : (nextOldFiber = oldFiber.sibling); - var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes); - if (null === newFiber) { - null === oldFiber && (oldFiber = nextOldFiber); - break; - } - knownKeys = warnOnInvalidKey( - returnFiber, - newFiber, - step.value, - knownKeys - ); - shouldTrackSideEffects && - oldFiber && - null === newFiber.alternate && - deleteChild(returnFiber, oldFiber); - currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); - null === previousNewFiber - ? (resultingFirstChild = newFiber) - : (previousNewFiber.sibling = newFiber); - previousNewFiber = newFiber; - oldFiber = nextOldFiber; - } - if (step.done) - return ( - deleteRemainingChildren(returnFiber, oldFiber), - isHydrating && pushTreeFork(returnFiber, newIdx), - resultingFirstChild - ); - if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildren.next()) - (oldFiber = createChild(returnFiber, step.value, lanes)), - null !== oldFiber && - ((knownKeys = warnOnInvalidKey( - returnFiber, - oldFiber, - step.value, - knownKeys - )), - (currentFirstChild = placeChild( - oldFiber, - currentFirstChild, - newIdx - )), - null === previousNewFiber - ? (resultingFirstChild = oldFiber) - : (previousNewFiber.sibling = oldFiber), - (previousNewFiber = oldFiber)); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - for ( - oldFiber = mapRemainingChildren(oldFiber); - !step.done; - newIdx++, step = newChildren.next() - ) - (nextOldFiber = updateFromMap( - oldFiber, - returnFiber, - newIdx, - step.value, - lanes - )), - null !== nextOldFiber && - ((knownKeys = warnOnInvalidKey( - returnFiber, - nextOldFiber, - step.value, - knownKeys - )), - shouldTrackSideEffects && - null !== nextOldFiber.alternate && - oldFiber.delete( - null === nextOldFiber.key ? newIdx : nextOldFiber.key - ), - (currentFirstChild = placeChild( - nextOldFiber, - currentFirstChild, - newIdx - )), - null === previousNewFiber - ? (resultingFirstChild = nextOldFiber) - : (previousNewFiber.sibling = nextOldFiber), - (previousNewFiber = nextOldFiber)); - shouldTrackSideEffects && - oldFiber.forEach(function (child) { - return deleteChild(returnFiber, child); - }); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - function reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - newChild, - lanes - ) { - "object" === typeof newChild && - null !== newChild && - newChild.type === REACT_FRAGMENT_TYPE && - null === newChild.key && - (validateFragmentProps(newChild, null, returnFiber), - (newChild = newChild.props.children)); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - var prevDebugInfo = pushDebugInfo(newChild._debugInfo); - a: { - for (var key = newChild.key; null !== currentFirstChild; ) { - if (currentFirstChild.key === key) { - key = newChild.type; - if (key === REACT_FRAGMENT_TYPE) { - if (7 === currentFirstChild.tag) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber( - currentFirstChild, - newChild.props.children - ); - lanes.return = returnFiber; - lanes._debugOwner = newChild._owner; - lanes._debugInfo = currentDebugInfo; - validateFragmentProps(newChild, lanes, returnFiber); - returnFiber = lanes; - break a; - } - } else if ( - currentFirstChild.elementType === key || - isCompatibleFamilyForHotReloading( - currentFirstChild, - newChild - ) || - ("object" === typeof key && - null !== key && - key.$$typeof === REACT_LAZY_TYPE && - callLazyInitInDEV(key) === currentFirstChild.type) - ) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber(currentFirstChild, newChild.props); - coerceRef(lanes, newChild); - lanes.return = returnFiber; - lanes._debugOwner = newChild._owner; - lanes._debugInfo = currentDebugInfo; - returnFiber = lanes; - break a; - } - deleteRemainingChildren(returnFiber, currentFirstChild); - break; - } else deleteChild(returnFiber, currentFirstChild); - currentFirstChild = currentFirstChild.sibling; - } - newChild.type === REACT_FRAGMENT_TYPE - ? ((lanes = createFiberFromFragment( - newChild.props.children, - returnFiber.mode, - lanes, - newChild.key - )), - (lanes.return = returnFiber), - (lanes._debugOwner = returnFiber), - (lanes._debugTask = returnFiber._debugTask), - (lanes._debugInfo = currentDebugInfo), - validateFragmentProps(newChild, lanes, returnFiber), - (returnFiber = lanes)) - : ((lanes = createFiberFromElement( - newChild, - returnFiber.mode, - lanes - )), - coerceRef(lanes, newChild), - (lanes.return = returnFiber), - (lanes._debugInfo = currentDebugInfo), - (returnFiber = lanes)); - } - returnFiber = placeSingleChild(returnFiber); - currentDebugInfo = prevDebugInfo; - return returnFiber; - case REACT_PORTAL_TYPE: - a: { - prevDebugInfo = newChild; - for ( - newChild = prevDebugInfo.key; - null !== currentFirstChild; - - ) { - if (currentFirstChild.key === newChild) - if ( - 4 === currentFirstChild.tag && - currentFirstChild.stateNode.containerInfo === - prevDebugInfo.containerInfo && - currentFirstChild.stateNode.implementation === - prevDebugInfo.implementation - ) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber( - currentFirstChild, - prevDebugInfo.children || [] - ); - lanes.return = returnFiber; - returnFiber = lanes; - break a; - } else { - deleteRemainingChildren(returnFiber, currentFirstChild); - break; - } - else deleteChild(returnFiber, currentFirstChild); - currentFirstChild = currentFirstChild.sibling; - } - lanes = createFiberFromPortal( - prevDebugInfo, - returnFiber.mode, - lanes - ); - lanes.return = returnFiber; - returnFiber = lanes; - } - return placeSingleChild(returnFiber); - case REACT_LAZY_TYPE: + } + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && + console.error( + "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." + ); + args = requestUpdateLane(fiber); + var update = { + lane: args, + revertLane: 0, + action: action, + hasEagerState: !1, + eagerState: null, + next: null + }; + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (startUpdateTimerByLane(args), + scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && + console.error( + "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." + ); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args) && + startUpdateTimerByLane(args); + } + function dispatchSetStateInternal(fiber, queue, action, lane) { + var update = { + lane: lane, + revertLane: 0, + action: action, + hasEagerState: !1, + eagerState: null, + next: null + }; + if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update); + else { + var alternate = fiber.alternate; + if ( + 0 === fiber.lanes && + (null === alternate || 0 === alternate.lanes) && + ((alternate = queue.lastRenderedReducer), null !== alternate) + ) { + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + var currentState = queue.lastRenderedState, + eagerState = alternate(currentState, action); + update.hasEagerState = !0; + update.eagerState = eagerState; + if (objectIs(eagerState, currentState)) return ( - (prevDebugInfo = pushDebugInfo(newChild._debugInfo)), - (newChild = callLazyInitInDEV(newChild)), - (returnFiber = reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - newChild, - lanes - )), - (currentDebugInfo = prevDebugInfo), - returnFiber - ); - } - if (isArrayImpl(newChild)) - return ( - (prevDebugInfo = pushDebugInfo(newChild._debugInfo)), - (returnFiber = reconcileChildrenArray( - returnFiber, - currentFirstChild, - newChild, - lanes - )), - (currentDebugInfo = prevDebugInfo), - returnFiber - ); - if (getIteratorFn(newChild)) { - prevDebugInfo = pushDebugInfo(newChild._debugInfo); - key = getIteratorFn(newChild); - if ("function" !== typeof key) - throw Error( - "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." + enqueueUpdate$1(fiber, queue, update, 0), + null === workInProgressRoot && + finishQueueingConcurrentUpdates(), + !1 ); - var newChildren = key.call(newChild); - if (newChildren === newChild) { - if ( - 0 !== returnFiber.tag || - "[object GeneratorFunction]" !== - Object.prototype.toString.call(returnFiber.type) || - "[object Generator]" !== - Object.prototype.toString.call(newChildren) - ) - didWarnAboutGenerators || - console.error( - "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items." - ), - (didWarnAboutGenerators = !0); - } else - newChild.entries !== key || - didWarnAboutMaps || - (console.error( - "Using Maps as children is not supported. Use an array of keyed ReactElements instead." - ), - (didWarnAboutMaps = !0)); - returnFiber = reconcileChildrenIterator( - returnFiber, - currentFirstChild, - newChildren, - lanes - ); - currentDebugInfo = prevDebugInfo; - return returnFiber; + } catch (error) { + } finally { + ReactSharedInternals.H = prevDispatcher; } - if ("function" === typeof newChild[ASYNC_ITERATOR]) - return ( - (prevDebugInfo = pushDebugInfo(newChild._debugInfo)), - (returnFiber = reconcileChildrenAsyncIteratable( - returnFiber, - currentFirstChild, - newChild, - lanes - )), - (currentDebugInfo = prevDebugInfo), - returnFiber - ); - if ("function" === typeof newChild.then) - return ( - (prevDebugInfo = pushDebugInfo(newChild._debugInfo)), - (returnFiber = reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - unwrapThenable(newChild), - lanes - )), - (currentDebugInfo = prevDebugInfo), - returnFiber - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); } - if ( - ("string" === typeof newChild && "" !== newChild) || - "number" === typeof newChild || - "bigint" === typeof newChild - ) + action = enqueueConcurrentHookUpdate(fiber, queue, update, lane); + if (null !== action) return ( - (prevDebugInfo = "" + newChild), - null !== currentFirstChild && 6 === currentFirstChild.tag - ? (deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ), - (lanes = useFiber(currentFirstChild, prevDebugInfo)), - (lanes.return = returnFiber), - (returnFiber = lanes)) - : (deleteRemainingChildren(returnFiber, currentFirstChild), - (lanes = createFiberFromText( - prevDebugInfo, - returnFiber.mode, - lanes - )), - (lanes.return = returnFiber), - (lanes._debugOwner = returnFiber), - (lanes._debugTask = returnFiber._debugTask), - (lanes._debugInfo = currentDebugInfo), - (returnFiber = lanes)), - placeSingleChild(returnFiber) + scheduleUpdateOnFiber(action, fiber, lane), + entangleTransitionUpdate(action, queue, lane), + !0 ); - "function" === typeof newChild && - warnOnFunctionType(returnFiber, newChild); - "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild); - return deleteRemainingChildren(returnFiber, currentFirstChild); } - return function (returnFiber, currentFirstChild, newChild, lanes) { - var prevDebugInfo = currentDebugInfo; - currentDebugInfo = null; - try { - thenableIndexCounter = 0; - var firstChildFiber = reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - newChild, - lanes - ); - thenableState = null; - return firstChildFiber; - } catch (x) { - if (x === SuspenseException || x === SuspenseActionException) throw x; - var fiber = createFiber(29, x, null, returnFiber.mode); - fiber.lanes = lanes; - fiber.return = returnFiber; - var debugInfo = (fiber._debugInfo = currentDebugInfo); - fiber._debugOwner = returnFiber._debugOwner; - fiber._debugTask = returnFiber._debugTask; - if (null != debugInfo) - for (var i = debugInfo.length - 1; 0 <= i; i--) - if ("string" === typeof debugInfo[i].stack) { - fiber._debugOwner = debugInfo[i]; - fiber._debugTask = debugInfo[i].debugTask; - break; - } - return fiber; - } finally { - currentDebugInfo = prevDebugInfo; - } - }; - } - function pushPrimaryTreeSuspenseHandler(handler) { - var current = handler.alternate; - push( - suspenseStackCursor, - suspenseStackCursor.current & SubtreeSuspenseContextMask, - handler - ); - push(suspenseHandlerStackCursor, handler, handler); - null === shellBoundary && - (null === current || null !== currentTreeHiddenStackCursor.current - ? (shellBoundary = handler) - : null !== current.memoizedState && (shellBoundary = handler)); - } - function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if ( - (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); + return !1; } - function reuseSuspenseHandlerOnStack(fiber) { - push(suspenseStackCursor, suspenseStackCursor.current, fiber); - push( - suspenseHandlerStackCursor, - suspenseHandlerStackCursor.current, - fiber + function dispatchOptimisticSetState( + fiber, + throwIfDuringRender, + queue, + action + ) { + null === ReactSharedInternals.T && + 0 === currentEntangledLane && + console.error( + "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition." + ); + action = { + lane: 2, + revertLane: requestTransitionLane(), + action: action, + hasEagerState: !1, + eagerState: null, + next: null + }; + if (isRenderPhaseUpdate(fiber)) { + if (throwIfDuringRender) + throw Error("Cannot update optimistic state while rendering."); + console.error("Cannot call startTransition while rendering."); + } else + (throwIfDuringRender = enqueueConcurrentHookUpdate( + fiber, + queue, + action, + 2 + )), + null !== throwIfDuringRender && + (startUpdateTimerByLane(2), + scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2)); + } + function isRenderPhaseUpdate(fiber) { + var alternate = fiber.alternate; + return ( + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } - function popSuspenseHandler(fiber) { - pop(suspenseHandlerStackCursor, fiber); - shellBoundary === fiber && (shellBoundary = null); - pop(suspenseStackCursor, fiber); + function enqueueRenderPhaseUpdate(queue, update) { + didScheduleRenderPhaseUpdateDuringThisPass = + didScheduleRenderPhaseUpdate = !0; + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; } - function findFirstSuspended(row) { - for (var node = row; null !== node; ) { - if (13 === node.tag) { - var state = node.memoizedState; - if ( - null !== state && - ((state = state.dehydrated), - null === state || - state.data === SUSPENSE_PENDING_START_DATA || - isSuspenseInstanceFallback(state)) - ) - return node; - } else if ( - 19 === node.tag && - void 0 !== node.memoizedProps.revealOrder - ) { - if (0 !== (node.flags & 128)) return node; - } else if (null !== node.child) { - node.child.return = node; - node = node.child; - continue; - } - if (node === row) break; - for (; null === node.sibling; ) { - if (null === node.return || node.return === row) return null; - node = node.return; - } - node.sibling.return = node.return; - node = node.sibling; + function entangleTransitionUpdate(root, queue, lane) { + if (0 !== (lane & 4194048)) { + var queueLanes = queue.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + queue.lanes = lane; + markRootEntangled(root, lane); } - return null; - } - function defaultOnUncaughtError(error) { - reportGlobalError(error); - console.warn( - "%s\n\n%s\n", - componentName - ? "An error occurred in the <" + componentName + "> component." - : "An error occurred in one of your React components.", - "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries." - ); } - function defaultOnCaughtError(error) { - var componentNameMessage = componentName - ? "The above error occurred in the <" + componentName + "> component." - : "The above error occurred in one of your React components.", - recreateMessage = - "React will try to recreate this component tree from scratch using the error boundary you provided, " + - ((errorBoundaryName || "Anonymous") + "."); - if ( - "object" === typeof error && - null !== error && - "string" === typeof error.environmentName - ) { - var JSCompiler_inline_result = error.environmentName; - error = [ - "%o\n\n%s\n\n%s\n", - error, - componentNameMessage, - recreateMessage - ].slice(0); - "string" === typeof error[0] - ? error.splice( - 0, - 1, - badgeFormat + error[0], - badgeStyle, - pad + JSCompiler_inline_result + pad, - resetStyle - ) - : error.splice( - 0, - 0, - badgeFormat, - badgeStyle, - pad + JSCompiler_inline_result + pad, - resetStyle - ); - error.unshift(console); - JSCompiler_inline_result = bind.apply(console.error, error); - JSCompiler_inline_result(); - } else + function startGesture(fiber, queue, gestureProvider, gestureOptions) { + var root = enqueueGestureRender(fiber); + if (null === root) return function () {}; + fiber = getCurrentGestureOffset(gestureProvider); + var range = gestureOptions && gestureOptions.range, + rangePrevious = range ? range[0] : 0, + rangeCurrent = range ? range[1] : fiber; + range = range ? range[2] : 100; + ((rangePrevious > rangeCurrent && range > rangeCurrent) || + (rangePrevious < rangeCurrent && range < rangeCurrent)) && console.error( - "%o\n\n%s\n\n%s\n", - error, - componentNameMessage, - recreateMessage + 'The range of a gesture needs "previous" and "next" to be on either side of the "current" offset. Both cannot be above current and both cannot be below current.' ); - } - function defaultOnRecoverableError(error) { - reportGlobalError(error); - } - function logUncaughtError(root, errorInfo) { - try { - componentName = errorInfo.source - ? getComponentNameFromFiber(errorInfo.source) - : null; - errorBoundaryName = null; - var error = errorInfo.value; - if (null !== ReactSharedInternals.actQueue) - ReactSharedInternals.thrownErrors.push(error); - else { - var onUncaughtError = root.onUncaughtError; - onUncaughtError(error, { componentStack: errorInfo.stack }); + var isFlippedDirection = rangePrevious > range, + update = { + gesture: scheduleGesture( + root, + gestureProvider, + fiber < rangeCurrent + ? isFlippedDirection + : fiber > rangeCurrent + ? !isFlippedDirection + : gestureOptions && "next" === gestureOptions.direction + ? !0 + : gestureOptions && "previous" === gestureOptions.direction + ? !1 + : queue.initialDirection, + rangePrevious, + rangeCurrent, + range + ), + prev: null, + next: queue.pending + }; + null !== queue.pending && (queue.pending.prev = update); + queue.pending = update; + return function () { + if (null === update.prev) + if (queue.pending === update) queue.pending = update.next; + else return; + else + (update.prev.next = update.next), + null !== update.next && (update.next.prev = update.prev), + (update.prev = null), + (update.next = null); + var gesture = update.gesture; + gesture.count--; + if (0 === gesture.count) { + var cancelDirectionSubscription = gesture.cancel; + cancelDirectionSubscription(); + deleteScheduledGesture(root, gesture); + cancelDirectionSubscription = gesture.running; + if (null !== cancelDirectionSubscription) { + var pendingLanesExcludingGestureLane = root.pendingLanes & -65; + 0 !== (pendingLanesExcludingGestureLane & 124) || + 0 !== (pendingLanesExcludingGestureLane & 4194048) + ? ((cancelDirectionSubscription = root.stoppingGestures), + null !== cancelDirectionSubscription && + ((gesture.next = cancelDirectionSubscription), + (cancelDirectionSubscription.prev = gesture)), + (root.stoppingGestures = gesture)) + : ((gesture.running = null), + cancelDirectionSubscription.skipTransition()); + } } - } catch (e$4) { - setTimeout(function () { - throw e$4; - }); - } - } - function logCaughtError(root, boundary, errorInfo) { - try { - componentName = errorInfo.source - ? getComponentNameFromFiber(errorInfo.source) - : null; - errorBoundaryName = getComponentNameFromFiber(boundary); - var onCaughtError = root.onCaughtError; - onCaughtError(errorInfo.value, { - componentStack: errorInfo.stack, - errorBoundary: 1 === boundary.tag ? boundary.stateNode : null - }); - } catch (e$5) { - setTimeout(function () { - throw e$5; - }); - } - } - function createRootErrorUpdate(root, errorInfo, lane) { - lane = createUpdate(lane); - lane.tag = CaptureUpdate; - lane.payload = { element: null }; - lane.callback = function () { - runWithFiberInDEV(errorInfo.source, logUncaughtError, root, errorInfo); }; - return lane; - } - function createClassErrorUpdate(lane) { - lane = createUpdate(lane); - lane.tag = CaptureUpdate; - return lane; } - function initializeClassErrorUpdate(update, root, fiber, errorInfo) { - var getDerivedStateFromError = fiber.type.getDerivedStateFromError; - if ("function" === typeof getDerivedStateFromError) { - var error = errorInfo.value; - update.payload = function () { - return getDerivedStateFromError(error); - }; - update.callback = function () { - markFailedErrorBoundaryForHotReloading(fiber); - runWithFiberInDEV( - errorInfo.source, - logCaughtError, - root, - fiber, - errorInfo - ); - }; + function mountSwipeTransition(previous, current) { + previous = { + pending: null, + dispatch: null, + initialDirection: previous === current + }; + var startGestureOnHook = (previous.dispatch = startGesture.bind( + null, + currentlyRenderingFiber, + previous + )); + mountWorkInProgressHook().queue = previous; + return [current, startGestureOnHook]; + } + function updateSwipeTransition(previous, current, next) { + var queue = updateWorkInProgressHook().queue, + startGestureOnHook = queue.dispatch, + rootRenderLanes = workInProgressRootRenderLanes, + value = current; + if (null !== queue.pending) { + if (64 === rootRenderLanes) { + rootRenderLanes = workInProgressRoot; + if (null === rootRenderLanes) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + rootRenderLanes = rootRenderLanes.pendingGestures; + if (null !== rootRenderLanes) + for (var update = queue.pending; null !== update; ) { + if (rootRenderLanes === update.gesture) { + value = rootRenderLanes.direction ? next : previous; + break; + } + update = update.next; + } + didReceiveUpdate = !0; + } + currentlyRenderingFiber.lanes |= 64; } - var inst = fiber.stateNode; - null !== inst && - "function" === typeof inst.componentDidCatch && - (update.callback = function () { - markFailedErrorBoundaryForHotReloading(fiber); + queue.initialDirection = previous === current; + return [value, startGestureOnHook]; + } + function pushDebugInfo(debugInfo) { + var previousDebugInfo = currentDebugInfo; + null != debugInfo && + (currentDebugInfo = + null === previousDebugInfo + ? debugInfo + : previousDebugInfo.concat(debugInfo)); + return previousDebugInfo; + } + function validateFragmentProps(element, fiber, returnFiber) { + for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) { + var key = keys[i]; + if ("children" !== key && "key" !== key && "ref" !== key) { + null === fiber && + ((fiber = createFiberFromElement(element, returnFiber.mode, 0)), + (fiber._debugInfo = currentDebugInfo), + (fiber.return = returnFiber)); runWithFiberInDEV( - errorInfo.source, - logCaughtError, - root, fiber, - errorInfo - ); - "function" !== typeof getDerivedStateFromError && - (null === legacyErrorBoundariesThatAlreadyFailed - ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this])) - : legacyErrorBoundariesThatAlreadyFailed.add(this)); - callComponentDidCatchInDEV(this, errorInfo); - "function" === typeof getDerivedStateFromError || - (0 === (fiber.lanes & 2) && + function (erroredKey) { console.error( - "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.", - getComponentNameFromFiber(fiber) || "Unknown" - )); - }); - } - function resetSuspendedComponent(sourceFiber, rootRenderLanes) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } - function markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ) { - suspenseBoundary.flags |= 65536; - suspenseBoundary.lanes = rootRenderLanes; - return suspenseBoundary; - } - function throwException( - root, - returnFiber, - sourceFiber, - value, - rootRenderLanes - ) { - sourceFiber.flags |= 32768; - isDevToolsPresent && restorePendingUpdaters(root, rootRenderLanes); - if ( - null !== value && - "object" === typeof value && - (value.$$typeof === REACT_POSTPONE_TYPE && - (value = { then: function () {} }), - "function" === typeof value.then) - ) { - resetSuspendedComponent(sourceFiber, rootRenderLanes); - isHydrating && (didSuspendOrErrorDEV = !0); - var suspenseBoundary = suspenseHandlerStackCursor.current; - if (null !== suspenseBoundary) { - switch (suspenseBoundary.tag) { - case 13: - return ( - null === shellBoundary - ? renderDidSuspendDelayIfPossible() - : null === suspenseBoundary.alternate && - workInProgressRootExitStatus === RootInProgress && - (workInProgressRootExitStatus = RootSuspended), - (suspenseBoundary.flags &= -257), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), - value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? (suspenseBoundary.updateQueue = new Set([value])) - : sourceFiber.add(value), - attachPingListener(root, value, rootRenderLanes)), - !1 - ); - case 22: - return ( - (suspenseBoundary.flags |= 65536), - value === noopSuspenseyCommitThenable - ? (suspenseBoundary.flags |= 16384) - : ((sourceFiber = suspenseBoundary.updateQueue), - null === sourceFiber - ? ((sourceFiber = { - transitions: null, - markerInstances: null, - retryQueue: new Set([value]) - }), - (suspenseBoundary.updateQueue = sourceFiber)) - : ((returnFiber = sourceFiber.retryQueue), - null === returnFiber - ? (sourceFiber.retryQueue = new Set([value])) - : returnFiber.add(value)), - attachPingListener(root, value, rootRenderLanes)), - !1 + "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key`, `ref`, and `children` props.", + erroredKey ); - } - throw Error( - "Unexpected Suspense handler tag (" + - suspenseBoundary.tag + - "). This is a bug in React." + }, + key ); + break; } - attachPingListener(root, value, rootRenderLanes); - renderDidSuspendDelayIfPossible(); - return !1; } - if (isHydrating) - return ( - (didSuspendOrErrorDEV = !0), - (suspenseBoundary = suspenseHandlerStackCursor.current), - null !== suspenseBoundary - ? (0 === (suspenseBoundary.flags & 65536) && - (suspenseBoundary.flags |= 256), - markSuspenseBoundaryShouldCapture( - suspenseBoundary, - returnFiber, - sourceFiber, - root, - rootRenderLanes - ), - value !== HydrationMismatchException && - queueHydrationError( - createCapturedValueAtFiber( - Error( - "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.", - { cause: value } - ), - sourceFiber - ) - )) - : (value !== HydrationMismatchException && - queueHydrationError( - createCapturedValueAtFiber( - Error( - "There was an error while hydrating but React was able to recover by instead client rendering the entire root.", - { cause: value } - ), - sourceFiber - ) - ), - (root = root.current.alternate), - (root.flags |= 65536), - (rootRenderLanes &= -rootRenderLanes), - (root.lanes |= rootRenderLanes), - (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), - (rootRenderLanes = createRootErrorUpdate( - root.stateNode, - sourceFiber, - rootRenderLanes - )), - enqueueCapturedUpdate(root, rootRenderLanes), - workInProgressRootExitStatus !== RootSuspendedWithDelay && - (workInProgressRootExitStatus = RootErrored)), - !1 - ); - queueConcurrentError( - createCapturedValueAtFiber( - Error( - "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", - { cause: value } - ), - sourceFiber - ) - ); - workInProgressRootExitStatus !== RootSuspendedWithDelay && - (workInProgressRootExitStatus = RootErrored); - if (null === returnFiber) return !0; - sourceFiber = createCapturedValueAtFiber(value, sourceFiber); - value = returnFiber; - do { - switch (value.tag) { - case 3: - return ( - (value.flags |= 65536), - (root = rootRenderLanes & -rootRenderLanes), - (value.lanes |= root), - (root = createRootErrorUpdate( - value.stateNode, - sourceFiber, - root - )), - enqueueCapturedUpdate(value, root), - !1 - ); - case 1: - if ( - ((returnFiber = value.type), - (suspenseBoundary = value.stateNode), - 0 === (value.flags & 128) && - ("function" === typeof returnFiber.getDerivedStateFromError || - (null !== suspenseBoundary && - "function" === typeof suspenseBoundary.componentDidCatch && - (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has( - suspenseBoundary - ))))) - ) - return ( - (value.flags |= 65536), - (rootRenderLanes &= -rootRenderLanes), - (value.lanes |= rootRenderLanes), - (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), - initializeClassErrorUpdate( - rootRenderLanes, - root, - value, - sourceFiber - ), - enqueueCapturedUpdate(value, rootRenderLanes), - !1 - ); - } - value = value.return; - } while (null !== value); - return !1; } - function reconcileChildren( - current, - workInProgress, - nextChildren, - renderLanes - ) { - workInProgress.child = - null === current - ? mountChildFibers(workInProgress, null, nextChildren, renderLanes) - : reconcileChildFibers( - workInProgress, - current.child, - nextChildren, - renderLanes - ); + function unwrapThenable(thenable) { + var index = thenableIndexCounter; + thenableIndexCounter += 1; + null === thenableState && (thenableState = createThenableState()); + return trackUsedThenable(thenableState, thenable, index); } - function updateForwardRef( - current, - workInProgress, - Component, - nextProps, - renderLanes - ) { - Component = Component.render; - var ref = workInProgress.ref; - if ("ref" in nextProps) { - var propsWithoutRef = {}; - for (var key in nextProps) - "ref" !== key && (propsWithoutRef[key] = nextProps[key]); - } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress); - nextProps = renderWithHooks( - current, - workInProgress, - Component, - propsWithoutRef, - ref, - renderLanes - ); - key = checkDidRenderIdHook(); - if (null !== current && !didReceiveUpdate) - return ( - bailoutHooks(current, workInProgress, renderLanes), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) + function coerceRef(workInProgress, element) { + element = element.props.ref; + workInProgress.ref = void 0 !== element ? element : null; + } + function throwOnInvalidObjectType(returnFiber, newChild) { + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' ); - isHydrating && key && pushMaterializedTreeId(workInProgress); - workInProgress.flags |= 1; - reconcileChildren(current, workInProgress, nextProps, renderLanes); - return workInProgress.child; + returnFiber = Object.prototype.toString.call(newChild); + throw Error( + "Objects are not valid as a React child (found: " + + ("[object Object]" === returnFiber + ? "object with keys {" + Object.keys(newChild).join(", ") + "}" + : returnFiber) + + "). If you meant to render a collection of children, use an array instead." + ); } - function updateMemoComponent( - current, - workInProgress, - Component, - nextProps, - renderLanes - ) { - if (null === current) { - var type = Component.type; - if ( - "function" === typeof type && - !shouldConstruct(type) && - void 0 === type.defaultProps && - null === Component.compare - ) - return ( - (Component = resolveFunctionForHotReloading(type)), - (workInProgress.tag = 15), - (workInProgress.type = Component), - validateFunctionComponentInDev(workInProgress, type), - updateSimpleMemoComponent( - current, - workInProgress, - Component, - nextProps, - renderLanes + function warnOnFunctionType(returnFiber, invalidChild) { + var parentName = getComponentNameFromFiber(returnFiber) || "Component"; + ownerHasFunctionTypeWarning[parentName] || + ((ownerHasFunctionTypeWarning[parentName] = !0), + (invalidChild = + invalidChild.displayName || invalidChild.name || "Component"), + 3 === returnFiber.tag + ? console.error( + "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)", + invalidChild, + invalidChild, + invalidChild ) - ); - current = createFiberFromTypeAndProps( - Component.type, - null, - nextProps, - workInProgress, - workInProgress.mode, - renderLanes - ); - current.ref = workInProgress.ref; - current.return = workInProgress; - return (workInProgress.child = current); + : console.error( + "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}", + invalidChild, + invalidChild, + parentName, + invalidChild, + parentName + )); + } + function warnOnSymbolType(returnFiber, invalidChild) { + var parentName = getComponentNameFromFiber(returnFiber) || "Component"; + ownerHasSymbolTypeWarning[parentName] || + ((ownerHasSymbolTypeWarning[parentName] = !0), + (invalidChild = String(invalidChild)), + 3 === returnFiber.tag + ? console.error( + "Symbols are not valid as a React child.\n root.render(%s)", + invalidChild + ) + : console.error( + "Symbols are not valid as a React child.\n <%s>%s", + parentName, + invalidChild, + parentName + )); + } + function createChildReconciler(shouldTrackSideEffects) { + function deleteChild(returnFiber, childToDelete) { + if (shouldTrackSideEffects) { + var deletions = returnFiber.deletions; + null === deletions + ? ((returnFiber.deletions = [childToDelete]), + (returnFiber.flags |= 16)) + : deletions.push(childToDelete); + } } - type = current.child; - if (!checkScheduledUpdateOrContext(current, renderLanes)) { - var prevProps = type.memoizedProps; - Component = Component.compare; - Component = null !== Component ? Component : shallowEqual; - if ( - Component(prevProps, nextProps) && - current.ref === workInProgress.ref - ) - return bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes + function deleteRemainingChildren(returnFiber, currentFirstChild) { + if (!shouldTrackSideEffects) return null; + for (; null !== currentFirstChild; ) + deleteChild(returnFiber, currentFirstChild), + (currentFirstChild = currentFirstChild.sibling); + return null; + } + function mapRemainingChildren(currentFirstChild) { + for (var existingChildren = new Map(); null !== currentFirstChild; ) + null !== currentFirstChild.key + ? existingChildren.set(currentFirstChild.key, currentFirstChild) + : existingChildren.set(currentFirstChild.index, currentFirstChild), + (currentFirstChild = currentFirstChild.sibling); + return existingChildren; + } + function useFiber(fiber, pendingProps) { + fiber = createWorkInProgress(fiber, pendingProps); + fiber.index = 0; + fiber.sibling = null; + return fiber; + } + function placeChild(newFiber, lastPlacedIndex, newIndex) { + newFiber.index = newIndex; + if (!shouldTrackSideEffects) + return (newFiber.flags |= 1048576), lastPlacedIndex; + newIndex = newFiber.alternate; + if (null !== newIndex) + return ( + (newIndex = newIndex.index), + newIndex < lastPlacedIndex + ? ((newFiber.flags |= 67108866), lastPlacedIndex) + : newIndex ); + newFiber.flags |= 67108866; + return lastPlacedIndex; } - workInProgress.flags |= 1; - current = createWorkInProgress(type, nextProps); - current.ref = workInProgress.ref; - current.return = workInProgress; - return (workInProgress.child = current); - } - function updateSimpleMemoComponent( - current, - workInProgress, - Component, - nextProps, - renderLanes - ) { - if (null !== current) { - var prevProps = current.memoizedProps; - if ( - shallowEqual(prevProps, nextProps) && - current.ref === workInProgress.ref && - workInProgress.type === current.type - ) - if ( - ((didReceiveUpdate = !1), - (workInProgress.pendingProps = nextProps = prevProps), - checkScheduledUpdateOrContext(current, renderLanes)) - ) - 0 !== (current.flags & 131072) && (didReceiveUpdate = !0); - else - return ( - (workInProgress.lanes = current.lanes), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) - ); + function placeSingleChild(newFiber) { + shouldTrackSideEffects && + null === newFiber.alternate && + (newFiber.flags |= 67108866); + return newFiber; } - return updateFunctionComponent( - current, - workInProgress, - Component, - nextProps, - renderLanes - ); - } - function updateOffscreenComponent(current, workInProgress, renderLanes) { - var nextProps = workInProgress.pendingProps, - nextChildren = nextProps.children, - nextIsDetached = - 0 !== - (workInProgress.stateNode._pendingVisibility & OffscreenDetached), - prevState = null !== current ? current.memoizedState : null; - markRef(current, workInProgress); - if ("hidden" === nextProps.mode || nextIsDetached) { - if (0 !== (workInProgress.flags & 128)) { - nextProps = - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes; - if (null !== current) { - nextChildren = workInProgress.child = current.child; - for (nextIsDetached = 0; null !== nextChildren; ) - (nextIsDetached = - nextIsDetached | nextChildren.lanes | nextChildren.childLanes), - (nextChildren = nextChildren.sibling); - workInProgress.childLanes = nextIsDetached & ~nextProps; - } else (workInProgress.childLanes = 0), (workInProgress.child = null); - return deferHiddenOffscreenComponent( - current, - workInProgress, - nextProps, - renderLanes + function updateTextNode(returnFiber, current, textContent, lanes) { + if (null === current || 6 !== current.tag) + return ( + (current = createFiberFromText( + textContent, + returnFiber.mode, + lanes + )), + (current.return = returnFiber), + (current._debugOwner = returnFiber), + (current._debugTask = returnFiber._debugTask), + (current._debugInfo = currentDebugInfo), + current ); - } - 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 + current = useFiber(current, textContent); + current.return = returnFiber; + current._debugInfo = currentDebugInfo; + return current; + } + function updateElement(returnFiber, current, element, lanes) { + var elementType = element.type; + if (elementType === REACT_FRAGMENT_TYPE) return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( + (current = updateFragment( + returnFiber, current, - workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) + element.props.children, + lanes, + element.key + )), + coerceRef(current, element), + validateFragmentProps(element, current, returnFiber), + current ); - } else - null !== prevState - ? (pushTransition(workInProgress, prevState.cachePool), - pushHiddenContext(workInProgress, prevState), - reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.memoizedState = null)) - : (null !== current && pushTransition(workInProgress, null), - reuseHiddenContextOnStack(workInProgress), - reuseSuspenseHandlerOnStack(workInProgress)); - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } - function deferHiddenOffscreenComponent( - current, - workInProgress, - nextBaseLanes, - renderLanes - ) { - var JSCompiler_inline_result = peekCacheFromPool(); - JSCompiler_inline_result = - null === JSCompiler_inline_result - ? null - : { - parent: CacheContext._currentValue, - pool: JSCompiler_inline_result - }; - workInProgress.memoizedState = { - baseLanes: nextBaseLanes, - cachePool: JSCompiler_inline_result - }; - null !== current && pushTransition(workInProgress, null); - reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); - null !== current && - propagateParentContextChanges(current, workInProgress, renderLanes, !0); - return null; - } - function markRef(current, workInProgress) { - var ref = workInProgress.ref; - if (null === ref) - null !== current && - null !== current.ref && - (workInProgress.flags |= 4194816); - else { - if ("function" !== typeof ref && "object" !== typeof ref) - throw Error( - "Expected ref to be a function, an object returned by React.createRef(), or undefined/null." + if ( + null !== current && + (current.elementType === elementType || + isCompatibleFamilyForHotReloading(current, element) || + ("object" === typeof elementType && + null !== elementType && + elementType.$$typeof === REACT_LAZY_TYPE && + callLazyInitInDEV(elementType) === current.type)) + ) + return ( + (current = useFiber(current, element.props)), + coerceRef(current, element), + (current.return = returnFiber), + (current._debugOwner = element._owner), + (current._debugInfo = currentDebugInfo), + current ); - if (null === current || current.ref !== ref) - workInProgress.flags |= 4194816; + current = createFiberFromElement(element, returnFiber.mode, lanes); + coerceRef(current, element); + current.return = returnFiber; + current._debugInfo = currentDebugInfo; + return current; } - } - function updateFunctionComponent( - current, - workInProgress, - Component, - nextProps, - renderLanes - ) { - if ( - Component.prototype && - "function" === typeof Component.prototype.render - ) { - var componentName = getComponentNameFromType(Component) || "Unknown"; - didWarnAboutBadClass[componentName] || - (console.error( - "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", - componentName, - componentName - ), - (didWarnAboutBadClass[componentName] = !0)); + function updatePortal(returnFiber, current, portal, lanes) { + if ( + null === current || + 4 !== current.tag || + current.stateNode.containerInfo !== portal.containerInfo || + current.stateNode.implementation !== portal.implementation + ) + return ( + (current = createFiberFromPortal(portal, returnFiber.mode, lanes)), + (current.return = returnFiber), + (current._debugInfo = currentDebugInfo), + current + ); + current = useFiber(current, portal.children || []); + current.return = returnFiber; + current._debugInfo = currentDebugInfo; + return current; } - workInProgress.mode & StrictLegacyMode && - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - null - ); - null === current && - (validateFunctionComponentInDev(workInProgress, workInProgress.type), - Component.contextTypes && - ((componentName = getComponentNameFromType(Component) || "Unknown"), - didWarnAboutContextTypes[componentName] || - ((didWarnAboutContextTypes[componentName] = !0), - console.error( - "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)", - componentName - )))); - prepareToReadContext(workInProgress); - Component = renderWithHooks( - current, - workInProgress, - Component, - nextProps, - void 0, - renderLanes - ); - nextProps = checkDidRenderIdHook(); - if (null !== current && !didReceiveUpdate) - return ( - bailoutHooks(current, workInProgress, renderLanes), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) - ); - isHydrating && nextProps && pushMaterializedTreeId(workInProgress); - workInProgress.flags |= 1; - reconcileChildren(current, workInProgress, Component, renderLanes); - return workInProgress.child; - } - function replayFunctionComponent( - current, - workInProgress, - nextProps, - Component, - secondArg, - renderLanes - ) { - prepareToReadContext(workInProgress); - hookTypesUpdateIndexDev = -1; - ignorePreviousDependencies = - null !== current && current.type !== workInProgress.type; - workInProgress.updateQueue = null; - nextProps = renderWithHooksAgain( - workInProgress, - Component, - nextProps, - secondArg - ); - finishRenderingHooks(current, workInProgress); - Component = checkDidRenderIdHook(); - if (null !== current && !didReceiveUpdate) - return ( - bailoutHooks(current, workInProgress, renderLanes), - bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) - ); - isHydrating && Component && pushMaterializedTreeId(workInProgress); - workInProgress.flags |= 1; - reconcileChildren(current, workInProgress, nextProps, renderLanes); - return workInProgress.child; - } - function updateClassComponent( - current, - workInProgress, - Component, - nextProps, - renderLanes - ) { - switch (shouldErrorImpl(workInProgress)) { - case !1: - var _instance = workInProgress.stateNode, - state = new workInProgress.type( - workInProgress.memoizedProps, - _instance.context - ).state; - _instance.updater.enqueueSetState(_instance, state, null); - break; - case !0: - workInProgress.flags |= 128; - workInProgress.flags |= 65536; - _instance = Error("Simulated error coming from DevTools"); - var lane = renderLanes & -renderLanes; - workInProgress.lanes |= lane; - state = workInProgressRoot; - if (null === state) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - lane = createClassErrorUpdate(lane); - initializeClassErrorUpdate( - lane, - state, - workInProgress, - createCapturedValueAtFiber(_instance, workInProgress) + function updateFragment(returnFiber, current, fragment, lanes, key) { + if (null === current || 7 !== current.tag) + return ( + (current = createFiberFromFragment( + fragment, + returnFiber.mode, + lanes, + key + )), + (current.return = returnFiber), + (current._debugOwner = returnFiber), + (current._debugTask = returnFiber._debugTask), + (current._debugInfo = currentDebugInfo), + current ); - enqueueCapturedUpdate(workInProgress, lane); + current = useFiber(current, fragment); + current.return = returnFiber; + current._debugInfo = currentDebugInfo; + return current; } - prepareToReadContext(workInProgress); - if (null === workInProgress.stateNode) { - state = emptyContextObject; - _instance = Component.contextType; - "contextType" in Component && - null !== _instance && - (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) && - !didWarnAboutInvalidateContextType.has(Component) && - (didWarnAboutInvalidateContextType.add(Component), - (lane = - void 0 === _instance - ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." - : "object" !== typeof _instance - ? " However, it is set to a " + typeof _instance + "." - : _instance.$$typeof === REACT_CONSUMER_TYPE - ? " Did you accidentally pass the Context.Consumer instead?" - : " However, it is set to an object with keys {" + - Object.keys(_instance).join(", ") + - "}."), - console.error( - "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", - getComponentNameFromType(Component) || "Component", - lane - )); - "object" === typeof _instance && - null !== _instance && - (state = readContext(_instance)); - _instance = new Component(nextProps, state); - if (workInProgress.mode & StrictLegacyMode) { - setIsStrictModeForDevtools(!0); - try { - _instance = new Component(nextProps, state); - } finally { - setIsStrictModeForDevtools(!1); - } - } - state = workInProgress.memoizedState = - null !== _instance.state && void 0 !== _instance.state - ? _instance.state - : null; - _instance.updater = classComponentUpdater; - workInProgress.stateNode = _instance; - _instance._reactInternals = workInProgress; - _instance._reactInternalInstance = fakeInternalInstance; - "function" === typeof Component.getDerivedStateFromProps && - null === state && - ((state = getComponentNameFromType(Component) || "Component"), - didWarnAboutUninitializedState.has(state) || - (didWarnAboutUninitializedState.add(state), - console.error( - "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", - state, - null === _instance.state ? "null" : "undefined", - state - ))); + function createChild(returnFiber, newChild, lanes) { if ( - "function" === typeof Component.getDerivedStateFromProps || - "function" === typeof _instance.getSnapshotBeforeUpdate - ) { - var foundWillUpdateName = (lane = state = null); - "function" === typeof _instance.componentWillMount && - !0 !== _instance.componentWillMount.__suppressDeprecationWarning - ? (state = "componentWillMount") - : "function" === typeof _instance.UNSAFE_componentWillMount && - (state = "UNSAFE_componentWillMount"); - "function" === typeof _instance.componentWillReceiveProps && - !0 !== - _instance.componentWillReceiveProps.__suppressDeprecationWarning - ? (lane = "componentWillReceiveProps") - : "function" === - typeof _instance.UNSAFE_componentWillReceiveProps && - (lane = "UNSAFE_componentWillReceiveProps"); - "function" === typeof _instance.componentWillUpdate && - !0 !== _instance.componentWillUpdate.__suppressDeprecationWarning - ? (foundWillUpdateName = "componentWillUpdate") - : "function" === typeof _instance.UNSAFE_componentWillUpdate && - (foundWillUpdateName = "UNSAFE_componentWillUpdate"); - if (null !== state || null !== lane || null !== foundWillUpdateName) { - _instance = getComponentNameFromType(Component) || "Component"; - var newApiName = - "function" === typeof Component.getDerivedStateFromProps - ? "getDerivedStateFromProps()" - : "getSnapshotBeforeUpdate()"; - didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || - (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), - console.error( - "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", - _instance, - newApiName, - null !== state ? "\n " + state : "", - null !== lane ? "\n " + lane : "", - null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" - )); + ("string" === typeof newChild && "" !== newChild) || + "number" === typeof newChild || + "bigint" === typeof newChild + ) + return ( + (newChild = createFiberFromText( + "" + newChild, + returnFiber.mode, + lanes + )), + (newChild.return = returnFiber), + (newChild._debugOwner = returnFiber), + (newChild._debugTask = returnFiber._debugTask), + (newChild._debugInfo = currentDebugInfo), + newChild + ); + if ("object" === typeof newChild && null !== newChild) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return ( + (lanes = createFiberFromElement( + newChild, + returnFiber.mode, + lanes + )), + coerceRef(lanes, newChild), + (lanes.return = returnFiber), + (returnFiber = pushDebugInfo(newChild._debugInfo)), + (lanes._debugInfo = currentDebugInfo), + (currentDebugInfo = returnFiber), + lanes + ); + case REACT_PORTAL_TYPE: + return ( + (newChild = createFiberFromPortal( + newChild, + returnFiber.mode, + lanes + )), + (newChild.return = returnFiber), + (newChild._debugInfo = currentDebugInfo), + newChild + ); + case REACT_LAZY_TYPE: + var _prevDebugInfo = pushDebugInfo(newChild._debugInfo); + newChild = callLazyInitInDEV(newChild); + returnFiber = createChild(returnFiber, newChild, lanes); + currentDebugInfo = _prevDebugInfo; + return returnFiber; } + if ( + isArrayImpl(newChild) || + getIteratorFn(newChild) || + "function" === typeof newChild[ASYNC_ITERATOR] + ) + return ( + (lanes = createFiberFromFragment( + newChild, + returnFiber.mode, + lanes, + null + )), + (lanes.return = returnFiber), + (lanes._debugOwner = returnFiber), + (lanes._debugTask = returnFiber._debugTask), + (returnFiber = pushDebugInfo(newChild._debugInfo)), + (lanes._debugInfo = currentDebugInfo), + (currentDebugInfo = returnFiber), + lanes + ); + if ("function" === typeof newChild.then) + return ( + (_prevDebugInfo = pushDebugInfo(newChild._debugInfo)), + (returnFiber = createChild( + returnFiber, + unwrapThenable(newChild), + lanes + )), + (currentDebugInfo = _prevDebugInfo), + returnFiber + ); + if (newChild.$$typeof === REACT_CONTEXT_TYPE) + return createChild( + returnFiber, + readContextDuringReconciliation(returnFiber, newChild), + lanes + ); + throwOnInvalidObjectType(returnFiber, newChild); } - _instance = workInProgress.stateNode; - state = getComponentNameFromType(Component) || "Component"; - _instance.render || - (Component.prototype && - "function" === typeof Component.prototype.render - ? console.error( - "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", - state - ) - : console.error( - "No `render` method found on the %s instance: you may have forgotten to define `render`.", - state - )); - !_instance.getInitialState || - _instance.getInitialState.isReactClassApproved || - _instance.state || - console.error( - "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", - state - ); - _instance.getDefaultProps && - !_instance.getDefaultProps.isReactClassApproved && - console.error( - "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", - state - ); - _instance.contextType && - console.error( - "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", - state - ); - Component.childContextTypes && - !didWarnAboutChildContextTypes.has(Component) && - (didWarnAboutChildContextTypes.add(Component), - console.error( - "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)", - state - )); - Component.contextTypes && - !didWarnAboutContextTypes$1.has(Component) && - (didWarnAboutContextTypes$1.add(Component), - console.error( - "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", - state - )); - "function" === typeof _instance.componentShouldUpdate && - console.error( - "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", - state - ); - Component.prototype && - Component.prototype.isPureReactComponent && - "undefined" !== typeof _instance.shouldComponentUpdate && - console.error( - "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", - getComponentNameFromType(Component) || "A pure component" - ); - "function" === typeof _instance.componentDidUnmount && - console.error( - "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", - state - ); - "function" === typeof _instance.componentDidReceiveProps && - console.error( - "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", - state - ); - "function" === typeof _instance.componentWillRecieveProps && - console.error( - "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", - state - ); - "function" === typeof _instance.UNSAFE_componentWillRecieveProps && - console.error( - "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", - state - ); - lane = _instance.props !== nextProps; - void 0 !== _instance.props && - lane && - console.error( - "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", - state - ); - _instance.defaultProps && - console.error( - "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", - state, - state - ); - "function" !== typeof _instance.getSnapshotBeforeUpdate || - "function" === typeof _instance.componentDidUpdate || - didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || - (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), - console.error( - "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", - getComponentNameFromType(Component) - )); - "function" === typeof _instance.getDerivedStateFromProps && - console.error( - "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - state - ); - "function" === typeof _instance.getDerivedStateFromError && - console.error( - "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", - state - ); - "function" === typeof Component.getSnapshotBeforeUpdate && - console.error( - "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", - state - ); - (lane = _instance.state) && - ("object" !== typeof lane || isArrayImpl(lane)) && - console.error("%s.state: must be set to an object or null", state); - "function" === typeof _instance.getChildContext && - "object" !== typeof Component.childContextTypes && - console.error( - "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", - state - ); - _instance = workInProgress.stateNode; - _instance.props = nextProps; - _instance.state = workInProgress.memoizedState; - _instance.refs = {}; - initializeUpdateQueue(workInProgress); - state = Component.contextType; - _instance.context = - "object" === typeof state && null !== state - ? readContext(state) - : emptyContextObject; - _instance.state === nextProps && - ((state = getComponentNameFromType(Component) || "Component"), - didWarnAboutDirectlyAssigningPropsToState.has(state) || - (didWarnAboutDirectlyAssigningPropsToState.add(state), - console.error( - "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", - state - ))); - workInProgress.mode & StrictLegacyMode && - ReactStrictModeWarnings.recordLegacyContextWarning( - workInProgress, - _instance - ); - ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( - workInProgress, - _instance - ); - _instance.state = workInProgress.memoizedState; - state = Component.getDerivedStateFromProps; - "function" === typeof state && - (applyDerivedStateFromProps( - workInProgress, - Component, - state, - nextProps - ), - (_instance.state = workInProgress.memoizedState)); - "function" === typeof Component.getDerivedStateFromProps || - "function" === typeof _instance.getSnapshotBeforeUpdate || - ("function" !== typeof _instance.UNSAFE_componentWillMount && - "function" !== typeof _instance.componentWillMount) || - ((state = _instance.state), - "function" === typeof _instance.componentWillMount && - _instance.componentWillMount(), - "function" === typeof _instance.UNSAFE_componentWillMount && - _instance.UNSAFE_componentWillMount(), - state !== _instance.state && - (console.error( - "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", - getComponentNameFromFiber(workInProgress) || "Component" - ), - classComponentUpdater.enqueueReplaceState( - _instance, - _instance.state, + "function" === typeof newChild && + warnOnFunctionType(returnFiber, newChild); + "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild); + return null; + } + function updateSlot(returnFiber, oldFiber, newChild, lanes) { + var key = null !== oldFiber ? oldFiber.key : null; + if ( + ("string" === typeof newChild && "" !== newChild) || + "number" === typeof newChild || + "bigint" === typeof newChild + ) + return null !== key + ? null + : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); + if ("object" === typeof newChild && null !== newChild) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return newChild.key === key + ? ((key = pushDebugInfo(newChild._debugInfo)), + (returnFiber = updateElement( + returnFiber, + oldFiber, + newChild, + lanes + )), + (currentDebugInfo = key), + returnFiber) + : null; + case REACT_PORTAL_TYPE: + return newChild.key === key + ? updatePortal(returnFiber, oldFiber, newChild, lanes) + : null; + case REACT_LAZY_TYPE: + return ( + (key = pushDebugInfo(newChild._debugInfo)), + (newChild = callLazyInitInDEV(newChild)), + (returnFiber = updateSlot( + returnFiber, + oldFiber, + newChild, + lanes + )), + (currentDebugInfo = key), + returnFiber + ); + } + if ( + isArrayImpl(newChild) || + getIteratorFn(newChild) || + "function" === typeof newChild[ASYNC_ITERATOR] + ) { + if (null !== key) return null; + key = pushDebugInfo(newChild._debugInfo); + returnFiber = updateFragment( + returnFiber, + oldFiber, + newChild, + lanes, null - )), - processUpdateQueue(workInProgress, nextProps, _instance, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction(), - (_instance.state = workInProgress.memoizedState)); - "function" === typeof _instance.componentDidMount && - (workInProgress.flags |= 4194308); - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 134217728); - _instance = !0; - } else if (null === current) { - _instance = workInProgress.stateNode; - var unresolvedOldProps = workInProgress.memoizedProps; - lane = resolveClassComponentProps(Component, unresolvedOldProps); - _instance.props = lane; - var oldContext = _instance.context; - foundWillUpdateName = Component.contextType; - state = emptyContextObject; - "object" === typeof foundWillUpdateName && - null !== foundWillUpdateName && - (state = readContext(foundWillUpdateName)); - newApiName = Component.getDerivedStateFromProps; - foundWillUpdateName = - "function" === typeof newApiName || - "function" === typeof _instance.getSnapshotBeforeUpdate; - unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; - foundWillUpdateName || - ("function" !== typeof _instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof _instance.componentWillReceiveProps) || - ((unresolvedOldProps || oldContext !== state) && - callComponentWillReceiveProps( - workInProgress, - _instance, - nextProps, - state - )); - hasForceUpdate = !1; - var oldState = workInProgress.memoizedState; - _instance.state = oldState; - processUpdateQueue(workInProgress, nextProps, _instance, renderLanes); - suspendIfUpdateReadFromEntangledAsyncAction(); - oldContext = workInProgress.memoizedState; - unresolvedOldProps || oldState !== oldContext || hasForceUpdate - ? ("function" === typeof newApiName && - (applyDerivedStateFromProps( - workInProgress, - Component, - newApiName, - nextProps - ), - (oldContext = workInProgress.memoizedState)), - (lane = - hasForceUpdate || - checkShouldComponentUpdate( - workInProgress, - Component, - lane, - nextProps, - oldState, - oldContext, - state - )) - ? (foundWillUpdateName || - ("function" !== typeof _instance.UNSAFE_componentWillMount && - "function" !== typeof _instance.componentWillMount) || - ("function" === typeof _instance.componentWillMount && - _instance.componentWillMount(), - "function" === typeof _instance.UNSAFE_componentWillMount && - _instance.UNSAFE_componentWillMount()), - "function" === typeof _instance.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 134217728)) - : ("function" === typeof _instance.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 134217728), - (workInProgress.memoizedProps = nextProps), - (workInProgress.memoizedState = oldContext)), - (_instance.props = nextProps), - (_instance.state = oldContext), - (_instance.context = state), - (_instance = lane)) - : ("function" === typeof _instance.componentDidMount && - (workInProgress.flags |= 4194308), - (workInProgress.mode & StrictEffectsMode) !== NoMode && - (workInProgress.flags |= 134217728), - (_instance = !1)); - } else { - _instance = workInProgress.stateNode; - cloneUpdateQueue(current, workInProgress); - state = workInProgress.memoizedProps; - foundWillUpdateName = resolveClassComponentProps(Component, state); - _instance.props = foundWillUpdateName; - newApiName = workInProgress.pendingProps; - oldState = _instance.context; - oldContext = Component.contextType; - lane = emptyContextObject; - "object" === typeof oldContext && - null !== oldContext && - (lane = readContext(oldContext)); - unresolvedOldProps = Component.getDerivedStateFromProps; - (oldContext = - "function" === typeof unresolvedOldProps || - "function" === typeof _instance.getSnapshotBeforeUpdate) || - ("function" !== typeof _instance.UNSAFE_componentWillReceiveProps && - "function" !== typeof _instance.componentWillReceiveProps) || - ((state !== newApiName || oldState !== lane) && - callComponentWillReceiveProps( - workInProgress, - _instance, - nextProps, - lane - )); - hasForceUpdate = !1; - oldState = workInProgress.memoizedState; - _instance.state = oldState; - processUpdateQueue(workInProgress, nextProps, _instance, renderLanes); - suspendIfUpdateReadFromEntangledAsyncAction(); - var newState = workInProgress.memoizedState; - state !== newApiName || - oldState !== newState || - hasForceUpdate || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies)) - ? ("function" === typeof unresolvedOldProps && - (applyDerivedStateFromProps( - workInProgress, - Component, - unresolvedOldProps, - nextProps - ), - (newState = workInProgress.memoizedState)), - (foundWillUpdateName = - hasForceUpdate || - checkShouldComponentUpdate( - workInProgress, - Component, - foundWillUpdateName, - nextProps, - oldState, - newState, - lane - ) || - (null !== current && - null !== current.dependencies && - checkIfContextChanged(current.dependencies))) - ? (oldContext || - ("function" !== typeof _instance.UNSAFE_componentWillUpdate && - "function" !== typeof _instance.componentWillUpdate) || - ("function" === typeof _instance.componentWillUpdate && - _instance.componentWillUpdate(nextProps, newState, lane), - "function" === typeof _instance.UNSAFE_componentWillUpdate && - _instance.UNSAFE_componentWillUpdate( - nextProps, - newState, - lane - )), - "function" === typeof _instance.componentDidUpdate && - (workInProgress.flags |= 4), - "function" === typeof _instance.getSnapshotBeforeUpdate && - (workInProgress.flags |= 1024)) - : ("function" !== typeof _instance.componentDidUpdate || - (state === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 4), - "function" !== typeof _instance.getSnapshotBeforeUpdate || - (state === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 1024), - (workInProgress.memoizedProps = nextProps), - (workInProgress.memoizedState = newState)), - (_instance.props = nextProps), - (_instance.state = newState), - (_instance.context = lane), - (_instance = foundWillUpdateName)) - : ("function" !== typeof _instance.componentDidUpdate || - (state === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 4), - "function" !== typeof _instance.getSnapshotBeforeUpdate || - (state === current.memoizedProps && - oldState === current.memoizedState) || - (workInProgress.flags |= 1024), - (_instance = !1)); - } - lane = _instance; - markRef(current, workInProgress); - state = 0 !== (workInProgress.flags & 128); - if (lane || state) { - lane = workInProgress.stateNode; - setCurrentFiber(workInProgress); - if (state && "function" !== typeof Component.getDerivedStateFromError) - (Component = null), (profilerStartTime = -1); - else if ( - ((Component = callRenderInDEV(lane)), - workInProgress.mode & StrictLegacyMode) - ) { - setIsStrictModeForDevtools(!0); - try { - callRenderInDEV(lane); - } finally { - setIsStrictModeForDevtools(!1); + ); + currentDebugInfo = key; + return returnFiber; } + if ("function" === typeof newChild.then) + return ( + (key = pushDebugInfo(newChild._debugInfo)), + (returnFiber = updateSlot( + returnFiber, + oldFiber, + unwrapThenable(newChild), + lanes + )), + (currentDebugInfo = key), + returnFiber + ); + if (newChild.$$typeof === REACT_CONTEXT_TYPE) + return updateSlot( + returnFiber, + oldFiber, + readContextDuringReconciliation(returnFiber, newChild), + lanes + ); + throwOnInvalidObjectType(returnFiber, newChild); } - workInProgress.flags |= 1; - null !== current && state - ? ((workInProgress.child = reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - Component, - renderLanes - ))) - : reconcileChildren(current, workInProgress, Component, renderLanes); - workInProgress.memoizedState = lane.state; - current = workInProgress.child; - } else - current = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - renderLanes = workInProgress.stateNode; - _instance && - renderLanes.props !== nextProps && - (didWarnAboutReassigningProps || - console.error( - "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", - getComponentNameFromFiber(workInProgress) || "a component" - ), - (didWarnAboutReassigningProps = !0)); - return current; - } - function mountHostRootWithoutHydrating( - current, - workInProgress, - nextChildren, - renderLanes - ) { - resetHydrationState(); - workInProgress.flags |= 256; - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } - function validateFunctionComponentInDev(workInProgress, Component) { - Component && - Component.childContextTypes && - console.error( - "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...", - Component.displayName || Component.name || "Component" - ); - "function" === typeof Component.getDerivedStateFromProps && - ((workInProgress = getComponentNameFromType(Component) || "Unknown"), - didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] || - (console.error( - "%s: Function components do not support getDerivedStateFromProps.", - workInProgress - ), - (didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] = - !0))); - "object" === typeof Component.contextType && - null !== Component.contextType && - ((Component = getComponentNameFromType(Component) || "Unknown"), - didWarnAboutContextTypeOnFunctionComponent[Component] || - (console.error( - "%s: Function components do not support contextType.", - Component - ), - (didWarnAboutContextTypeOnFunctionComponent[Component] = !0))); - } - function mountSuspenseOffscreenState(renderLanes) { - return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; - } - function getRemainingWorkInPrimaryTree( - current, - primaryTreeDidDefer, - renderLanes - ) { - current = null !== current ? current.childLanes & ~renderLanes : 0; - primaryTreeDidDefer && (current |= workInProgressDeferredLane); - return current; - } - function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2797; - var JSCompiler_object_inline_stack_2796 = workInProgress.pendingProps; - shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2794 = !1; - var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2797 = didSuspend) || - (JSCompiler_object_inline_componentStack_2797 = - null !== current && null === current.memoizedState - ? !1 - : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2797 && - ((JSCompiler_object_inline_message_2794 = !0), - (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2797 = - 0 !== (workInProgress.flags & 32); - workInProgress.flags &= -33; - if (null === current) { - if (isHydrating) { - JSCompiler_object_inline_message_2794 - ? pushPrimaryTreeSuspenseHandler(workInProgress) - : reuseSuspenseHandlerOnStack(workInProgress); - if (isHydrating) { - var JSCompiler_object_inline_digest_2795 = nextHydratableInstance; - var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2795)) { - c: { - var instance = JSCompiler_object_inline_digest_2795; - for ( - JSCompiler_temp = rootOrSingletonContext; - 8 !== instance.nodeType; - - ) { - if (!JSCompiler_temp) { - JSCompiler_temp = null; - break c; - } - instance = getNextHydratable(instance.nextSibling); - if (null === instance) { - JSCompiler_temp = null; - break c; - } - } - JSCompiler_temp = instance; - } - null !== JSCompiler_temp - ? (warnIfNotHydrating(), - (workInProgress.memoizedState = { - dehydrated: JSCompiler_temp, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, - retryLane: 536870912, - hydrationErrors: null - }), - (instance = createFiber(18, null, null, NoMode)), - (instance.stateNode = JSCompiler_temp), - (instance.return = workInProgress), - (workInProgress.child = instance), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (JSCompiler_temp = !0)) - : (JSCompiler_temp = !1); - JSCompiler_temp = !JSCompiler_temp; - } - JSCompiler_temp && - (warnNonHydratedInstance( - workInProgress, - JSCompiler_object_inline_digest_2795 - ), - throwOnHydrationMismatch(workInProgress)); + "function" === typeof newChild && + warnOnFunctionType(returnFiber, newChild); + "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild); + return null; + } + function updateFromMap( + existingChildren, + returnFiber, + newIdx, + newChild, + lanes + ) { + if ( + ("string" === typeof newChild && "" !== newChild) || + "number" === typeof newChild || + "bigint" === typeof newChild + ) + return ( + (existingChildren = existingChildren.get(newIdx) || null), + updateTextNode(returnFiber, existingChildren, "" + newChild, lanes) + ); + if ("object" === typeof newChild && null !== newChild) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return ( + (newIdx = + existingChildren.get( + null === newChild.key ? newIdx : newChild.key + ) || null), + (existingChildren = pushDebugInfo(newChild._debugInfo)), + (returnFiber = updateElement( + returnFiber, + newIdx, + newChild, + lanes + )), + (currentDebugInfo = existingChildren), + returnFiber + ); + case REACT_PORTAL_TYPE: + return ( + (existingChildren = + existingChildren.get( + null === newChild.key ? newIdx : newChild.key + ) || null), + updatePortal(returnFiber, existingChildren, newChild, lanes) + ); + case REACT_LAZY_TYPE: + var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo); + newChild = callLazyInitInDEV(newChild); + returnFiber = updateFromMap( + existingChildren, + returnFiber, + newIdx, + newChild, + lanes + ); + currentDebugInfo = _prevDebugInfo7; + return returnFiber; } - JSCompiler_object_inline_digest_2795 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2795 && - ((JSCompiler_object_inline_digest_2795 = - JSCompiler_object_inline_digest_2795.dehydrated), - null !== JSCompiler_object_inline_digest_2795) + isArrayImpl(newChild) || + getIteratorFn(newChild) || + "function" === typeof newChild[ASYNC_ITERATOR] ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2795) - ? (workInProgress.lanes = 32) - : (workInProgress.lanes = 536870912), - null - ); - popSuspenseHandler(workInProgress); - } - JSCompiler_object_inline_digest_2795 = - JSCompiler_object_inline_stack_2796.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2796.fallback; - if (JSCompiler_object_inline_message_2794) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2796 = - mountSuspenseFallbackChildren( - workInProgress, - JSCompiler_object_inline_digest_2795, - JSCompiler_temp, - renderLanes - )), - (JSCompiler_object_inline_message_2794 = workInProgress.child), - (JSCompiler_object_inline_message_2794.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2794.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2797, - renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2796 - ); - if ( - "number" === - typeof JSCompiler_object_inline_stack_2796.unstable_expectedLoadTime - ) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2796 = - mountSuspenseFallbackChildren( - workInProgress, - JSCompiler_object_inline_digest_2795, - JSCompiler_temp, - renderLanes + (newIdx = existingChildren.get(newIdx) || null), + (existingChildren = pushDebugInfo(newChild._debugInfo)), + (returnFiber = updateFragment( + returnFiber, + newIdx, + newChild, + lanes, + null )), - (JSCompiler_object_inline_message_2794 = workInProgress.child), - (JSCompiler_object_inline_message_2794.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2794.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2797, - renderLanes + (currentDebugInfo = existingChildren), + returnFiber + ); + if ("function" === typeof newChild.then) + return ( + (_prevDebugInfo7 = pushDebugInfo(newChild._debugInfo)), + (returnFiber = updateFromMap( + existingChildren, + returnFiber, + newIdx, + unwrapThenable(newChild), + lanes )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2796 - ); - pushPrimaryTreeSuspenseHandler(workInProgress); - return mountSuspensePrimaryChildren( - workInProgress, - JSCompiler_object_inline_digest_2795 - ); + (currentDebugInfo = _prevDebugInfo7), + returnFiber + ); + if (newChild.$$typeof === REACT_CONTEXT_TYPE) + return updateFromMap( + existingChildren, + returnFiber, + newIdx, + readContextDuringReconciliation(returnFiber, newChild), + lanes + ); + throwOnInvalidObjectType(returnFiber, newChild); + } + "function" === typeof newChild && + warnOnFunctionType(returnFiber, newChild); + "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild); + return null; } - var prevState = current.memoizedState; - if ( - null !== prevState && - ((JSCompiler_object_inline_digest_2795 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2795) - ) { - 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_2794 = - JSCompiler_object_inline_stack_2796.fallback), - (JSCompiler_object_inline_digest_2795 = workInProgress.mode), - (JSCompiler_object_inline_stack_2796 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2796.children - }, - JSCompiler_object_inline_digest_2795 - )), - (JSCompiler_object_inline_message_2794 = - createFiberFromFragment( - JSCompiler_object_inline_message_2794, - JSCompiler_object_inline_digest_2795, - renderLanes, - null - )), - (JSCompiler_object_inline_message_2794.flags |= 2), - (JSCompiler_object_inline_stack_2796.return = workInProgress), - (JSCompiler_object_inline_message_2794.return = workInProgress), - (JSCompiler_object_inline_stack_2796.sibling = - JSCompiler_object_inline_message_2794), - (workInProgress.child = JSCompiler_object_inline_stack_2796), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2796 = workInProgress.child), - (JSCompiler_object_inline_stack_2796.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2796.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2797, - renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2794)); - 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_digest_2795)) + function warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys) { + if ("object" !== typeof child || null === child) return knownKeys; + switch (child.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + warnForMissingKey(returnFiber, workInProgress, child); + var key = child.key; + if ("string" !== typeof key) break; + if (null === knownKeys) { + knownKeys = new Set(); + knownKeys.add(key); + break; + } + if (!knownKeys.has(key)) { + knownKeys.add(key); + break; + } + runWithFiberInDEV(workInProgress, function () { + console.error( + "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.", + key + ); + }); + break; + case REACT_LAZY_TYPE: + (child = callLazyInitInDEV(child)), + warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys); + } + return knownKeys; + } + function reconcileChildrenArray( + returnFiber, + currentFirstChild, + newChildren, + lanes + ) { + for ( + var knownKeys = null, + resultingFirstChild = null, + previousNewFiber = null, + oldFiber = currentFirstChild, + newIdx = (currentFirstChild = 0), + nextOldFiber = null; + null !== oldFiber && newIdx < newChildren.length; + newIdx++ ) { - JSCompiler_object_inline_componentStack_2797 = - JSCompiler_object_inline_digest_2795.nextSibling && - JSCompiler_object_inline_digest_2795.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2797) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2797.dgst; - var message = JSCompiler_object_inline_componentStack_2797.msg; - instance = JSCompiler_object_inline_componentStack_2797.stck; - var componentStack = - JSCompiler_object_inline_componentStack_2797.cstck; + oldFiber.index > newIdx + ? ((nextOldFiber = oldFiber), (oldFiber = null)) + : (nextOldFiber = oldFiber.sibling); + var newFiber = updateSlot( + returnFiber, + oldFiber, + newChildren[newIdx], + lanes + ); + if (null === newFiber) { + null === oldFiber && (oldFiber = nextOldFiber); + break; } - JSCompiler_object_inline_message_2794 = message; - JSCompiler_object_inline_digest_2795 = JSCompiler_temp; - JSCompiler_object_inline_stack_2796 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2797 = - componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2795 && - ((JSCompiler_object_inline_componentStack_2797 = - JSCompiler_object_inline_message_2794 - ? Error(JSCompiler_object_inline_message_2794) - : 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_2797.stack = - JSCompiler_object_inline_stack_2796 || ""), - (JSCompiler_object_inline_componentStack_2797.digest = - JSCompiler_object_inline_digest_2795), - (JSCompiler_object_inline_stack_2796 = - void 0 === JSCompiler_temp ? null : JSCompiler_temp), - (JSCompiler_object_inline_message_2794 = { - value: JSCompiler_object_inline_componentStack_2797, - source: null, - stack: JSCompiler_object_inline_stack_2796 - }), - "string" === typeof JSCompiler_object_inline_stack_2796 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2797, - JSCompiler_object_inline_message_2794 - ), - queueHydrationError(JSCompiler_object_inline_message_2794)); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes + knownKeys = warnOnInvalidKey( + returnFiber, + newFiber, + newChildren[newIdx], + knownKeys ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( - current, - workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_componentStack_2797 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2797) - ) { - JSCompiler_object_inline_componentStack_2797 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_componentStack_2797 && - ((JSCompiler_object_inline_stack_2796 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2796 = - 0 !== (JSCompiler_object_inline_stack_2796 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2796 - )), - (JSCompiler_object_inline_stack_2796 = - 0 !== - (JSCompiler_object_inline_stack_2796 & - (JSCompiler_object_inline_componentStack_2797.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2796), - 0 !== JSCompiler_object_inline_stack_2796 && - JSCompiler_object_inline_stack_2796 !== prevState.retryLane) - ) - throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2796), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2796 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2797, - current, - JSCompiler_object_inline_stack_2796 - ), - SelectiveHydrationException) - ); - JSCompiler_object_inline_digest_2795.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes + shouldTrackSideEffects && + oldFiber && + null === newFiber.alternate && + deleteChild(returnFiber, oldFiber); + currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); + null === previousNewFiber + ? (resultingFirstChild = newFiber) + : (previousNewFiber.sibling = newFiber); + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + if (newIdx === newChildren.length) + return ( + deleteRemainingChildren(returnFiber, oldFiber), + isHydrating && pushTreeFork(returnFiber, newIdx), + resultingFirstChild ); - } else - JSCompiler_object_inline_digest_2795.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = prevState.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2795.nextSibling + if (null === oldFiber) { + for (; newIdx < newChildren.length; newIdx++) + (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)), + null !== oldFiber && + ((knownKeys = warnOnInvalidKey( + returnFiber, + oldFiber, + newChildren[newIdx], + knownKeys + )), + (currentFirstChild = placeChild( + oldFiber, + currentFirstChild, + newIdx + )), + null === previousNewFiber + ? (resultingFirstChild = oldFiber) + : (previousNewFiber.sibling = oldFiber), + (previousNewFiber = oldFiber)); + isHydrating && pushTreeFork(returnFiber, newIdx); + return resultingFirstChild; + } + for ( + oldFiber = mapRemainingChildren(oldFiber); + newIdx < newChildren.length; + newIdx++ + ) + (nextOldFiber = updateFromMap( + oldFiber, + returnFiber, + newIdx, + newChildren[newIdx], + lanes + )), + null !== nextOldFiber && + ((knownKeys = warnOnInvalidKey( + returnFiber, + nextOldFiber, + newChildren[newIdx], + knownKeys )), - (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( - workInProgress, - JSCompiler_object_inline_stack_2796.children + shouldTrackSideEffects && + null !== nextOldFiber.alternate && + oldFiber.delete( + null === nextOldFiber.key ? newIdx : nextOldFiber.key + ), + (currentFirstChild = placeChild( + nextOldFiber, + currentFirstChild, + newIdx )), - (workInProgress.flags |= 4096)); - return workInProgress; + null === previousNewFiber + ? (resultingFirstChild = nextOldFiber) + : (previousNewFiber.sibling = nextOldFiber), + (previousNewFiber = nextOldFiber)); + shouldTrackSideEffects && + oldFiber.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + isHydrating && pushTreeFork(returnFiber, newIdx); + return resultingFirstChild; } - if (JSCompiler_object_inline_message_2794) - return ( - reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2794 = - JSCompiler_object_inline_stack_2796.fallback), - (JSCompiler_object_inline_digest_2795 = workInProgress.mode), - (JSCompiler_temp = current.child), - (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2796 = createWorkInProgress( - JSCompiler_temp, - { - mode: "hidden", - children: JSCompiler_object_inline_stack_2796.children - } - )), - (JSCompiler_object_inline_stack_2796.subtreeFlags = - JSCompiler_temp.subtreeFlags & 65011712), - null !== instance - ? (JSCompiler_object_inline_message_2794 = createWorkInProgress( - instance, - JSCompiler_object_inline_message_2794 - )) - : ((JSCompiler_object_inline_message_2794 = createFiberFromFragment( - JSCompiler_object_inline_message_2794, - JSCompiler_object_inline_digest_2795, - renderLanes, - null - )), - (JSCompiler_object_inline_message_2794.flags |= 2)), - (JSCompiler_object_inline_message_2794.return = workInProgress), - (JSCompiler_object_inline_stack_2796.return = workInProgress), - (JSCompiler_object_inline_stack_2796.sibling = - JSCompiler_object_inline_message_2794), - (workInProgress.child = JSCompiler_object_inline_stack_2796), - (JSCompiler_object_inline_stack_2796 = - JSCompiler_object_inline_message_2794), - (JSCompiler_object_inline_message_2794 = workInProgress.child), - (JSCompiler_object_inline_digest_2795 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2795 - ? (JSCompiler_object_inline_digest_2795 = - mountSuspenseOffscreenState(renderLanes)) - : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2795.cachePool), - null !== JSCompiler_temp - ? ((instance = CacheContext._currentValue), - (JSCompiler_temp = - JSCompiler_temp.parent !== instance - ? { parent: instance, pool: instance } - : JSCompiler_temp)) - : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2795 = { - baseLanes: - JSCompiler_object_inline_digest_2795.baseLanes | renderLanes, - cachePool: JSCompiler_temp - })), - (JSCompiler_object_inline_message_2794.memoizedState = - JSCompiler_object_inline_digest_2795), - (JSCompiler_object_inline_message_2794.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_componentStack_2797, - renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2796 - ); - pushPrimaryTreeSuspenseHandler(workInProgress); - renderLanes = current.child; - current = renderLanes.sibling; - renderLanes = createWorkInProgress(renderLanes, { - mode: "visible", - children: JSCompiler_object_inline_stack_2796.children - }); - renderLanes.return = workInProgress; - renderLanes.sibling = null; - null !== current && - ((JSCompiler_object_inline_componentStack_2797 = - workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2797 - ? ((workInProgress.deletions = [current]), - (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2797.push(current)); - workInProgress.child = renderLanes; - workInProgress.memoizedState = null; - return renderLanes; - } - function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { - primaryChildren = mountWorkInProgressOffscreenFiber( - { mode: "visible", children: primaryChildren }, - workInProgress.mode - ); - primaryChildren.return = workInProgress; - return (workInProgress.child = primaryChildren); - } - function mountSuspenseFallbackChildren( - workInProgress, - primaryChildren, - fallbackChildren, - renderLanes - ) { - var mode = workInProgress.mode; - primaryChildren = mountWorkInProgressOffscreenFiber( - { mode: "hidden", children: primaryChildren }, - mode - ); - fallbackChildren = createFiberFromFragment( - fallbackChildren, - mode, - renderLanes, - null - ); - primaryChildren.return = workInProgress; - fallbackChildren.return = workInProgress; - primaryChildren.sibling = fallbackChildren; - workInProgress.child = primaryChildren; - return fallbackChildren; - } - function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { - return createFiberFromOffscreen(offscreenProps, mode, 0, null); - } - function retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ) { - reconcileChildFibers(workInProgress, current.child, null, renderLanes); - current = mountSuspensePrimaryChildren( - workInProgress, - workInProgress.pendingProps.children - ); - current.flags |= 2; - workInProgress.memoizedState = null; - return current; - } - function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { - fiber.lanes |= renderLanes; - var alternate = fiber.alternate; - null !== alternate && (alternate.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - propagationRoot - ); - } - function validateSuspenseListNestedChild(childSlot, index) { - var isAnArray = isArrayImpl(childSlot); - childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot); - return isAnArray || childSlot - ? ((isAnArray = isAnArray ? "array" : "iterable"), - console.error( - "A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ", - isAnArray, - index, - isAnArray - ), - !1) - : !0; - } - function initSuspenseListRenderState( - workInProgress, - isBackwards, - tail, - lastContentRow, - tailMode - ) { - var renderState = workInProgress.memoizedState; - null === renderState - ? (workInProgress.memoizedState = { - isBackwards: isBackwards, - rendering: null, - renderingStartTime: 0, - last: lastContentRow, - tail: tail, - tailMode: tailMode - }) - : ((renderState.isBackwards = isBackwards), - (renderState.rendering = null), - (renderState.renderingStartTime = 0), - (renderState.last = lastContentRow), - (renderState.tail = tail), - (renderState.tailMode = tailMode)); - } - function updateSuspenseListComponent(current, workInProgress, renderLanes) { - var nextProps = workInProgress.pendingProps, - revealOrder = nextProps.revealOrder, - tailMode = nextProps.tail; - nextProps = nextProps.children; - if ( - void 0 !== revealOrder && - "forwards" !== revealOrder && - "backwards" !== revealOrder && - "together" !== revealOrder && - !didWarnAboutRevealOrder[revealOrder] - ) - if ( - ((didWarnAboutRevealOrder[revealOrder] = !0), - "string" === typeof revealOrder) - ) - switch (revealOrder.toLowerCase()) { - case "together": - case "forwards": - case "backwards": - console.error( - '"%s" is not a valid value for revealOrder on . Use lowercase "%s" instead.', - revealOrder, - revealOrder.toLowerCase() - ); - break; - case "forward": - case "backward": - console.error( - '"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.', - revealOrder, - revealOrder.toLowerCase() - ); - break; - default: - console.error( - '"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?', - revealOrder - ); - } - else - console.error( - '%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?', - revealOrder - ); - void 0 === tailMode || - didWarnAboutTailOptions[tailMode] || - ("collapsed" !== tailMode && "hidden" !== tailMode - ? ((didWarnAboutTailOptions[tailMode] = !0), - console.error( - '"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?', - tailMode - )) - : "forwards" !== revealOrder && - "backwards" !== revealOrder && - ((didWarnAboutTailOptions[tailMode] = !0), + function reconcileChildrenAsyncIteratable( + returnFiber, + currentFirstChild, + newChildrenIterable, + lanes + ) { + var newChildren = newChildrenIterable[ASYNC_ITERATOR](); + newChildren !== newChildrenIterable || + (0 === returnFiber.tag && + "[object AsyncGeneratorFunction]" === + Object.prototype.toString.call(returnFiber.type) && + "[object AsyncGenerator]" === + Object.prototype.toString.call(newChildren)) || + (didWarnAboutGenerators || console.error( - ' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?', - tailMode - ))); - a: if ( - ("forwards" === revealOrder || "backwards" === revealOrder) && - void 0 !== nextProps && - null !== nextProps && - !1 !== nextProps - ) - if (isArrayImpl(nextProps)) - for (var i = 0; i < nextProps.length; i++) { - if (!validateSuspenseListNestedChild(nextProps[i], i)) break a; - } - else if (((i = getIteratorFn(nextProps)), "function" === typeof i)) { - if ((i = i.call(nextProps))) - for (var step = i.next(), _i = 0; !step.done; step = i.next()) { - if (!validateSuspenseListNestedChild(step.value, _i)) break a; - _i++; - } - } else - console.error( - 'A single row was passed to a . This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?', - revealOrder - ); - reconcileChildren(current, workInProgress, nextProps, renderLanes); - nextProps = suspenseStackCursor.current; - if (0 !== (nextProps & ForceSuspenseFallback)) - (nextProps = - (nextProps & SubtreeSuspenseContextMask) | ForceSuspenseFallback), - (workInProgress.flags |= 128); - else { - if (null !== current && 0 !== (current.flags & 128)) - a: for (current = workInProgress.child; null !== current; ) { - if (13 === current.tag) - null !== current.memoizedState && - scheduleSuspenseWorkOnFiber( - current, - renderLanes, - workInProgress - ); - else if (19 === current.tag) - scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); - else if (null !== current.child) { - current.child.return = current; - current = current.child; - continue; - } - if (current === workInProgress) break a; - for (; null === current.sibling; ) { - if (null === current.return || current.return === workInProgress) - break a; - current = current.return; + "Using AsyncIterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You can use an AsyncIterable that can iterate multiple times over the same items." + ), + (didWarnAboutGenerators = !0)); + if (null == newChildren) + throw Error("An iterable object provided no iterator."); + return reconcileChildrenIterator( + returnFiber, + currentFirstChild, + { + next: function () { + return unwrapThenable(newChildren.next()); } - current.sibling.return = current.return; - current = current.sibling; - } - nextProps &= SubtreeSuspenseContextMask; + }, + lanes + ); } - push(suspenseStackCursor, nextProps, workInProgress); - switch (revealOrder) { - case "forwards": - renderLanes = workInProgress.child; - for (revealOrder = null; null !== renderLanes; ) - (current = renderLanes.alternate), - null !== current && - null === findFirstSuspended(current) && - (revealOrder = renderLanes), - (renderLanes = renderLanes.sibling); - renderLanes = revealOrder; - null === renderLanes - ? ((revealOrder = workInProgress.child), - (workInProgress.child = null)) - : ((revealOrder = renderLanes.sibling), - (renderLanes.sibling = null)); - initSuspenseListRenderState( - workInProgress, - !1, - revealOrder, - renderLanes, - tailMode - ); - break; - case "backwards": - renderLanes = null; - revealOrder = workInProgress.child; - for (workInProgress.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes; - renderLanes = revealOrder; - revealOrder = current; - } - initSuspenseListRenderState( - workInProgress, - !0, - renderLanes, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress, !1, null, null, void 0); - break; - default: - workInProgress.memoizedState = null; - } - return workInProgress.child; - } - function bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ) { - null !== current && (workInProgress.dependencies = current.dependencies); - profilerStartTime = -1; - workInProgressRootSkippedLanes |= workInProgress.lanes; - if (0 === (renderLanes & workInProgress.childLanes)) - if (null !== current) { - if ( - (propagateParentContextChanges( - current, - workInProgress, - renderLanes, - !1 - ), - 0 === (renderLanes & workInProgress.childLanes)) - ) - return null; - } else return null; - if (null !== current && workInProgress.child !== current.child) - throw Error("Resuming work not yet implemented."); - if (null !== workInProgress.child) { - current = workInProgress.child; - renderLanes = createWorkInProgress(current, current.pendingProps); - workInProgress.child = renderLanes; - for (renderLanes.return = workInProgress; null !== current.sibling; ) - (current = current.sibling), - (renderLanes = renderLanes.sibling = - createWorkInProgress(current, current.pendingProps)), - (renderLanes.return = workInProgress); - renderLanes.sibling = null; - } - return workInProgress.child; - } - function checkScheduledUpdateOrContext(current, renderLanes) { - if (0 !== (current.lanes & renderLanes)) return !0; - current = current.dependencies; - return null !== current && checkIfContextChanged(current) ? !0 : !1; - } - function attemptEarlyBailoutIfNoScheduledUpdate( - current, - workInProgress, - renderLanes - ) { - switch (workInProgress.tag) { - case 3: - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ); - pushProvider( - workInProgress, - CacheContext, - current.memoizedState.cache - ); - resetHydrationState(); - break; - case 27: - case 5: - pushHostContext(workInProgress); - break; - case 4: - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ); - break; - case 10: - pushProvider( - workInProgress, - workInProgress.type, - workInProgress.memoizedProps.value - ); - break; - case 12: - 0 !== (renderLanes & workInProgress.childLanes) && - (workInProgress.flags |= 4); - workInProgress.flags |= 2048; - var stateNode = workInProgress.stateNode; - stateNode.effectDuration = -0; - stateNode.passiveEffectDuration = -0; - break; - case 13: - stateNode = workInProgress.memoizedState; - if (null !== stateNode) { - if (null !== stateNode.dehydrated) - return ( - pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags |= 128), - null - ); - if (0 !== (renderLanes & workInProgress.child.childLanes)) - return updateSuspenseComponent( - current, - workInProgress, - renderLanes - ); - pushPrimaryTreeSuspenseHandler(workInProgress); - current = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - return null !== current ? current.sibling : null; - } - pushPrimaryTreeSuspenseHandler(workInProgress); - break; - case 19: - var didSuspendBefore = 0 !== (current.flags & 128); - stateNode = 0 !== (renderLanes & workInProgress.childLanes); - stateNode || - (propagateParentContextChanges( - current, - workInProgress, - renderLanes, - !1 - ), - (stateNode = 0 !== (renderLanes & workInProgress.childLanes))); - if (didSuspendBefore) { - if (stateNode) - return updateSuspenseListComponent( - current, - workInProgress, - renderLanes - ); - workInProgress.flags |= 128; + function reconcileChildrenIterator( + returnFiber, + currentFirstChild, + newChildren, + lanes + ) { + if (null == newChildren) + throw Error("An iterable object provided no iterator."); + for ( + var resultingFirstChild = null, + previousNewFiber = null, + oldFiber = currentFirstChild, + newIdx = (currentFirstChild = 0), + nextOldFiber = null, + knownKeys = null, + step = newChildren.next(); + null !== oldFiber && !step.done; + newIdx++, step = newChildren.next() + ) { + oldFiber.index > newIdx + ? ((nextOldFiber = oldFiber), (oldFiber = null)) + : (nextOldFiber = oldFiber.sibling); + var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes); + if (null === newFiber) { + null === oldFiber && (oldFiber = nextOldFiber); + break; } - didSuspendBefore = workInProgress.memoizedState; - null !== didSuspendBefore && - ((didSuspendBefore.rendering = null), - (didSuspendBefore.tail = null), - (didSuspendBefore.lastEffect = null)); - push( - suspenseStackCursor, - suspenseStackCursor.current, - workInProgress + knownKeys = warnOnInvalidKey( + returnFiber, + newFiber, + step.value, + knownKeys ); - if (stateNode) break; - else return null; - case 22: - case 23: + shouldTrackSideEffects && + oldFiber && + null === newFiber.alternate && + deleteChild(returnFiber, oldFiber); + currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); + null === previousNewFiber + ? (resultingFirstChild = newFiber) + : (previousNewFiber.sibling = newFiber); + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + if (step.done) return ( - (workInProgress.lanes = 0), - updateOffscreenComponent(current, workInProgress, renderLanes) - ); - case 24: - pushProvider( - workInProgress, - CacheContext, - current.memoizedState.cache + deleteRemainingChildren(returnFiber, oldFiber), + isHydrating && pushTreeFork(returnFiber, newIdx), + resultingFirstChild ); - } - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } - function beginWork(current, workInProgress, renderLanes) { - if (workInProgress._debugNeedsRemount && null !== current) { - renderLanes = createFiberFromTypeAndProps( - workInProgress.type, - workInProgress.key, - workInProgress.pendingProps, - workInProgress._debugOwner || null, - workInProgress.mode, - workInProgress.lanes - ); - renderLanes._debugStack = workInProgress._debugStack; - renderLanes._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; - if (workInProgress === returnFiber.child) - returnFiber.child = renderLanes; - else { - var prevSibling = returnFiber.child; - if (null === prevSibling) - throw Error("Expected parent to have a child."); - for (; prevSibling.sibling !== workInProgress; ) - if (((prevSibling = prevSibling.sibling), null === prevSibling)) - throw Error("Expected to find the previous sibling."); - prevSibling.sibling = renderLanes; + if (null === oldFiber) { + for (; !step.done; newIdx++, step = newChildren.next()) + (oldFiber = createChild(returnFiber, step.value, lanes)), + null !== oldFiber && + ((knownKeys = warnOnInvalidKey( + returnFiber, + oldFiber, + step.value, + knownKeys + )), + (currentFirstChild = placeChild( + oldFiber, + currentFirstChild, + newIdx + )), + null === previousNewFiber + ? (resultingFirstChild = oldFiber) + : (previousNewFiber.sibling = oldFiber), + (previousNewFiber = oldFiber)); + isHydrating && pushTreeFork(returnFiber, newIdx); + return resultingFirstChild; } - workInProgress = returnFiber.deletions; - null === workInProgress - ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) - : workInProgress.push(current); - renderLanes.flags |= 2; - return renderLanes; - } - if (null !== current) - if ( - current.memoizedProps !== workInProgress.pendingProps || - workInProgress.type !== current.type + for ( + oldFiber = mapRemainingChildren(oldFiber); + !step.done; + newIdx++, step = newChildren.next() ) - didReceiveUpdate = !0; - else { - if ( - !checkScheduledUpdateOrContext(current, renderLanes) && - 0 === (workInProgress.flags & 128) - ) - return ( - (didReceiveUpdate = !1), - attemptEarlyBailoutIfNoScheduledUpdate( - current, - workInProgress, - renderLanes - ) - ); - didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1; - } - else { - didReceiveUpdate = !1; - if ((returnFiber = isHydrating)) - warnIfNotHydrating(), - (returnFiber = 0 !== (workInProgress.flags & 1048576)); - returnFiber && - ((returnFiber = workInProgress.index), - warnIfNotHydrating(), - pushTreeId(workInProgress, treeForkCount, returnFiber)); + (nextOldFiber = updateFromMap( + oldFiber, + returnFiber, + newIdx, + step.value, + lanes + )), + null !== nextOldFiber && + ((knownKeys = warnOnInvalidKey( + returnFiber, + nextOldFiber, + step.value, + knownKeys + )), + shouldTrackSideEffects && + null !== nextOldFiber.alternate && + oldFiber.delete( + null === nextOldFiber.key ? newIdx : nextOldFiber.key + ), + (currentFirstChild = placeChild( + nextOldFiber, + currentFirstChild, + newIdx + )), + null === previousNewFiber + ? (resultingFirstChild = nextOldFiber) + : (previousNewFiber.sibling = nextOldFiber), + (previousNewFiber = nextOldFiber)); + shouldTrackSideEffects && + oldFiber.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + isHydrating && pushTreeFork(returnFiber, newIdx); + return resultingFirstChild; } - 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 - ); - break a; - } else if (prevSibling === REACT_MEMO_TYPE) { - workInProgress.tag = 14; - workInProgress = updateMemoComponent( - null, - workInProgress, - current, - returnFiber, - 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 - ); - } - return workInProgress; - case 0: - return updateFunctionComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 1: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, - workInProgress.pendingProps - )), - updateClassComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) - ); - case 3: - a: { - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ); - if (null === current) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - returnFiber = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - prevSibling = prevState.element; - cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, returnFiber, null, renderLanes); - var nextState = workInProgress.memoizedState; - returnFiber = nextState.cache; - pushProvider(workInProgress, CacheContext, returnFiber); - returnFiber !== prevState.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !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 - ); - break a; - } else if (returnFiber !== prevSibling) { - prevSibling = 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 - ); - break a; - } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { - case 9: - current = current.body; + function reconcileChildFibersImpl( + returnFiber, + currentFirstChild, + newChild, + lanes + ) { + "object" === typeof newChild && + null !== newChild && + newChild.type === REACT_FRAGMENT_TYPE && + null === newChild.key && + void 0 === newChild.props.ref && + (validateFragmentProps(newChild, null, returnFiber), + (newChild = newChild.props.children)); + if ("object" === typeof newChild && null !== newChild) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + var prevDebugInfo = pushDebugInfo(newChild._debugInfo); + a: { + for (var key = newChild.key; null !== currentFirstChild; ) { + if (currentFirstChild.key === key) { + key = newChild.type; + if (key === REACT_FRAGMENT_TYPE) { + if (7 === currentFirstChild.tag) { + deleteRemainingChildren( + returnFiber, + currentFirstChild.sibling + ); + lanes = useFiber( + currentFirstChild, + newChild.props.children + ); + coerceRef(lanes, newChild); + lanes.return = returnFiber; + lanes._debugOwner = newChild._owner; + lanes._debugInfo = currentDebugInfo; + validateFragmentProps(newChild, lanes, returnFiber); + returnFiber = lanes; + break a; + } + } else if ( + currentFirstChild.elementType === key || + isCompatibleFamilyForHotReloading( + currentFirstChild, + newChild + ) || + ("object" === typeof key && + null !== key && + key.$$typeof === REACT_LAZY_TYPE && + callLazyInitInDEV(key) === currentFirstChild.type) + ) { + deleteRemainingChildren( + returnFiber, + currentFirstChild.sibling + ); + lanes = useFiber(currentFirstChild, newChild.props); + coerceRef(lanes, newChild); + lanes.return = returnFiber; + lanes._debugOwner = newChild._owner; + lanes._debugInfo = currentDebugInfo; + returnFiber = lanes; + break a; + } + deleteRemainingChildren(returnFiber, currentFirstChild); break; - default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + } else deleteChild(returnFiber, currentFirstChild); + currentFirstChild = currentFirstChild.sibling; } - nextHydratableInstance = getNextHydratable(current.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); + newChild.type === REACT_FRAGMENT_TYPE + ? ((lanes = createFiberFromFragment( + newChild.props.children, + returnFiber.mode, + lanes, + newChild.key + )), + coerceRef(lanes, newChild), + (lanes.return = returnFiber), + (lanes._debugOwner = returnFiber), + (lanes._debugTask = returnFiber._debugTask), + (lanes._debugInfo = currentDebugInfo), + validateFragmentProps(newChild, lanes, returnFiber), + (returnFiber = lanes)) + : ((lanes = createFiberFromElement( + newChild, + returnFiber.mode, + lanes + )), + coerceRef(lanes, newChild), + (lanes.return = returnFiber), + (lanes._debugInfo = currentDebugInfo), + (returnFiber = lanes)); } - else { - resetHydrationState(); - if (returnFiber === prevSibling) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes + returnFiber = placeSingleChild(returnFiber); + currentDebugInfo = prevDebugInfo; + return returnFiber; + case REACT_PORTAL_TYPE: + a: { + prevDebugInfo = newChild; + for ( + newChild = prevDebugInfo.key; + null !== currentFirstChild; + + ) { + if (currentFirstChild.key === newChild) + if ( + 4 === currentFirstChild.tag && + currentFirstChild.stateNode.containerInfo === + prevDebugInfo.containerInfo && + currentFirstChild.stateNode.implementation === + prevDebugInfo.implementation + ) { + deleteRemainingChildren( + returnFiber, + currentFirstChild.sibling + ); + lanes = useFiber( + currentFirstChild, + prevDebugInfo.children || [] + ); + lanes.return = returnFiber; + returnFiber = lanes; + break a; + } else { + deleteRemainingChildren(returnFiber, currentFirstChild); + break; + } + else deleteChild(returnFiber, currentFirstChild); + currentFirstChild = currentFirstChild.sibling; + } + lanes = createFiberFromPortal( + prevDebugInfo, + returnFiber.mode, + lanes ); - break a; + lanes.return = returnFiber; + returnFiber = lanes; } - reconcileChildren( - current, - workInProgress, + return placeSingleChild(returnFiber); + case REACT_LAZY_TYPE: + return ( + (prevDebugInfo = pushDebugInfo(newChild._debugInfo)), + (newChild = callLazyInitInDEV(newChild)), + (returnFiber = reconcileChildFibersImpl( + returnFiber, + currentFirstChild, + newChild, + lanes + )), + (currentDebugInfo = prevDebugInfo), + returnFiber + ); + } + if (isArrayImpl(newChild)) + return ( + (prevDebugInfo = pushDebugInfo(newChild._debugInfo)), + (returnFiber = reconcileChildrenArray( returnFiber, - renderLanes + currentFirstChild, + newChild, + lanes + )), + (currentDebugInfo = prevDebugInfo), + returnFiber + ); + if (getIteratorFn(newChild)) { + prevDebugInfo = pushDebugInfo(newChild._debugInfo); + key = getIteratorFn(newChild); + if ("function" !== typeof key) + throw Error( + "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." ); - } - workInProgress = workInProgress.child; + var newChildren = key.call(newChild); + if (newChildren === newChild) { + if ( + 0 !== returnFiber.tag || + "[object GeneratorFunction]" !== + Object.prototype.toString.call(returnFiber.type) || + "[object Generator]" !== + Object.prototype.toString.call(newChildren) + ) + didWarnAboutGenerators || + console.error( + "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items." + ), + (didWarnAboutGenerators = !0); + } else + newChild.entries !== key || + didWarnAboutMaps || + (console.error( + "Using Maps as children is not supported. Use an array of keyed ReactElements instead." + ), + (didWarnAboutMaps = !0)); + returnFiber = reconcileChildrenIterator( + returnFiber, + currentFirstChild, + newChildren, + lanes + ); + currentDebugInfo = prevDebugInfo; + return returnFiber; } - return workInProgress; - 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 - ); - 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 - ); - case 5: - return ( - null === current && - isHydrating && - ((prevState = getHostContext()), - (returnFiber = validateDOMNesting( - workInProgress.type, - prevState.ancestorInfo + if ("function" === typeof newChild[ASYNC_ITERATOR]) + return ( + (prevDebugInfo = pushDebugInfo(newChild._debugInfo)), + (returnFiber = reconcileChildrenAsyncIteratable( + returnFiber, + currentFirstChild, + newChild, + lanes )), - (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 + (currentDebugInfo = prevDebugInfo), + returnFiber + ); + if ("function" === typeof newChild.then) + return ( + (prevDebugInfo = pushDebugInfo(newChild._debugInfo)), + (returnFiber = reconcileChildFibersImpl( + returnFiber, + currentFirstChild, + unwrapThenable(newChild), + lanes )), - (HostTransitionContext._currentValue = prevSibling)), - markRef(current, workInProgress), - reconcileChildren( - current, - workInProgress, + (currentDebugInfo = prevDebugInfo), + returnFiber + ); + if (newChild.$$typeof === REACT_CONTEXT_TYPE) + return reconcileChildFibersImpl( returnFiber, - renderLanes - ), - 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 - ); - case 13: - return updateSuspenseComponent(current, workInProgress, renderLanes); - case 4: + currentFirstChild, + readContextDuringReconciliation(returnFiber, newChild), + lanes + ); + throwOnInvalidObjectType(returnFiber, newChild); + } + if ( + ("string" === typeof newChild && "" !== newChild) || + "number" === typeof newChild || + "bigint" === typeof newChild + ) return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (returnFiber = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - )) - : reconcileChildren( - current, - workInProgress, + (prevDebugInfo = "" + newChild), + null !== currentFirstChild && 6 === currentFirstChild.tag + ? (deleteRemainingChildren( returnFiber, - renderLanes + currentFirstChild.sibling ), - workInProgress.child + (lanes = useFiber(currentFirstChild, prevDebugInfo)), + (lanes.return = returnFiber), + (returnFiber = lanes)) + : (deleteRemainingChildren(returnFiber, currentFirstChild), + (lanes = createFiberFromText( + prevDebugInfo, + returnFiber.mode, + lanes + )), + (lanes.return = returnFiber), + (lanes._debugOwner = returnFiber), + (lanes._debugTask = returnFiber._debugTask), + (lanes._debugInfo = currentDebugInfo), + (returnFiber = lanes)), + placeSingleChild(returnFiber) ); - case 11: - return updateForwardRef( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 7: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps, - renderLanes - ), - workInProgress.child - ); - case 8: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - 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 + "function" === typeof newChild && + warnOnFunctionType(returnFiber, newChild); + "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild); + return deleteRemainingChildren(returnFiber, currentFirstChild); + } + return function (returnFiber, currentFirstChild, newChild, lanes) { + var prevDebugInfo = currentDebugInfo; + currentDebugInfo = null; + try { + thenableIndexCounter = 0; + var firstChildFiber = reconcileChildFibersImpl( + returnFiber, + currentFirstChild, + newChild, + lanes ); - 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 + thenableState = null; + return firstChildFiber; + } catch (x) { + if (x === SuspenseException || x === SuspenseActionException) throw x; + var fiber = createFiber(29, x, null, returnFiber.mode); + fiber.lanes = lanes; + fiber.return = returnFiber; + var debugInfo = (fiber._debugInfo = currentDebugInfo); + fiber._debugOwner = returnFiber._debugOwner; + fiber._debugTask = returnFiber._debugTask; + if (null != debugInfo) + for (var i = debugInfo.length - 1; 0 <= i; i--) + if ("string" === typeof debugInfo[i].stack) { + fiber._debugOwner = debugInfo[i]; + fiber._debugTask = debugInfo[i].debugTask; + break; + } + return fiber; + } finally { + currentDebugInfo = prevDebugInfo; + } + }; + } + function pushPrimaryTreeSuspenseHandler(handler) { + var current = handler.alternate; + push( + suspenseStackCursor, + suspenseStackCursor.current & SubtreeSuspenseContextMask, + handler + ); + push(suspenseHandlerStackCursor, handler, handler); + null === shellBoundary && + (null === current || null !== currentTreeHiddenStackCursor.current + ? (shellBoundary = handler) + : null !== current.memoizedState && (shellBoundary = handler)); + } + function pushOffscreenSuspenseHandler(fiber) { + if (22 === fiber.tag) { + if ( + (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); + } + function reuseSuspenseHandlerOnStack(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push( + suspenseHandlerStackCursor, + suspenseHandlerStackCursor.current, + fiber + ); + } + function popSuspenseHandler(fiber) { + pop(suspenseHandlerStackCursor, fiber); + shellBoundary === fiber && (shellBoundary = null); + pop(suspenseStackCursor, fiber); + } + function findFirstSuspended(row) { + for (var node = row; null !== node; ) { + if (13 === node.tag) { + var state = node.memoizedState; + if ( + null !== state && + ((state = state.dehydrated), + null === state || + state.data === SUSPENSE_PENDING_START_DATA || + isSuspenseInstanceFallback(state)) + ) + return node; + } else if ( + 19 === node.tag && + void 0 !== node.memoizedProps.revealOrder + ) { + if (0 !== (node.flags & 128)) return node; + } else if (null !== node.child) { + node.child.return = node; + node = node.child; + continue; + } + if (node === row) break; + for (; null === node.sibling; ) { + if (null === node.return || node.return === row) return null; + node = node.return; + } + node.sibling.return = node.return; + node = node.sibling; + } + return null; + } + function warnOnInvalidCallback(callback) { + if (null !== callback && "function" !== typeof callback) { + var key = String(callback); + didWarnOnInvalidCallback.has(key) || + (didWarnOnInvalidCallback.add(key), + console.error( + "Expected the last optional `callback` argument to be a function. Instead received: %s.", + callback + )); + } + } + function applyDerivedStateFromProps( + workInProgress, + ctor, + getDerivedStateFromProps, + nextProps + ) { + var prevState = workInProgress.memoizedState, + partialState = getDerivedStateFromProps(nextProps, prevState); + if (workInProgress.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + partialState = getDerivedStateFromProps(nextProps, prevState); + } finally { + setIsStrictModeForDevtools(!1); + } + } + void 0 === partialState && + ((ctor = getComponentNameFromType(ctor) || "Component"), + didWarnAboutUndefinedDerivedState.has(ctor) || + (didWarnAboutUndefinedDerivedState.add(ctor), + console.error( + "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", + ctor + ))); + prevState = + null === partialState || void 0 === partialState + ? prevState + : assign({}, prevState, partialState); + workInProgress.memoizedState = prevState; + 0 === workInProgress.lanes && + (workInProgress.updateQueue.baseState = prevState); + } + function checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext + ) { + var instance = workInProgress.stateNode; + if ("function" === typeof instance.shouldComponentUpdate) { + oldProps = instance.shouldComponentUpdate( + newProps, + newState, + nextContext + ); + if (workInProgress.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + oldProps = instance.shouldComponentUpdate( + newProps, + newState, + nextContext + ); + } finally { + setIsStrictModeForDevtools(!1); + } + } + void 0 === oldProps && + console.error( + "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", + getComponentNameFromType(ctor) || "Component" ); - 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 - ); - case 14: - return updateMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 19: - return updateSuspenseListComponent( - current, - workInProgress, - renderLanes - ); - case 31: - return ( - (returnFiber = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (returnFiber = { - mode: returnFiber.mode, - children: returnFiber.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( - returnFiber, - renderLanes - )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, returnFiber)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - 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 - ); - 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++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (prevSibling.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - null !== current && current.memoizedProps.name !== returnFiber.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), - reconcileChildren( - current, - workInProgress, - returnFiber.children, - renderLanes - ), - workInProgress.child - ); - case 29: - throw workInProgress.pendingProps; + return oldProps; } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); + return ctor.prototype && ctor.prototype.isPureReactComponent + ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) + : !0; } - function shouldProfile(current) { - return (current.mode & ProfileMode) !== NoMode; + function callComponentWillReceiveProps( + workInProgress, + instance, + newProps, + nextContext + ) { + var oldState = instance.state; + "function" === typeof instance.componentWillReceiveProps && + instance.componentWillReceiveProps(newProps, nextContext); + "function" === typeof instance.UNSAFE_componentWillReceiveProps && + instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); + instance.state !== oldState && + ((workInProgress = + getComponentNameFromFiber(workInProgress) || "Component"), + didWarnAboutStateAssignmentForComponent.has(workInProgress) || + (didWarnAboutStateAssignmentForComponent.add(workInProgress), + console.error( + "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", + workInProgress + )), + classComponentUpdater.enqueueReplaceState( + instance, + instance.state, + null + )); } - function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile(finishedWork) - ? (startEffectTimer(), - commitHookEffectListMount(hookFlags, finishedWork), - recordEffectDuration()) - : commitHookEffectListMount(hookFlags, finishedWork); + function resolveClassComponentProps(Component, baseProps) { + var newProps = baseProps; + if ("ref" in baseProps) { + newProps = {}; + for (var propName in baseProps) + "ref" !== propName && (newProps[propName] = baseProps[propName]); + } + if ((Component = Component.defaultProps)) { + newProps === baseProps && (newProps = assign({}, newProps)); + for (var _propName in Component) + void 0 === newProps[_propName] && + (newProps[_propName] = Component[_propName]); + } + return newProps; } - function commitHookLayoutUnmountEffects( - finishedWork, - nearestMountedAncestor, - hookFlags - ) { - shouldProfile(finishedWork) - ? (startEffectTimer(), - commitHookEffectListUnmount( - hookFlags, - finishedWork, - nearestMountedAncestor - ), - recordEffectDuration()) - : commitHookEffectListUnmount( - hookFlags, - finishedWork, - nearestMountedAncestor - ); + function defaultOnUncaughtError(error) { + reportGlobalError(error); + console.warn( + "%s\n\n%s\n", + componentName + ? "An error occurred in the <" + componentName + "> component." + : "An error occurred in one of your React components.", + "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries." + ); } - function commitHookEffectListMount(flags, finishedWork) { - try { - var updateQueue = finishedWork.updateQueue, - lastEffect = null !== updateQueue ? updateQueue.lastEffect : null; - if (null !== lastEffect) { - var firstEffect = lastEffect.next; - updateQueue = firstEffect; - do { - if ( - (updateQueue.tag & flags) === flags && - ((lastEffect = void 0), - (flags & Insertion) !== NoFlags && - (isRunningInsertionEffect = !0), - (lastEffect = runWithFiberInDEV( - finishedWork, - callCreateInDEV, - updateQueue - )), - (flags & Insertion) !== NoFlags && - (isRunningInsertionEffect = !1), - void 0 !== lastEffect && "function" !== typeof lastEffect) - ) { - var hookName = void 0; - hookName = - 0 !== (updateQueue.tag & Layout) - ? "useLayoutEffect" - : 0 !== (updateQueue.tag & Insertion) - ? "useInsertionEffect" - : "useEffect"; - var addendum = void 0; - addendum = - null === lastEffect - ? " You returned null. If your effect does not require clean up, return undefined (or nothing)." - : "function" === typeof lastEffect.then - ? "\n\nIt looks like you wrote " + - hookName + - "(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n" + - hookName + - "(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching" - : " You returned: " + lastEffect; - runWithFiberInDEV( - finishedWork, - function (n, a) { - console.error( - "%s must not return anything besides a function, which is used for clean-up.%s", - n, - a - ); - }, - hookName, - addendum - ); - } - updateQueue = updateQueue.next; - } while (updateQueue !== firstEffect); + function defaultOnCaughtError(error) { + var componentNameMessage = componentName + ? "The above error occurred in the <" + componentName + "> component." + : "The above error occurred in one of your React components.", + recreateMessage = + "React will try to recreate this component tree from scratch using the error boundary you provided, " + + ((errorBoundaryName || "Anonymous") + "."); + if ( + "object" === typeof error && + null !== error && + "string" === typeof error.environmentName + ) { + var JSCompiler_inline_result = error.environmentName; + error = [ + "%o\n\n%s\n\n%s\n", + error, + componentNameMessage, + recreateMessage + ].slice(0); + "string" === typeof error[0] + ? error.splice( + 0, + 1, + badgeFormat + error[0], + badgeStyle, + pad + JSCompiler_inline_result + pad, + resetStyle + ) + : error.splice( + 0, + 0, + badgeFormat, + badgeStyle, + pad + JSCompiler_inline_result + pad, + resetStyle + ); + error.unshift(console); + JSCompiler_inline_result = bind.apply(console.error, error); + JSCompiler_inline_result(); + } else + console.error( + "%o\n\n%s\n\n%s\n", + error, + componentNameMessage, + recreateMessage + ); + } + function defaultOnRecoverableError(error) { + reportGlobalError(error); + } + function logUncaughtError(root, errorInfo) { + try { + componentName = errorInfo.source + ? getComponentNameFromFiber(errorInfo.source) + : null; + errorBoundaryName = null; + var error = errorInfo.value; + if (null !== ReactSharedInternals.actQueue) + ReactSharedInternals.thrownErrors.push(error); + else { + var onUncaughtError = root.onUncaughtError; + onUncaughtError(error, { componentStack: errorInfo.stack }); } - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); + } catch (e$5) { + setTimeout(function () { + throw e$5; + }); } } - function commitHookEffectListUnmount( - flags, - finishedWork, - nearestMountedAncestor - ) { + function logCaughtError(root, boundary, errorInfo) { try { - var updateQueue = finishedWork.updateQueue, - lastEffect = null !== updateQueue ? updateQueue.lastEffect : null; - if (null !== lastEffect) { - var firstEffect = lastEffect.next; - updateQueue = firstEffect; - do { - if ((updateQueue.tag & flags) === flags) { - var inst = updateQueue.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - (flags & Insertion) !== NoFlags && - (isRunningInsertionEffect = !0), - (lastEffect = finishedWork), - runWithFiberInDEV( - lastEffect, - callDestroyInDEV, - lastEffect, - nearestMountedAncestor, - destroy - ), - (flags & Insertion) !== NoFlags && - (isRunningInsertionEffect = !1)); - } - updateQueue = updateQueue.next; - } while (updateQueue !== firstEffect); - } - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); + componentName = errorInfo.source + ? getComponentNameFromFiber(errorInfo.source) + : null; + errorBoundaryName = getComponentNameFromFiber(boundary); + var onCaughtError = root.onCaughtError; + onCaughtError(errorInfo.value, { + componentStack: errorInfo.stack, + errorBoundary: 1 === boundary.tag ? boundary.stateNode : null + }); + } catch (e$6) { + setTimeout(function () { + throw e$6; + }); } } - function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile(finishedWork) - ? (startEffectTimer(), - commitHookEffectListMount(hookFlags, finishedWork), - recordEffectDuration()) - : commitHookEffectListMount(hookFlags, finishedWork); + function createRootErrorUpdate(root, errorInfo, lane) { + lane = createUpdate(lane); + lane.tag = CaptureUpdate; + lane.payload = { element: null }; + lane.callback = function () { + runWithFiberInDEV(errorInfo.source, logUncaughtError, root, errorInfo); + }; + return lane; } - function commitHookPassiveUnmountEffects( - finishedWork, - nearestMountedAncestor, - hookFlags - ) { - shouldProfile(finishedWork) - ? (startEffectTimer(), - commitHookEffectListUnmount( - hookFlags, - finishedWork, - nearestMountedAncestor - ), - recordEffectDuration()) - : commitHookEffectListUnmount( - hookFlags, - finishedWork, - nearestMountedAncestor - ); + function createClassErrorUpdate(lane) { + lane = createUpdate(lane); + lane.tag = CaptureUpdate; + return lane; } - function commitClassCallbacks(finishedWork) { - var updateQueue = finishedWork.updateQueue; - if (null !== updateQueue) { - var instance = finishedWork.stateNode; - finishedWork.type.defaultProps || - "ref" in finishedWork.memoizedProps || - didWarnAboutReassigningProps || - (instance.props !== finishedWork.memoizedProps && - console.error( - "Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", - getComponentNameFromFiber(finishedWork) || "instance" - ), - instance.state !== finishedWork.memoizedState && - console.error( - "Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", - getComponentNameFromFiber(finishedWork) || "instance" - )); - try { + function initializeClassErrorUpdate(update, root, fiber, errorInfo) { + var getDerivedStateFromError = fiber.type.getDerivedStateFromError; + if ("function" === typeof getDerivedStateFromError) { + var error = errorInfo.value; + update.payload = function () { + return getDerivedStateFromError(error); + }; + update.callback = function () { + markFailedErrorBoundaryForHotReloading(fiber); runWithFiberInDEV( - finishedWork, - commitCallbacks, - updateQueue, - instance + errorInfo.source, + logCaughtError, + root, + fiber, + errorInfo ); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } + }; } + var inst = fiber.stateNode; + null !== inst && + "function" === typeof inst.componentDidCatch && + (update.callback = function () { + markFailedErrorBoundaryForHotReloading(fiber); + runWithFiberInDEV( + errorInfo.source, + logCaughtError, + root, + fiber, + errorInfo + ); + "function" !== typeof getDerivedStateFromError && + (null === legacyErrorBoundariesThatAlreadyFailed + ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this])) + : legacyErrorBoundariesThatAlreadyFailed.add(this)); + callComponentDidCatchInDEV(this, errorInfo); + "function" === typeof getDerivedStateFromError || + (0 === (fiber.lanes & 2) && + console.error( + "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.", + getComponentNameFromFiber(fiber) || "Unknown" + )); + }); } - function callGetSnapshotBeforeUpdates(instance, prevProps, prevState) { - return instance.getSnapshotBeforeUpdate(prevProps, prevState); + function resetSuspendedComponent(sourceFiber, rootRenderLanes) { + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); } - function commitClassSnapshot(finishedWork, current) { - var prevProps = current.memoizedProps, - prevState = current.memoizedState; - current = finishedWork.stateNode; - finishedWork.type.defaultProps || - "ref" in finishedWork.memoizedProps || - didWarnAboutReassigningProps || - (current.props !== finishedWork.memoizedProps && - console.error( - "Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", - getComponentNameFromFiber(finishedWork) || "instance" - ), - current.state !== finishedWork.memoizedState && - console.error( - "Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", - getComponentNameFromFiber(finishedWork) || "instance" - )); - try { - var resolvedPrevProps = resolveClassComponentProps( - finishedWork.type, - prevProps, - finishedWork.elementType === finishedWork.type - ); - var snapshot = runWithFiberInDEV( - finishedWork, - callGetSnapshotBeforeUpdates, - current, - resolvedPrevProps, - prevState - ); - prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate; - void 0 !== snapshot || - prevProps.has(finishedWork.type) || - (prevProps.add(finishedWork.type), - runWithFiberInDEV(finishedWork, function () { - console.error( - "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.", - getComponentNameFromFiber(finishedWork) - ); - })); - current.__reactInternalSnapshotBeforeUpdate = snapshot; - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } + function markSuspenseBoundaryShouldCapture( + suspenseBoundary, + returnFiber, + sourceFiber, + root, + rootRenderLanes + ) { + suspenseBoundary.flags |= 65536; + suspenseBoundary.lanes = rootRenderLanes; + return suspenseBoundary; } - function safelyCallComponentWillUnmount( - current, - nearestMountedAncestor, - instance + function throwException( + root, + returnFiber, + sourceFiber, + value, + rootRenderLanes ) { - instance.props = resolveClassComponentProps( - current.type, - current.memoizedProps - ); - instance.state = current.memoizedState; - shouldProfile(current) - ? (startEffectTimer(), - runWithFiberInDEV( - current, - callComponentWillUnmountInDEV, - current, - nearestMountedAncestor, - instance - ), - recordEffectDuration()) - : runWithFiberInDEV( - current, - callComponentWillUnmountInDEV, - current, - nearestMountedAncestor, - instance + sourceFiber.flags |= 32768; + isDevToolsPresent && restorePendingUpdaters(root, rootRenderLanes); + if ( + null !== value && + "object" === typeof value && + (value.$$typeof === REACT_POSTPONE_TYPE && + (value = { then: function () {} }), + "function" === typeof value.then) + ) { + resetSuspendedComponent(sourceFiber, rootRenderLanes); + isHydrating && (didSuspendOrErrorDEV = !0); + var suspenseBoundary = suspenseHandlerStackCursor.current; + if (null !== suspenseBoundary) { + switch (suspenseBoundary.tag) { + case 13: + return ( + null === shellBoundary + ? renderDidSuspendDelayIfPossible() + : null === suspenseBoundary.alternate && + workInProgressRootExitStatus === RootInProgress && + (workInProgressRootExitStatus = RootSuspended), + (suspenseBoundary.flags &= -257), + markSuspenseBoundaryShouldCapture( + suspenseBoundary, + returnFiber, + sourceFiber, + root, + rootRenderLanes + ), + value === noopSuspenseyCommitThenable + ? (suspenseBoundary.flags |= 16384) + : ((sourceFiber = suspenseBoundary.updateQueue), + null === sourceFiber + ? (suspenseBoundary.updateQueue = new Set([value])) + : sourceFiber.add(value), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); + case 22: + return ( + (suspenseBoundary.flags |= 65536), + value === noopSuspenseyCommitThenable + ? (suspenseBoundary.flags |= 16384) + : ((sourceFiber = suspenseBoundary.updateQueue), + null === sourceFiber + ? ((sourceFiber = { + transitions: null, + markerInstances: null, + retryQueue: new Set([value]) + }), + (suspenseBoundary.updateQueue = sourceFiber)) + : ((returnFiber = sourceFiber.retryQueue), + null === returnFiber + ? (sourceFiber.retryQueue = new Set([value])) + : returnFiber.add(value)), + attachPingListener(root, value, rootRenderLanes)), + !1 + ); + } + throw Error( + "Unexpected Suspense handler tag (" + + suspenseBoundary.tag + + "). This is a bug in React." ); - } - function commitAttachRef(finishedWork) { - var ref = finishedWork.ref; - if (null !== ref) { - switch (finishedWork.tag) { - case 26: - case 27: - case 5: - var instanceToUse = finishedWork.stateNode; - break; - case 30: - instanceToUse = finishedWork.stateNode; - var name = getViewTransitionName( - finishedWork.memoizedProps, - instanceToUse - ); - if (null === instanceToUse.ref || instanceToUse.ref.name !== name) - instanceToUse.ref = createViewTransitionInstance(name); - instanceToUse = instanceToUse.ref; - break; - default: - instanceToUse = finishedWork.stateNode; } - if ("function" === typeof ref) - if (shouldProfile(finishedWork)) - try { - startEffectTimer(), - (finishedWork.refCleanup = ref(instanceToUse)); - } finally { - recordEffectDuration(); - } - else finishedWork.refCleanup = ref(instanceToUse); - else - "string" === typeof ref - ? console.error("String refs are no longer supported.") - : ref.hasOwnProperty("current") || - console.error( - "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().", - getComponentNameFromFiber(finishedWork) - ), - (ref.current = instanceToUse); - } - } - function safelyAttachRef(current, nearestMountedAncestor) { - try { - runWithFiberInDEV(current, commitAttachRef, current); - } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + attachPingListener(root, value, rootRenderLanes); + renderDidSuspendDelayIfPossible(); + return !1; } - } - function safelyDetachRef(current, nearestMountedAncestor) { - var ref = current.ref, - refCleanup = current.refCleanup; - if (null !== ref) - if ("function" === typeof refCleanup) - try { - if (shouldProfile(current)) - try { - startEffectTimer(), runWithFiberInDEV(current, refCleanup); - } finally { - recordEffectDuration(current); - } - else runWithFiberInDEV(current, refCleanup); - } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); - } finally { - (current.refCleanup = null), - (current = current.alternate), - null != current && (current.refCleanup = null); - } - else if ("function" === typeof ref) - try { - if (shouldProfile(current)) - try { - startEffectTimer(), runWithFiberInDEV(current, ref, null); - } finally { - recordEffectDuration(current); - } - else runWithFiberInDEV(current, ref, null); - } catch (error$6) { - captureCommitPhaseError(current, nearestMountedAncestor, error$6); - } - else ref.current = null; - } - function commitProfiler( - finishedWork, - current, - commitStartTime, - effectDuration - ) { - var _finishedWork$memoize = finishedWork.memoizedProps, - id = _finishedWork$memoize.id, - onCommit = _finishedWork$memoize.onCommit; - _finishedWork$memoize = _finishedWork$memoize.onRender; - current = null === current ? "mount" : "update"; - currentUpdateIsNested && (current = "nested-update"); - "function" === typeof _finishedWork$memoize && - _finishedWork$memoize( - id, - current, - finishedWork.actualDuration, - finishedWork.treeBaseDuration, - finishedWork.actualStartTime, - commitStartTime - ); - "function" === typeof onCommit && - onCommit( - finishedWork.memoizedProps.id, - current, - effectDuration, - commitStartTime + if (isHydrating) + return ( + (didSuspendOrErrorDEV = !0), + (suspenseBoundary = suspenseHandlerStackCursor.current), + null !== suspenseBoundary + ? (0 === (suspenseBoundary.flags & 65536) && + (suspenseBoundary.flags |= 256), + markSuspenseBoundaryShouldCapture( + suspenseBoundary, + returnFiber, + sourceFiber, + root, + rootRenderLanes + ), + value !== HydrationMismatchException && + queueHydrationError( + createCapturedValueAtFiber( + Error( + "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.", + { cause: value } + ), + sourceFiber + ) + )) + : (value !== HydrationMismatchException && + queueHydrationError( + createCapturedValueAtFiber( + Error( + "There was an error while hydrating but React was able to recover by instead client rendering the entire root.", + { cause: value } + ), + sourceFiber + ) + ), + (root = root.current.alternate), + (root.flags |= 65536), + (rootRenderLanes &= -rootRenderLanes), + (root.lanes |= rootRenderLanes), + (sourceFiber = createCapturedValueAtFiber(value, sourceFiber)), + (rootRenderLanes = createRootErrorUpdate( + root.stateNode, + sourceFiber, + rootRenderLanes + )), + enqueueCapturedUpdate(root, rootRenderLanes), + workInProgressRootExitStatus !== RootSuspendedWithDelay && + (workInProgressRootExitStatus = RootErrored)), + !1 ); + queueConcurrentError( + createCapturedValueAtFiber( + Error( + "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", + { cause: value } + ), + sourceFiber + ) + ); + workInProgressRootExitStatus !== RootSuspendedWithDelay && + (workInProgressRootExitStatus = RootErrored); + if (null === returnFiber) return !0; + sourceFiber = createCapturedValueAtFiber(value, sourceFiber); + value = returnFiber; + do { + switch (value.tag) { + case 3: + return ( + (value.flags |= 65536), + (root = rootRenderLanes & -rootRenderLanes), + (value.lanes |= root), + (root = createRootErrorUpdate( + value.stateNode, + sourceFiber, + root + )), + enqueueCapturedUpdate(value, root), + !1 + ); + case 1: + if ( + ((returnFiber = value.type), + (suspenseBoundary = value.stateNode), + 0 === (value.flags & 128) && + ("function" === typeof returnFiber.getDerivedStateFromError || + (null !== suspenseBoundary && + "function" === typeof suspenseBoundary.componentDidCatch && + (null === legacyErrorBoundariesThatAlreadyFailed || + !legacyErrorBoundariesThatAlreadyFailed.has( + suspenseBoundary + ))))) + ) + return ( + (value.flags |= 65536), + (rootRenderLanes &= -rootRenderLanes), + (value.lanes |= rootRenderLanes), + (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)), + initializeClassErrorUpdate( + rootRenderLanes, + root, + value, + sourceFiber + ), + enqueueCapturedUpdate(value, rootRenderLanes), + !1 + ); + } + value = value.return; + } while (null !== value); + return !1; } - function commitProfilerPostCommitImpl( - finishedWork, + function reconcileChildren( current, - commitStartTime, - passiveEffectDuration + workInProgress, + nextChildren, + renderLanes ) { - var _finishedWork$memoize2 = finishedWork.memoizedProps; - finishedWork = _finishedWork$memoize2.id; - _finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit; - current = null === current ? "mount" : "update"; - currentUpdateIsNested && (current = "nested-update"); - "function" === typeof _finishedWork$memoize2 && - _finishedWork$memoize2( - finishedWork, - current, - passiveEffectDuration, - commitStartTime - ); + workInProgress.child = + null === current + ? mountChildFibers(workInProgress, null, nextChildren, renderLanes) + : reconcileChildFibers( + workInProgress, + current.child, + nextChildren, + renderLanes + ); } - function commitHostMount(finishedWork) { - var type = finishedWork.type, - props = finishedWork.memoizedProps, - instance = finishedWork.stateNode; - try { - runWithFiberInDEV( - finishedWork, - commitMount, - instance, - type, - props, - finishedWork + function updateForwardRef( + current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + Component = Component.render; + var ref = workInProgress.ref; + if ("ref" in nextProps) { + var propsWithoutRef = {}; + for (var key in nextProps) + "ref" !== key && (propsWithoutRef[key] = nextProps[key]); + } else propsWithoutRef = nextProps; + prepareToReadContext(workInProgress); + nextProps = renderWithHooks( + current, + workInProgress, + Component, + propsWithoutRef, + ref, + renderLanes + ); + key = checkDidRenderIdHook(); + if (null !== current && !didReceiveUpdate) + return ( + bailoutHooks(current, workInProgress, renderLanes), + bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) ); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } + isHydrating && key && pushMaterializedTreeId(workInProgress); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, nextProps, renderLanes); + return workInProgress.child; } - function commitHostUpdate(finishedWork, newProps, oldProps) { - try { - runWithFiberInDEV( - finishedWork, - commitUpdate, - finishedWork.stateNode, - finishedWork.type, - oldProps, - newProps, - finishedWork + function updateMemoComponent( + current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + if (null === current) { + var type = Component.type; + if ( + "function" === typeof type && + !shouldConstruct(type) && + void 0 === type.defaultProps && + null === Component.compare + ) + return ( + (Component = resolveFunctionForHotReloading(type)), + (workInProgress.tag = 15), + (workInProgress.type = Component), + validateFunctionComponentInDev(workInProgress, type), + updateSimpleMemoComponent( + current, + workInProgress, + Component, + nextProps, + renderLanes + ) + ); + current = createFiberFromTypeAndProps( + Component.type, + null, + nextProps, + workInProgress, + workInProgress.mode, + renderLanes ); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); + current.ref = workInProgress.ref; + current.return = workInProgress; + return (workInProgress.child = current); + } + type = current.child; + if (!checkScheduledUpdateOrContext(current, renderLanes)) { + var prevProps = type.memoizedProps; + Component = Component.compare; + Component = null !== Component ? Component : shallowEqual; + if ( + Component(prevProps, nextProps) && + current.ref === workInProgress.ref + ) + return bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); } + workInProgress.flags |= 1; + current = createWorkInProgress(type, nextProps); + current.ref = workInProgress.ref; + current.return = workInProgress; + return (workInProgress.child = current); } - function isHostParent(fiber) { - return ( - 5 === fiber.tag || - 3 === fiber.tag || - 26 === fiber.tag || - (27 === fiber.tag && isSingletonScope(fiber.type)) || - 4 === fiber.tag + function updateSimpleMemoComponent( + current, + workInProgress, + Component, + nextProps, + renderLanes + ) { + if (null !== current) { + var prevProps = current.memoizedProps; + if ( + shallowEqual(prevProps, nextProps) && + current.ref === workInProgress.ref && + workInProgress.type === current.type + ) + if ( + ((didReceiveUpdate = !1), + (workInProgress.pendingProps = nextProps = prevProps), + checkScheduledUpdateOrContext(current, renderLanes)) + ) + 0 !== (current.flags & 131072) && (didReceiveUpdate = !0); + else + return ( + (workInProgress.lanes = current.lanes), + bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) + ); + } + return updateFunctionComponent( + current, + workInProgress, + Component, + nextProps, + renderLanes ); } - function getHostSibling(fiber) { - a: for (;;) { - for (; null === fiber.sibling; ) { - if (null === fiber.return || isHostParent(fiber.return)) return null; - fiber = fiber.return; - } - fiber.sibling.return = fiber.return; - for ( - fiber = fiber.sibling; - 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag; - - ) { - if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a; - if (fiber.flags & 2) continue a; - if (null === fiber.child || 4 === fiber.tag) continue a; - else (fiber.child.return = fiber), (fiber = fiber.child); + function updateOffscreenComponent(current, workInProgress, renderLanes) { + var nextProps = workInProgress.pendingProps, + nextChildren = nextProps.children, + prevState = null !== current ? current.memoizedState : null; + if ("hidden" === nextProps.mode) { + if (0 !== (workInProgress.flags & 128)) { + nextProps = + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes; + if (null !== current) { + nextChildren = workInProgress.child = current.child; + for (prevState = 0; null !== nextChildren; ) + (prevState = + prevState | nextChildren.lanes | nextChildren.childLanes), + (nextChildren = nextChildren.sibling); + workInProgress.childLanes = prevState & ~nextProps; + } else (workInProgress.childLanes = 0), (workInProgress.child = null); + return deferHiddenOffscreenComponent( + current, + workInProgress, + nextProps, + renderLanes + ); } - if (!(fiber.flags & 2)) return fiber.stateNode; - } - } - function insertOrAppendPlacementNodeIntoContainer(node, before, parent) { - var tag = node.tag; - if (5 === tag || 6 === tag) - (node = node.stateNode), - before - ? ((parent = - 9 === parent.nodeType - ? parent.body - : "HTML" === parent.nodeName - ? parent.ownerDocument.body - : parent), - supportsMoveBefore && null !== node.parentNode - ? parent.moveBefore(node, before) - : parent.insertBefore(node, before)) - : ((before = parent), - (parent = - 9 === before.nodeType - ? before.body - : "HTML" === before.nodeName - ? before.ownerDocument.body - : before), - supportsMoveBefore && null !== node.parentNode - ? parent.moveBefore(node, null) - : parent.appendChild(node), - (before = before._reactRootContainer), - (null !== before && void 0 !== before) || - null !== parent.onclick || - (parent.onclick = noop$1)), - (viewTransitionMutationContext = !0); - else if ( - 4 !== tag && - (27 === tag && - isSingletonScope(node.type) && - ((parent = node.stateNode), (before = null)), - (node = node.child), - null !== node) - ) - for ( - insertOrAppendPlacementNodeIntoContainer(node, before, parent), - node = node.sibling; - null !== node; - - ) - insertOrAppendPlacementNodeIntoContainer(node, before, parent), - (node = node.sibling); + 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( + current, + workInProgress, + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); + } else + null !== prevState + ? (pushTransition(workInProgress, prevState.cachePool), + pushHiddenContext(workInProgress, prevState), + reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.memoizedState = null)) + : (null !== current && pushTransition(workInProgress, null), + reuseHiddenContextOnStack(workInProgress), + reuseSuspenseHandlerOnStack(workInProgress)); + reconcileChildren(current, workInProgress, nextChildren, renderLanes); + return workInProgress.child; } - function insertOrAppendPlacementNode(node, before, parent) { - var tag = node.tag; - if (5 === tag || 6 === tag) - (node = node.stateNode), - before - ? supportsMoveBefore && null !== node.parentNode - ? parent.moveBefore(node, before) - : parent.insertBefore(node, before) - : appendChild(parent, node), - (viewTransitionMutationContext = !0); - else if ( - 4 !== tag && - (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode), - (node = node.child), - null !== node) - ) - for ( - insertOrAppendPlacementNode(node, before, parent), - node = node.sibling; - null !== node; - - ) - insertOrAppendPlacementNode(node, before, parent), - (node = node.sibling); + function deferHiddenOffscreenComponent( + current, + workInProgress, + nextBaseLanes, + renderLanes + ) { + var JSCompiler_inline_result = peekCacheFromPool(); + JSCompiler_inline_result = + null === JSCompiler_inline_result + ? null + : { + parent: CacheContext._currentValue, + pool: JSCompiler_inline_result + }; + workInProgress.memoizedState = { + baseLanes: nextBaseLanes, + cachePool: JSCompiler_inline_result + }; + null !== current && pushTransition(workInProgress, null); + reuseHiddenContextOnStack(workInProgress); + pushOffscreenSuspenseHandler(workInProgress); + null !== current && + propagateParentContextChanges(current, workInProgress, renderLanes, !0); + return null; } - function commitPlacement(finishedWork) { - for ( - var hostParentFiber, parentFiber = finishedWork.return; - null !== parentFiber; - - ) { - if (isHostParent(parentFiber)) { - hostParentFiber = parentFiber; - break; - } - parentFiber = parentFiber.return; - } - if (null == hostParentFiber) - throw Error( - "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." - ); - switch (hostParentFiber.tag) { - case 27: - hostParentFiber = hostParentFiber.stateNode; - parentFiber = getHostSibling(finishedWork); - insertOrAppendPlacementNode( - finishedWork, - parentFiber, - hostParentFiber - ); - break; - case 5: - parentFiber = hostParentFiber.stateNode; - hostParentFiber.flags & 32 && - (resetTextContent(parentFiber), (hostParentFiber.flags &= -33)); - hostParentFiber = getHostSibling(finishedWork); - insertOrAppendPlacementNode( - finishedWork, - hostParentFiber, - parentFiber - ); - break; - case 3: - case 4: - hostParentFiber = hostParentFiber.stateNode.containerInfo; - parentFiber = getHostSibling(finishedWork); - insertOrAppendPlacementNodeIntoContainer( - finishedWork, - parentFiber, - hostParentFiber - ); - break; - default: + function markRef(current, workInProgress) { + var ref = workInProgress.ref; + if (null === ref) + null !== current && + null !== current.ref && + (workInProgress.flags |= 4194816); + else { + if ("function" !== typeof ref && "object" !== typeof ref) throw Error( - "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." + "Expected ref to be a function, an object returned by React.createRef(), or undefined/null." ); + if (null === current || current.ref !== ref) + workInProgress.flags |= 4194816; } } - function commitHostSingletonAcquisition(finishedWork) { - var singleton = finishedWork.stateNode, - props = finishedWork.memoizedProps; - try { - runWithFiberInDEV( - finishedWork, - acquireSingletonInstance, - finishedWork.type, - props, - singleton, - finishedWork - ); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } - } - function pushViewTransitionCancelableScope() { - var prevChildren = viewTransitionCancelableChildren; - viewTransitionCancelableChildren = null; - return prevChildren; - } - function applyViewTransitionToHostInstances( - child, - name, - className, - collectMeasurements, - stopAtNestedViewTransitions + function updateFunctionComponent( + current, + workInProgress, + Component, + nextProps, + renderLanes ) { - viewTransitionHostInstanceIdx = 0; - return applyViewTransitionToHostInstancesRecursive( - child, - name, - className, - collectMeasurements, - stopAtNestedViewTransitions + if ( + Component.prototype && + "function" === typeof Component.prototype.render + ) { + var componentName = getComponentNameFromType(Component) || "Unknown"; + didWarnAboutBadClass[componentName] || + (console.error( + "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", + componentName, + componentName + ), + (didWarnAboutBadClass[componentName] = !0)); + } + workInProgress.mode & StrictLegacyMode && + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + null + ); + null === current && + (validateFunctionComponentInDev(workInProgress, workInProgress.type), + Component.contextTypes && + ((componentName = getComponentNameFromType(Component) || "Unknown"), + didWarnAboutContextTypes[componentName] || + ((didWarnAboutContextTypes[componentName] = !0), + console.error( + "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)", + componentName + )))); + prepareToReadContext(workInProgress); + Component = renderWithHooks( + current, + workInProgress, + Component, + nextProps, + void 0, + renderLanes ); + nextProps = checkDidRenderIdHook(); + if (null !== current && !didReceiveUpdate) + return ( + bailoutHooks(current, workInProgress, renderLanes), + bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) + ); + isHydrating && nextProps && pushMaterializedTreeId(workInProgress); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, Component, renderLanes); + return workInProgress.child; } - function applyViewTransitionToHostInstancesRecursive( - child, - name, - className, - collectMeasurements, - stopAtNestedViewTransitions + function replayFunctionComponent( + current, + workInProgress, + nextProps, + Component, + secondArg, + renderLanes ) { - for (var inViewport = !1; null !== child; ) { - if (5 === child.tag) { - shouldStartViewTransition = !0; - var instance = child.stateNode; - if (null !== collectMeasurements) { - var measurement = measureInstance(instance); - collectMeasurements.push(measurement); - measurement.view && (inViewport = !0); - } else - inViewport || (measureInstance(instance).view && (inViewport = !0)); - applyViewTransitionName( - instance, - 0 === viewTransitionHostInstanceIdx - ? name - : name + "_" + viewTransitionHostInstanceIdx, - className - ); - viewTransitionHostInstanceIdx++; - } else if (22 !== child.tag || null === child.memoizedState) - (30 === child.tag && stopAtNestedViewTransitions) || - (applyViewTransitionToHostInstancesRecursive( - child.child, - name, - className, - collectMeasurements, - stopAtNestedViewTransitions - ) && - (inViewport = !0)); - child = child.sibling; - } - return inViewport; + prepareToReadContext(workInProgress); + hookTypesUpdateIndexDev = -1; + ignorePreviousDependencies = + null !== current && current.type !== workInProgress.type; + workInProgress.updateQueue = null; + nextProps = renderWithHooksAgain( + workInProgress, + Component, + nextProps, + secondArg + ); + finishRenderingHooks(current, workInProgress); + Component = checkDidRenderIdHook(); + if (null !== current && !didReceiveUpdate) + return ( + bailoutHooks(current, workInProgress, renderLanes), + bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) + ); + isHydrating && Component && pushMaterializedTreeId(workInProgress); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, nextProps, renderLanes); + return workInProgress.child; } - function restoreViewTransitionOnHostInstances( - child, - stopAtNestedViewTransitions + function updateClassComponent( + current, + workInProgress, + Component, + nextProps, + renderLanes ) { - for (; null !== child; ) { - if (5 === child.tag) - restoreViewTransitionName(child.stateNode, child.memoizedProps); - else if (22 !== child.tag || null === child.memoizedState) - (30 === child.tag && stopAtNestedViewTransitions) || - restoreViewTransitionOnHostInstances( - child.child, - stopAtNestedViewTransitions + switch (shouldErrorImpl(workInProgress)) { + case !1: + var _instance = workInProgress.stateNode, + state = new workInProgress.type( + workInProgress.memoizedProps, + _instance.context + ).state; + _instance.updater.enqueueSetState(_instance, state, null); + break; + case !0: + workInProgress.flags |= 128; + workInProgress.flags |= 65536; + _instance = Error("Simulated error coming from DevTools"); + var lane = renderLanes & -renderLanes; + workInProgress.lanes |= lane; + state = workInProgressRoot; + if (null === state) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." ); - child = child.sibling; + lane = createClassErrorUpdate(lane); + initializeClassErrorUpdate( + lane, + state, + workInProgress, + createCapturedValueAtFiber(_instance, workInProgress) + ); + enqueueCapturedUpdate(workInProgress, lane); } - } - function commitAppearingPairViewTransitions(placement) { - if (0 !== (placement.subtreeFlags & 18874368)) - for (placement = placement.child; null !== placement; ) { - if (22 !== placement.tag || null !== placement.memoizedState) - if ( - (commitAppearingPairViewTransitions(placement), - 30 === placement.tag && - 0 !== (placement.flags & 18874368) && - placement.stateNode.paired) - ) { - var props = placement.memoizedProps; - if (null == props.name || "auto" === props.name) - throw Error( - "Found a pair with an auto name. This is a bug in React." - ); - var name = props.name; - props = getViewTransitionClassName(props.className, props.share); - "none" !== props && - (applyViewTransitionToHostInstances( - placement.child, - name, - props, - null, - !1 - ) || - restoreViewTransitionOnHostInstances(placement.child, !1)); - } - placement = placement.sibling; + prepareToReadContext(workInProgress); + if (null === workInProgress.stateNode) { + state = emptyContextObject; + _instance = Component.contextType; + "contextType" in Component && + null !== _instance && + (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) && + !didWarnAboutInvalidateContextType.has(Component) && + (didWarnAboutInvalidateContextType.add(Component), + (lane = + void 0 === _instance + ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." + : "object" !== typeof _instance + ? " However, it is set to a " + typeof _instance + "." + : _instance.$$typeof === REACT_CONSUMER_TYPE + ? " Did you accidentally pass the Context.Consumer instead?" + : " However, it is set to an object with keys {" + + Object.keys(_instance).join(", ") + + "}."), + console.error( + "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", + getComponentNameFromType(Component) || "Component", + lane + )); + "object" === typeof _instance && + null !== _instance && + (state = readContext(_instance)); + _instance = new Component(nextProps, state); + if (workInProgress.mode & StrictLegacyMode) { + setIsStrictModeForDevtools(!0); + try { + _instance = new Component(nextProps, state); + } finally { + setIsStrictModeForDevtools(!1); + } } - } - function commitEnterViewTransitions(placement, gesture) { - if (30 === placement.tag) { - var state = placement.stateNode, - props = placement.memoizedProps, - name = getViewTransitionName(props, state), - className = getViewTransitionClassName( - props.className, - state.paired ? props.share : props.enter - ); - "none" !== className - ? applyViewTransitionToHostInstances( - placement.child, - name, - className, - null, - !1 - ) - ? (commitAppearingPairViewTransitions(placement), - state.paired || - gesture || - scheduleViewTransitionEvent(placement, props.onEnter)) - : restoreViewTransitionOnHostInstances(placement.child, !1) - : commitAppearingPairViewTransitions(placement); - } else if (0 !== (placement.subtreeFlags & 33554432)) - for (placement = placement.child; null !== placement; ) - commitEnterViewTransitions(placement, gesture), - (placement = placement.sibling); - else commitAppearingPairViewTransitions(placement); - } - function commitDeletedPairViewTransitions(deletion) { - if ( - null !== appearingViewTransitions && - 0 !== appearingViewTransitions.size - ) { - var pairs = appearingViewTransitions; - if (0 !== (deletion.subtreeFlags & 18874368)) - for (deletion = deletion.child; null !== deletion; ) { - if (22 !== deletion.tag || null !== deletion.memoizedState) { - if (30 === deletion.tag && 0 !== (deletion.flags & 18874368)) { - var props = deletion.memoizedProps, - name = props.name; - if (null != name && "auto" !== name) { - var pair = pairs.get(name); - if (void 0 !== pair) { - var className = getViewTransitionClassName( - props.className, - props.share - ); - "none" !== className && - (applyViewTransitionToHostInstances( - deletion.child, - name, - className, - null, - !1 - ) - ? ((className = deletion.stateNode), - (pair.paired = className), - (className.paired = pair), - scheduleViewTransitionEvent(deletion, props.onShare)) - : restoreViewTransitionOnHostInstances( - deletion.child, - !1 - )); - pairs.delete(name); - if (0 === pairs.size) break; - } - } - } - commitDeletedPairViewTransitions(deletion); - } - deletion = deletion.sibling; - } - } - } - function commitExitViewTransitions(deletion) { - if (30 === deletion.tag) { - var props = deletion.memoizedProps, - name = getViewTransitionName(props, deletion.stateNode), - pair = - null !== appearingViewTransitions - ? appearingViewTransitions.get(name) - : void 0, - className = getViewTransitionClassName( - props.className, - void 0 !== pair ? props.share : props.exit - ); - "none" !== className && - (applyViewTransitionToHostInstances( - deletion.child, - name, - className, - null, - !1 - ) - ? void 0 !== pair - ? ((className = deletion.stateNode), - (pair.paired = className), - (className.paired = pair), - appearingViewTransitions.delete(name), - scheduleViewTransitionEvent(deletion, props.onShare)) - : scheduleViewTransitionEvent(deletion, props.onExit) - : restoreViewTransitionOnHostInstances(deletion.child, !1)); - null !== appearingViewTransitions && - commitDeletedPairViewTransitions(deletion); - } else if (0 !== (deletion.subtreeFlags & 33554432)) - for (deletion = deletion.child; null !== deletion; ) - commitExitViewTransitions(deletion), (deletion = deletion.sibling); - else - null !== appearingViewTransitions && - commitDeletedPairViewTransitions(deletion); - } - function commitNestedViewTransitions(changedParent) { - for (changedParent = changedParent.child; null !== changedParent; ) { - if (30 === changedParent.tag) { - var props = changedParent.memoizedProps, - name = getViewTransitionName(props, changedParent.stateNode); - props = getViewTransitionClassName(props.className, props.layout); - "none" !== props && - applyViewTransitionToHostInstances( - changedParent.child, - name, - props, - (changedParent.memoizedState = []), - !1 - ); - } else - 0 !== (changedParent.subtreeFlags & 33554432) && - commitNestedViewTransitions(changedParent); - changedParent = changedParent.sibling; - } - } - function restorePairedViewTransitions(parent) { - if (0 !== (parent.subtreeFlags & 18874368)) - for (parent = parent.child; null !== parent; ) { - if (22 !== parent.tag || null !== parent.memoizedState) { - if (30 === parent.tag && 0 !== (parent.flags & 18874368)) { - var instance = parent.stateNode; - null !== instance.paired && - ((instance.paired = null), - restoreViewTransitionOnHostInstances(parent.child, !1)); - } - restorePairedViewTransitions(parent); + state = workInProgress.memoizedState = + null !== _instance.state && void 0 !== _instance.state + ? _instance.state + : null; + _instance.updater = classComponentUpdater; + workInProgress.stateNode = _instance; + _instance._reactInternals = workInProgress; + _instance._reactInternalInstance = fakeInternalInstance; + "function" === typeof Component.getDerivedStateFromProps && + null === state && + ((state = getComponentNameFromType(Component) || "Component"), + didWarnAboutUninitializedState.has(state) || + (didWarnAboutUninitializedState.add(state), + console.error( + "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", + state, + null === _instance.state ? "null" : "undefined", + state + ))); + if ( + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof _instance.getSnapshotBeforeUpdate + ) { + var foundWillUpdateName = (lane = state = null); + "function" === typeof _instance.componentWillMount && + !0 !== _instance.componentWillMount.__suppressDeprecationWarning + ? (state = "componentWillMount") + : "function" === typeof _instance.UNSAFE_componentWillMount && + (state = "UNSAFE_componentWillMount"); + "function" === typeof _instance.componentWillReceiveProps && + !0 !== + _instance.componentWillReceiveProps.__suppressDeprecationWarning + ? (lane = "componentWillReceiveProps") + : "function" === + typeof _instance.UNSAFE_componentWillReceiveProps && + (lane = "UNSAFE_componentWillReceiveProps"); + "function" === typeof _instance.componentWillUpdate && + !0 !== _instance.componentWillUpdate.__suppressDeprecationWarning + ? (foundWillUpdateName = "componentWillUpdate") + : "function" === typeof _instance.UNSAFE_componentWillUpdate && + (foundWillUpdateName = "UNSAFE_componentWillUpdate"); + if (null !== state || null !== lane || null !== foundWillUpdateName) { + _instance = getComponentNameFromType(Component) || "Component"; + var newApiName = + "function" === typeof Component.getDerivedStateFromProps + ? "getDerivedStateFromProps()" + : "getSnapshotBeforeUpdate()"; + didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || + (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), + console.error( + "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", + _instance, + newApiName, + null !== state ? "\n " + state : "", + null !== lane ? "\n " + lane : "", + null !== foundWillUpdateName ? "\n " + foundWillUpdateName : "" + )); } - parent = parent.sibling; } - } - function restoreEnterOrExitViewTransitions(fiber) { - if (30 === fiber.tag) - (fiber.stateNode.paired = null), - restoreViewTransitionOnHostInstances(fiber.child, !1), - restorePairedViewTransitions(fiber); - else if (0 !== (fiber.subtreeFlags & 33554432)) - for (fiber = fiber.child; null !== fiber; ) - restoreEnterOrExitViewTransitions(fiber), (fiber = fiber.sibling); - else restorePairedViewTransitions(fiber); - } - function restoreNestedViewTransitions(changedParent) { - for (changedParent = changedParent.child; null !== changedParent; ) - 30 === changedParent.tag - ? restoreViewTransitionOnHostInstances(changedParent.child, !1) - : 0 !== (changedParent.subtreeFlags & 33554432) && - restoreNestedViewTransitions(changedParent), - (changedParent = changedParent.sibling); - } - function cancelViewTransitionHostInstancesRecursive( - child, - oldName, - stopAtNestedViewTransitions - ) { - for (; null !== child; ) { - if (5 === child.tag) { - var instance = child.stateNode; - null === viewTransitionCancelableChildren && - (viewTransitionCancelableChildren = []); - viewTransitionCancelableChildren.push( - instance, - oldName, - child.memoizedProps + _instance = workInProgress.stateNode; + state = getComponentNameFromType(Component) || "Component"; + _instance.render || + (Component.prototype && + "function" === typeof Component.prototype.render + ? console.error( + "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", + state + ) + : console.error( + "No `render` method found on the %s instance: you may have forgotten to define `render`.", + state + )); + !_instance.getInitialState || + _instance.getInitialState.isReactClassApproved || + _instance.state || + console.error( + "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", + state ); - viewTransitionHostInstanceIdx++; - } else if (22 !== child.tag || null === child.memoizedState) - (30 === child.tag && stopAtNestedViewTransitions) || - cancelViewTransitionHostInstancesRecursive( - child.child, - oldName, - stopAtNestedViewTransitions - ); - child = child.sibling; - } - } - function measureViewTransitionHostInstancesRecursive( - parentViewTransition, - child, - newName, - oldName, - className, - previousMeasurements, - stopAtNestedViewTransitions - ) { - for (var inViewport = !1; null !== child; ) { - if (5 === child.tag) { - var instance = child.stateNode; - if ( - null !== previousMeasurements && - viewTransitionHostInstanceIdx < previousMeasurements.length - ) { - var previousMeasurement = - previousMeasurements[viewTransitionHostInstanceIdx], - nextMeasurement = measureInstance(instance); - if (previousMeasurement.view || nextMeasurement.view) - inViewport = !0; - var JSCompiler_temp; - if ((JSCompiler_temp = 0 === (parentViewTransition.flags & 4))) - if (nextMeasurement.clip) JSCompiler_temp = !0; - else { - JSCompiler_temp = previousMeasurement.rect; - var newRect = nextMeasurement.rect; - JSCompiler_temp = - JSCompiler_temp.y !== newRect.y || - JSCompiler_temp.x !== newRect.x || - JSCompiler_temp.height !== newRect.height || - JSCompiler_temp.width !== newRect.width; - } - JSCompiler_temp && (parentViewTransition.flags |= 4); - nextMeasurement.abs - ? (nextMeasurement = !previousMeasurement.abs) - : ((previousMeasurement = previousMeasurement.rect), - (nextMeasurement = nextMeasurement.rect), - (nextMeasurement = - previousMeasurement.height !== nextMeasurement.height || - previousMeasurement.width !== nextMeasurement.width)); - nextMeasurement && (parentViewTransition.flags |= 32); - } else parentViewTransition.flags |= 32; - 0 !== (parentViewTransition.flags & 4) && - applyViewTransitionName( - instance, - 0 === viewTransitionHostInstanceIdx - ? newName - : newName + "_" + viewTransitionHostInstanceIdx, - className - ); - (inViewport && 0 !== (parentViewTransition.flags & 4)) || - (null === viewTransitionCancelableChildren && - (viewTransitionCancelableChildren = []), - viewTransitionCancelableChildren.push( - instance, - oldName, - child.memoizedProps - )); - viewTransitionHostInstanceIdx++; - } else if (22 !== child.tag || null === child.memoizedState) - 30 === child.tag && stopAtNestedViewTransitions - ? (parentViewTransition.flags |= child.flags & 32) - : measureViewTransitionHostInstancesRecursive( - parentViewTransition, - child.child, - newName, - oldName, - className, - previousMeasurements, - stopAtNestedViewTransitions - ) && (inViewport = !0); - child = child.sibling; - } - return inViewport; - } - function measureUpdateViewTransition(current, finishedWork, gesture) { - var oldFiber = gesture ? finishedWork : current, - newFiber = gesture ? current : finishedWork, - props = newFiber.memoizedProps, - state = newFiber.stateNode, - newName = getViewTransitionName(props, state); - current = getViewTransitionName(oldFiber.memoizedProps, state); - var updateClassName = getViewTransitionClassName( - props.className, - props.update - ); - props = getViewTransitionClassName(props.className, props.layout); - if ("none" === updateClassName) { - if ("none" === props) return !1; - finishedWork.flags &= -5; - updateClassName = props; - } else if (0 === (finishedWork.flags & 4)) { - if ("none" === props) - return ( - (finishedWork = oldFiber.child), - (viewTransitionHostInstanceIdx = 0), - cancelViewTransitionHostInstancesRecursive( - finishedWork, - current, - !0 - ), - !1 + _instance.getDefaultProps && + !_instance.getDefaultProps.isReactClassApproved && + console.error( + "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", + state ); - updateClassName = props; - } - gesture - ? ((oldFiber = state.clones), - (gesture = - null === oldFiber ? null : oldFiber.map(measureClonedInstance))) - : ((gesture = oldFiber.memoizedState), (oldFiber.memoizedState = null)); - oldFiber = newFiber.child; - viewTransitionHostInstanceIdx = 0; - current = measureViewTransitionHostInstancesRecursive( - finishedWork, - oldFiber, - newName, - current, - updateClassName, - gesture, - !0 - ); - viewTransitionHostInstanceIdx !== - (null === gesture ? 0 : gesture.length) && (finishedWork.flags |= 32); - return current; - } - function measureNestedViewTransitions(changedParent, gesture) { - for (changedParent = changedParent.child; null !== changedParent; ) { - if (30 === changedParent.tag) { - var props = changedParent.memoizedProps, - state = changedParent.stateNode, - name = getViewTransitionName(props, state), - className = getViewTransitionClassName( - props.className, - props.layout - ); - if (gesture) { - state = state.clones; - var previousMeasurements = - null === state ? null : state.map(measureClonedInstance); - } else - (previousMeasurements = changedParent.memoizedState), - (changedParent.memoizedState = null); - state = changedParent; - var child = changedParent.child, - newName = name; - viewTransitionHostInstanceIdx = 0; - className = measureViewTransitionHostInstancesRecursive( + _instance.contextType && + console.error( + "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", + state + ); + Component.childContextTypes && + !didWarnAboutChildContextTypes.has(Component) && + (didWarnAboutChildContextTypes.add(Component), + console.error( + "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)", + state + )); + Component.contextTypes && + !didWarnAboutContextTypes$1.has(Component) && + (didWarnAboutContextTypes$1.add(Component), + console.error( + "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", + state + )); + "function" === typeof _instance.componentShouldUpdate && + console.error( + "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", + state + ); + Component.prototype && + Component.prototype.isPureReactComponent && + "undefined" !== typeof _instance.shouldComponentUpdate && + console.error( + "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", + getComponentNameFromType(Component) || "A pure component" + ); + "function" === typeof _instance.componentDidUnmount && + console.error( + "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", + state + ); + "function" === typeof _instance.componentDidReceiveProps && + console.error( + "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", + state + ); + "function" === typeof _instance.componentWillRecieveProps && + console.error( + "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", + state + ); + "function" === typeof _instance.UNSAFE_componentWillRecieveProps && + console.error( + "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", + state + ); + lane = _instance.props !== nextProps; + void 0 !== _instance.props && + lane && + console.error( + "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", + state + ); + _instance.defaultProps && + console.error( + "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", state, - child, - newName, - name, - className, - previousMeasurements, - !1 + state ); - 0 !== (changedParent.flags & 4) && - className && - (gesture || - scheduleViewTransitionEvent(changedParent, props.onLayout)); - } else - 0 !== (changedParent.subtreeFlags & 33554432) && - measureNestedViewTransitions(changedParent, gesture); - changedParent = changedParent.sibling; - } - } - function commitBeforeMutationEffects(root, firstChild, committedLanes) { - root = root.containerInfo; - eventsEnabled = _enabled; - root = getActiveElementDeep(root); - if (hasSelectionCapabilities(root)) { - if ("selectionStart" in root) - var JSCompiler_temp = { - start: root.selectionStart, - end: root.selectionEnd - }; - else - a: { - JSCompiler_temp = - ((JSCompiler_temp = root.ownerDocument) && - JSCompiler_temp.defaultView) || - window; - var selection = - JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); - if (selection && 0 !== selection.rangeCount) { - JSCompiler_temp = selection.anchorNode; - var anchorOffset = selection.anchorOffset, - focusNode = selection.focusNode; - selection = selection.focusOffset; - try { - JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$2) { - JSCompiler_temp = null; - break a; - } - var length = 0, - start = -1, - end = -1, - indexWithinAnchor = 0, - indexWithinFocus = 0, - node = root, - parentNode = null; - b: for (;;) { - for (var next; ; ) { - node !== JSCompiler_temp || - (0 !== anchorOffset && 3 !== node.nodeType) || - (start = length + anchorOffset); - node !== focusNode || - (0 !== selection && 3 !== node.nodeType) || - (end = length + selection); - 3 === node.nodeType && (length += node.nodeValue.length); - if (null === (next = node.firstChild)) break; - parentNode = node; - node = next; - } - for (;;) { - if (node === root) break b; - parentNode === JSCompiler_temp && - ++indexWithinAnchor === anchorOffset && - (start = length); - parentNode === focusNode && - ++indexWithinFocus === selection && - (end = length); - if (null !== (next = node.nextSibling)) break; - node = parentNode; - parentNode = node.parentNode; - } - node = next; - } - JSCompiler_temp = - -1 === start || -1 === end ? null : { start: start, end: end }; - } else JSCompiler_temp = null; - } - JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; - } else JSCompiler_temp = null; - selectionInformation = { - focusedElem: root, - selectionRange: JSCompiler_temp - }; - _enabled = !1; - committedLanes = (committedLanes & 335544064) === committedLanes; - nextEffect = firstChild; - for (firstChild = committedLanes ? 9270 : 1028; null !== nextEffect; ) { - root = nextEffect; - if ( - committedLanes && - ((JSCompiler_temp = root.deletions), null !== JSCompiler_temp) + "function" !== typeof _instance.getSnapshotBeforeUpdate || + "function" === typeof _instance.componentDidUpdate || + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || + (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), + console.error( + "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", + getComponentNameFromType(Component) + )); + "function" === typeof _instance.getDerivedStateFromProps && + console.error( + "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + state + ); + "function" === typeof _instance.getDerivedStateFromError && + console.error( + "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", + state + ); + "function" === typeof Component.getSnapshotBeforeUpdate && + console.error( + "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", + state + ); + (lane = _instance.state) && + ("object" !== typeof lane || isArrayImpl(lane)) && + console.error("%s.state: must be set to an object or null", state); + "function" === typeof _instance.getChildContext && + "object" !== typeof Component.childContextTypes && + console.error( + "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", + state + ); + _instance = workInProgress.stateNode; + _instance.props = nextProps; + _instance.state = workInProgress.memoizedState; + _instance.refs = {}; + initializeUpdateQueue(workInProgress); + state = Component.contextType; + _instance.context = + "object" === typeof state && null !== state + ? readContext(state) + : emptyContextObject; + _instance.state === nextProps && + ((state = getComponentNameFromType(Component) || "Component"), + didWarnAboutDirectlyAssigningPropsToState.has(state) || + (didWarnAboutDirectlyAssigningPropsToState.add(state), + console.error( + "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", + state + ))); + workInProgress.mode & StrictLegacyMode && + ReactStrictModeWarnings.recordLegacyContextWarning( + workInProgress, + _instance + ); + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings( + workInProgress, + _instance + ); + _instance.state = workInProgress.memoizedState; + state = Component.getDerivedStateFromProps; + "function" === typeof state && + (applyDerivedStateFromProps( + workInProgress, + Component, + state, + nextProps + ), + (_instance.state = workInProgress.memoizedState)); + "function" === typeof Component.getDerivedStateFromProps || + "function" === typeof _instance.getSnapshotBeforeUpdate || + ("function" !== typeof _instance.UNSAFE_componentWillMount && + "function" !== typeof _instance.componentWillMount) || + ((state = _instance.state), + "function" === typeof _instance.componentWillMount && + _instance.componentWillMount(), + "function" === typeof _instance.UNSAFE_componentWillMount && + _instance.UNSAFE_componentWillMount(), + state !== _instance.state && + (console.error( + "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", + getComponentNameFromFiber(workInProgress) || "Component" + ), + classComponentUpdater.enqueueReplaceState( + _instance, + _instance.state, + null + )), + processUpdateQueue(workInProgress, nextProps, _instance, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction(), + (_instance.state = workInProgress.memoizedState)); + "function" === typeof _instance.componentDidMount && + (workInProgress.flags |= 4194308); + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 134217728); + _instance = !0; + } else if (null === current) { + _instance = workInProgress.stateNode; + var unresolvedOldProps = workInProgress.memoizedProps; + lane = resolveClassComponentProps(Component, unresolvedOldProps); + _instance.props = lane; + var oldContext = _instance.context; + foundWillUpdateName = Component.contextType; + state = emptyContextObject; + "object" === typeof foundWillUpdateName && + null !== foundWillUpdateName && + (state = readContext(foundWillUpdateName)); + newApiName = Component.getDerivedStateFromProps; + foundWillUpdateName = + "function" === typeof newApiName || + "function" === typeof _instance.getSnapshotBeforeUpdate; + unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; + foundWillUpdateName || + ("function" !== typeof _instance.UNSAFE_componentWillReceiveProps && + "function" !== typeof _instance.componentWillReceiveProps) || + ((unresolvedOldProps || oldContext !== state) && + callComponentWillReceiveProps( + workInProgress, + _instance, + nextProps, + state + )); + hasForceUpdate = !1; + var oldState = workInProgress.memoizedState; + _instance.state = oldState; + processUpdateQueue(workInProgress, nextProps, _instance, renderLanes); + suspendIfUpdateReadFromEntangledAsyncAction(); + oldContext = workInProgress.memoizedState; + unresolvedOldProps || oldState !== oldContext || hasForceUpdate + ? ("function" === typeof newApiName && + (applyDerivedStateFromProps( + workInProgress, + Component, + newApiName, + nextProps + ), + (oldContext = workInProgress.memoizedState)), + (lane = + hasForceUpdate || + checkShouldComponentUpdate( + workInProgress, + Component, + lane, + nextProps, + oldState, + oldContext, + state + )) + ? (foundWillUpdateName || + ("function" !== typeof _instance.UNSAFE_componentWillMount && + "function" !== typeof _instance.componentWillMount) || + ("function" === typeof _instance.componentWillMount && + _instance.componentWillMount(), + "function" === typeof _instance.UNSAFE_componentWillMount && + _instance.UNSAFE_componentWillMount()), + "function" === typeof _instance.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 134217728)) + : ("function" === typeof _instance.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 134217728), + (workInProgress.memoizedProps = nextProps), + (workInProgress.memoizedState = oldContext)), + (_instance.props = nextProps), + (_instance.state = oldContext), + (_instance.context = state), + (_instance = lane)) + : ("function" === typeof _instance.componentDidMount && + (workInProgress.flags |= 4194308), + (workInProgress.mode & StrictEffectsMode) !== NoMode && + (workInProgress.flags |= 134217728), + (_instance = !1)); + } else { + _instance = workInProgress.stateNode; + cloneUpdateQueue(current, workInProgress); + state = workInProgress.memoizedProps; + foundWillUpdateName = resolveClassComponentProps(Component, state); + _instance.props = foundWillUpdateName; + newApiName = workInProgress.pendingProps; + oldState = _instance.context; + oldContext = Component.contextType; + lane = emptyContextObject; + "object" === typeof oldContext && + null !== oldContext && + (lane = readContext(oldContext)); + unresolvedOldProps = Component.getDerivedStateFromProps; + (oldContext = + "function" === typeof unresolvedOldProps || + "function" === typeof _instance.getSnapshotBeforeUpdate) || + ("function" !== typeof _instance.UNSAFE_componentWillReceiveProps && + "function" !== typeof _instance.componentWillReceiveProps) || + ((state !== newApiName || oldState !== lane) && + callComponentWillReceiveProps( + workInProgress, + _instance, + nextProps, + lane + )); + hasForceUpdate = !1; + oldState = workInProgress.memoizedState; + _instance.state = oldState; + processUpdateQueue(workInProgress, nextProps, _instance, renderLanes); + suspendIfUpdateReadFromEntangledAsyncAction(); + var newState = workInProgress.memoizedState; + state !== newApiName || + oldState !== newState || + hasForceUpdate || + (null !== current && + null !== current.dependencies && + checkIfContextChanged(current.dependencies)) + ? ("function" === typeof unresolvedOldProps && + (applyDerivedStateFromProps( + workInProgress, + Component, + unresolvedOldProps, + nextProps + ), + (newState = workInProgress.memoizedState)), + (foundWillUpdateName = + hasForceUpdate || + checkShouldComponentUpdate( + workInProgress, + Component, + foundWillUpdateName, + nextProps, + oldState, + newState, + lane + ) || + (null !== current && + null !== current.dependencies && + checkIfContextChanged(current.dependencies))) + ? (oldContext || + ("function" !== typeof _instance.UNSAFE_componentWillUpdate && + "function" !== typeof _instance.componentWillUpdate) || + ("function" === typeof _instance.componentWillUpdate && + _instance.componentWillUpdate(nextProps, newState, lane), + "function" === typeof _instance.UNSAFE_componentWillUpdate && + _instance.UNSAFE_componentWillUpdate( + nextProps, + newState, + lane + )), + "function" === typeof _instance.componentDidUpdate && + (workInProgress.flags |= 4), + "function" === typeof _instance.getSnapshotBeforeUpdate && + (workInProgress.flags |= 1024)) + : ("function" !== typeof _instance.componentDidUpdate || + (state === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 4), + "function" !== typeof _instance.getSnapshotBeforeUpdate || + (state === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 1024), + (workInProgress.memoizedProps = nextProps), + (workInProgress.memoizedState = newState)), + (_instance.props = nextProps), + (_instance.state = newState), + (_instance.context = lane), + (_instance = foundWillUpdateName)) + : ("function" !== typeof _instance.componentDidUpdate || + (state === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 4), + "function" !== typeof _instance.getSnapshotBeforeUpdate || + (state === current.memoizedProps && + oldState === current.memoizedState) || + (workInProgress.flags |= 1024), + (_instance = !1)); + } + lane = _instance; + markRef(current, workInProgress); + state = 0 !== (workInProgress.flags & 128); + if (lane || state) { + lane = workInProgress.stateNode; + setCurrentFiber(workInProgress); + if (state && "function" !== typeof Component.getDerivedStateFromError) + (Component = null), (profilerStartTime = -1); + else if ( + ((Component = callRenderInDEV(lane)), + workInProgress.mode & StrictLegacyMode) + ) { + setIsStrictModeForDevtools(!0); + try { + callRenderInDEV(lane); + } finally { + setIsStrictModeForDevtools(!1); + } + } + workInProgress.flags |= 1; + null !== current && state + ? ((workInProgress.child = reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + Component, + renderLanes + ))) + : reconcileChildren(current, workInProgress, Component, renderLanes); + workInProgress.memoizedState = lane.state; + current = workInProgress.child; + } else + current = bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); + renderLanes = workInProgress.stateNode; + _instance && + renderLanes.props !== nextProps && + (didWarnAboutReassigningProps || + console.error( + "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", + getComponentNameFromFiber(workInProgress) || "a component" + ), + (didWarnAboutReassigningProps = !0)); + return current; + } + function mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ) { + resetHydrationState(); + workInProgress.flags |= 256; + reconcileChildren(current, workInProgress, nextChildren, renderLanes); + return workInProgress.child; + } + function validateFunctionComponentInDev(workInProgress, Component) { + Component && + Component.childContextTypes && + console.error( + "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...", + Component.displayName || Component.name || "Component" + ); + "function" === typeof Component.getDerivedStateFromProps && + ((workInProgress = getComponentNameFromType(Component) || "Unknown"), + didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] || + (console.error( + "%s: Function components do not support getDerivedStateFromProps.", + workInProgress + ), + (didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] = + !0))); + "object" === typeof Component.contextType && + null !== Component.contextType && + ((Component = getComponentNameFromType(Component) || "Unknown"), + didWarnAboutContextTypeOnFunctionComponent[Component] || + (console.error( + "%s: Function components do not support contextType.", + Component + ), + (didWarnAboutContextTypeOnFunctionComponent[Component] = !0))); + } + function mountSuspenseOffscreenState(renderLanes) { + return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; + } + function getRemainingWorkInPrimaryTree( + current, + primaryTreeDidDefer, + renderLanes + ) { + current = null !== current ? current.childLanes & ~renderLanes : 0; + primaryTreeDidDefer && (current |= workInProgressDeferredLane); + return current; + } + function updateSuspenseComponent(current, workInProgress, renderLanes) { + var JSCompiler_object_inline_componentStack_2840; + var JSCompiler_object_inline_stack_2839 = workInProgress.pendingProps; + shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); + var JSCompiler_object_inline_message_2837 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_componentStack_2840 = didSuspend) || + (JSCompiler_object_inline_componentStack_2840 = + null !== current && null === current.memoizedState + ? !1 + : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); + JSCompiler_object_inline_componentStack_2840 && + ((JSCompiler_object_inline_message_2837 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_componentStack_2840 = + 0 !== (workInProgress.flags & 32); + workInProgress.flags &= -33; + if (null === current) { + if (isHydrating) { + JSCompiler_object_inline_message_2837 + ? pushPrimaryTreeSuspenseHandler(workInProgress) + : reuseSuspenseHandlerOnStack(workInProgress); + if (isHydrating) { + var JSCompiler_object_inline_digest_2838 = nextHydratableInstance; + var JSCompiler_temp; + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2838)) { + c: { + var instance = JSCompiler_object_inline_digest_2838; + for ( + JSCompiler_temp = rootOrSingletonContext; + 8 !== instance.nodeType; + + ) { + if (!JSCompiler_temp) { + JSCompiler_temp = null; + break c; + } + instance = getNextHydratable(instance.nextSibling); + if (null === instance) { + JSCompiler_temp = null; + break c; + } + } + JSCompiler_temp = instance; + } + null !== JSCompiler_temp + ? (warnIfNotHydrating(), + (workInProgress.memoizedState = { + dehydrated: JSCompiler_temp, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (instance = createFiber(18, null, null, NoMode)), + (instance.stateNode = JSCompiler_temp), + (instance.return = workInProgress), + (workInProgress.child = instance), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (JSCompiler_temp = !0)) + : (JSCompiler_temp = !1); + JSCompiler_temp = !JSCompiler_temp; + } + JSCompiler_temp && + (warnNonHydratedInstance( + workInProgress, + JSCompiler_object_inline_digest_2838 + ), + throwOnHydrationMismatch(workInProgress)); + } + JSCompiler_object_inline_digest_2838 = workInProgress.memoizedState; + if ( + null !== JSCompiler_object_inline_digest_2838 && + ((JSCompiler_object_inline_digest_2838 = + JSCompiler_object_inline_digest_2838.dehydrated), + null !== JSCompiler_object_inline_digest_2838) + ) + return ( + isSuspenseInstanceFallback(JSCompiler_object_inline_digest_2838) + ? (workInProgress.lanes = 32) + : (workInProgress.lanes = 536870912), + null + ); + popSuspenseHandler(workInProgress); + } + JSCompiler_object_inline_digest_2838 = + JSCompiler_object_inline_stack_2839.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2839.fallback; + if (JSCompiler_object_inline_message_2837) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (JSCompiler_object_inline_stack_2839 = + mountSuspenseFallbackChildren( + workInProgress, + JSCompiler_object_inline_digest_2838, + JSCompiler_temp, + renderLanes + )), + (JSCompiler_object_inline_message_2837 = workInProgress.child), + (JSCompiler_object_inline_message_2837.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_message_2837.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2840, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + JSCompiler_object_inline_stack_2839 + ); + if ( + "number" === + typeof JSCompiler_object_inline_stack_2839.unstable_expectedLoadTime ) - for ( - anchorOffset = 0; - anchorOffset < JSCompiler_temp.length; - anchorOffset++ + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (JSCompiler_object_inline_stack_2839 = + mountSuspenseFallbackChildren( + workInProgress, + JSCompiler_object_inline_digest_2838, + JSCompiler_temp, + renderLanes + )), + (JSCompiler_object_inline_message_2837 = workInProgress.child), + (JSCompiler_object_inline_message_2837.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_message_2837.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2840, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress.lanes = 4194304), + JSCompiler_object_inline_stack_2839 + ); + pushPrimaryTreeSuspenseHandler(workInProgress); + return mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_digest_2838 + ); + } + var prevState = current.memoizedState; + if ( + null !== prevState && + ((JSCompiler_object_inline_digest_2838 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2838) + ) { + 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_2837 = + JSCompiler_object_inline_stack_2839.fallback), + (JSCompiler_object_inline_digest_2838 = workInProgress.mode), + (JSCompiler_object_inline_stack_2839 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2839.children + }, + JSCompiler_object_inline_digest_2838 + )), + (JSCompiler_object_inline_message_2837 = + createFiberFromFragment( + JSCompiler_object_inline_message_2837, + JSCompiler_object_inline_digest_2838, + renderLanes, + null + )), + (JSCompiler_object_inline_message_2837.flags |= 2), + (JSCompiler_object_inline_stack_2839.return = workInProgress), + (JSCompiler_object_inline_message_2837.return = workInProgress), + (JSCompiler_object_inline_stack_2839.sibling = + JSCompiler_object_inline_message_2837), + (workInProgress.child = JSCompiler_object_inline_stack_2839), + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (JSCompiler_object_inline_stack_2839 = workInProgress.child), + (JSCompiler_object_inline_stack_2839.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2839.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2840, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = JSCompiler_object_inline_message_2837)); + 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_digest_2838)) + ) { + JSCompiler_object_inline_componentStack_2840 = + JSCompiler_object_inline_digest_2838.nextSibling && + JSCompiler_object_inline_digest_2838.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2840) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2840.dgst; + var message = JSCompiler_object_inline_componentStack_2840.msg; + instance = JSCompiler_object_inline_componentStack_2840.stck; + var componentStack = + JSCompiler_object_inline_componentStack_2840.cstck; + } + JSCompiler_object_inline_message_2837 = message; + JSCompiler_object_inline_digest_2838 = JSCompiler_temp; + JSCompiler_object_inline_stack_2839 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2840 = + componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2838 && + ((JSCompiler_object_inline_componentStack_2840 = + JSCompiler_object_inline_message_2837 + ? Error(JSCompiler_object_inline_message_2837) + : 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_2840.stack = + JSCompiler_object_inline_stack_2839 || ""), + (JSCompiler_object_inline_componentStack_2840.digest = + JSCompiler_object_inline_digest_2838), + (JSCompiler_object_inline_stack_2839 = + void 0 === JSCompiler_temp ? null : JSCompiler_temp), + (JSCompiler_object_inline_message_2837 = { + value: JSCompiler_object_inline_componentStack_2840, + source: null, + stack: JSCompiler_object_inline_stack_2839 + }), + "string" === typeof JSCompiler_object_inline_stack_2839 && + CapturedStacks.set( + JSCompiler_object_inline_componentStack_2840, + JSCompiler_object_inline_message_2837 + ), + queueHydrationError(JSCompiler_object_inline_message_2837)); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (JSCompiler_object_inline_componentStack_2840 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_componentStack_2840) + ) { + JSCompiler_object_inline_componentStack_2840 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_componentStack_2840 && + ((JSCompiler_object_inline_stack_2839 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2839 = + 0 !== (JSCompiler_object_inline_stack_2839 & 42) + ? 1 + : getBumpedLaneForHydrationByLane( + JSCompiler_object_inline_stack_2839 + )), + (JSCompiler_object_inline_stack_2839 = + 0 !== + (JSCompiler_object_inline_stack_2839 & + (JSCompiler_object_inline_componentStack_2840.suspendedLanes | + renderLanes)) + ? 0 + : JSCompiler_object_inline_stack_2839), + 0 !== JSCompiler_object_inline_stack_2839 && + JSCompiler_object_inline_stack_2839 !== prevState.retryLane) ) - committedLanes && - commitExitViewTransitions(JSCompiler_temp[anchorOffset]); - if (null === root.alternate && 0 !== (root.flags & 2)) - commitBeforeMutationEffects_complete(committedLanes); - else { - if (22 === root.tag) - if ( - ((JSCompiler_temp = root.alternate), null !== root.memoizedState) - ) { - null !== JSCompiler_temp && - null === JSCompiler_temp.memoizedState && - committedLanes && - commitExitViewTransitions(JSCompiler_temp); - commitBeforeMutationEffects_complete(committedLanes); - continue; - } else if ( - null !== JSCompiler_temp && - null !== JSCompiler_temp.memoizedState - ) { - commitBeforeMutationEffects_complete(committedLanes); - continue; - } - JSCompiler_temp = root.child; - 0 !== (root.subtreeFlags & firstChild) && null !== JSCompiler_temp - ? ((JSCompiler_temp.return = root), (nextEffect = JSCompiler_temp)) - : (committedLanes && commitNestedViewTransitions(root), - commitBeforeMutationEffects_complete(committedLanes)); - } + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2839), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2839 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_componentStack_2840, + current, + JSCompiler_object_inline_stack_2839 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_digest_2838.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_digest_2838.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_digest_2838.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( + workInProgress, + JSCompiler_object_inline_stack_2839.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; } - appearingViewTransitions = null; + if (JSCompiler_object_inline_message_2837) + return ( + reuseSuspenseHandlerOnStack(workInProgress), + (JSCompiler_object_inline_message_2837 = + JSCompiler_object_inline_stack_2839.fallback), + (JSCompiler_object_inline_digest_2838 = workInProgress.mode), + (JSCompiler_temp = current.child), + (instance = JSCompiler_temp.sibling), + (JSCompiler_object_inline_stack_2839 = createWorkInProgress( + JSCompiler_temp, + { + mode: "hidden", + children: JSCompiler_object_inline_stack_2839.children + } + )), + (JSCompiler_object_inline_stack_2839.subtreeFlags = + JSCompiler_temp.subtreeFlags & 65011712), + null !== instance + ? (JSCompiler_object_inline_message_2837 = createWorkInProgress( + instance, + JSCompiler_object_inline_message_2837 + )) + : ((JSCompiler_object_inline_message_2837 = createFiberFromFragment( + JSCompiler_object_inline_message_2837, + JSCompiler_object_inline_digest_2838, + renderLanes, + null + )), + (JSCompiler_object_inline_message_2837.flags |= 2)), + (JSCompiler_object_inline_message_2837.return = workInProgress), + (JSCompiler_object_inline_stack_2839.return = workInProgress), + (JSCompiler_object_inline_stack_2839.sibling = + JSCompiler_object_inline_message_2837), + (workInProgress.child = JSCompiler_object_inline_stack_2839), + (JSCompiler_object_inline_stack_2839 = + JSCompiler_object_inline_message_2837), + (JSCompiler_object_inline_message_2837 = workInProgress.child), + (JSCompiler_object_inline_digest_2838 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2838 + ? (JSCompiler_object_inline_digest_2838 = + mountSuspenseOffscreenState(renderLanes)) + : ((JSCompiler_temp = + JSCompiler_object_inline_digest_2838.cachePool), + null !== JSCompiler_temp + ? ((instance = CacheContext._currentValue), + (JSCompiler_temp = + JSCompiler_temp.parent !== instance + ? { parent: instance, pool: instance } + : JSCompiler_temp)) + : (JSCompiler_temp = getSuspendedCache()), + (JSCompiler_object_inline_digest_2838 = { + baseLanes: + JSCompiler_object_inline_digest_2838.baseLanes | renderLanes, + cachePool: JSCompiler_temp + })), + (JSCompiler_object_inline_message_2837.memoizedState = + JSCompiler_object_inline_digest_2838), + (JSCompiler_object_inline_message_2837.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_componentStack_2840, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + JSCompiler_object_inline_stack_2839 + ); + pushPrimaryTreeSuspenseHandler(workInProgress); + renderLanes = current.child; + current = renderLanes.sibling; + renderLanes = createWorkInProgress(renderLanes, { + mode: "visible", + children: JSCompiler_object_inline_stack_2839.children + }); + renderLanes.return = workInProgress; + renderLanes.sibling = null; + null !== current && + ((JSCompiler_object_inline_componentStack_2840 = + workInProgress.deletions), + null === JSCompiler_object_inline_componentStack_2840 + ? ((workInProgress.deletions = [current]), + (workInProgress.flags |= 16)) + : JSCompiler_object_inline_componentStack_2840.push(current)); + workInProgress.child = renderLanes; + workInProgress.memoizedState = null; + return renderLanes; } - function commitBeforeMutationEffects_complete( - isViewTransitionEligible$jscomp$0 + function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "visible", children: primaryChildren }, + workInProgress.mode + ); + primaryChildren.return = workInProgress; + return (workInProgress.child = primaryChildren); + } + function mountSuspenseFallbackChildren( + workInProgress, + primaryChildren, + fallbackChildren, + renderLanes ) { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - finishedWork = fiber, - isViewTransitionEligible = isViewTransitionEligible$jscomp$0, - current = finishedWork.alternate, - flags = finishedWork.flags; - switch (finishedWork.tag) { - case 0: - if ( - 0 !== (flags & 4) && - ((isViewTransitionEligible = finishedWork.updateQueue), - (isViewTransitionEligible = - null !== isViewTransitionEligible - ? isViewTransitionEligible.events - : null), - null !== isViewTransitionEligible) - ) - for ( - finishedWork = 0; - finishedWork < isViewTransitionEligible.length; - finishedWork++ - ) - (current = isViewTransitionEligible[finishedWork]), - (current.ref.impl = current.nextImpl); - break; - case 11: - case 15: - break; - case 1: - 0 !== (flags & 1024) && - null !== current && - commitClassSnapshot(finishedWork, current); - break; - case 3: - if (0 !== (flags & 1024)) - if ( - ((isViewTransitionEligible = - finishedWork.stateNode.containerInfo), - (finishedWork = isViewTransitionEligible.nodeType), - 9 === finishedWork) - ) - clearContainerSparingly(isViewTransitionEligible); - else if (1 === finishedWork) - switch (isViewTransitionEligible.nodeName) { - case "HEAD": - case "HTML": - case "BODY": - clearContainerSparingly(isViewTransitionEligible); - break; - default: - isViewTransitionEligible.textContent = ""; - } - break; - case 5: - case 26: - case 27: - case 6: - case 4: - case 17: - break; - case 30: - if (isViewTransitionEligible && null !== current) - a: { - isViewTransitionEligible = current; - current = finishedWork; - finishedWork = getViewTransitionName( - isViewTransitionEligible.memoizedProps, - isViewTransitionEligible.stateNode - ); - current = current.memoizedProps; - flags = getViewTransitionClassName( - current.className, - current.update - ); - if ( - "none" === flags && - ((flags = getViewTransitionClassName( - current.className, - current.layout - )), - "none" === flags) - ) - break a; - applyViewTransitionToHostInstances( - isViewTransitionEligible.child, - finishedWork, - flags, - (isViewTransitionEligible.memoizedState = []), - !0 - ); - } - break; - default: - if (0 !== (flags & 1024)) - throw Error( - "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." - ); - } - isViewTransitionEligible = fiber.sibling; - if (null !== isViewTransitionEligible) { - isViewTransitionEligible.return = fiber.return; - nextEffect = isViewTransitionEligible; - break; - } - nextEffect = fiber.return; - } + var mode = workInProgress.mode; + primaryChildren = mountWorkInProgressOffscreenFiber( + { mode: "hidden", children: primaryChildren }, + mode + ); + fallbackChildren = createFiberFromFragment( + fallbackChildren, + mode, + renderLanes, + null + ); + primaryChildren.return = workInProgress; + fallbackChildren.return = workInProgress; + primaryChildren.sibling = fallbackChildren; + workInProgress.child = primaryChildren; + return fallbackChildren; } - function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { - var prevEffectStart = pushComponentEffectStart(), - prevEffectErrors = pushComponentEffectErrors(), - flags = finishedWork.flags; - switch (finishedWork.tag) { - case 0: - case 11: - case 15: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - flags & 4 && - commitHookLayoutEffects(finishedWork, Layout | HasEffect); - break; - case 1: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - if (((finishedRoot = finishedWork.stateNode), null === current)) - finishedWork.type.defaultProps || - "ref" in finishedWork.memoizedProps || - didWarnAboutReassigningProps || - (finishedRoot.props !== finishedWork.memoizedProps && - console.error( - "Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", - getComponentNameFromFiber(finishedWork) || "instance" - ), - finishedRoot.state !== finishedWork.memoizedState && - console.error( - "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", - getComponentNameFromFiber(finishedWork) || "instance" - )), - shouldProfile(finishedWork) - ? (startEffectTimer(), - runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - finishedRoot - ), - recordEffectDuration()) - : runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - finishedRoot - ); - else { - var prevProps = resolveClassComponentProps( - finishedWork.type, - current.memoizedProps + function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { + offscreenProps = createFiber(22, offscreenProps, null, mode); + offscreenProps.lanes = 0; + offscreenProps.stateNode = { + _visibility: OffscreenVisible, + _pendingMarkers: null, + _retryCache: null, + _transitions: null + }; + return offscreenProps; + } + function retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountSuspensePrimaryChildren( + workInProgress, + workInProgress.pendingProps.children + ); + current.flags |= 2; + workInProgress.memoizedState = null; + return current; + } + function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { + fiber.lanes |= renderLanes; + var alternate = fiber.alternate; + null !== alternate && (alternate.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + fiber.return, + renderLanes, + propagationRoot + ); + } + function validateSuspenseListNestedChild(childSlot, index) { + var isAnArray = isArrayImpl(childSlot); + childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot); + return isAnArray || childSlot + ? ((isAnArray = isAnArray ? "array" : "iterable"), + console.error( + "A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ", + isAnArray, + index, + isAnArray + ), + !1) + : !0; + } + function initSuspenseListRenderState( + workInProgress, + isBackwards, + tail, + lastContentRow, + tailMode + ) { + var renderState = workInProgress.memoizedState; + null === renderState + ? (workInProgress.memoizedState = { + isBackwards: isBackwards, + rendering: null, + renderingStartTime: 0, + last: lastContentRow, + tail: tail, + tailMode: tailMode + }) + : ((renderState.isBackwards = isBackwards), + (renderState.rendering = null), + (renderState.renderingStartTime = 0), + (renderState.last = lastContentRow), + (renderState.tail = tail), + (renderState.tailMode = tailMode)); + } + function updateSuspenseListComponent(current, workInProgress, renderLanes) { + var nextProps = workInProgress.pendingProps, + revealOrder = nextProps.revealOrder, + tailMode = nextProps.tail; + nextProps = nextProps.children; + if ( + void 0 !== revealOrder && + "forwards" !== revealOrder && + "backwards" !== revealOrder && + "together" !== revealOrder && + !didWarnAboutRevealOrder[revealOrder] + ) + if ( + ((didWarnAboutRevealOrder[revealOrder] = !0), + "string" === typeof revealOrder) + ) + switch (revealOrder.toLowerCase()) { + case "together": + case "forwards": + case "backwards": + console.error( + '"%s" is not a valid value for revealOrder on . Use lowercase "%s" instead.', + revealOrder, + revealOrder.toLowerCase() ); - current = current.memoizedState; - finishedWork.type.defaultProps || - "ref" in finishedWork.memoizedProps || - didWarnAboutReassigningProps || - (finishedRoot.props !== finishedWork.memoizedProps && - console.error( - "Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", - getComponentNameFromFiber(finishedWork) || "instance" - ), - finishedRoot.state !== finishedWork.memoizedState && - console.error( - "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", - getComponentNameFromFiber(finishedWork) || "instance" - )); - shouldProfile(finishedWork) - ? (startEffectTimer(), - runWithFiberInDEV( - finishedWork, - callComponentDidUpdateInDEV, - finishedWork, - finishedRoot, - prevProps, - current, - finishedRoot.__reactInternalSnapshotBeforeUpdate - ), - recordEffectDuration()) - : runWithFiberInDEV( - finishedWork, - callComponentDidUpdateInDEV, - finishedWork, - finishedRoot, - prevProps, - current, - finishedRoot.__reactInternalSnapshotBeforeUpdate - ); + break; + case "forward": + case "backward": + console.error( + '"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.', + revealOrder, + revealOrder.toLowerCase() + ); + break; + default: + console.error( + '"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?', + revealOrder + ); + } + else + console.error( + '%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?', + revealOrder + ); + void 0 === tailMode || + didWarnAboutTailOptions[tailMode] || + ("collapsed" !== tailMode && "hidden" !== tailMode + ? ((didWarnAboutTailOptions[tailMode] = !0), + console.error( + '"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?', + tailMode + )) + : "forwards" !== revealOrder && + "backwards" !== revealOrder && + ((didWarnAboutTailOptions[tailMode] = !0), + console.error( + ' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?', + tailMode + ))); + a: if ( + ("forwards" === revealOrder || "backwards" === revealOrder) && + void 0 !== nextProps && + null !== nextProps && + !1 !== nextProps + ) + if (isArrayImpl(nextProps)) + for (var i = 0; i < nextProps.length; i++) { + if (!validateSuspenseListNestedChild(nextProps[i], i)) break a; + } + else if (((i = getIteratorFn(nextProps)), "function" === typeof i)) { + if ((i = i.call(nextProps))) + for (var step = i.next(), _i = 0; !step.done; step = i.next()) { + if (!validateSuspenseListNestedChild(step.value, _i)) break a; + _i++; + } + } else + console.error( + 'A single row was passed to a . This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?', + revealOrder + ); + reconcileChildren(current, workInProgress, nextProps, renderLanes); + nextProps = suspenseStackCursor.current; + if (0 !== (nextProps & ForceSuspenseFallback)) + (nextProps = + (nextProps & SubtreeSuspenseContextMask) | ForceSuspenseFallback), + (workInProgress.flags |= 128); + else { + if (null !== current && 0 !== (current.flags & 128)) + a: for (current = workInProgress.child; null !== current; ) { + if (13 === current.tag) + null !== current.memoizedState && + scheduleSuspenseWorkOnFiber( + current, + renderLanes, + workInProgress + ); + else if (19 === current.tag) + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); + else if (null !== current.child) { + current.child.return = current; + current = current.child; + continue; } - flags & 64 && commitClassCallbacks(finishedWork); - flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); - break; - case 3: - current = pushNestedEffectDurations(); - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if ( - flags & 64 && - ((flags = finishedWork.updateQueue), null !== flags) - ) { - prevProps = null; - if (null !== finishedWork.child) - switch (finishedWork.child.tag) { - case 27: - case 5: - prevProps = finishedWork.child.stateNode; - break; - case 1: - prevProps = finishedWork.child.stateNode; - } - try { - runWithFiberInDEV( - finishedWork, - commitCallbacks, - flags, - prevProps - ); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); + if (current === workInProgress) break a; + for (; null === current.sibling; ) { + if (null === current.return || current.return === workInProgress) + break a; + current = current.return; } + current.sibling.return = current.return; + current = current.sibling; } - finishedRoot.effectDuration += popNestedEffectDurations(current); - break; - case 27: - null === current && - flags & 4 && - commitHostSingletonAcquisition(finishedWork); - case 26: - case 5: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - null === current && flags & 4 && commitHostMount(finishedWork); - flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); + nextProps &= SubtreeSuspenseContextMask; + } + push(suspenseStackCursor, nextProps, workInProgress); + switch (revealOrder) { + case "forwards": + renderLanes = workInProgress.child; + for (revealOrder = null; null !== renderLanes; ) + (current = renderLanes.alternate), + null !== current && + null === findFirstSuspended(current) && + (revealOrder = renderLanes), + (renderLanes = renderLanes.sibling); + renderLanes = revealOrder; + null === renderLanes + ? ((revealOrder = workInProgress.child), + (workInProgress.child = null)) + : ((revealOrder = renderLanes.sibling), + (renderLanes.sibling = null)); + initSuspenseListRenderState( + workInProgress, + !1, + revealOrder, + renderLanes, + tailMode + ); break; - case 12: - if (flags & 4) { - flags = pushNestedEffectDurations(); - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - finishedRoot = finishedWork.stateNode; - finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); - try { - runWithFiberInDEV( - finishedWork, - commitProfiler, - finishedWork, - current, - commitStartTime, - finishedRoot.effectDuration - ); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); + case "backwards": + renderLanes = null; + revealOrder = workInProgress.child; + for (workInProgress.child = null; null !== revealOrder; ) { + current = revealOrder.alternate; + if (null !== current && null === findFirstSuspended(current)) { + workInProgress.child = revealOrder; + break; } - } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - break; - case 13: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - flags & 4 && - commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); - flags & 64 && - ((finishedRoot = finishedWork.memoizedState), - null !== finishedRoot && - ((finishedRoot = finishedRoot.dehydrated), - null !== finishedRoot && - ((flags = retryDehydratedSuspenseBoundary.bind( - null, - finishedWork - )), - registerSuspenseInstanceRetry(finishedRoot, flags)))); - break; - case 22: - prevProps = - null !== finishedWork.memoizedState || offscreenSubtreeIsHidden; - if (!prevProps) { - current = - (null !== current && null !== current.memoizedState) || - offscreenSubtreeWasHidden; - var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevProps; - (offscreenSubtreeWasHidden = current) && - !prevOffscreenSubtreeWasHidden - ? recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - 0 !== (finishedWork.subtreeFlags & 8772) - ) - : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; + current = revealOrder.sibling; + revealOrder.sibling = renderLanes; + renderLanes = revealOrder; + revealOrder = current; } - flags & 512 && - ("manual" === finishedWork.memoizedProps.mode - ? safelyAttachRef(finishedWork, finishedWork.return) - : safelyDetachRef(finishedWork, finishedWork.return)); + initSuspenseListRenderState( + workInProgress, + !0, + renderLanes, + null, + tailMode + ); break; - case 30: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); + case "together": + initSuspenseListRenderState(workInProgress, !1, null, null, void 0); break; default: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + workInProgress.memoizedState = null; } - (finishedWork.mode & ProfileMode) !== NoMode && - 0 <= componentEffectStartTime && - 0 <= componentEffectEndTime && - 0.05 < componentEffectDuration && - logComponentEffect( - finishedWork, - componentEffectStartTime, - componentEffectEndTime, - componentEffectDuration, - componentEffectErrors - ); - popComponentEffectStart(prevEffectStart); - componentEffectErrors = prevEffectErrors; - } - function detachFiberAfterEffects(fiber) { - var alternate = fiber.alternate; - null !== alternate && - ((fiber.alternate = null), detachFiberAfterEffects(alternate)); - fiber.child = null; - fiber.deletions = null; - fiber.sibling = null; - 5 === fiber.tag && - ((alternate = fiber.stateNode), - null !== alternate && detachDeletedInstance(alternate)); - fiber.stateNode = null; - fiber._debugOwner = null; - fiber.return = null; - fiber.dependencies = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.stateNode = null; - fiber.updateQueue = null; - } - function recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - parent - ) { - for (parent = parent.child; null !== parent; ) - commitDeletionEffectsOnFiber( - finishedRoot, - nearestMountedAncestor, - parent - ), - (parent = parent.sibling); + return workInProgress.child; } - function commitDeletionEffectsOnFiber( - finishedRoot, - nearestMountedAncestor, - deletedFiber + function bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes ) { - if ( - injectedHook && - "function" === typeof injectedHook.onCommitFiberUnmount - ) - try { - injectedHook.onCommitFiberUnmount(rendererID, deletedFiber); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - console.error( - "React instrumentation encountered an error: %s", - err - )); - } - switch (deletedFiber.tag) { - case 26: - offscreenSubtreeWasHidden || - safelyDetachRef(deletedFiber, nearestMountedAncestor); - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); - deletedFiber.memoizedState - ? deletedFiber.memoizedState.count-- - : deletedFiber.stateNode && - ((deletedFiber = deletedFiber.stateNode), - deletedFiber.parentNode.removeChild(deletedFiber)); - break; - case 27: - offscreenSubtreeWasHidden || - safelyDetachRef(deletedFiber, nearestMountedAncestor); - var prevHostParent = hostParent, - prevHostParentIsContainer = hostParentIsContainer; - isSingletonScope(deletedFiber.type) && - ((hostParent = deletedFiber.stateNode), - (hostParentIsContainer = !1)); - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber + null !== current && (workInProgress.dependencies = current.dependencies); + profilerStartTime = -1; + workInProgressRootSkippedLanes |= workInProgress.lanes; + if (0 === (renderLanes & workInProgress.childLanes)) + if (null !== current) { + if ( + (propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + 0 === (renderLanes & workInProgress.childLanes)) + ) + return null; + } else return null; + if (null !== current && workInProgress.child !== current.child) + throw Error("Resuming work not yet implemented."); + if (null !== workInProgress.child) { + current = workInProgress.child; + renderLanes = createWorkInProgress(current, current.pendingProps); + workInProgress.child = renderLanes; + for (renderLanes.return = workInProgress; null !== current.sibling; ) + (current = current.sibling), + (renderLanes = renderLanes.sibling = + createWorkInProgress(current, current.pendingProps)), + (renderLanes.return = workInProgress); + renderLanes.sibling = null; + } + return workInProgress.child; + } + function checkScheduledUpdateOrContext(current, renderLanes) { + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; + } + function attemptEarlyBailoutIfNoScheduledUpdate( + current, + workInProgress, + renderLanes + ) { + switch (workInProgress.tag) { + case 3: + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo ); - runWithFiberInDEV( - deletedFiber, - releaseSingletonInstance, - deletedFiber.stateNode + pushProvider( + workInProgress, + CacheContext, + current.memoizedState.cache ); - hostParent = prevHostParent; - hostParentIsContainer = prevHostParentIsContainer; + resetHydrationState(); break; + case 27: case 5: - offscreenSubtreeWasHidden || - safelyDetachRef(deletedFiber, nearestMountedAncestor); - case 6: - prevHostParent = hostParent; - prevHostParentIsContainer = hostParentIsContainer; - hostParent = null; - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); - hostParent = prevHostParent; - hostParentIsContainer = prevHostParentIsContainer; - if (null !== hostParent) - if (hostParentIsContainer) - try { - runWithFiberInDEV( - deletedFiber, - removeChildFromContainer, - hostParent, - deletedFiber.stateNode - ), - (viewTransitionMutationContext = !0); - } catch (error) { - captureCommitPhaseError( - deletedFiber, - nearestMountedAncestor, - error - ); - } - else - try { - runWithFiberInDEV( - deletedFiber, - removeChild, - hostParent, - deletedFiber.stateNode - ), - (viewTransitionMutationContext = !0); - } catch (error) { - captureCommitPhaseError( - deletedFiber, - nearestMountedAncestor, - error - ); - } - break; - case 18: - null !== hostParent && - (hostParentIsContainer - ? ((finishedRoot = hostParent), - clearSuspenseBoundary( - 9 === finishedRoot.nodeType - ? finishedRoot.body - : "HTML" === finishedRoot.nodeName - ? finishedRoot.ownerDocument.body - : finishedRoot, - deletedFiber.stateNode - ), - retryIfBlockedOn(finishedRoot)) - : clearSuspenseBoundary(hostParent, deletedFiber.stateNode)); + pushHostContext(workInProgress); break; case 4: - prevHostParent = hostParent; - prevHostParentIsContainer = hostParentIsContainer; - hostParent = deletedFiber.stateNode.containerInfo; - hostParentIsContainer = !0; - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); - hostParent = prevHostParent; - hostParentIsContainer = prevHostParentIsContainer; - break; - case 0: - case 11: - case 14: - case 15: - offscreenSubtreeWasHidden || - commitHookEffectListUnmount( - Insertion, - deletedFiber, - nearestMountedAncestor - ); - offscreenSubtreeWasHidden || - commitHookLayoutUnmountEffects( - deletedFiber, - nearestMountedAncestor, - Layout - ); - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo ); break; - case 1: - offscreenSubtreeWasHidden || - (safelyDetachRef(deletedFiber, nearestMountedAncestor), - (prevHostParent = deletedFiber.stateNode), - "function" === typeof prevHostParent.componentWillUnmount && - safelyCallComponentWillUnmount( - deletedFiber, - nearestMountedAncestor, - prevHostParent - )); - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber + case 10: + pushProvider( + workInProgress, + workInProgress.type, + workInProgress.memoizedProps.value ); break; - case 21: - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); + case 12: + 0 !== (renderLanes & workInProgress.childLanes) && + (workInProgress.flags |= 4); + workInProgress.flags |= 2048; + var stateNode = workInProgress.stateNode; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; - case 22: - offscreenSubtreeWasHidden || - safelyDetachRef(deletedFiber, nearestMountedAncestor); - offscreenSubtreeWasHidden = - (prevHostParent = offscreenSubtreeWasHidden) || - null !== deletedFiber.memoizedState; - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); - offscreenSubtreeWasHidden = prevHostParent; + case 13: + stateNode = workInProgress.memoizedState; + if (null !== stateNode) { + if (null !== stateNode.dehydrated) + return ( + pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags |= 128), + null + ); + if (0 !== (renderLanes & workInProgress.child.childLanes)) + return updateSuspenseComponent( + current, + workInProgress, + renderLanes + ); + pushPrimaryTreeSuspenseHandler(workInProgress); + current = bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); + return null !== current ? current.sibling : null; + } + pushPrimaryTreeSuspenseHandler(workInProgress); break; - default: - recursivelyTraverseDeletionEffects( - finishedRoot, - nearestMountedAncestor, - deletedFiber - ); - } - } - function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { - if ( - null === finishedWork.memoizedState && - ((finishedRoot = finishedWork.alternate), - null !== finishedRoot && - ((finishedRoot = finishedRoot.memoizedState), - null !== finishedRoot && - ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot))) - ) - try { - runWithFiberInDEV( - finishedWork, - commitHydratedSuspenseInstance, - finishedRoot + case 19: + var didSuspendBefore = 0 !== (current.flags & 128); + stateNode = 0 !== (renderLanes & workInProgress.childLanes); + stateNode || + (propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (stateNode = 0 !== (renderLanes & workInProgress.childLanes))); + if (didSuspendBefore) { + if (stateNode) + return updateSuspenseListComponent( + current, + workInProgress, + renderLanes + ); + workInProgress.flags |= 128; + } + didSuspendBefore = workInProgress.memoizedState; + null !== didSuspendBefore && + ((didSuspendBefore.rendering = null), + (didSuspendBefore.tail = null), + (didSuspendBefore.lastEffect = null)); + push( + suspenseStackCursor, + suspenseStackCursor.current, + workInProgress ); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } - } - function getRetryCache(finishedWork) { - switch (finishedWork.tag) { - case 13: - case 19: - var retryCache = finishedWork.stateNode; - null === retryCache && - (retryCache = finishedWork.stateNode = new PossiblyWeakSet()); - return retryCache; + if (stateNode) break; + else return null; case 22: + case 23: return ( - (finishedWork = finishedWork.stateNode), - (retryCache = finishedWork._retryCache), - null === retryCache && - (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), - retryCache + (workInProgress.lanes = 0), + updateOffscreenComponent(current, workInProgress, renderLanes) ); - default: - throw Error( - "Unexpected Suspense handler tag (" + - finishedWork.tag + - "). This is a bug in React." + case 24: + pushProvider( + workInProgress, + CacheContext, + current.memoizedState.cache ); } + return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } - function attachSuspenseRetryListeners(finishedWork, wakeables) { - var retryCache = getRetryCache(finishedWork); - wakeables.forEach(function (wakeable) { - var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable); - if (!retryCache.has(wakeable)) { - retryCache.add(wakeable); - if (isDevToolsPresent) - if (null !== inProgressLanes && null !== inProgressRoot) - restorePendingUpdaters(inProgressRoot, inProgressLanes); - else - throw Error( - "Expected finished root and lanes to be set. This is a bug in React." - ); - wakeable.then(retry, retry); + function beginWork(current, workInProgress, renderLanes) { + if (workInProgress._debugNeedsRemount && null !== current) { + renderLanes = createFiberFromTypeAndProps( + workInProgress.type, + workInProgress.key, + workInProgress.pendingProps, + workInProgress._debugOwner || null, + workInProgress.mode, + workInProgress.lanes + ); + renderLanes._debugStack = workInProgress._debugStack; + renderLanes._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; + if (workInProgress === returnFiber.child) + returnFiber.child = renderLanes; + else { + var prevSibling = returnFiber.child; + if (null === prevSibling) + throw Error("Expected parent to have a child."); + for (; prevSibling.sibling !== workInProgress; ) + if (((prevSibling = prevSibling.sibling), null === prevSibling)) + throw Error("Expected to find the previous sibling."); + prevSibling.sibling = renderLanes; } - }); - } - function recursivelyTraverseMutationEffects( - root$jscomp$0, - parentFiber, - lanes - ) { - var deletions = parentFiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var root = root$jscomp$0, - returnFiber = parentFiber, - deletedFiber = deletions[i], - parent = returnFiber; - a: for (; null !== parent; ) { - switch (parent.tag) { - case 27: - if (isSingletonScope(parent.type)) { - hostParent = parent.stateNode; - hostParentIsContainer = !1; - break a; - } - break; - case 5: - hostParent = parent.stateNode; - hostParentIsContainer = !1; + workInProgress = returnFiber.deletions; + null === workInProgress + ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) + : workInProgress.push(current); + renderLanes.flags |= 2; + return renderLanes; + } + if (null !== current) + if ( + current.memoizedProps !== workInProgress.pendingProps || + workInProgress.type !== current.type + ) + didReceiveUpdate = !0; + else { + if ( + !checkScheduledUpdateOrContext(current, renderLanes) && + 0 === (workInProgress.flags & 128) + ) + return ( + (didReceiveUpdate = !1), + attemptEarlyBailoutIfNoScheduledUpdate( + current, + workInProgress, + renderLanes + ) + ); + didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1; + } + else { + didReceiveUpdate = !1; + if ((returnFiber = isHydrating)) + warnIfNotHydrating(), + (returnFiber = 0 !== (workInProgress.flags & 1048576)); + returnFiber && + ((returnFiber = workInProgress.index), + warnIfNotHydrating(), + pushTreeId(workInProgress, treeForkCount, returnFiber)); + } + 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 + ); break a; - case 3: - case 4: - hostParent = parent.stateNode.containerInfo; - hostParentIsContainer = !0; + } else if (prevSibling === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + workInProgress = updateMemoComponent( + null, + workInProgress, + current, + returnFiber, + renderLanes + ); break a; - } - parent = parent.return; - } - if (null === hostParent) + } + 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( - "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." + "Element type is invalid. Received a promise that resolves to: " + + current + + ". Lazy element type must resolve to a class or function." + + workInProgress ); - commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber); - hostParent = null; - hostParentIsContainer = !1; - root = deletedFiber; - returnFiber = root.alternate; - null !== returnFiber && (returnFiber.return = null); - root.return = null; - } - if (parentFiber.subtreeFlags & 13878) - for (parentFiber = parentFiber.child; null !== parentFiber; ) - commitMutationEffectsOnFiber(parentFiber, root$jscomp$0, lanes), - (parentFiber = parentFiber.sibling); - } - function commitMutationEffectsOnFiber(finishedWork, root, lanes) { - var prevEffectStart = pushComponentEffectStart(), - prevEffectErrors = pushComponentEffectErrors(), - current = finishedWork.alternate, - flags = finishedWork.flags; - switch (finishedWork.tag) { + } + return workInProgress; case 0: - case 11: - case 14: - case 15: - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - flags & 4 && - (commitHookEffectListUnmount( - Insertion | HasEffect, - finishedWork, - finishedWork.return - ), - commitHookEffectListMount(Insertion | HasEffect, finishedWork), - commitHookLayoutUnmountEffects( - finishedWork, - finishedWork.return, - Layout | HasEffect - )); - break; + return updateFunctionComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); case 1: - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - flags & 512 && - (offscreenSubtreeWasHidden || - null === current || - 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))))); - break; - case 26: - var hoistableRoot = currentHoistableRoot; - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - flags & 512 && - (offscreenSubtreeWasHidden || - null === current || - safelyDetachRef(current, current.return)); - if (flags & 4) - if ( - ((root = null !== current ? current.memoizedState : null), - (flags = finishedWork.memoizedState), - null === current) + return ( + (returnFiber = workInProgress.type), + (prevSibling = resolveClassComponentProps( + returnFiber, + workInProgress.pendingProps + )), + updateClassComponent( + current, + workInProgress, + returnFiber, + prevSibling, + renderLanes ) - if (null === flags) - if (null === finishedWork.stateNode) { - a: { - current = finishedWork.type; - flags = finishedWork.memoizedProps; - root = hoistableRoot.ownerDocument || hoistableRoot; - b: switch (current) { - case "title": - lanes = root.getElementsByTagName("title")[0]; - if ( - !lanes || - lanes[internalHoistableMarker] || - lanes[internalInstanceKey] || - lanes.namespaceURI === SVG_NAMESPACE || - lanes.hasAttribute("itemprop") - ) - (lanes = root.createElement(current)), - root.head.insertBefore( - lanes, - root.querySelector("head > title") - ); - setInitialProperties(lanes, current, flags); - lanes[internalInstanceKey] = finishedWork; - markNodeAsHoistable(lanes); - current = lanes; - break a; - case "link": - if ( - (hoistableRoot = getHydratableHoistableCache( - "link", - "href", - root - ).get(current + (flags.href || ""))) - ) - for (var i = 0; i < hoistableRoot.length; i++) - if ( - ((lanes = hoistableRoot[i]), - lanes.getAttribute("href") === - (null == flags.href || "" === flags.href - ? null - : flags.href) && - lanes.getAttribute("rel") === - (null == flags.rel ? null : flags.rel) && - lanes.getAttribute("title") === - (null == flags.title ? null : flags.title) && - lanes.getAttribute("crossorigin") === - (null == flags.crossOrigin - ? null - : flags.crossOrigin)) - ) { - hoistableRoot.splice(i, 1); - break b; - } - lanes = root.createElement(current); - setInitialProperties(lanes, current, flags); - root.head.appendChild(lanes); - break; - case "meta": - if ( - (hoistableRoot = getHydratableHoistableCache( - "meta", - "content", - root - ).get(current + (flags.content || ""))) - ) - for (i = 0; i < hoistableRoot.length; i++) - if ( - ((lanes = hoistableRoot[i]), - checkAttributeStringCoercion( - flags.content, - "content" - ), - lanes.getAttribute("content") === - (null == flags.content - ? null - : "" + flags.content) && - lanes.getAttribute("name") === - (null == flags.name ? null : flags.name) && - lanes.getAttribute("property") === - (null == flags.property - ? null - : flags.property) && - lanes.getAttribute("http-equiv") === - (null == flags.httpEquiv - ? null - : flags.httpEquiv) && - lanes.getAttribute("charset") === - (null == flags.charSet - ? null - : flags.charSet)) - ) { - hoistableRoot.splice(i, 1); - break b; - } - lanes = root.createElement(current); - setInitialProperties(lanes, current, flags); - root.head.appendChild(lanes); - break; - default: - throw Error( - 'getNodesForType encountered a type it did not expect: "' + - current + - '". This is a bug in React.' - ); - } - lanes[internalInstanceKey] = finishedWork; - markNodeAsHoistable(lanes); - current = lanes; - } - finishedWork.stateNode = current; - } else - mountHoistable( - hoistableRoot, - finishedWork.type, - finishedWork.stateNode - ); - else - finishedWork.stateNode = acquireResource( - hoistableRoot, - flags, - finishedWork.memoizedProps + ); + case 3: + a: { + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo + ); + if (null === current) + throw Error( + "Should have a current fiber. This is a bug in React." + ); + returnFiber = workInProgress.pendingProps; + var prevState = workInProgress.memoizedState; + prevSibling = prevState.element; + cloneUpdateQueue(current, workInProgress); + processUpdateQueue(workInProgress, returnFiber, null, renderLanes); + var nextState = workInProgress.memoizedState; + returnFiber = nextState.cache; + pushProvider(workInProgress, CacheContext, returnFiber); + returnFiber !== prevState.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !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 + ); + break a; + } else if (returnFiber !== prevSibling) { + prevSibling = 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 + ); + break a; + } else { + current = workInProgress.stateNode.containerInfo; + switch (current.nodeType) { + case 9: + current = current.body; + break; + default: + current = + "HTML" === current.nodeName + ? current.ownerDocument.body + : current; + } + nextHydratableInstance = getNextHydratable(current.firstChild); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !0; + current = mountChildFibers( + workInProgress, + null, + returnFiber, + renderLanes ); - else - root !== flags - ? (null === root - ? null !== current.stateNode && - ((current = current.stateNode), - current.parentNode.removeChild(current)) - : root.count--, - null === flags - ? mountHoistable( - hoistableRoot, - finishedWork.type, - finishedWork.stateNode - ) - : acquireResource( - hoistableRoot, - flags, - finishedWork.memoizedProps - )) - : null === flags && - null !== finishedWork.stateNode && - commitHostUpdate( - finishedWork, - finishedWork.memoizedProps, - current.memoizedProps - ); - break; - case 27: - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - flags & 512 && - (offscreenSubtreeWasHidden || - null === current || - safelyDetachRef(current, current.return)); - null !== current && - flags & 4 && - commitHostUpdate( - finishedWork, - finishedWork.memoizedProps, - current.memoizedProps - ); - break; - case 5: - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - flags & 512 && - (offscreenSubtreeWasHidden || - null === current || - safelyDetachRef(current, current.return)); - if (finishedWork.flags & 32) { - root = finishedWork.stateNode; - try { - runWithFiberInDEV(finishedWork, resetTextContent, root), - (viewTransitionMutationContext = !0); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); + for (workInProgress.child = current; current; ) + (current.flags = (current.flags & -3) | 4096), + (current = current.sibling); + } + else { + resetHydrationState(); + if (returnFiber === prevSibling) { + workInProgress = bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); + break a; + } + reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ); } + workInProgress = workInProgress.child; } - flags & 4 && - null != finishedWork.stateNode && - ((root = finishedWork.memoizedProps), - commitHostUpdate( - finishedWork, - root, - null !== current ? current.memoizedProps : root - )); - flags & 1024 && - ((needsFormReset = !0), - "form" !== finishedWork.type && - console.error( - "Unexpected host component type. Expected a form. This is a bug in React." - )); - break; - case 6: - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - if (flags & 4) { - if (null === finishedWork.stateNode) - throw Error( - "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." - ); - flags = finishedWork.memoizedProps; - current = null !== current ? current.memoizedProps : flags; - root = finishedWork.stateNode; - try { - runWithFiberInDEV( - finishedWork, - commitTextUpdate, - root, + return workInProgress; + 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 + ); + 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 + ); + case 5: + return ( + null === current && + isHydrating && + ((prevState = getHostContext()), + (returnFiber = 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, - flags - ), - (viewTransitionMutationContext = !0); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } - } - break; - case 3: - hoistableRoot = pushNestedEffectDurations(); - tagCaches = null; - i = currentHoistableRoot; - currentHoistableRoot = getHoistableRoot(root.containerInfo); - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - currentHoistableRoot = i; - commitReconciliationEffects(finishedWork); - if ( - flags & 4 && - null !== current && - current.memoizedState.isDehydrated - ) - try { - runWithFiberInDEV( - finishedWork, - commitHydratedContainer, - root.containerInfo - ); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } - needsFormReset && - ((needsFormReset = !1), recursivelyResetForms(finishedWork)); - root.effectDuration += popNestedEffectDurations(hoistableRoot); - break; + workInProgress, + TransitionAwareHostComponent, + null, + null, + renderLanes + )), + (HostTransitionContext._currentValue = prevSibling)), + markRef(current, workInProgress), + reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ), + 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 + ); + case 13: + return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - current = currentHoistableRoot; - currentHoistableRoot = getHoistableRoot( - finishedWork.stateNode.containerInfo + 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 + ); + case 11: + return updateForwardRef( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 7: + return ( + (returnFiber = workInProgress.pendingProps), + markRef(current, workInProgress), + reconcileChildren( + current, + workInProgress, + returnFiber, + renderLanes + ), + workInProgress.child + ); + case 8: + return ( + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child ); - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - currentHoistableRoot = current; - break; case 12: - current = pushNestedEffectDurations(); - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - finishedWork.stateNode.effectDuration += - bubbleNestedEffectDurations(current); - break; - case 13: - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - finishedWork.child.flags & 8192 && - (null !== finishedWork.memoizedState) !== - (null !== current && null !== current.memoizedState) && - (globalMostRecentFallbackTime = now$1()); - flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && - ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, current))); - break; - case 22: - flags & 512 && - (offscreenSubtreeWasHidden || - null === current || - safelyDetachRef(current, current.return)); - hoistableRoot = null !== finishedWork.memoizedState; - var wasHidden = null !== current && null !== current.memoizedState, - prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, - prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = - prevOffscreenSubtreeIsHidden || hoistableRoot; - offscreenSubtreeWasHidden = - prevOffscreenSubtreeWasHidden || wasHidden; - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; - offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; - commitReconciliationEffects(finishedWork); - root = finishedWork.stateNode; - root._current = finishedWork; - root._visibility &= ~OffscreenDetached; - root._visibility |= root._pendingVisibility & OffscreenDetached; - if ( - flags & 8192 && - ((root._visibility = hoistableRoot - ? root._visibility & ~OffscreenVisible - : root._visibility | OffscreenVisible), - hoistableRoot && - (null === current || - wasHidden || - offscreenSubtreeIsHidden || - offscreenSubtreeWasHidden || - recursivelyTraverseDisappearLayoutEffects(finishedWork)), - null === finishedWork.memoizedProps || - "manual" !== finishedWork.memoizedProps.mode) - ) - a: for (current = null, root = finishedWork; ; ) { - if (5 === root.tag || 26 === root.tag) { - if (null === current) { - lanes = current = root; - try { - (i = lanes.stateNode), - hoistableRoot - ? runWithFiberInDEV(lanes, hideInstance, i) - : runWithFiberInDEV( - lanes, - unhideInstance, - lanes.stateNode, - lanes.memoizedProps - ); - } catch (error) { - captureCommitPhaseError(lanes, lanes.return, error); - } - } - } else if (6 === root.tag) { - if (null === current) { - lanes = root; - try { - var instance = lanes.stateNode; - hoistableRoot - ? runWithFiberInDEV(lanes, hideTextInstance, instance) - : runWithFiberInDEV( - lanes, - unhideTextInstance, - instance, - lanes.memoizedProps - ); - viewTransitionMutationContext = !0; - } catch (error) { - captureCommitPhaseError(lanes, lanes.return, error); - } - } - } else if ( - ((22 !== root.tag && 23 !== root.tag) || - null === root.memoizedState || - root === finishedWork) && - null !== root.child - ) { - root.child.return = root; - root = root.child; - continue; - } - if (root === finishedWork) break a; - for (; null === root.sibling; ) { - if (null === root.return || root.return === finishedWork) - break a; - current === root && (current = null); - root = root.return; - } - current === root && (current = null); - root.sibling.return = root.return; - root = root.sibling; - } - flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && - ((flags = current.retryQueue), - null !== flags && - ((current.retryQueue = null), - attachSuspenseRetryListeners(finishedWork, flags)))); - break; + 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 + ); + 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 + ); + 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 + ); + case 14: + return updateMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); case 19: - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - flags & 4 && - ((current = finishedWork.updateQueue), - null !== current && - ((finishedWork.updateQueue = null), - attachSuspenseRetryListeners(finishedWork, current))); - break; + return updateSuspenseListComponent( + current, + workInProgress, + renderLanes + ); + case 31: + return ( + (returnFiber = workInProgress.pendingProps), + (renderLanes = workInProgress.mode), + (returnFiber = { + mode: returnFiber.mode, + children: returnFiber.children + }), + null === current + ? ((current = mountWorkInProgressOffscreenFiber( + returnFiber, + renderLanes + )), + (current.ref = workInProgress.ref), + (workInProgress.child = current), + (current.return = workInProgress), + (workInProgress = current)) + : ((current = createWorkInProgress(current.child, returnFiber)), + (current.ref = workInProgress.ref), + (workInProgress.child = current), + (current.return = workInProgress), + (workInProgress = current)), + workInProgress + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + 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 + ); case 30: - flags & 512 && - (offscreenSubtreeWasHidden || - null === current || - safelyDetachRef(current, current.return)); - flags = pushMutationContext(); - recursivelyTraverseMutationEffects(root, finishedWork, lanes); - commitReconciliationEffects(finishedWork); - (lanes & 335544064) === lanes && - null !== current && - viewTransitionMutationContext && - (finishedWork.flags |= 4); - viewTransitionMutationContext = flags; - break; - case 21: - break; - default: - recursivelyTraverseMutationEffects(root, finishedWork, lanes), - commitReconciliationEffects(finishedWork); + 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)), + null !== current && current.memoizedProps.name !== returnFiber.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress), + reconcileChildren( + current, + workInProgress, + returnFiber.children, + renderLanes + ), + workInProgress.child + ); + case 29: + throw workInProgress.pendingProps; } - (finishedWork.mode & ProfileMode) !== NoMode && - 0 <= componentEffectStartTime && - 0 <= componentEffectEndTime && - 0.05 < componentEffectDuration && - logComponentEffect( - finishedWork, - componentEffectStartTime, - componentEffectEndTime, - componentEffectDuration, - componentEffectErrors - ); - popComponentEffectStart(prevEffectStart); - componentEffectErrors = prevEffectErrors; + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } - function commitReconciliationEffects(finishedWork) { - var flags = finishedWork.flags; - if (flags & 2) { - try { - runWithFiberInDEV(finishedWork, commitPlacement, finishedWork); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } - finishedWork.flags &= -3; + function markUpdate(workInProgress) { + workInProgress.flags |= 4; + } + function preloadResourceAndSuspendIfNeeded(workInProgress, resource) { + if ( + "stylesheet" !== resource.type || + (resource.state.loading & Inserted) !== NotLoaded + ) + workInProgress.flags &= -16777217; + else if ( + ((workInProgress.flags |= 16777216), !preloadResource(resource)) + ) { + resource = suspenseHandlerStackCursor.current; + if ( + null !== resource && + ((workInProgressRootRenderLanes & 4194048) === + workInProgressRootRenderLanes + ? null !== shellBoundary + : ((workInProgressRootRenderLanes & 62914560) !== + workInProgressRootRenderLanes && + 0 === (workInProgressRootRenderLanes & 536870912)) || + resource !== shellBoundary) + ) + throw ( + ((suspendedThenable = noopSuspenseyCommitThenable), + SuspenseyCommitException) + ); + workInProgress.flags |= 8192; } - flags & 4096 && (finishedWork.flags &= -4097); - } - function recursivelyResetForms(parentFiber) { - if (parentFiber.subtreeFlags & 1024) - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var fiber = parentFiber; - recursivelyResetForms(fiber); - 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset(); - parentFiber = parentFiber.sibling; - } } - function recursivelyTraverseAfterMutationEffects(root, parentFiber) { - if (parentFiber.subtreeFlags & 9270) - for (parentFiber = parentFiber.child; null !== parentFiber; ) - commitAfterMutationEffectsOnFiber(parentFiber, root), - (parentFiber = parentFiber.sibling); - else measureNestedViewTransitions(parentFiber, !1); + function scheduleRetryEffect(workInProgress, retryQueue) { + null !== retryQueue && (workInProgress.flags |= 4); + workInProgress.flags & 16384 && + ((retryQueue = + 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), + (workInProgress.lanes |= retryQueue), + (workInProgressSuspendedRetryLanes |= retryQueue)); } - function commitAfterMutationEffectsOnFiber(finishedWork, root) { - var current = finishedWork.alternate; - if (null === current) commitEnterViewTransitions(finishedWork, !1); - else - switch (finishedWork.tag) { - case 3: - viewTransitionContextChanged$1 = !1; - pushViewTransitionCancelableScope(); - recursivelyTraverseAfterMutationEffects(root, finishedWork); - if (!viewTransitionContextChanged$1) { - finishedWork = viewTransitionCancelableChildren; - if (null !== finishedWork) - for (var i = 0; i < finishedWork.length; i += 3) - cancelViewTransitionName( - finishedWork[i], - finishedWork[i + 1], - finishedWork[i + 2] - ); - cancelRootViewTransitionName(root.containerInfo); - } - viewTransitionCancelableChildren = null; - break; - case 5: - recursivelyTraverseAfterMutationEffects(root, finishedWork); - break; - case 22: - null === finishedWork.memoizedState && - (null !== current.memoizedState - ? commitEnterViewTransitions(finishedWork, !1) - : recursivelyTraverseAfterMutationEffects(root, finishedWork)); - break; - case 30: - i = 0 !== (finishedWork.flags & 4); - var prevContextChanged = viewTransitionContextChanged$1, - prevCancelableChildren = pushViewTransitionCancelableScope(); - viewTransitionContextChanged$1 = !1; - recursivelyTraverseAfterMutationEffects(root, finishedWork); - viewTransitionContextChanged$1 && (finishedWork.flags |= 4); - root = measureUpdateViewTransition(current, finishedWork, !1); - 0 !== (finishedWork.flags & 4) && root - ? ((root = finishedWork.memoizedProps), - scheduleViewTransitionEvent( - finishedWork, - i || viewTransitionContextChanged$1 - ? root.onUpdate - : root.onLayout - ), - (viewTransitionCancelableChildren = prevCancelableChildren)) - : null !== prevCancelableChildren && - (prevCancelableChildren.push.apply( - prevCancelableChildren, - viewTransitionCancelableChildren - ), - (viewTransitionCancelableChildren = prevCancelableChildren)); - viewTransitionContextChanged$1 = - 0 !== (finishedWork.flags & 32) ? !0 : prevContextChanged; + function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { + if (!isHydrating) + switch (renderState.tailMode) { + case "hidden": + hasRenderedATailFallback = renderState.tail; + for (var lastTailNode = null; null !== hasRenderedATailFallback; ) + null !== hasRenderedATailFallback.alternate && + (lastTailNode = hasRenderedATailFallback), + (hasRenderedATailFallback = hasRenderedATailFallback.sibling); + null === lastTailNode + ? (renderState.tail = null) + : (lastTailNode.sibling = null); break; - default: - recursivelyTraverseAfterMutationEffects(root, finishedWork); + case "collapsed": + lastTailNode = renderState.tail; + for (var _lastTailNode = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (_lastTailNode = lastTailNode), + (lastTailNode = lastTailNode.sibling); + null === _lastTailNode + ? hasRenderedATailFallback || null === renderState.tail + ? (renderState.tail = null) + : (renderState.tail.sibling = null) + : (_lastTailNode.sibling = null); } } - function recursivelyTraverseLayoutEffects(root, parentFiber) { - if (parentFiber.subtreeFlags & 8772) - for (parentFiber = parentFiber.child; null !== parentFiber; ) - commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber), - (parentFiber = parentFiber.sibling); - } - function disappearLayoutEffects(finishedWork) { - var prevEffectStart = pushComponentEffectStart(), - prevEffectErrors = pushComponentEffectErrors(); - switch (finishedWork.tag) { - case 0: - case 11: - case 14: - case 15: - commitHookLayoutUnmountEffects( - finishedWork, - finishedWork.return, - Layout - ); - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 1: - safelyDetachRef(finishedWork, finishedWork.return); - var instance = finishedWork.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount( - finishedWork, - finishedWork.return, - instance - ); - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 27: - runWithFiberInDEV( - finishedWork, - releaseSingletonInstance, - finishedWork.stateNode - ); - case 26: - case 5: - safelyDetachRef(finishedWork, finishedWork.return); - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 22: - safelyDetachRef(finishedWork, finishedWork.return); - null === finishedWork.memoizedState && - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 30: - safelyDetachRef(finishedWork, finishedWork.return); - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - default: - recursivelyTraverseDisappearLayoutEffects(finishedWork); - } - (finishedWork.mode & ProfileMode) !== NoMode && - 0 <= componentEffectStartTime && - 0 <= componentEffectEndTime && - 0.05 < componentEffectDuration && - logComponentEffect( - finishedWork, - componentEffectStartTime, - componentEffectEndTime, - componentEffectDuration, - componentEffectErrors - ); - popComponentEffectStart(prevEffectStart); - componentEffectErrors = prevEffectErrors; - } - function recursivelyTraverseDisappearLayoutEffects(parentFiber) { - for (parentFiber = parentFiber.child; null !== parentFiber; ) - disappearLayoutEffects(parentFiber), - (parentFiber = parentFiber.sibling); + function bubbleProperties(completedWork) { + var didBailout = + null !== completedWork.alternate && + completedWork.alternate.child === completedWork.child, + newChildLanes = 0, + subtreeFlags = 0; + if (didBailout) + if ((completedWork.mode & ProfileMode) !== NoMode) { + for ( + var _treeBaseDuration = completedWork.selfBaseDuration, + _child2 = completedWork.child; + null !== _child2; + + ) + (newChildLanes |= _child2.lanes | _child2.childLanes), + (subtreeFlags |= _child2.subtreeFlags & 65011712), + (subtreeFlags |= _child2.flags & 65011712), + (_treeBaseDuration += _child2.treeBaseDuration), + (_child2 = _child2.sibling); + completedWork.treeBaseDuration = _treeBaseDuration; + } else + for ( + _treeBaseDuration = completedWork.child; + null !== _treeBaseDuration; + + ) + (newChildLanes |= + _treeBaseDuration.lanes | _treeBaseDuration.childLanes), + (subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712), + (subtreeFlags |= _treeBaseDuration.flags & 65011712), + (_treeBaseDuration.return = completedWork), + (_treeBaseDuration = _treeBaseDuration.sibling); + else if ((completedWork.mode & ProfileMode) !== NoMode) { + _treeBaseDuration = completedWork.actualDuration; + _child2 = completedWork.selfBaseDuration; + for (var child = completedWork.child; null !== child; ) + (newChildLanes |= child.lanes | child.childLanes), + (subtreeFlags |= child.subtreeFlags), + (subtreeFlags |= child.flags), + (_treeBaseDuration += child.actualDuration), + (_child2 += child.treeBaseDuration), + (child = child.sibling); + completedWork.actualDuration = _treeBaseDuration; + completedWork.treeBaseDuration = _child2; + } else + for ( + _treeBaseDuration = completedWork.child; + null !== _treeBaseDuration; + + ) + (newChildLanes |= + _treeBaseDuration.lanes | _treeBaseDuration.childLanes), + (subtreeFlags |= _treeBaseDuration.subtreeFlags), + (subtreeFlags |= _treeBaseDuration.flags), + (_treeBaseDuration.return = completedWork), + (_treeBaseDuration = _treeBaseDuration.sibling); + completedWork.subtreeFlags |= subtreeFlags; + completedWork.childLanes = newChildLanes; + return didBailout; } - function reappearLayoutEffects( - finishedRoot, - current, - finishedWork, - includeWorkInProgressEffects - ) { - var prevEffectStart = pushComponentEffectStart(), - prevEffectErrors = pushComponentEffectErrors(), - flags = finishedWork.flags; - switch (finishedWork.tag) { - case 0: - case 11: - case 15: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); - commitHookLayoutEffects(finishedWork, Layout); - break; + function completeWork(current, workInProgress, renderLanes) { + var newProps = workInProgress.pendingProps; + popTreeContext(workInProgress); + switch (workInProgress.tag) { + case 31: + case 16: + case 15: + case 0: + case 11: + case 7: + case 8: + case 12: + case 9: + case 14: + return bubbleProperties(workInProgress), null; case 1: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects + return bubbleProperties(workInProgress), null; + case 3: + renderLanes = workInProgress.stateNode; + newProps = null; + null !== current && (newProps = current.memoizedState.cache); + workInProgress.memoizedState.cache !== newProps && + (workInProgress.flags |= 2048); + popProvider(CacheContext, workInProgress); + popHostContainer(workInProgress); + renderLanes.pendingContext && + ((renderLanes.context = renderLanes.pendingContext), + (renderLanes.pendingContext = null)); + if (null === current || null === current.child) + popHydrationState(workInProgress) + ? (emitPendingHydrationWarnings(), markUpdate(workInProgress)) + : null === current || + (current.memoizedState.isDehydrated && + 0 === (workInProgress.flags & 256)) || + ((workInProgress.flags |= 1024), + upgradeHydrationErrorsToRecoverable()); + bubbleProperties(workInProgress); + return null; + case 26: + return ( + (renderLanes = workInProgress.memoizedState), + null === current + ? (markUpdate(workInProgress), + null !== renderLanes + ? (bubbleProperties(workInProgress), + preloadResourceAndSuspendIfNeeded( + workInProgress, + renderLanes + )) + : (bubbleProperties(workInProgress), + (workInProgress.flags &= -16777217))) + : renderLanes + ? renderLanes !== current.memoizedState + ? (markUpdate(workInProgress), + bubbleProperties(workInProgress), + preloadResourceAndSuspendIfNeeded( + workInProgress, + renderLanes + )) + : (bubbleProperties(workInProgress), + (workInProgress.flags &= -16777217)) + : (current.memoizedProps !== newProps && + markUpdate(workInProgress), + bubbleProperties(workInProgress), + (workInProgress.flags &= -16777217)), + null ); - current = finishedWork.stateNode; - "function" === typeof current.componentDidMount && - runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - current - ); - current = finishedWork.updateQueue; - if (null !== current) { - finishedRoot = finishedWork.stateNode; - try { - runWithFiberInDEV( - finishedWork, - commitHiddenCallbacks, - current, - finishedRoot + case 27: + popHostContext(workInProgress); + renderLanes = requiredContext(rootInstanceStackCursor.current); + var _type = workInProgress.type; + if (null !== current && null != workInProgress.stateNode) + current.memoizedProps !== newProps && markUpdate(workInProgress); + else { + if (!newProps) { + if (null === workInProgress.stateNode) + throw Error( + "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." + ); + bubbleProperties(workInProgress); + workInProgress.subtreeFlags &= -33554433; + return null; + } + current = getHostContext(); + popHydrationState(workInProgress) + ? prepareToHydrateHostInstance(workInProgress, current) + : ((current = resolveSingletonInstance( + _type, + newProps, + renderLanes, + current, + !0 + )), + (workInProgress.stateNode = current), + markUpdate(workInProgress)); + } + bubbleProperties(workInProgress); + workInProgress.subtreeFlags &= -33554433; + return null; + case 5: + popHostContext(workInProgress); + renderLanes = workInProgress.type; + if (null !== current && null != workInProgress.stateNode) + current.memoizedProps !== newProps && markUpdate(workInProgress); + else { + if (!newProps) { + if (null === workInProgress.stateNode) + throw Error( + "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." + ); + bubbleProperties(workInProgress); + workInProgress.subtreeFlags &= -33554433; + return null; + } + _type = getHostContext(); + if (popHydrationState(workInProgress)) + prepareToHydrateHostInstance(workInProgress, _type); + else { + current = requiredContext(rootInstanceStackCursor.current); + validateDOMNesting(renderLanes, _type.ancestorInfo); + _type = _type.context; + current = getOwnerDocumentFromRootContainer(current); + switch (_type) { + case HostContextNamespaceSvg: + current = current.createElementNS(SVG_NAMESPACE, renderLanes); + break; + case HostContextNamespaceMath: + current = current.createElementNS( + MATH_NAMESPACE, + renderLanes + ); + break; + default: + switch (renderLanes) { + case "svg": + current = current.createElementNS( + SVG_NAMESPACE, + renderLanes + ); + break; + case "math": + current = current.createElementNS( + MATH_NAMESPACE, + renderLanes + ); + break; + case "script": + current = current.createElement("div"); + current.innerHTML = "