From a4a97414fc050b6092b683ab22c4e4031945cb2a Mon Sep 17 00:00:00 2001 From: hz Date: Mon, 12 May 2025 20:16:04 -0700 Subject: [PATCH] Adding login and registration base pages --- .env | 1 + node_modules/.bin/acorn.cmd | 17 + node_modules/.bin/acorn.ps1 | 28 + node_modules/.bin/browserslist.cmd | 17 + node_modules/.bin/browserslist.ps1 | 28 + node_modules/.bin/esbuild.cmd | 17 + node_modules/.bin/esbuild.ps1 | 28 + node_modules/.bin/eslint.cmd | 17 + node_modules/.bin/eslint.ps1 | 28 + node_modules/.bin/js-yaml.cmd | 17 + node_modules/.bin/js-yaml.ps1 | 28 + node_modules/.bin/jsesc.cmd | 17 + node_modules/.bin/jsesc.ps1 | 28 + node_modules/.bin/json5.cmd | 17 + node_modules/.bin/json5.ps1 | 28 + node_modules/.bin/nanoid.cmd | 17 + node_modules/.bin/nanoid.ps1 | 28 + node_modules/.bin/node-which.cmd | 17 + node_modules/.bin/node-which.ps1 | 28 + node_modules/.bin/parser.cmd | 17 + node_modules/.bin/parser.ps1 | 28 + node_modules/.bin/rollup.cmd | 17 + node_modules/.bin/rollup.ps1 | 28 + node_modules/.bin/semver.cmd | 17 + node_modules/.bin/semver.ps1 | 28 + node_modules/.bin/update-browserslist-db.cmd | 17 + node_modules/.bin/update-browserslist-db.ps1 | 28 + node_modules/.bin/vite.cmd | 17 + node_modules/.bin/vite.ps1 | 28 + node_modules/.vite/deps/chunk-G4HUE2DP.js | 278 + node_modules/.vite/deps/chunk-G4HUE2DP.js.map | 7 + node_modules/.vite/deps/chunk-V62QEVPD.js | 996 ++ node_modules/.vite/deps/chunk-V62QEVPD.js.map | 7 + node_modules/.vite/deps/react-router-dom.js | 12093 ++++++++++++++++ .../.vite/deps/react-router-dom.js.map | 7 + node_modules/@esbuild/win32-x64/README.md | 3 + node_modules/@esbuild/win32-x64/esbuild.exe | Bin 0 -> 10517504 bytes node_modules/@esbuild/win32-x64/package.json | 20 + .../@rollup/rollup-win32-x64-msvc/README.md | 3 + .../rollup-win32-x64-msvc/package.json | 19 + .../rollup.win32-x64-msvc.node | Bin 0 -> 3682304 bytes node_modules/react-router-dom/LICENSE.md | 23 + node_modules/react-router-dom/README.md | 6 + .../react-router-dom/dist/index.d.mts | 2 + node_modules/react-router-dom/dist/index.d.ts | 2 + node_modules/react-router-dom/dist/index.js | 45 + node_modules/react-router-dom/dist/index.mjs | 18 + node_modules/react-router-dom/package.json | 82 + node_modules/react-router/CHANGELOG.md | 1657 +++ node_modules/react-router/LICENSE.md | 23 + node_modules/react-router/README.md | 7 + .../dist/development/chunk-D4RADZKF.mjs | 11556 +++++++++++++++ .../dist/development/dom-export.d.mts | 23 + .../dist/development/dom-export.d.ts | 22 + .../dist/development/dom-export.js | 246 + .../dist/development/dom-export.mjs | 225 + .../react-router/dist/development/index.d.mts | 814 ++ .../react-router/dist/development/index.d.ts | 2544 ++++ .../react-router/dist/development/index.js | 11706 +++++++++++++++ .../react-router/dist/development/index.mjs | 246 + .../dist/development/lib-CCSAGgcP.d.mts | 1736 +++ .../development/lib/types/route-module.d.mts | 208 + .../development/lib/types/route-module.d.ts | 208 + .../development/lib/types/route-module.js | 28 + .../development/lib/types/route-module.mjs | 10 + .../dist/development/route-data-B9_30zbP.d.ts | 1749 +++ .../development/route-data-C6QaL0wu.d.mts | 1749 +++ .../dist/production/chunk-CVXGOGHQ.mjs | 11556 +++++++++++++++ .../dist/production/dom-export.d.mts | 23 + .../dist/production/dom-export.d.ts | 22 + .../dist/production/dom-export.js | 246 + .../dist/production/dom-export.mjs | 225 + .../react-router/dist/production/index.d.mts | 814 ++ .../react-router/dist/production/index.d.ts | 2544 ++++ .../react-router/dist/production/index.js | 11706 +++++++++++++++ .../react-router/dist/production/index.mjs | 246 + .../dist/production/lib-CCSAGgcP.d.mts | 1736 +++ .../production/lib/types/route-module.d.mts | 208 + .../production/lib/types/route-module.d.ts | 208 + .../dist/production/lib/types/route-module.js | 28 + .../production/lib/types/route-module.mjs | 10 + .../dist/production/route-data-B9_30zbP.d.ts | 1749 +++ .../dist/production/route-data-C6QaL0wu.d.mts | 1749 +++ .../react-router/node_modules/cookie/LICENSE | 24 + .../node_modules/cookie/README.md | 248 + .../node_modules/cookie/dist/index.d.ts | 114 + .../node_modules/cookie/dist/index.js | 239 + .../node_modules/cookie/dist/index.js.map | 1 + .../node_modules/cookie/package.json | 42 + node_modules/react-router/package.json | 117 + node_modules/set-cookie-parser/LICENSE | 21 + node_modules/set-cookie-parser/README.md | 202 + .../set-cookie-parser/lib/set-cookie.js | 224 + node_modules/set-cookie-parser/package.json | 45 + src/config.js | 5 + src/pages/Login.jsx | 66 + src/pages/Register.jsx | 85 + 97 files changed, 83502 insertions(+) create mode 100644 .env create mode 100644 node_modules/.bin/acorn.cmd create mode 100644 node_modules/.bin/acorn.ps1 create mode 100644 node_modules/.bin/browserslist.cmd create mode 100644 node_modules/.bin/browserslist.ps1 create mode 100644 node_modules/.bin/esbuild.cmd create mode 100644 node_modules/.bin/esbuild.ps1 create mode 100644 node_modules/.bin/eslint.cmd create mode 100644 node_modules/.bin/eslint.ps1 create mode 100644 node_modules/.bin/js-yaml.cmd create mode 100644 node_modules/.bin/js-yaml.ps1 create mode 100644 node_modules/.bin/jsesc.cmd create mode 100644 node_modules/.bin/jsesc.ps1 create mode 100644 node_modules/.bin/json5.cmd create mode 100644 node_modules/.bin/json5.ps1 create mode 100644 node_modules/.bin/nanoid.cmd create mode 100644 node_modules/.bin/nanoid.ps1 create mode 100644 node_modules/.bin/node-which.cmd create mode 100644 node_modules/.bin/node-which.ps1 create mode 100644 node_modules/.bin/parser.cmd create mode 100644 node_modules/.bin/parser.ps1 create mode 100644 node_modules/.bin/rollup.cmd create mode 100644 node_modules/.bin/rollup.ps1 create mode 100644 node_modules/.bin/semver.cmd create mode 100644 node_modules/.bin/semver.ps1 create mode 100644 node_modules/.bin/update-browserslist-db.cmd create mode 100644 node_modules/.bin/update-browserslist-db.ps1 create mode 100644 node_modules/.bin/vite.cmd create mode 100644 node_modules/.bin/vite.ps1 create mode 100644 node_modules/.vite/deps/chunk-G4HUE2DP.js create mode 100644 node_modules/.vite/deps/chunk-G4HUE2DP.js.map create mode 100644 node_modules/.vite/deps/chunk-V62QEVPD.js create mode 100644 node_modules/.vite/deps/chunk-V62QEVPD.js.map create mode 100644 node_modules/.vite/deps/react-router-dom.js create mode 100644 node_modules/.vite/deps/react-router-dom.js.map create mode 100644 node_modules/@esbuild/win32-x64/README.md create mode 100644 node_modules/@esbuild/win32-x64/esbuild.exe create mode 100644 node_modules/@esbuild/win32-x64/package.json create mode 100644 node_modules/@rollup/rollup-win32-x64-msvc/README.md create mode 100644 node_modules/@rollup/rollup-win32-x64-msvc/package.json create mode 100644 node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node create mode 100644 node_modules/react-router-dom/LICENSE.md create mode 100644 node_modules/react-router-dom/README.md create mode 100644 node_modules/react-router-dom/dist/index.d.mts create mode 100644 node_modules/react-router-dom/dist/index.d.ts create mode 100644 node_modules/react-router-dom/dist/index.js create mode 100644 node_modules/react-router-dom/dist/index.mjs create mode 100644 node_modules/react-router-dom/package.json create mode 100644 node_modules/react-router/CHANGELOG.md create mode 100644 node_modules/react-router/LICENSE.md create mode 100644 node_modules/react-router/README.md create mode 100644 node_modules/react-router/dist/development/chunk-D4RADZKF.mjs create mode 100644 node_modules/react-router/dist/development/dom-export.d.mts create mode 100644 node_modules/react-router/dist/development/dom-export.d.ts create mode 100644 node_modules/react-router/dist/development/dom-export.js create mode 100644 node_modules/react-router/dist/development/dom-export.mjs create mode 100644 node_modules/react-router/dist/development/index.d.mts create mode 100644 node_modules/react-router/dist/development/index.d.ts create mode 100644 node_modules/react-router/dist/development/index.js create mode 100644 node_modules/react-router/dist/development/index.mjs create mode 100644 node_modules/react-router/dist/development/lib-CCSAGgcP.d.mts create mode 100644 node_modules/react-router/dist/development/lib/types/route-module.d.mts create mode 100644 node_modules/react-router/dist/development/lib/types/route-module.d.ts create mode 100644 node_modules/react-router/dist/development/lib/types/route-module.js create mode 100644 node_modules/react-router/dist/development/lib/types/route-module.mjs create mode 100644 node_modules/react-router/dist/development/route-data-B9_30zbP.d.ts create mode 100644 node_modules/react-router/dist/development/route-data-C6QaL0wu.d.mts create mode 100644 node_modules/react-router/dist/production/chunk-CVXGOGHQ.mjs create mode 100644 node_modules/react-router/dist/production/dom-export.d.mts create mode 100644 node_modules/react-router/dist/production/dom-export.d.ts create mode 100644 node_modules/react-router/dist/production/dom-export.js create mode 100644 node_modules/react-router/dist/production/dom-export.mjs create mode 100644 node_modules/react-router/dist/production/index.d.mts create mode 100644 node_modules/react-router/dist/production/index.d.ts create mode 100644 node_modules/react-router/dist/production/index.js create mode 100644 node_modules/react-router/dist/production/index.mjs create mode 100644 node_modules/react-router/dist/production/lib-CCSAGgcP.d.mts create mode 100644 node_modules/react-router/dist/production/lib/types/route-module.d.mts create mode 100644 node_modules/react-router/dist/production/lib/types/route-module.d.ts create mode 100644 node_modules/react-router/dist/production/lib/types/route-module.js create mode 100644 node_modules/react-router/dist/production/lib/types/route-module.mjs create mode 100644 node_modules/react-router/dist/production/route-data-B9_30zbP.d.ts create mode 100644 node_modules/react-router/dist/production/route-data-C6QaL0wu.d.mts create mode 100644 node_modules/react-router/node_modules/cookie/LICENSE create mode 100644 node_modules/react-router/node_modules/cookie/README.md create mode 100644 node_modules/react-router/node_modules/cookie/dist/index.d.ts create mode 100644 node_modules/react-router/node_modules/cookie/dist/index.js create mode 100644 node_modules/react-router/node_modules/cookie/dist/index.js.map create mode 100644 node_modules/react-router/node_modules/cookie/package.json create mode 100644 node_modules/react-router/package.json create mode 100644 node_modules/set-cookie-parser/LICENSE create mode 100644 node_modules/set-cookie-parser/README.md create mode 100644 node_modules/set-cookie-parser/lib/set-cookie.js create mode 100644 node_modules/set-cookie-parser/package.json create mode 100644 src/config.js create mode 100644 src/pages/Login.jsx create mode 100644 src/pages/Register.jsx diff --git a/.env b/.env new file mode 100644 index 0000000..be1f554 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VITE_API_BASE_URL=https://gameauthapi.ranaze.com \ No newline at end of file diff --git a/node_modules/.bin/acorn.cmd b/node_modules/.bin/acorn.cmd new file mode 100644 index 0000000..a9324df --- /dev/null +++ b/node_modules/.bin/acorn.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* diff --git a/node_modules/.bin/acorn.ps1 b/node_modules/.bin/acorn.ps1 new file mode 100644 index 0000000..6f6dcdd --- /dev/null +++ b/node_modules/.bin/acorn.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args + } else { + & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args + } else { + & "node$exe" "$basedir/../acorn/bin/acorn" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/browserslist.cmd b/node_modules/.bin/browserslist.cmd new file mode 100644 index 0000000..f93c251 --- /dev/null +++ b/node_modules/.bin/browserslist.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %* diff --git a/node_modules/.bin/browserslist.ps1 b/node_modules/.bin/browserslist.ps1 new file mode 100644 index 0000000..01e10a0 --- /dev/null +++ b/node_modules/.bin/browserslist.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args + } else { + & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../browserslist/cli.js" $args + } else { + & "node$exe" "$basedir/../browserslist/cli.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/esbuild.cmd b/node_modules/.bin/esbuild.cmd new file mode 100644 index 0000000..cc920c5 --- /dev/null +++ b/node_modules/.bin/esbuild.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %* diff --git a/node_modules/.bin/esbuild.ps1 b/node_modules/.bin/esbuild.ps1 new file mode 100644 index 0000000..81ffbf9 --- /dev/null +++ b/node_modules/.bin/esbuild.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args + } else { + & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args + } else { + & "node$exe" "$basedir/../esbuild/bin/esbuild" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/eslint.cmd b/node_modules/.bin/eslint.cmd new file mode 100644 index 0000000..032901a --- /dev/null +++ b/node_modules/.bin/eslint.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\eslint\bin\eslint.js" %* diff --git a/node_modules/.bin/eslint.ps1 b/node_modules/.bin/eslint.ps1 new file mode 100644 index 0000000..155bec4 --- /dev/null +++ b/node_modules/.bin/eslint.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args + } else { + & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../eslint/bin/eslint.js" $args + } else { + & "node$exe" "$basedir/../eslint/bin/eslint.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/js-yaml.cmd b/node_modules/.bin/js-yaml.cmd new file mode 100644 index 0000000..453312b --- /dev/null +++ b/node_modules/.bin/js-yaml.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %* diff --git a/node_modules/.bin/js-yaml.ps1 b/node_modules/.bin/js-yaml.ps1 new file mode 100644 index 0000000..2acfc61 --- /dev/null +++ b/node_modules/.bin/js-yaml.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args + } else { + & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args + } else { + & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/jsesc.cmd b/node_modules/.bin/jsesc.cmd new file mode 100644 index 0000000..eb41110 --- /dev/null +++ b/node_modules/.bin/jsesc.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jsesc\bin\jsesc" %* diff --git a/node_modules/.bin/jsesc.ps1 b/node_modules/.bin/jsesc.ps1 new file mode 100644 index 0000000..6007e02 --- /dev/null +++ b/node_modules/.bin/jsesc.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args + } else { + & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../jsesc/bin/jsesc" $args + } else { + & "node$exe" "$basedir/../jsesc/bin/jsesc" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/json5.cmd b/node_modules/.bin/json5.cmd new file mode 100644 index 0000000..95c137f --- /dev/null +++ b/node_modules/.bin/json5.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %* diff --git a/node_modules/.bin/json5.ps1 b/node_modules/.bin/json5.ps1 new file mode 100644 index 0000000..8700ddb --- /dev/null +++ b/node_modules/.bin/json5.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args + } else { + & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../json5/lib/cli.js" $args + } else { + & "node$exe" "$basedir/../json5/lib/cli.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/nanoid.cmd b/node_modules/.bin/nanoid.cmd new file mode 100644 index 0000000..9c40107 --- /dev/null +++ b/node_modules/.bin/nanoid.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %* diff --git a/node_modules/.bin/nanoid.ps1 b/node_modules/.bin/nanoid.ps1 new file mode 100644 index 0000000..d8a4d7a --- /dev/null +++ b/node_modules/.bin/nanoid.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } else { + & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } else { + & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/node-which.cmd b/node_modules/.bin/node-which.cmd new file mode 100644 index 0000000..8738aed --- /dev/null +++ b/node_modules/.bin/node-which.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\node-which" %* diff --git a/node_modules/.bin/node-which.ps1 b/node_modules/.bin/node-which.ps1 new file mode 100644 index 0000000..cfb09e8 --- /dev/null +++ b/node_modules/.bin/node-which.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args + } else { + & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../which/bin/node-which" $args + } else { + & "node$exe" "$basedir/../which/bin/node-which" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/parser.cmd b/node_modules/.bin/parser.cmd new file mode 100644 index 0000000..1ad5c81 --- /dev/null +++ b/node_modules/.bin/parser.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %* diff --git a/node_modules/.bin/parser.ps1 b/node_modules/.bin/parser.ps1 new file mode 100644 index 0000000..8926517 --- /dev/null +++ b/node_modules/.bin/parser.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } else { + & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } else { + & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/rollup.cmd b/node_modules/.bin/rollup.cmd new file mode 100644 index 0000000..b3f110b --- /dev/null +++ b/node_modules/.bin/rollup.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rollup\dist\bin\rollup" %* diff --git a/node_modules/.bin/rollup.ps1 b/node_modules/.bin/rollup.ps1 new file mode 100644 index 0000000..10f657d --- /dev/null +++ b/node_modules/.bin/rollup.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } else { + & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } else { + & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd new file mode 100644 index 0000000..9913fa9 --- /dev/null +++ b/node_modules/.bin/semver.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1 new file mode 100644 index 0000000..314717a --- /dev/null +++ b/node_modules/.bin/semver.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args + } else { + & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args + } else { + & "node$exe" "$basedir/../semver/bin/semver.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/update-browserslist-db.cmd b/node_modules/.bin/update-browserslist-db.cmd new file mode 100644 index 0000000..2e14905 --- /dev/null +++ b/node_modules/.bin/update-browserslist-db.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\update-browserslist-db\cli.js" %* diff --git a/node_modules/.bin/update-browserslist-db.ps1 b/node_modules/.bin/update-browserslist-db.ps1 new file mode 100644 index 0000000..7abdf26 --- /dev/null +++ b/node_modules/.bin/update-browserslist-db.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args + } else { + & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args + } else { + & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/vite.cmd b/node_modules/.bin/vite.cmd new file mode 100644 index 0000000..f62e966 --- /dev/null +++ b/node_modules/.bin/vite.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vite\bin\vite.js" %* diff --git a/node_modules/.bin/vite.ps1 b/node_modules/.bin/vite.ps1 new file mode 100644 index 0000000..a7759bc --- /dev/null +++ b/node_modules/.bin/vite.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args + } else { + & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../vite/bin/vite.js" $args + } else { + & "node$exe" "$basedir/../vite/bin/vite.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.vite/deps/chunk-G4HUE2DP.js b/node_modules/.vite/deps/chunk-G4HUE2DP.js new file mode 100644 index 0000000..72a4958 --- /dev/null +++ b/node_modules/.vite/deps/chunk-G4HUE2DP.js @@ -0,0 +1,278 @@ +import { + __commonJS, + require_react +} from "./chunk-V62QEVPD.js"; + +// node_modules/react-dom/cjs/react-dom.development.js +var require_react_dom_development = __commonJS({ + "node_modules/react-dom/cjs/react-dom.development.js"(exports) { + "use strict"; + (function() { + function noop() { + } + function testStringCoercion(value) { + return "" + value; + } + function createPortal$1(children, containerInfo, implementation) { + var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null; + try { + testStringCoercion(key); + var JSCompiler_inline_result = false; + } catch (e) { + JSCompiler_inline_result = true; + } + JSCompiler_inline_result && (console.error( + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object" + ), testStringCoercion(key)); + return { + $$typeof: REACT_PORTAL_TYPE, + key: null == key ? null : "" + key, + children, + containerInfo, + implementation + }; + } + function getCrossOriginStringAs(as, input) { + if ("font" === as) return ""; + if ("string" === typeof input) + return "use-credentials" === input ? input : ""; + } + function getValueDescriptorExpectingObjectForWarning(thing) { + return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"'; + } + function getValueDescriptorExpectingEnumForWarning(thing) { + return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"'; + } + function resolveDispatcher() { + var dispatcher = ReactSharedInternals.H; + null === dispatcher && console.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." + ); + return dispatcher; + } + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); + var React = require_react(), Internals = { + d: { + f: noop, + r: function() { + throw Error( + "Invalid form element. requestFormReset must be passed a form that was rendered by React." + ); + }, + D: noop, + C: noop, + L: noop, + m: noop, + X: noop, + S: noop, + M: noop + }, + p: 0, + findDOMNode: null + }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error( + "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills" + ); + exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals; + exports.createPortal = function(children, container) { + var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; + if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType) + throw Error("Target container is not a DOM element."); + return createPortal$1(children, container, null, key); + }; + exports.flushSync = function(fn) { + var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p; + try { + if (ReactSharedInternals.T = null, Internals.p = 2, fn) + return fn(); + } finally { + ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error( + "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." + ); + } + }; + exports.preconnect = function(href, options) { + "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error( + "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", + getValueDescriptorExpectingEnumForWarning(options) + ) : null != options && "string" !== typeof options.crossOrigin && console.error( + "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", + getValueDescriptorExpectingObjectForWarning(options.crossOrigin) + ) : console.error( + "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", + getValueDescriptorExpectingObjectForWarning(href) + ); + "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options)); + }; + exports.prefetchDNS = function(href) { + if ("string" !== typeof href || !href) + console.error( + "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", + getValueDescriptorExpectingObjectForWarning(href) + ); + else if (1 < arguments.length) { + var options = arguments[1]; + "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error( + "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", + getValueDescriptorExpectingEnumForWarning(options) + ) : console.error( + "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", + getValueDescriptorExpectingEnumForWarning(options) + ); + } + "string" === typeof href && Internals.d.D(href); + }; + exports.preinit = function(href, options) { + "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error( + "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", + getValueDescriptorExpectingEnumForWarning(options) + ) : "style" !== options.as && "script" !== options.as && console.error( + 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', + getValueDescriptorExpectingEnumForWarning(options.as) + ) : console.error( + "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", + getValueDescriptorExpectingObjectForWarning(href) + ); + if ("string" === typeof href && options && "string" === typeof options.as) { + var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0; + "style" === as ? Internals.d.S( + href, + "string" === typeof options.precedence ? options.precedence : void 0, + { + crossOrigin, + integrity, + fetchPriority + } + ) : "script" === as && Internals.d.X(href, { + crossOrigin, + integrity, + fetchPriority, + nonce: "string" === typeof options.nonce ? options.nonce : void 0 + }); + } + }; + exports.preinitModule = function(href, options) { + var encountered = ""; + "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); + void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + "."); + if (encountered) + console.error( + "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", + encountered + ); + else + switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) { + case "script": + break; + default: + encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error( + 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)', + encountered, + href + ); + } + if ("string" === typeof href) + if ("object" === typeof options && null !== options) { + if (null == options.as || "script" === options.as) + encountered = getCrossOriginStringAs( + options.as, + options.crossOrigin + ), Internals.d.M(href, { + crossOrigin: encountered, + integrity: "string" === typeof options.integrity ? options.integrity : void 0, + nonce: "string" === typeof options.nonce ? options.nonce : void 0 + }); + } else null == options && Internals.d.M(href); + }; + exports.preload = function(href, options) { + var encountered = ""; + "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); + null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + "."); + encountered && console.error( + 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `` tag.%s', + encountered + ); + if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) { + encountered = options.as; + var crossOrigin = getCrossOriginStringAs( + encountered, + options.crossOrigin + ); + Internals.d.L(href, encountered, { + crossOrigin, + integrity: "string" === typeof options.integrity ? options.integrity : void 0, + nonce: "string" === typeof options.nonce ? options.nonce : void 0, + type: "string" === typeof options.type ? options.type : void 0, + fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0, + referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0, + imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0, + imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0, + media: "string" === typeof options.media ? options.media : void 0 + }); + } + }; + exports.preloadModule = function(href, options) { + var encountered = ""; + "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); + void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + "."); + encountered && console.error( + 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s', + encountered + ); + "string" === typeof href && (options ? (encountered = getCrossOriginStringAs( + options.as, + options.crossOrigin + ), Internals.d.m(href, { + as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0, + crossOrigin: encountered, + integrity: "string" === typeof options.integrity ? options.integrity : void 0 + })) : Internals.d.m(href)); + }; + exports.requestFormReset = function(form) { + Internals.d.r(form); + }; + exports.unstable_batchedUpdates = function(fn, a) { + return fn(a); + }; + exports.useFormState = function(action, initialState, permalink) { + return resolveDispatcher().useFormState(action, initialState, permalink); + }; + exports.useFormStatus = function() { + return resolveDispatcher().useHostTransitionStatus(); + }; + exports.version = "19.1.0"; + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); + })(); + } +}); + +// node_modules/react-dom/index.js +var require_react_dom = __commonJS({ + "node_modules/react-dom/index.js"(exports, module) { + if (false) { + checkDCE(); + module.exports = null; + } else { + module.exports = require_react_dom_development(); + } + } +}); + +export { + require_react_dom +}; +/*! Bundled license information: + +react-dom/cjs/react-dom.development.js: + (** + * @license React + * react-dom.development.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) +*/ +//# sourceMappingURL=chunk-G4HUE2DP.js.map diff --git a/node_modules/.vite/deps/chunk-G4HUE2DP.js.map b/node_modules/.vite/deps/chunk-G4HUE2DP.js.map new file mode 100644 index 0000000..b6fdce0 --- /dev/null +++ b/node_modules/.vite/deps/chunk-G4HUE2DP.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../react-dom/cjs/react-dom.development.js", "../../react-dom/index.js"], + "sourcesContent": ["/**\r\n * @license React\r\n * react-dom.development.js\r\n *\r\n * Copyright (c) Meta Platforms, Inc. and affiliates.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\n\"use strict\";\r\n\"production\" !== process.env.NODE_ENV &&\r\n (function () {\r\n function noop() {}\r\n function testStringCoercion(value) {\r\n return \"\" + value;\r\n }\r\n function createPortal$1(children, containerInfo, implementation) {\r\n var key =\r\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\r\n try {\r\n testStringCoercion(key);\r\n var JSCompiler_inline_result = !1;\r\n } catch (e) {\r\n JSCompiler_inline_result = !0;\r\n }\r\n JSCompiler_inline_result &&\r\n (console.error(\r\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\r\n (\"function\" === typeof Symbol &&\r\n Symbol.toStringTag &&\r\n key[Symbol.toStringTag]) ||\r\n key.constructor.name ||\r\n \"Object\"\r\n ),\r\n testStringCoercion(key));\r\n return {\r\n $$typeof: REACT_PORTAL_TYPE,\r\n key: null == key ? null : \"\" + key,\r\n children: children,\r\n containerInfo: containerInfo,\r\n implementation: implementation\r\n };\r\n }\r\n function getCrossOriginStringAs(as, input) {\r\n if (\"font\" === as) return \"\";\r\n if (\"string\" === typeof input)\r\n return \"use-credentials\" === input ? input : \"\";\r\n }\r\n function getValueDescriptorExpectingObjectForWarning(thing) {\r\n return null === thing\r\n ? \"`null`\"\r\n : void 0 === thing\r\n ? \"`undefined`\"\r\n : \"\" === thing\r\n ? \"an empty string\"\r\n : 'something with type \"' + typeof thing + '\"';\r\n }\r\n function getValueDescriptorExpectingEnumForWarning(thing) {\r\n return null === thing\r\n ? \"`null`\"\r\n : void 0 === thing\r\n ? \"`undefined`\"\r\n : \"\" === thing\r\n ? \"an empty string\"\r\n : \"string\" === typeof thing\r\n ? JSON.stringify(thing)\r\n : \"number\" === typeof thing\r\n ? \"`\" + thing + \"`\"\r\n : 'something with type \"' + typeof thing + '\"';\r\n }\r\n function resolveDispatcher() {\r\n var dispatcher = ReactSharedInternals.H;\r\n null === dispatcher &&\r\n console.error(\r\n \"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.\"\r\n );\r\n return dispatcher;\r\n }\r\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\r\n \"function\" ===\r\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\r\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\r\n var React = require(\"react\"),\r\n Internals = {\r\n d: {\r\n f: noop,\r\n r: function () {\r\n throw Error(\r\n \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\r\n );\r\n },\r\n D: noop,\r\n C: noop,\r\n L: noop,\r\n m: noop,\r\n X: noop,\r\n S: noop,\r\n M: noop\r\n },\r\n p: 0,\r\n findDOMNode: null\r\n },\r\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\r\n ReactSharedInternals =\r\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\r\n (\"function\" === typeof Map &&\r\n null != Map.prototype &&\r\n \"function\" === typeof Map.prototype.forEach &&\r\n \"function\" === typeof Set &&\r\n null != Set.prototype &&\r\n \"function\" === typeof Set.prototype.clear &&\r\n \"function\" === typeof Set.prototype.forEach) ||\r\n console.error(\r\n \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\r\n );\r\n exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\r\n Internals;\r\n exports.createPortal = function (children, container) {\r\n var key =\r\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\r\n if (\r\n !container ||\r\n (1 !== container.nodeType &&\r\n 9 !== container.nodeType &&\r\n 11 !== container.nodeType)\r\n )\r\n throw Error(\"Target container is not a DOM element.\");\r\n return createPortal$1(children, container, null, key);\r\n };\r\n exports.flushSync = function (fn) {\r\n var previousTransition = ReactSharedInternals.T,\r\n previousUpdatePriority = Internals.p;\r\n try {\r\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))\r\n return fn();\r\n } finally {\r\n (ReactSharedInternals.T = previousTransition),\r\n (Internals.p = previousUpdatePriority),\r\n Internals.d.f() &&\r\n console.error(\r\n \"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.\"\r\n );\r\n }\r\n };\r\n exports.preconnect = function (href, options) {\r\n \"string\" === typeof href && href\r\n ? null != options && \"object\" !== typeof options\r\n ? console.error(\r\n \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\r\n getValueDescriptorExpectingEnumForWarning(options)\r\n )\r\n : null != options &&\r\n \"string\" !== typeof options.crossOrigin &&\r\n console.error(\r\n \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\r\n getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\r\n )\r\n : console.error(\r\n \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\r\n getValueDescriptorExpectingObjectForWarning(href)\r\n );\r\n \"string\" === typeof href &&\r\n (options\r\n ? ((options = options.crossOrigin),\r\n (options =\r\n \"string\" === typeof options\r\n ? \"use-credentials\" === options\r\n ? options\r\n : \"\"\r\n : void 0))\r\n : (options = null),\r\n Internals.d.C(href, options));\r\n };\r\n exports.prefetchDNS = function (href) {\r\n if (\"string\" !== typeof href || !href)\r\n console.error(\r\n \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\r\n getValueDescriptorExpectingObjectForWarning(href)\r\n );\r\n else if (1 < arguments.length) {\r\n var options = arguments[1];\r\n \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\r\n ? console.error(\r\n \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\r\n getValueDescriptorExpectingEnumForWarning(options)\r\n )\r\n : console.error(\r\n \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\r\n getValueDescriptorExpectingEnumForWarning(options)\r\n );\r\n }\r\n \"string\" === typeof href && Internals.d.D(href);\r\n };\r\n exports.preinit = function (href, options) {\r\n \"string\" === typeof href && href\r\n ? null == options || \"object\" !== typeof options\r\n ? console.error(\r\n \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\r\n getValueDescriptorExpectingEnumForWarning(options)\r\n )\r\n : \"style\" !== options.as &&\r\n \"script\" !== options.as &&\r\n console.error(\r\n 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\r\n getValueDescriptorExpectingEnumForWarning(options.as)\r\n )\r\n : console.error(\r\n \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\r\n getValueDescriptorExpectingObjectForWarning(href)\r\n );\r\n if (\r\n \"string\" === typeof href &&\r\n options &&\r\n \"string\" === typeof options.as\r\n ) {\r\n var as = options.as,\r\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\r\n integrity =\r\n \"string\" === typeof options.integrity ? options.integrity : void 0,\r\n fetchPriority =\r\n \"string\" === typeof options.fetchPriority\r\n ? options.fetchPriority\r\n : void 0;\r\n \"style\" === as\r\n ? Internals.d.S(\r\n href,\r\n \"string\" === typeof options.precedence\r\n ? options.precedence\r\n : void 0,\r\n {\r\n crossOrigin: crossOrigin,\r\n integrity: integrity,\r\n fetchPriority: fetchPriority\r\n }\r\n )\r\n : \"script\" === as &&\r\n Internals.d.X(href, {\r\n crossOrigin: crossOrigin,\r\n integrity: integrity,\r\n fetchPriority: fetchPriority,\r\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\r\n });\r\n }\r\n };\r\n exports.preinitModule = function (href, options) {\r\n var encountered = \"\";\r\n (\"string\" === typeof href && href) ||\r\n (encountered +=\r\n \" The `href` argument encountered was \" +\r\n getValueDescriptorExpectingObjectForWarning(href) +\r\n \".\");\r\n void 0 !== options && \"object\" !== typeof options\r\n ? (encountered +=\r\n \" The `options` argument encountered was \" +\r\n getValueDescriptorExpectingObjectForWarning(options) +\r\n \".\")\r\n : options &&\r\n \"as\" in options &&\r\n \"script\" !== options.as &&\r\n (encountered +=\r\n \" The `as` option encountered was \" +\r\n getValueDescriptorExpectingEnumForWarning(options.as) +\r\n \".\");\r\n if (encountered)\r\n console.error(\r\n \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\r\n encountered\r\n );\r\n else\r\n switch (\r\n ((encountered =\r\n options && \"string\" === typeof options.as ? options.as : \"script\"),\r\n encountered)\r\n ) {\r\n case \"script\":\r\n break;\r\n default:\r\n (encountered =\r\n getValueDescriptorExpectingEnumForWarning(encountered)),\r\n console.error(\r\n 'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\r\n encountered,\r\n href\r\n );\r\n }\r\n if (\"string\" === typeof href)\r\n if (\"object\" === typeof options && null !== options) {\r\n if (null == options.as || \"script\" === options.as)\r\n (encountered = getCrossOriginStringAs(\r\n options.as,\r\n options.crossOrigin\r\n )),\r\n Internals.d.M(href, {\r\n crossOrigin: encountered,\r\n integrity:\r\n \"string\" === typeof options.integrity\r\n ? options.integrity\r\n : void 0,\r\n nonce:\r\n \"string\" === typeof options.nonce ? options.nonce : void 0\r\n });\r\n } else null == options && Internals.d.M(href);\r\n };\r\n exports.preload = function (href, options) {\r\n var encountered = \"\";\r\n (\"string\" === typeof href && href) ||\r\n (encountered +=\r\n \" The `href` argument encountered was \" +\r\n getValueDescriptorExpectingObjectForWarning(href) +\r\n \".\");\r\n null == options || \"object\" !== typeof options\r\n ? (encountered +=\r\n \" The `options` argument encountered was \" +\r\n getValueDescriptorExpectingObjectForWarning(options) +\r\n \".\")\r\n : (\"string\" === typeof options.as && options.as) ||\r\n (encountered +=\r\n \" The `as` option encountered was \" +\r\n getValueDescriptorExpectingObjectForWarning(options.as) +\r\n \".\");\r\n encountered &&\r\n console.error(\r\n 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `` tag.%s',\r\n encountered\r\n );\r\n if (\r\n \"string\" === typeof href &&\r\n \"object\" === typeof options &&\r\n null !== options &&\r\n \"string\" === typeof options.as\r\n ) {\r\n encountered = options.as;\r\n var crossOrigin = getCrossOriginStringAs(\r\n encountered,\r\n options.crossOrigin\r\n );\r\n Internals.d.L(href, encountered, {\r\n crossOrigin: crossOrigin,\r\n integrity:\r\n \"string\" === typeof options.integrity ? options.integrity : void 0,\r\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\r\n type: \"string\" === typeof options.type ? options.type : void 0,\r\n fetchPriority:\r\n \"string\" === typeof options.fetchPriority\r\n ? options.fetchPriority\r\n : void 0,\r\n referrerPolicy:\r\n \"string\" === typeof options.referrerPolicy\r\n ? options.referrerPolicy\r\n : void 0,\r\n imageSrcSet:\r\n \"string\" === typeof options.imageSrcSet\r\n ? options.imageSrcSet\r\n : void 0,\r\n imageSizes:\r\n \"string\" === typeof options.imageSizes\r\n ? options.imageSizes\r\n : void 0,\r\n media: \"string\" === typeof options.media ? options.media : void 0\r\n });\r\n }\r\n };\r\n exports.preloadModule = function (href, options) {\r\n var encountered = \"\";\r\n (\"string\" === typeof href && href) ||\r\n (encountered +=\r\n \" The `href` argument encountered was \" +\r\n getValueDescriptorExpectingObjectForWarning(href) +\r\n \".\");\r\n void 0 !== options && \"object\" !== typeof options\r\n ? (encountered +=\r\n \" The `options` argument encountered was \" +\r\n getValueDescriptorExpectingObjectForWarning(options) +\r\n \".\")\r\n : options &&\r\n \"as\" in options &&\r\n \"string\" !== typeof options.as &&\r\n (encountered +=\r\n \" The `as` option encountered was \" +\r\n getValueDescriptorExpectingObjectForWarning(options.as) +\r\n \".\");\r\n encountered &&\r\n console.error(\r\n 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s',\r\n encountered\r\n );\r\n \"string\" === typeof href &&\r\n (options\r\n ? ((encountered = getCrossOriginStringAs(\r\n options.as,\r\n options.crossOrigin\r\n )),\r\n Internals.d.m(href, {\r\n as:\r\n \"string\" === typeof options.as && \"script\" !== options.as\r\n ? options.as\r\n : void 0,\r\n crossOrigin: encountered,\r\n integrity:\r\n \"string\" === typeof options.integrity\r\n ? options.integrity\r\n : void 0\r\n }))\r\n : Internals.d.m(href));\r\n };\r\n exports.requestFormReset = function (form) {\r\n Internals.d.r(form);\r\n };\r\n exports.unstable_batchedUpdates = function (fn, a) {\r\n return fn(a);\r\n };\r\n exports.useFormState = function (action, initialState, permalink) {\r\n return resolveDispatcher().useFormState(action, initialState, permalink);\r\n };\r\n exports.useFormStatus = function () {\r\n return resolveDispatcher().useHostTransitionStatus();\r\n };\r\n exports.version = \"19.1.0\";\r\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\r\n \"function\" ===\r\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\r\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\r\n })();\r\n", "'use strict';\r\n\r\nfunction checkDCE() {\r\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\r\n if (\r\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\r\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\r\n ) {\r\n return;\r\n }\r\n if (process.env.NODE_ENV !== 'production') {\r\n // This branch is unreachable because this function is only called\r\n // in production, but the condition is true only in development.\r\n // Therefore if the branch is still here, dead code elimination wasn't\r\n // properly applied.\r\n // Don't change the message. React DevTools relies on it. Also make sure\r\n // this message doesn't occur elsewhere in this function, or it will cause\r\n // a false positive.\r\n throw new Error('^_^');\r\n }\r\n try {\r\n // Verify that the code above has been dead code eliminated (DCE'd).\r\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\r\n } catch (err) {\r\n // DevTools shouldn't crash React, no matter what.\r\n // We should still report in case we break this code.\r\n console.error(err);\r\n }\r\n}\r\n\r\nif (process.env.NODE_ENV === 'production') {\r\n // DCE check should happen before ReactDOM bundle executes so that\r\n // DevTools can report bad minification during injection.\r\n checkDCE();\r\n module.exports = require('./cjs/react-dom.production.js');\r\n} else {\r\n module.exports = require('./cjs/react-dom.development.js');\r\n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A,IACnB,OAAO;AACL,aAAO,UAAU;AAAA,IACnB;AAAA;AAAA;", + "names": [] +} diff --git a/node_modules/.vite/deps/chunk-V62QEVPD.js b/node_modules/.vite/deps/chunk-V62QEVPD.js new file mode 100644 index 0000000..4818cb4 --- /dev/null +++ b/node_modules/.vite/deps/chunk-V62QEVPD.js @@ -0,0 +1,996 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// node_modules/react/cjs/react.development.js +var require_react_development = __commonJS({ + "node_modules/react/cjs/react.development.js"(exports, module) { + "use strict"; + (function() { + function defineDeprecationWarning(methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function() { + console.warn( + "%s(...) is deprecated in plain JavaScript React classes. %s", + info[0], + info[1] + ); + } + }); + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function warnNoop(publicInstance, callerName) { + publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass"; + var warningKey = publicInstance + "." + callerName; + didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error( + "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", + callerName, + publicInstance + ), didWarnStateUpdateForUnmountedComponent[warningKey] = true); + } + function Component(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + function ComponentDummy() { + } + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + try { + testStringCoercion(value); + var JSCompiler_inline_result = false; + } catch (e) { + JSCompiler_inline_result = true; + } + if (JSCompiler_inline_result) { + JSCompiler_inline_result = console; + var JSCompiler_temp_const = JSCompiler_inline_result.error; + var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + JSCompiler_temp_const.call( + JSCompiler_inline_result, + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + JSCompiler_inline_result$jscomp$0 + ); + return testStringCoercion(value); + } + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + } + if ("object" === typeof type) + switch ("number" === typeof type.tag && console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), type.$$typeof) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return (type.displayName || "Context") + ".Provider"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); + return type; + case REACT_MEMO_TYPE: + return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) { + } + } + return null; + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) + return "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function getOwner() { + var dispatcher = ReactSharedInternals.A; + return null === dispatcher ? null : dispatcher.getOwner(); + } + function UnknownOwner() { + return Error("react-stack-top-frame"); + } + function hasValidKey(config) { + if (hasOwnProperty.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) return false; + } + return void 0 !== config.key; + } + function defineKeyPropWarningGetter(props, displayName) { + function warnAboutAccessingKey() { + specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error( + "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", + displayName + )); + } + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + function elementRefGetterWithDeprecationWarning() { + var componentName = getComponentNameFromType(this.type); + didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error( + "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." + )); + componentName = this.props.ref; + return void 0 !== componentName ? componentName : null; + } + function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) { + self = props.ref; + type = { + $$typeof: REACT_ELEMENT_TYPE, + type, + key, + props, + _owner: owner + }; + null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", { + enumerable: false, + get: elementRefGetterWithDeprecationWarning + }) : Object.defineProperty(type, "ref", { enumerable: false, value: null }); + type._store = {}; + Object.defineProperty(type._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: 0 + }); + Object.defineProperty(type, "_debugInfo", { + configurable: false, + enumerable: false, + writable: true, + value: null + }); + Object.defineProperty(type, "_debugStack", { + configurable: false, + enumerable: false, + writable: true, + value: debugStack + }); + Object.defineProperty(type, "_debugTask", { + configurable: false, + enumerable: false, + writable: true, + value: debugTask + }); + Object.freeze && (Object.freeze(type.props), Object.freeze(type)); + return type; + } + function cloneAndReplaceKey(oldElement, newKey) { + newKey = ReactElement( + oldElement.type, + newKey, + void 0, + void 0, + oldElement._owner, + oldElement.props, + oldElement._debugStack, + oldElement._debugTask + ); + oldElement._store && (newKey._store.validated = oldElement._store.validated); + return newKey; + } + function isValidElement(object) { + return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; + } + function escape(key) { + var escaperLookup = { "=": "=0", ":": "=2" }; + return "$" + key.replace(/[=:]/g, function(match) { + return escaperLookup[match]; + }); + } + function getElementKey(element, index) { + return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36); + } + function noop$1() { + } + function resolveThenable(thenable) { + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then( + function(fulfilledValue) { + "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue); + }, + function(error) { + "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error); + } + )), thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + } + throw thenable; + } + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if ("undefined" === type || "boolean" === type) children = null; + var invokeCallback = false; + if (null === children) invokeCallback = true; + else + switch (type) { + case "bigint": + case "string": + case "number": + invokeCallback = true; + break; + case "object": + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + break; + case REACT_LAZY_TYPE: + return invokeCallback = children._init, mapIntoArray( + invokeCallback(children._payload), + array, + escapedPrefix, + nameSoFar, + callback + ); + } + } + if (invokeCallback) { + invokeCallback = children; + callback = callback(invokeCallback); + var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar; + isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) { + return c; + })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey( + callback, + escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace( + userProvidedKeyEscapeRegex, + "$&/" + ) + "/") + childKey + ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback)); + return 1; + } + invokeCallback = 0; + childKey = "" === nameSoFar ? "." : nameSoFar + ":"; + if (isArrayImpl(children)) + for (var i = 0; i < children.length; i++) + nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray( + nameSoFar, + array, + escapedPrefix, + type, + callback + ); + else if (i = getIteratorFn(children), "function" === typeof i) + for (i === children.entries && (didWarnAboutMaps || console.warn( + "Using Maps as children is not supported. Use an array of keyed ReactElements instead." + ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) + nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray( + nameSoFar, + array, + escapedPrefix, + type, + callback + ); + else if ("object" === type) { + if ("function" === typeof children.then) + return mapIntoArray( + resolveThenable(children), + array, + escapedPrefix, + nameSoFar, + callback + ); + array = String(children); + throw Error( + "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead." + ); + } + return invokeCallback; + } + function mapChildren(children, func, context) { + if (null == children) return children; + var result = [], count = 0; + mapIntoArray(children, result, "", "", function(child) { + return func.call(context, child, count++); + }); + return result; + } + function lazyInitializer(payload) { + if (-1 === payload._status) { + var ctor = payload._result; + ctor = ctor(); + ctor.then( + function(moduleObject) { + if (0 === payload._status || -1 === payload._status) + payload._status = 1, payload._result = moduleObject; + }, + function(error) { + if (0 === payload._status || -1 === payload._status) + payload._status = 2, payload._result = error; + } + ); + -1 === payload._status && (payload._status = 0, payload._result = ctor); + } + if (1 === payload._status) + return ctor = payload._result, void 0 === ctor && console.error( + "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", + ctor + ), "default" in ctor || console.error( + "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", + ctor + ), ctor.default; + throw payload._result; + } + function resolveDispatcher() { + var dispatcher = ReactSharedInternals.H; + null === dispatcher && console.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." + ); + return dispatcher; + } + function noop() { + } + function enqueueTask(task) { + if (null === enqueueTaskImpl) + try { + var requireString = ("require" + Math.random()).slice(0, 7); + enqueueTaskImpl = (module && module[requireString]).call( + module, + "timers" + ).setImmediate; + } catch (_err) { + enqueueTaskImpl = function(callback) { + false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error( + "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning." + )); + var channel = new MessageChannel(); + channel.port1.onmessage = callback; + channel.port2.postMessage(void 0); + }; + } + return enqueueTaskImpl(task); + } + function aggregateErrors(errors) { + return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0]; + } + function popActScope(prevActQueue, prevActScopeDepth) { + prevActScopeDepth !== actScopeDepth - 1 && console.error( + "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. " + ); + actScopeDepth = prevActScopeDepth; + } + function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { + var queue = ReactSharedInternals.actQueue; + if (null !== queue) + if (0 !== queue.length) + try { + flushActQueue(queue); + enqueueTask(function() { + return recursivelyFlushAsyncActWork(returnValue, resolve, reject); + }); + return; + } catch (error) { + ReactSharedInternals.thrownErrors.push(error); + } + else ReactSharedInternals.actQueue = null; + 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue); + } + function flushActQueue(queue) { + if (!isFlushing) { + isFlushing = true; + var i = 0; + try { + for (; i < queue.length; i++) { + var callback = queue[i]; + do { + ReactSharedInternals.didUsePromise = false; + var continuation = callback(false); + if (null !== continuation) { + if (ReactSharedInternals.didUsePromise) { + queue[i] = callback; + queue.splice(0, i); + return; + } + callback = continuation; + } else break; + } while (1); + } + queue.length = 0; + } catch (error) { + queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error); + } finally { + isFlushing = false; + } + } + } + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); + var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + Symbol.for("react.provider"); + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = { + isMounted: function() { + return false; + }, + enqueueForceUpdate: function(publicInstance) { + warnNoop(publicInstance, "forceUpdate"); + }, + enqueueReplaceState: function(publicInstance) { + warnNoop(publicInstance, "replaceState"); + }, + enqueueSetState: function(publicInstance) { + warnNoop(publicInstance, "setState"); + } + }, assign = Object.assign, emptyObject = {}; + Object.freeze(emptyObject); + Component.prototype.isReactComponent = {}; + Component.prototype.setState = function(partialState, callback) { + if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) + throw Error( + "takes an object of state variables to update or a function which returns an object of state variables." + ); + this.updater.enqueueSetState(this, partialState, callback, "setState"); + }; + Component.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); + }; + var deprecatedAPIs = { + isMounted: [ + "isMounted", + "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks." + ], + replaceState: [ + "replaceState", + "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)." + ] + }, fnName; + for (fnName in deprecatedAPIs) + deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + ComponentDummy.prototype = Component.prototype; + deprecatedAPIs = PureComponent.prototype = new ComponentDummy(); + deprecatedAPIs.constructor = PureComponent; + assign(deprecatedAPIs, Component.prototype); + deprecatedAPIs.isPureReactComponent = true; + var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = { + H: null, + A: null, + T: null, + S: null, + V: null, + actQueue: null, + isBatchingLegacy: false, + didScheduleLegacyUpdate: false, + didUsePromise: false, + thrownErrors: [], + getCurrentStack: null, + recentlyCreatedOwnerStacks: 0 + }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() { + return null; + }; + deprecatedAPIs = { + "react-stack-bottom-frame": function(callStackForError) { + return callStackForError(); + } + }; + var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime; + var didWarnAboutElementRef = {}; + var unknownOwnerDebugStack = deprecatedAPIs["react-stack-bottom-frame"].bind(deprecatedAPIs, UnknownOwner)(); + var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner)); + var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) { + if ("object" === typeof window && "function" === typeof window.ErrorEvent) { + var event = new window.ErrorEvent("error", { + bubbles: true, + cancelable: true, + message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error), + error + }); + if (!window.dispatchEvent(event)) return; + } else if ("object" === typeof process && "function" === typeof process.emit) { + process.emit("uncaughtException", error); + return; + } + console.error(error); + }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) { + queueMicrotask(function() { + return queueMicrotask(callback); + }); + } : enqueueTask; + deprecatedAPIs = Object.freeze({ + __proto__: null, + c: function(size) { + return resolveDispatcher().useMemoCache(size); + } + }); + exports.Children = { + map: mapChildren, + forEach: function(children, forEachFunc, forEachContext) { + mapChildren( + children, + function() { + forEachFunc.apply(this, arguments); + }, + forEachContext + ); + }, + count: function(children) { + var n = 0; + mapChildren(children, function() { + n++; + }); + return n; + }, + toArray: function(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + }, + only: function(children) { + if (!isValidElement(children)) + throw Error( + "React.Children.only expected to receive a single React element child." + ); + return children; + } + }; + exports.Component = Component; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.Profiler = REACT_PROFILER_TYPE; + exports.PureComponent = PureComponent; + exports.StrictMode = REACT_STRICT_MODE_TYPE; + exports.Suspense = REACT_SUSPENSE_TYPE; + exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; + exports.__COMPILER_RUNTIME = deprecatedAPIs; + exports.act = function(callback) { + var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth; + actScopeDepth++; + var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false; + try { + var result = callback(); + } catch (error) { + ReactSharedInternals.thrownErrors.push(error); + } + if (0 < ReactSharedInternals.thrownErrors.length) + throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; + if (null !== result && "object" === typeof result && "function" === typeof result.then) { + var thenable = result; + queueSeveralMicrotasks(function() { + didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error( + "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);" + )); + }); + return { + then: function(resolve, reject) { + didAwaitActCall = true; + thenable.then( + function(returnValue) { + popActScope(prevActQueue, prevActScopeDepth); + if (0 === prevActScopeDepth) { + try { + flushActQueue(queue), enqueueTask(function() { + return recursivelyFlushAsyncActWork( + returnValue, + resolve, + reject + ); + }); + } catch (error$0) { + ReactSharedInternals.thrownErrors.push(error$0); + } + if (0 < ReactSharedInternals.thrownErrors.length) { + var _thrownError = aggregateErrors( + ReactSharedInternals.thrownErrors + ); + ReactSharedInternals.thrownErrors.length = 0; + reject(_thrownError); + } + } else resolve(returnValue); + }, + function(error) { + popActScope(prevActQueue, prevActScopeDepth); + 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors( + ReactSharedInternals.thrownErrors + ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error); + } + ); + } + }; + } + var returnValue$jscomp$0 = result; + popActScope(prevActQueue, prevActScopeDepth); + 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() { + didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error( + "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)" + )); + }), ReactSharedInternals.actQueue = null); + if (0 < ReactSharedInternals.thrownErrors.length) + throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; + return { + then: function(resolve, reject) { + didAwaitActCall = true; + 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() { + return recursivelyFlushAsyncActWork( + returnValue$jscomp$0, + resolve, + reject + ); + })) : resolve(returnValue$jscomp$0); + } + }; + }; + exports.cache = function(fn) { + return function() { + return fn.apply(null, arguments); + }; + }; + exports.captureOwnerStack = function() { + var getCurrentStack = ReactSharedInternals.getCurrentStack; + return null === getCurrentStack ? null : getCurrentStack(); + }; + exports.cloneElement = function(element, config, children) { + if (null === element || void 0 === element) + throw Error( + "The argument must be a React element, but you passed " + element + "." + ); + var props = assign({}, element.props), key = element.key, owner = element._owner; + if (null != config) { + var JSCompiler_inline_result; + a: { + if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor( + config, + "ref" + ).get) && JSCompiler_inline_result.isReactWarning) { + JSCompiler_inline_result = false; + break a; + } + JSCompiler_inline_result = void 0 !== config.ref; + } + JSCompiler_inline_result && (owner = getOwner()); + hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key); + for (propName in config) + !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]); + } + var propName = arguments.length - 2; + if (1 === propName) props.children = children; + else if (1 < propName) { + JSCompiler_inline_result = Array(propName); + for (var i = 0; i < propName; i++) + JSCompiler_inline_result[i] = arguments[i + 2]; + props.children = JSCompiler_inline_result; + } + props = ReactElement( + element.type, + key, + void 0, + void 0, + owner, + props, + element._debugStack, + element._debugTask + ); + for (key = 2; key < arguments.length; key++) + owner = arguments[key], isValidElement(owner) && owner._store && (owner._store.validated = 1); + return props; + }; + exports.createContext = function(defaultValue) { + defaultValue = { + $$typeof: REACT_CONTEXT_TYPE, + _currentValue: defaultValue, + _currentValue2: defaultValue, + _threadCount: 0, + Provider: null, + Consumer: null + }; + defaultValue.Provider = defaultValue; + defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + }; + defaultValue._currentRenderer = null; + defaultValue._currentRenderer2 = null; + return defaultValue; + }; + exports.createElement = function(type, config, children) { + for (var i = 2; i < arguments.length; i++) { + var node = arguments[i]; + isValidElement(node) && node._store && (node._store.validated = 1); + } + i = {}; + node = null; + if (null != config) + for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn( + "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform" + )), hasValidKey(config) && (checkKeyStringCoercion(config.key), node = "" + config.key), config) + hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]); + var childrenLength = arguments.length - 2; + if (1 === childrenLength) i.children = children; + else if (1 < childrenLength) { + for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++) + childArray[_i] = arguments[_i + 2]; + Object.freeze && Object.freeze(childArray); + i.children = childArray; + } + if (type && type.defaultProps) + for (propName in childrenLength = type.defaultProps, childrenLength) + void 0 === i[propName] && (i[propName] = childrenLength[propName]); + node && defineKeyPropWarningGetter( + i, + "function" === typeof type ? type.displayName || type.name || "Unknown" : type + ); + var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++; + return ReactElement( + type, + node, + void 0, + void 0, + getOwner(), + i, + propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, + propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask + ); + }; + exports.createRef = function() { + var refObject = { current: null }; + Object.seal(refObject); + return refObject; + }; + exports.forwardRef = function(render) { + null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error( + "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))." + ) : "function" !== typeof render ? console.error( + "forwardRef requires a render function but was given %s.", + null === render ? "null" : typeof render + ) : 0 !== render.length && 2 !== render.length && console.error( + "forwardRef render functions accept exactly two parameters: props and ref. %s", + 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined." + ); + null != render && null != render.defaultProps && console.error( + "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?" + ); + var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name); + } + }); + return elementType; + }; + exports.isValidElement = isValidElement; + exports.lazy = function(ctor) { + return { + $$typeof: REACT_LAZY_TYPE, + _payload: { _status: -1, _result: ctor }, + _init: lazyInitializer + }; + }; + exports.memo = function(type, compare) { + null == type && console.error( + "memo: The first argument must be a component. Instead received: %s", + null === type ? "null" : typeof type + ); + compare = { + $$typeof: REACT_MEMO_TYPE, + type, + compare: void 0 === compare ? null : compare + }; + var ownName; + Object.defineProperty(compare, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name); + } + }); + return compare; + }; + exports.startTransition = function(scope) { + var prevTransition = ReactSharedInternals.T, currentTransition = {}; + ReactSharedInternals.T = currentTransition; + currentTransition._updatedFibers = /* @__PURE__ */ new Set(); + try { + var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); + "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError); + } catch (error) { + reportGlobalError(error); + } finally { + null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && 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." + )), ReactSharedInternals.T = prevTransition; + } + }; + exports.unstable_useCacheRefresh = function() { + return resolveDispatcher().useCacheRefresh(); + }; + exports.use = function(usable) { + return resolveDispatcher().use(usable); + }; + exports.useActionState = function(action, initialState, permalink) { + return resolveDispatcher().useActionState( + action, + initialState, + permalink + ); + }; + exports.useCallback = function(callback, deps) { + return resolveDispatcher().useCallback(callback, deps); + }; + exports.useContext = function(Context) { + var dispatcher = resolveDispatcher(); + Context.$$typeof === REACT_CONSUMER_TYPE && console.error( + "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?" + ); + return dispatcher.useContext(Context); + }; + exports.useDebugValue = function(value, formatterFn) { + return resolveDispatcher().useDebugValue(value, formatterFn); + }; + exports.useDeferredValue = function(value, initialValue) { + return resolveDispatcher().useDeferredValue(value, initialValue); + }; + exports.useEffect = function(create, createDeps, update) { + null == create && console.warn( + "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?" + ); + var dispatcher = resolveDispatcher(); + if ("function" === typeof update) + throw Error( + "useEffect CRUD overload is not enabled in this build of React." + ); + return dispatcher.useEffect(create, createDeps); + }; + exports.useId = function() { + return resolveDispatcher().useId(); + }; + exports.useImperativeHandle = function(ref, create, deps) { + return resolveDispatcher().useImperativeHandle(ref, create, deps); + }; + exports.useInsertionEffect = function(create, deps) { + null == create && console.warn( + "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?" + ); + return resolveDispatcher().useInsertionEffect(create, deps); + }; + exports.useLayoutEffect = function(create, deps) { + null == create && console.warn( + "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?" + ); + return resolveDispatcher().useLayoutEffect(create, deps); + }; + exports.useMemo = function(create, deps) { + return resolveDispatcher().useMemo(create, deps); + }; + exports.useOptimistic = function(passthrough, reducer) { + return resolveDispatcher().useOptimistic(passthrough, reducer); + }; + exports.useReducer = function(reducer, initialArg, init) { + return resolveDispatcher().useReducer(reducer, initialArg, init); + }; + exports.useRef = function(initialValue) { + return resolveDispatcher().useRef(initialValue); + }; + exports.useState = function(initialState) { + return resolveDispatcher().useState(initialState); + }; + exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) { + return resolveDispatcher().useSyncExternalStore( + subscribe, + getSnapshot, + getServerSnapshot + ); + }; + exports.useTransition = function() { + return resolveDispatcher().useTransition(); + }; + exports.version = "19.1.0"; + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); + })(); + } +}); + +// node_modules/react/index.js +var require_react = __commonJS({ + "node_modules/react/index.js"(exports, module) { + if (false) { + module.exports = null; + } else { + module.exports = require_react_development(); + } + } +}); + +export { + __commonJS, + __toESM, + require_react +}; +/*! Bundled license information: + +react/cjs/react.development.js: + (** + * @license React + * react.development.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) +*/ +//# sourceMappingURL=chunk-V62QEVPD.js.map diff --git a/node_modules/.vite/deps/chunk-V62QEVPD.js.map b/node_modules/.vite/deps/chunk-V62QEVPD.js.map new file mode 100644 index 0000000..6227395 --- /dev/null +++ b/node_modules/.vite/deps/chunk-V62QEVPD.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../react/cjs/react.development.js", "../../react/index.js"], + "sourcesContent": ["/**\r\n * @license React\r\n * react.development.js\r\n *\r\n * Copyright (c) Meta Platforms, Inc. and affiliates.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\n\"use strict\";\r\n\"production\" !== process.env.NODE_ENV &&\r\n (function () {\r\n function defineDeprecationWarning(methodName, info) {\r\n Object.defineProperty(Component.prototype, methodName, {\r\n get: function () {\r\n console.warn(\r\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\r\n info[0],\r\n info[1]\r\n );\r\n }\r\n });\r\n }\r\n function getIteratorFn(maybeIterable) {\r\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\r\n return null;\r\n maybeIterable =\r\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\r\n maybeIterable[\"@@iterator\"];\r\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\r\n }\r\n function warnNoop(publicInstance, callerName) {\r\n publicInstance =\r\n ((publicInstance = publicInstance.constructor) &&\r\n (publicInstance.displayName || publicInstance.name)) ||\r\n \"ReactClass\";\r\n var warningKey = publicInstance + \".\" + callerName;\r\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\r\n (console.error(\r\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\r\n callerName,\r\n publicInstance\r\n ),\r\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\r\n }\r\n function Component(props, context, updater) {\r\n this.props = props;\r\n this.context = context;\r\n this.refs = emptyObject;\r\n this.updater = updater || ReactNoopUpdateQueue;\r\n }\r\n function ComponentDummy() {}\r\n function PureComponent(props, context, updater) {\r\n this.props = props;\r\n this.context = context;\r\n this.refs = emptyObject;\r\n this.updater = updater || ReactNoopUpdateQueue;\r\n }\r\n function testStringCoercion(value) {\r\n return \"\" + value;\r\n }\r\n function checkKeyStringCoercion(value) {\r\n try {\r\n testStringCoercion(value);\r\n var JSCompiler_inline_result = !1;\r\n } catch (e) {\r\n JSCompiler_inline_result = !0;\r\n }\r\n if (JSCompiler_inline_result) {\r\n JSCompiler_inline_result = console;\r\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\r\n var JSCompiler_inline_result$jscomp$0 =\r\n (\"function\" === typeof Symbol &&\r\n Symbol.toStringTag &&\r\n value[Symbol.toStringTag]) ||\r\n value.constructor.name ||\r\n \"Object\";\r\n JSCompiler_temp_const.call(\r\n JSCompiler_inline_result,\r\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\r\n JSCompiler_inline_result$jscomp$0\r\n );\r\n return testStringCoercion(value);\r\n }\r\n }\r\n function getComponentNameFromType(type) {\r\n if (null == type) return null;\r\n if (\"function\" === typeof type)\r\n return type.$$typeof === REACT_CLIENT_REFERENCE\r\n ? null\r\n : type.displayName || type.name || null;\r\n if (\"string\" === typeof type) return type;\r\n switch (type) {\r\n case REACT_FRAGMENT_TYPE:\r\n return \"Fragment\";\r\n case REACT_PROFILER_TYPE:\r\n return \"Profiler\";\r\n case REACT_STRICT_MODE_TYPE:\r\n return \"StrictMode\";\r\n case REACT_SUSPENSE_TYPE:\r\n return \"Suspense\";\r\n case REACT_SUSPENSE_LIST_TYPE:\r\n return \"SuspenseList\";\r\n case REACT_ACTIVITY_TYPE:\r\n return \"Activity\";\r\n }\r\n if (\"object\" === typeof type)\r\n switch (\r\n (\"number\" === typeof type.tag &&\r\n console.error(\r\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\r\n ),\r\n type.$$typeof)\r\n ) {\r\n case REACT_PORTAL_TYPE:\r\n return \"Portal\";\r\n case REACT_CONTEXT_TYPE:\r\n return (type.displayName || \"Context\") + \".Provider\";\r\n case REACT_CONSUMER_TYPE:\r\n return (type._context.displayName || \"Context\") + \".Consumer\";\r\n case REACT_FORWARD_REF_TYPE:\r\n var innerType = type.render;\r\n type = type.displayName;\r\n type ||\r\n ((type = innerType.displayName || innerType.name || \"\"),\r\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\r\n return type;\r\n case REACT_MEMO_TYPE:\r\n return (\r\n (innerType = type.displayName || null),\r\n null !== innerType\r\n ? innerType\r\n : getComponentNameFromType(type.type) || \"Memo\"\r\n );\r\n case REACT_LAZY_TYPE:\r\n innerType = type._payload;\r\n type = type._init;\r\n try {\r\n return getComponentNameFromType(type(innerType));\r\n } catch (x) {}\r\n }\r\n return null;\r\n }\r\n function getTaskName(type) {\r\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\r\n if (\r\n \"object\" === typeof type &&\r\n null !== type &&\r\n type.$$typeof === REACT_LAZY_TYPE\r\n )\r\n return \"<...>\";\r\n try {\r\n var name = getComponentNameFromType(type);\r\n return name ? \"<\" + name + \">\" : \"<...>\";\r\n } catch (x) {\r\n return \"<...>\";\r\n }\r\n }\r\n function getOwner() {\r\n var dispatcher = ReactSharedInternals.A;\r\n return null === dispatcher ? null : dispatcher.getOwner();\r\n }\r\n function UnknownOwner() {\r\n return Error(\"react-stack-top-frame\");\r\n }\r\n function hasValidKey(config) {\r\n if (hasOwnProperty.call(config, \"key\")) {\r\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\r\n if (getter && getter.isReactWarning) return !1;\r\n }\r\n return void 0 !== config.key;\r\n }\r\n function defineKeyPropWarningGetter(props, displayName) {\r\n function warnAboutAccessingKey() {\r\n specialPropKeyWarningShown ||\r\n ((specialPropKeyWarningShown = !0),\r\n console.error(\r\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\r\n displayName\r\n ));\r\n }\r\n warnAboutAccessingKey.isReactWarning = !0;\r\n Object.defineProperty(props, \"key\", {\r\n get: warnAboutAccessingKey,\r\n configurable: !0\r\n });\r\n }\r\n function elementRefGetterWithDeprecationWarning() {\r\n var componentName = getComponentNameFromType(this.type);\r\n didWarnAboutElementRef[componentName] ||\r\n ((didWarnAboutElementRef[componentName] = !0),\r\n console.error(\r\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\r\n ));\r\n componentName = this.props.ref;\r\n return void 0 !== componentName ? componentName : null;\r\n }\r\n function ReactElement(\r\n type,\r\n key,\r\n self,\r\n source,\r\n owner,\r\n props,\r\n debugStack,\r\n debugTask\r\n ) {\r\n self = props.ref;\r\n type = {\r\n $$typeof: REACT_ELEMENT_TYPE,\r\n type: type,\r\n key: key,\r\n props: props,\r\n _owner: owner\r\n };\r\n null !== (void 0 !== self ? self : null)\r\n ? Object.defineProperty(type, \"ref\", {\r\n enumerable: !1,\r\n get: elementRefGetterWithDeprecationWarning\r\n })\r\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\r\n type._store = {};\r\n Object.defineProperty(type._store, \"validated\", {\r\n configurable: !1,\r\n enumerable: !1,\r\n writable: !0,\r\n value: 0\r\n });\r\n Object.defineProperty(type, \"_debugInfo\", {\r\n configurable: !1,\r\n enumerable: !1,\r\n writable: !0,\r\n value: null\r\n });\r\n Object.defineProperty(type, \"_debugStack\", {\r\n configurable: !1,\r\n enumerable: !1,\r\n writable: !0,\r\n value: debugStack\r\n });\r\n Object.defineProperty(type, \"_debugTask\", {\r\n configurable: !1,\r\n enumerable: !1,\r\n writable: !0,\r\n value: debugTask\r\n });\r\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\r\n return type;\r\n }\r\n function cloneAndReplaceKey(oldElement, newKey) {\r\n newKey = ReactElement(\r\n oldElement.type,\r\n newKey,\r\n void 0,\r\n void 0,\r\n oldElement._owner,\r\n oldElement.props,\r\n oldElement._debugStack,\r\n oldElement._debugTask\r\n );\r\n oldElement._store &&\r\n (newKey._store.validated = oldElement._store.validated);\r\n return newKey;\r\n }\r\n function isValidElement(object) {\r\n return (\r\n \"object\" === typeof object &&\r\n null !== object &&\r\n object.$$typeof === REACT_ELEMENT_TYPE\r\n );\r\n }\r\n function escape(key) {\r\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\r\n return (\r\n \"$\" +\r\n key.replace(/[=:]/g, function (match) {\r\n return escaperLookup[match];\r\n })\r\n );\r\n }\r\n function getElementKey(element, index) {\r\n return \"object\" === typeof element &&\r\n null !== element &&\r\n null != element.key\r\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\r\n : index.toString(36);\r\n }\r\n function noop$1() {}\r\n function resolveThenable(thenable) {\r\n switch (thenable.status) {\r\n case \"fulfilled\":\r\n return thenable.value;\r\n case \"rejected\":\r\n throw thenable.reason;\r\n default:\r\n switch (\r\n (\"string\" === typeof thenable.status\r\n ? thenable.then(noop$1, noop$1)\r\n : ((thenable.status = \"pending\"),\r\n thenable.then(\r\n function (fulfilledValue) {\r\n \"pending\" === thenable.status &&\r\n ((thenable.status = \"fulfilled\"),\r\n (thenable.value = fulfilledValue));\r\n },\r\n function (error) {\r\n \"pending\" === thenable.status &&\r\n ((thenable.status = \"rejected\"),\r\n (thenable.reason = error));\r\n }\r\n )),\r\n thenable.status)\r\n ) {\r\n case \"fulfilled\":\r\n return thenable.value;\r\n case \"rejected\":\r\n throw thenable.reason;\r\n }\r\n }\r\n throw thenable;\r\n }\r\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\r\n var type = typeof children;\r\n if (\"undefined\" === type || \"boolean\" === type) children = null;\r\n var invokeCallback = !1;\r\n if (null === children) invokeCallback = !0;\r\n else\r\n switch (type) {\r\n case \"bigint\":\r\n case \"string\":\r\n case \"number\":\r\n invokeCallback = !0;\r\n break;\r\n case \"object\":\r\n switch (children.$$typeof) {\r\n case REACT_ELEMENT_TYPE:\r\n case REACT_PORTAL_TYPE:\r\n invokeCallback = !0;\r\n break;\r\n case REACT_LAZY_TYPE:\r\n return (\r\n (invokeCallback = children._init),\r\n mapIntoArray(\r\n invokeCallback(children._payload),\r\n array,\r\n escapedPrefix,\r\n nameSoFar,\r\n callback\r\n )\r\n );\r\n }\r\n }\r\n if (invokeCallback) {\r\n invokeCallback = children;\r\n callback = callback(invokeCallback);\r\n var childKey =\r\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\r\n isArrayImpl(callback)\r\n ? ((escapedPrefix = \"\"),\r\n null != childKey &&\r\n (escapedPrefix =\r\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\r\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\r\n return c;\r\n }))\r\n : null != callback &&\r\n (isValidElement(callback) &&\r\n (null != callback.key &&\r\n ((invokeCallback && invokeCallback.key === callback.key) ||\r\n checkKeyStringCoercion(callback.key)),\r\n (escapedPrefix = cloneAndReplaceKey(\r\n callback,\r\n escapedPrefix +\r\n (null == callback.key ||\r\n (invokeCallback && invokeCallback.key === callback.key)\r\n ? \"\"\r\n : (\"\" + callback.key).replace(\r\n userProvidedKeyEscapeRegex,\r\n \"$&/\"\r\n ) + \"/\") +\r\n childKey\r\n )),\r\n \"\" !== nameSoFar &&\r\n null != invokeCallback &&\r\n isValidElement(invokeCallback) &&\r\n null == invokeCallback.key &&\r\n invokeCallback._store &&\r\n !invokeCallback._store.validated &&\r\n (escapedPrefix._store.validated = 2),\r\n (callback = escapedPrefix)),\r\n array.push(callback));\r\n return 1;\r\n }\r\n invokeCallback = 0;\r\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\r\n if (isArrayImpl(children))\r\n for (var i = 0; i < children.length; i++)\r\n (nameSoFar = children[i]),\r\n (type = childKey + getElementKey(nameSoFar, i)),\r\n (invokeCallback += mapIntoArray(\r\n nameSoFar,\r\n array,\r\n escapedPrefix,\r\n type,\r\n callback\r\n ));\r\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\r\n for (\r\n i === children.entries &&\r\n (didWarnAboutMaps ||\r\n console.warn(\r\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\r\n ),\r\n (didWarnAboutMaps = !0)),\r\n children = i.call(children),\r\n i = 0;\r\n !(nameSoFar = children.next()).done;\r\n\r\n )\r\n (nameSoFar = nameSoFar.value),\r\n (type = childKey + getElementKey(nameSoFar, i++)),\r\n (invokeCallback += mapIntoArray(\r\n nameSoFar,\r\n array,\r\n escapedPrefix,\r\n type,\r\n callback\r\n ));\r\n else if (\"object\" === type) {\r\n if (\"function\" === typeof children.then)\r\n return mapIntoArray(\r\n resolveThenable(children),\r\n array,\r\n escapedPrefix,\r\n nameSoFar,\r\n callback\r\n );\r\n array = String(children);\r\n throw Error(\r\n \"Objects are not valid as a React child (found: \" +\r\n (\"[object Object]\" === array\r\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\r\n : array) +\r\n \"). If you meant to render a collection of children, use an array instead.\"\r\n );\r\n }\r\n return invokeCallback;\r\n }\r\n function mapChildren(children, func, context) {\r\n if (null == children) return children;\r\n var result = [],\r\n count = 0;\r\n mapIntoArray(children, result, \"\", \"\", function (child) {\r\n return func.call(context, child, count++);\r\n });\r\n return result;\r\n }\r\n function lazyInitializer(payload) {\r\n if (-1 === payload._status) {\r\n var ctor = payload._result;\r\n ctor = ctor();\r\n ctor.then(\r\n function (moduleObject) {\r\n if (0 === payload._status || -1 === payload._status)\r\n (payload._status = 1), (payload._result = moduleObject);\r\n },\r\n function (error) {\r\n if (0 === payload._status || -1 === payload._status)\r\n (payload._status = 2), (payload._result = error);\r\n }\r\n );\r\n -1 === payload._status &&\r\n ((payload._status = 0), (payload._result = ctor));\r\n }\r\n if (1 === payload._status)\r\n return (\r\n (ctor = payload._result),\r\n void 0 === ctor &&\r\n console.error(\r\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\r\n ctor\r\n ),\r\n \"default\" in ctor ||\r\n console.error(\r\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\r\n ctor\r\n ),\r\n ctor.default\r\n );\r\n throw payload._result;\r\n }\r\n function resolveDispatcher() {\r\n var dispatcher = ReactSharedInternals.H;\r\n null === dispatcher &&\r\n console.error(\r\n \"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.\"\r\n );\r\n return dispatcher;\r\n }\r\n function noop() {}\r\n function enqueueTask(task) {\r\n if (null === enqueueTaskImpl)\r\n try {\r\n var requireString = (\"require\" + Math.random()).slice(0, 7);\r\n enqueueTaskImpl = (module && module[requireString]).call(\r\n module,\r\n \"timers\"\r\n ).setImmediate;\r\n } catch (_err) {\r\n enqueueTaskImpl = function (callback) {\r\n !1 === didWarnAboutMessageChannel &&\r\n ((didWarnAboutMessageChannel = !0),\r\n \"undefined\" === typeof MessageChannel &&\r\n console.error(\r\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\r\n ));\r\n var channel = new MessageChannel();\r\n channel.port1.onmessage = callback;\r\n channel.port2.postMessage(void 0);\r\n };\r\n }\r\n return enqueueTaskImpl(task);\r\n }\r\n function aggregateErrors(errors) {\r\n return 1 < errors.length && \"function\" === typeof AggregateError\r\n ? new AggregateError(errors)\r\n : errors[0];\r\n }\r\n function popActScope(prevActQueue, prevActScopeDepth) {\r\n prevActScopeDepth !== actScopeDepth - 1 &&\r\n console.error(\r\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\r\n );\r\n actScopeDepth = prevActScopeDepth;\r\n }\r\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\r\n var queue = ReactSharedInternals.actQueue;\r\n if (null !== queue)\r\n if (0 !== queue.length)\r\n try {\r\n flushActQueue(queue);\r\n enqueueTask(function () {\r\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\r\n });\r\n return;\r\n } catch (error) {\r\n ReactSharedInternals.thrownErrors.push(error);\r\n }\r\n else ReactSharedInternals.actQueue = null;\r\n 0 < ReactSharedInternals.thrownErrors.length\r\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\r\n (ReactSharedInternals.thrownErrors.length = 0),\r\n reject(queue))\r\n : resolve(returnValue);\r\n }\r\n function flushActQueue(queue) {\r\n if (!isFlushing) {\r\n isFlushing = !0;\r\n var i = 0;\r\n try {\r\n for (; i < queue.length; i++) {\r\n var callback = queue[i];\r\n do {\r\n ReactSharedInternals.didUsePromise = !1;\r\n var continuation = callback(!1);\r\n if (null !== continuation) {\r\n if (ReactSharedInternals.didUsePromise) {\r\n queue[i] = callback;\r\n queue.splice(0, i);\r\n return;\r\n }\r\n callback = continuation;\r\n } else break;\r\n } while (1);\r\n }\r\n queue.length = 0;\r\n } catch (error) {\r\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\r\n } finally {\r\n isFlushing = !1;\r\n }\r\n }\r\n }\r\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\r\n \"function\" ===\r\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\r\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\r\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\r\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\r\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\r\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\r\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\r\n Symbol.for(\"react.provider\");\r\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\r\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\r\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\r\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\r\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\r\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\r\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\r\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\r\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\r\n didWarnStateUpdateForUnmountedComponent = {},\r\n ReactNoopUpdateQueue = {\r\n isMounted: function () {\r\n return !1;\r\n },\r\n enqueueForceUpdate: function (publicInstance) {\r\n warnNoop(publicInstance, \"forceUpdate\");\r\n },\r\n enqueueReplaceState: function (publicInstance) {\r\n warnNoop(publicInstance, \"replaceState\");\r\n },\r\n enqueueSetState: function (publicInstance) {\r\n warnNoop(publicInstance, \"setState\");\r\n }\r\n },\r\n assign = Object.assign,\r\n emptyObject = {};\r\n Object.freeze(emptyObject);\r\n Component.prototype.isReactComponent = {};\r\n Component.prototype.setState = function (partialState, callback) {\r\n if (\r\n \"object\" !== typeof partialState &&\r\n \"function\" !== typeof partialState &&\r\n null != partialState\r\n )\r\n throw Error(\r\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\r\n );\r\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\r\n };\r\n Component.prototype.forceUpdate = function (callback) {\r\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\r\n };\r\n var deprecatedAPIs = {\r\n isMounted: [\r\n \"isMounted\",\r\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\r\n ],\r\n replaceState: [\r\n \"replaceState\",\r\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\r\n ]\r\n },\r\n fnName;\r\n for (fnName in deprecatedAPIs)\r\n deprecatedAPIs.hasOwnProperty(fnName) &&\r\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\r\n ComponentDummy.prototype = Component.prototype;\r\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\r\n deprecatedAPIs.constructor = PureComponent;\r\n assign(deprecatedAPIs, Component.prototype);\r\n deprecatedAPIs.isPureReactComponent = !0;\r\n var isArrayImpl = Array.isArray,\r\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\r\n ReactSharedInternals = {\r\n H: null,\r\n A: null,\r\n T: null,\r\n S: null,\r\n V: null,\r\n actQueue: null,\r\n isBatchingLegacy: !1,\r\n didScheduleLegacyUpdate: !1,\r\n didUsePromise: !1,\r\n thrownErrors: [],\r\n getCurrentStack: null,\r\n recentlyCreatedOwnerStacks: 0\r\n },\r\n hasOwnProperty = Object.prototype.hasOwnProperty,\r\n createTask = console.createTask\r\n ? console.createTask\r\n : function () {\r\n return null;\r\n };\r\n deprecatedAPIs = {\r\n \"react-stack-bottom-frame\": function (callStackForError) {\r\n return callStackForError();\r\n }\r\n };\r\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\r\n var didWarnAboutElementRef = {};\r\n var unknownOwnerDebugStack = deprecatedAPIs[\r\n \"react-stack-bottom-frame\"\r\n ].bind(deprecatedAPIs, UnknownOwner)();\r\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\r\n var didWarnAboutMaps = !1,\r\n userProvidedKeyEscapeRegex = /\\/+/g,\r\n reportGlobalError =\r\n \"function\" === typeof reportError\r\n ? reportError\r\n : function (error) {\r\n if (\r\n \"object\" === typeof window &&\r\n \"function\" === typeof window.ErrorEvent\r\n ) {\r\n var event = new window.ErrorEvent(\"error\", {\r\n bubbles: !0,\r\n cancelable: !0,\r\n message:\r\n \"object\" === typeof error &&\r\n null !== error &&\r\n \"string\" === typeof error.message\r\n ? String(error.message)\r\n : String(error),\r\n error: error\r\n });\r\n if (!window.dispatchEvent(event)) return;\r\n } else if (\r\n \"object\" === typeof process &&\r\n \"function\" === typeof process.emit\r\n ) {\r\n process.emit(\"uncaughtException\", error);\r\n return;\r\n }\r\n console.error(error);\r\n },\r\n didWarnAboutMessageChannel = !1,\r\n enqueueTaskImpl = null,\r\n actScopeDepth = 0,\r\n didWarnNoAwaitAct = !1,\r\n isFlushing = !1,\r\n queueSeveralMicrotasks =\r\n \"function\" === typeof queueMicrotask\r\n ? function (callback) {\r\n queueMicrotask(function () {\r\n return queueMicrotask(callback);\r\n });\r\n }\r\n : enqueueTask;\r\n deprecatedAPIs = Object.freeze({\r\n __proto__: null,\r\n c: function (size) {\r\n return resolveDispatcher().useMemoCache(size);\r\n }\r\n });\r\n exports.Children = {\r\n map: mapChildren,\r\n forEach: function (children, forEachFunc, forEachContext) {\r\n mapChildren(\r\n children,\r\n function () {\r\n forEachFunc.apply(this, arguments);\r\n },\r\n forEachContext\r\n );\r\n },\r\n count: function (children) {\r\n var n = 0;\r\n mapChildren(children, function () {\r\n n++;\r\n });\r\n return n;\r\n },\r\n toArray: function (children) {\r\n return (\r\n mapChildren(children, function (child) {\r\n return child;\r\n }) || []\r\n );\r\n },\r\n only: function (children) {\r\n if (!isValidElement(children))\r\n throw Error(\r\n \"React.Children.only expected to receive a single React element child.\"\r\n );\r\n return children;\r\n }\r\n };\r\n exports.Component = Component;\r\n exports.Fragment = REACT_FRAGMENT_TYPE;\r\n exports.Profiler = REACT_PROFILER_TYPE;\r\n exports.PureComponent = PureComponent;\r\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\r\n exports.Suspense = REACT_SUSPENSE_TYPE;\r\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\r\n ReactSharedInternals;\r\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\r\n exports.act = function (callback) {\r\n var prevActQueue = ReactSharedInternals.actQueue,\r\n prevActScopeDepth = actScopeDepth;\r\n actScopeDepth++;\r\n var queue = (ReactSharedInternals.actQueue =\r\n null !== prevActQueue ? prevActQueue : []),\r\n didAwaitActCall = !1;\r\n try {\r\n var result = callback();\r\n } catch (error) {\r\n ReactSharedInternals.thrownErrors.push(error);\r\n }\r\n if (0 < ReactSharedInternals.thrownErrors.length)\r\n throw (\r\n (popActScope(prevActQueue, prevActScopeDepth),\r\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\r\n (ReactSharedInternals.thrownErrors.length = 0),\r\n callback)\r\n );\r\n if (\r\n null !== result &&\r\n \"object\" === typeof result &&\r\n \"function\" === typeof result.then\r\n ) {\r\n var thenable = result;\r\n queueSeveralMicrotasks(function () {\r\n didAwaitActCall ||\r\n didWarnNoAwaitAct ||\r\n ((didWarnNoAwaitAct = !0),\r\n console.error(\r\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\r\n ));\r\n });\r\n return {\r\n then: function (resolve, reject) {\r\n didAwaitActCall = !0;\r\n thenable.then(\r\n function (returnValue) {\r\n popActScope(prevActQueue, prevActScopeDepth);\r\n if (0 === prevActScopeDepth) {\r\n try {\r\n flushActQueue(queue),\r\n enqueueTask(function () {\r\n return recursivelyFlushAsyncActWork(\r\n returnValue,\r\n resolve,\r\n reject\r\n );\r\n });\r\n } catch (error$0) {\r\n ReactSharedInternals.thrownErrors.push(error$0);\r\n }\r\n if (0 < ReactSharedInternals.thrownErrors.length) {\r\n var _thrownError = aggregateErrors(\r\n ReactSharedInternals.thrownErrors\r\n );\r\n ReactSharedInternals.thrownErrors.length = 0;\r\n reject(_thrownError);\r\n }\r\n } else resolve(returnValue);\r\n },\r\n function (error) {\r\n popActScope(prevActQueue, prevActScopeDepth);\r\n 0 < ReactSharedInternals.thrownErrors.length\r\n ? ((error = aggregateErrors(\r\n ReactSharedInternals.thrownErrors\r\n )),\r\n (ReactSharedInternals.thrownErrors.length = 0),\r\n reject(error))\r\n : reject(error);\r\n }\r\n );\r\n }\r\n };\r\n }\r\n var returnValue$jscomp$0 = result;\r\n popActScope(prevActQueue, prevActScopeDepth);\r\n 0 === prevActScopeDepth &&\r\n (flushActQueue(queue),\r\n 0 !== queue.length &&\r\n queueSeveralMicrotasks(function () {\r\n didAwaitActCall ||\r\n didWarnNoAwaitAct ||\r\n ((didWarnNoAwaitAct = !0),\r\n console.error(\r\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\r\n ));\r\n }),\r\n (ReactSharedInternals.actQueue = null));\r\n if (0 < ReactSharedInternals.thrownErrors.length)\r\n throw (\r\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\r\n (ReactSharedInternals.thrownErrors.length = 0),\r\n callback)\r\n );\r\n return {\r\n then: function (resolve, reject) {\r\n didAwaitActCall = !0;\r\n 0 === prevActScopeDepth\r\n ? ((ReactSharedInternals.actQueue = queue),\r\n enqueueTask(function () {\r\n return recursivelyFlushAsyncActWork(\r\n returnValue$jscomp$0,\r\n resolve,\r\n reject\r\n );\r\n }))\r\n : resolve(returnValue$jscomp$0);\r\n }\r\n };\r\n };\r\n exports.cache = function (fn) {\r\n return function () {\r\n return fn.apply(null, arguments);\r\n };\r\n };\r\n exports.captureOwnerStack = function () {\r\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\r\n return null === getCurrentStack ? null : getCurrentStack();\r\n };\r\n exports.cloneElement = function (element, config, children) {\r\n if (null === element || void 0 === element)\r\n throw Error(\r\n \"The argument must be a React element, but you passed \" +\r\n element +\r\n \".\"\r\n );\r\n var props = assign({}, element.props),\r\n key = element.key,\r\n owner = element._owner;\r\n if (null != config) {\r\n var JSCompiler_inline_result;\r\n a: {\r\n if (\r\n hasOwnProperty.call(config, \"ref\") &&\r\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\r\n config,\r\n \"ref\"\r\n ).get) &&\r\n JSCompiler_inline_result.isReactWarning\r\n ) {\r\n JSCompiler_inline_result = !1;\r\n break a;\r\n }\r\n JSCompiler_inline_result = void 0 !== config.ref;\r\n }\r\n JSCompiler_inline_result && (owner = getOwner());\r\n hasValidKey(config) &&\r\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\r\n for (propName in config)\r\n !hasOwnProperty.call(config, propName) ||\r\n \"key\" === propName ||\r\n \"__self\" === propName ||\r\n \"__source\" === propName ||\r\n (\"ref\" === propName && void 0 === config.ref) ||\r\n (props[propName] = config[propName]);\r\n }\r\n var propName = arguments.length - 2;\r\n if (1 === propName) props.children = children;\r\n else if (1 < propName) {\r\n JSCompiler_inline_result = Array(propName);\r\n for (var i = 0; i < propName; i++)\r\n JSCompiler_inline_result[i] = arguments[i + 2];\r\n props.children = JSCompiler_inline_result;\r\n }\r\n props = ReactElement(\r\n element.type,\r\n key,\r\n void 0,\r\n void 0,\r\n owner,\r\n props,\r\n element._debugStack,\r\n element._debugTask\r\n );\r\n for (key = 2; key < arguments.length; key++)\r\n (owner = arguments[key]),\r\n isValidElement(owner) && owner._store && (owner._store.validated = 1);\r\n return props;\r\n };\r\n exports.createContext = function (defaultValue) {\r\n defaultValue = {\r\n $$typeof: REACT_CONTEXT_TYPE,\r\n _currentValue: defaultValue,\r\n _currentValue2: defaultValue,\r\n _threadCount: 0,\r\n Provider: null,\r\n Consumer: null\r\n };\r\n defaultValue.Provider = defaultValue;\r\n defaultValue.Consumer = {\r\n $$typeof: REACT_CONSUMER_TYPE,\r\n _context: defaultValue\r\n };\r\n defaultValue._currentRenderer = null;\r\n defaultValue._currentRenderer2 = null;\r\n return defaultValue;\r\n };\r\n exports.createElement = function (type, config, children) {\r\n for (var i = 2; i < arguments.length; i++) {\r\n var node = arguments[i];\r\n isValidElement(node) && node._store && (node._store.validated = 1);\r\n }\r\n i = {};\r\n node = null;\r\n if (null != config)\r\n for (propName in (didWarnAboutOldJSXRuntime ||\r\n !(\"__self\" in config) ||\r\n \"key\" in config ||\r\n ((didWarnAboutOldJSXRuntime = !0),\r\n console.warn(\r\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\r\n )),\r\n hasValidKey(config) &&\r\n (checkKeyStringCoercion(config.key), (node = \"\" + config.key)),\r\n config))\r\n hasOwnProperty.call(config, propName) &&\r\n \"key\" !== propName &&\r\n \"__self\" !== propName &&\r\n \"__source\" !== propName &&\r\n (i[propName] = config[propName]);\r\n var childrenLength = arguments.length - 2;\r\n if (1 === childrenLength) i.children = children;\r\n else if (1 < childrenLength) {\r\n for (\r\n var childArray = Array(childrenLength), _i = 0;\r\n _i < childrenLength;\r\n _i++\r\n )\r\n childArray[_i] = arguments[_i + 2];\r\n Object.freeze && Object.freeze(childArray);\r\n i.children = childArray;\r\n }\r\n if (type && type.defaultProps)\r\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\r\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\r\n node &&\r\n defineKeyPropWarningGetter(\r\n i,\r\n \"function\" === typeof type\r\n ? type.displayName || type.name || \"Unknown\"\r\n : type\r\n );\r\n var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\r\n return ReactElement(\r\n type,\r\n node,\r\n void 0,\r\n void 0,\r\n getOwner(),\r\n i,\r\n propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\r\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\r\n );\r\n };\r\n exports.createRef = function () {\r\n var refObject = { current: null };\r\n Object.seal(refObject);\r\n return refObject;\r\n };\r\n exports.forwardRef = function (render) {\r\n null != render && render.$$typeof === REACT_MEMO_TYPE\r\n ? console.error(\r\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\r\n )\r\n : \"function\" !== typeof render\r\n ? console.error(\r\n \"forwardRef requires a render function but was given %s.\",\r\n null === render ? \"null\" : typeof render\r\n )\r\n : 0 !== render.length &&\r\n 2 !== render.length &&\r\n console.error(\r\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\r\n 1 === render.length\r\n ? \"Did you forget to use the ref parameter?\"\r\n : \"Any additional parameter will be undefined.\"\r\n );\r\n null != render &&\r\n null != render.defaultProps &&\r\n console.error(\r\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\r\n );\r\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\r\n ownName;\r\n Object.defineProperty(elementType, \"displayName\", {\r\n enumerable: !1,\r\n configurable: !0,\r\n get: function () {\r\n return ownName;\r\n },\r\n set: function (name) {\r\n ownName = name;\r\n render.name ||\r\n render.displayName ||\r\n (Object.defineProperty(render, \"name\", { value: name }),\r\n (render.displayName = name));\r\n }\r\n });\r\n return elementType;\r\n };\r\n exports.isValidElement = isValidElement;\r\n exports.lazy = function (ctor) {\r\n return {\r\n $$typeof: REACT_LAZY_TYPE,\r\n _payload: { _status: -1, _result: ctor },\r\n _init: lazyInitializer\r\n };\r\n };\r\n exports.memo = function (type, compare) {\r\n null == type &&\r\n console.error(\r\n \"memo: The first argument must be a component. Instead received: %s\",\r\n null === type ? \"null\" : typeof type\r\n );\r\n compare = {\r\n $$typeof: REACT_MEMO_TYPE,\r\n type: type,\r\n compare: void 0 === compare ? null : compare\r\n };\r\n var ownName;\r\n Object.defineProperty(compare, \"displayName\", {\r\n enumerable: !1,\r\n configurable: !0,\r\n get: function () {\r\n return ownName;\r\n },\r\n set: function (name) {\r\n ownName = name;\r\n type.name ||\r\n type.displayName ||\r\n (Object.defineProperty(type, \"name\", { value: name }),\r\n (type.displayName = name));\r\n }\r\n });\r\n return compare;\r\n };\r\n exports.startTransition = function (scope) {\r\n var prevTransition = ReactSharedInternals.T,\r\n currentTransition = {};\r\n ReactSharedInternals.T = currentTransition;\r\n currentTransition._updatedFibers = new Set();\r\n try {\r\n var returnValue = scope(),\r\n onStartTransitionFinish = ReactSharedInternals.S;\r\n null !== onStartTransitionFinish &&\r\n onStartTransitionFinish(currentTransition, returnValue);\r\n \"object\" === typeof returnValue &&\r\n null !== returnValue &&\r\n \"function\" === typeof returnValue.then &&\r\n returnValue.then(noop, reportGlobalError);\r\n } catch (error) {\r\n reportGlobalError(error);\r\n } finally {\r\n null === prevTransition &&\r\n currentTransition._updatedFibers &&\r\n ((scope = currentTransition._updatedFibers.size),\r\n currentTransition._updatedFibers.clear(),\r\n 10 < scope &&\r\n console.warn(\r\n \"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.\"\r\n )),\r\n (ReactSharedInternals.T = prevTransition);\r\n }\r\n };\r\n exports.unstable_useCacheRefresh = function () {\r\n return resolveDispatcher().useCacheRefresh();\r\n };\r\n exports.use = function (usable) {\r\n return resolveDispatcher().use(usable);\r\n };\r\n exports.useActionState = function (action, initialState, permalink) {\r\n return resolveDispatcher().useActionState(\r\n action,\r\n initialState,\r\n permalink\r\n );\r\n };\r\n exports.useCallback = function (callback, deps) {\r\n return resolveDispatcher().useCallback(callback, deps);\r\n };\r\n exports.useContext = function (Context) {\r\n var dispatcher = resolveDispatcher();\r\n Context.$$typeof === REACT_CONSUMER_TYPE &&\r\n console.error(\r\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\r\n );\r\n return dispatcher.useContext(Context);\r\n };\r\n exports.useDebugValue = function (value, formatterFn) {\r\n return resolveDispatcher().useDebugValue(value, formatterFn);\r\n };\r\n exports.useDeferredValue = function (value, initialValue) {\r\n return resolveDispatcher().useDeferredValue(value, initialValue);\r\n };\r\n exports.useEffect = function (create, createDeps, update) {\r\n null == create &&\r\n console.warn(\r\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\r\n );\r\n var dispatcher = resolveDispatcher();\r\n if (\"function\" === typeof update)\r\n throw Error(\r\n \"useEffect CRUD overload is not enabled in this build of React.\"\r\n );\r\n return dispatcher.useEffect(create, createDeps);\r\n };\r\n exports.useId = function () {\r\n return resolveDispatcher().useId();\r\n };\r\n exports.useImperativeHandle = function (ref, create, deps) {\r\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\r\n };\r\n exports.useInsertionEffect = function (create, deps) {\r\n null == create &&\r\n console.warn(\r\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\r\n );\r\n return resolveDispatcher().useInsertionEffect(create, deps);\r\n };\r\n exports.useLayoutEffect = function (create, deps) {\r\n null == create &&\r\n console.warn(\r\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\r\n );\r\n return resolveDispatcher().useLayoutEffect(create, deps);\r\n };\r\n exports.useMemo = function (create, deps) {\r\n return resolveDispatcher().useMemo(create, deps);\r\n };\r\n exports.useOptimistic = function (passthrough, reducer) {\r\n return resolveDispatcher().useOptimistic(passthrough, reducer);\r\n };\r\n exports.useReducer = function (reducer, initialArg, init) {\r\n return resolveDispatcher().useReducer(reducer, initialArg, init);\r\n };\r\n exports.useRef = function (initialValue) {\r\n return resolveDispatcher().useRef(initialValue);\r\n };\r\n exports.useState = function (initialState) {\r\n return resolveDispatcher().useState(initialState);\r\n };\r\n exports.useSyncExternalStore = function (\r\n subscribe,\r\n getSnapshot,\r\n getServerSnapshot\r\n ) {\r\n return resolveDispatcher().useSyncExternalStore(\r\n subscribe,\r\n getSnapshot,\r\n getServerSnapshot\r\n );\r\n };\r\n exports.useTransition = function () {\r\n return resolveDispatcher().useTransition();\r\n };\r\n exports.version = \"19.1.0\";\r\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\r\n \"function\" ===\r\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\r\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\r\n })();\r\n", "'use strict';\r\n\r\nif (process.env.NODE_ENV === 'production') {\r\n module.exports = require('./cjs/react.production.js');\r\n} else {\r\n module.exports = require('./cjs/react.development.js');\r\n}\r\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAWA,KACG,WAAY;AACX,eAAS,yBAAyB,YAAY,MAAM;AAClD,eAAO,eAAe,UAAU,WAAW,YAAY;AAAA,UACrD,KAAK,WAAY;AACf,oBAAQ;AAAA,cACN;AAAA,cACA,KAAK,CAAC;AAAA,cACN,KAAK,CAAC;AAAA,YACR;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AACA,eAAS,cAAc,eAAe;AACpC,YAAI,SAAS,iBAAiB,aAAa,OAAO;AAChD,iBAAO;AACT,wBACG,yBAAyB,cAAc,qBAAqB,KAC7D,cAAc,YAAY;AAC5B,eAAO,eAAe,OAAO,gBAAgB,gBAAgB;AAAA,MAC/D;AACA,eAAS,SAAS,gBAAgB,YAAY;AAC5C,0BACI,iBAAiB,eAAe,iBAC/B,eAAe,eAAe,eAAe,SAChD;AACF,YAAI,aAAa,iBAAiB,MAAM;AACxC,gDAAwC,UAAU,MAC/C,QAAQ;AAAA,UACP;AAAA,UACA;AAAA,UACA;AAAA,QACF,GACC,wCAAwC,UAAU,IAAI;AAAA,MAC3D;AACA,eAAS,UAAU,OAAO,SAAS,SAAS;AAC1C,aAAK,QAAQ;AACb,aAAK,UAAU;AACf,aAAK,OAAO;AACZ,aAA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AAQ,IAAI;AAAA,MAC5D;AACA,cAAQ,kBAAkB,SAAU,QAAQ,MAAM;AAChD,gBAAQ,UACN,QAAQ;AAAA,UACN;AAAA,QACF;AACF,eAAO,kBAAkB,EAAE,gBAAgB,QAAQ,IAAI;AAAA,MACzD;AACA,cAAQ,UAAU,SAAU,QAAQ,MAAM;AACxC,eAAO,kBAAkB,EAAE,QAAQ,QAAQ,IAAI;AAAA,MACjD;AACA,cAAQ,gBAAgB,SAAU,aAAa,SAAS;AACtD,eAAO,kBAAkB,EAAE,cAAc,aAAa,OAAO;AAAA,MAC/D;AACA,cAAQ,aAAa,SAAU,SAAS,YAAY,MAAM;AACxD,eAAO,kBAAkB,EAAE,WAAW,SAAS,YAAY,IAAI;AAAA,MACjE;AACA,cAAQ,SAAS,SAAU,cAAc;AACvC,eAAO,kBAAkB,EAAE,OAAO,YAAY;AAAA,MAChD;AACA,cAAQ,WAAW,SAAU,cAAc;AACzC,eAAO,kBAAkB,EAAE,SAAS,YAAY;AAAA,MAClD;AACA,cAAQ,uBAAuB,SAC7B,WACA,aACA,mBACA;AACA,eAAO,kBAAkB,EAAE;AAAA,UACzB;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AACA,cAAQ,gBAAgB,WAAY;AAClC,eAAO,kBAAkB,EAAE,cAAc;AAAA,MAC3C;AACA,cAAQ,UAAU;AAClB,sBAAgB,OAAO,kCACrB,eACE,OAAO,+BAA+B,8BACxC,+BAA+B,2BAA2B,MAAM,CAAC;AAAA,IACrE,GAAG;AAAA;AAAA;;;ACztCL;AAAA;AAEA,QAAI,OAAuC;AACzC,aAAO,UAAU;AAAA,IACnB,OAAO;AACL,aAAO,UAAU;AAAA,IACnB;AAAA;AAAA;", + "names": [] +} diff --git a/node_modules/.vite/deps/react-router-dom.js b/node_modules/.vite/deps/react-router-dom.js new file mode 100644 index 0000000..51bbb24 --- /dev/null +++ b/node_modules/.vite/deps/react-router-dom.js @@ -0,0 +1,12093 @@ +import { + require_react_dom +} from "./chunk-G4HUE2DP.js"; +import { + __commonJS, + __toESM, + require_react +} from "./chunk-V62QEVPD.js"; + +// node_modules/react-router/node_modules/cookie/dist/index.js +var require_dist = __commonJS({ + "node_modules/react-router/node_modules/cookie/dist/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parse = parse2; + exports.serialize = serialize2; + var cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/; + var cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/; + var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i; + var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/; + var __toString = Object.prototype.toString; + var NullObject = (() => { + const C = function() { + }; + C.prototype = /* @__PURE__ */ Object.create(null); + return C; + })(); + function parse2(str, options) { + const obj = new NullObject(); + const len = str.length; + if (len < 2) + return obj; + const dec = (options == null ? void 0 : options.decode) || decode2; + let index = 0; + do { + const eqIdx = str.indexOf("=", index); + if (eqIdx === -1) + break; + const colonIdx = str.indexOf(";", index); + const endIdx = colonIdx === -1 ? len : colonIdx; + if (eqIdx > endIdx) { + index = str.lastIndexOf(";", eqIdx - 1) + 1; + continue; + } + const keyStartIdx = startIndex(str, index, eqIdx); + const keyEndIdx = endIndex(str, eqIdx, keyStartIdx); + const key = str.slice(keyStartIdx, keyEndIdx); + if (obj[key] === void 0) { + let valStartIdx = startIndex(str, eqIdx + 1, endIdx); + let valEndIdx = endIndex(str, endIdx, valStartIdx); + const value = dec(str.slice(valStartIdx, valEndIdx)); + obj[key] = value; + } + index = endIdx + 1; + } while (index < len); + return obj; + } + function startIndex(str, index, max) { + do { + const code = str.charCodeAt(index); + if (code !== 32 && code !== 9) + return index; + } while (++index < max); + return max; + } + function endIndex(str, index, min) { + while (index > min) { + const code = str.charCodeAt(--index); + if (code !== 32 && code !== 9) + return index + 1; + } + return min; + } + function serialize2(name, val, options) { + const enc = (options == null ? void 0 : options.encode) || encodeURIComponent; + if (!cookieNameRegExp.test(name)) { + throw new TypeError(`argument name is invalid: ${name}`); + } + const value = enc(val); + if (!cookieValueRegExp.test(value)) { + throw new TypeError(`argument val is invalid: ${val}`); + } + let str = name + "=" + value; + if (!options) + return str; + if (options.maxAge !== void 0) { + if (!Number.isInteger(options.maxAge)) { + throw new TypeError(`option maxAge is invalid: ${options.maxAge}`); + } + str += "; Max-Age=" + options.maxAge; + } + if (options.domain) { + if (!domainValueRegExp.test(options.domain)) { + throw new TypeError(`option domain is invalid: ${options.domain}`); + } + str += "; Domain=" + options.domain; + } + if (options.path) { + if (!pathValueRegExp.test(options.path)) { + throw new TypeError(`option path is invalid: ${options.path}`); + } + str += "; Path=" + options.path; + } + if (options.expires) { + if (!isDate(options.expires) || !Number.isFinite(options.expires.valueOf())) { + throw new TypeError(`option expires is invalid: ${options.expires}`); + } + str += "; Expires=" + options.expires.toUTCString(); + } + if (options.httpOnly) { + str += "; HttpOnly"; + } + if (options.secure) { + str += "; Secure"; + } + if (options.partitioned) { + str += "; Partitioned"; + } + if (options.priority) { + const priority = typeof options.priority === "string" ? options.priority.toLowerCase() : void 0; + switch (priority) { + case "low": + str += "; Priority=Low"; + break; + case "medium": + str += "; Priority=Medium"; + break; + case "high": + str += "; Priority=High"; + break; + default: + throw new TypeError(`option priority is invalid: ${options.priority}`); + } + } + if (options.sameSite) { + const sameSite = typeof options.sameSite === "string" ? options.sameSite.toLowerCase() : options.sameSite; + switch (sameSite) { + case true: + case "strict": + str += "; SameSite=Strict"; + break; + case "lax": + str += "; SameSite=Lax"; + break; + case "none": + str += "; SameSite=None"; + break; + default: + throw new TypeError(`option sameSite is invalid: ${options.sameSite}`); + } + } + return str; + } + function decode2(str) { + if (str.indexOf("%") === -1) + return str; + try { + return decodeURIComponent(str); + } catch (e) { + return str; + } + } + function isDate(val) { + return __toString.call(val) === "[object Date]"; + } + } +}); + +// node_modules/set-cookie-parser/lib/set-cookie.js +var require_set_cookie = __commonJS({ + "node_modules/set-cookie-parser/lib/set-cookie.js"(exports, module) { + "use strict"; + var defaultParseOptions = { + decodeValues: true, + map: false, + silent: false + }; + function isNonEmptyString(str) { + return typeof str === "string" && !!str.trim(); + } + function parseString(setCookieValue, options) { + var parts = setCookieValue.split(";").filter(isNonEmptyString); + var nameValuePairStr = parts.shift(); + var parsed = parseNameValuePair(nameValuePairStr); + var name = parsed.name; + var value = parsed.value; + options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions; + try { + value = options.decodeValues ? decodeURIComponent(value) : value; + } catch (e) { + console.error( + "set-cookie-parser encountered an error while decoding a cookie with value '" + value + "'. Set options.decodeValues to false to disable this feature.", + e + ); + } + var cookie = { + name, + value + }; + parts.forEach(function(part) { + var sides = part.split("="); + var key = sides.shift().trimLeft().toLowerCase(); + var value2 = sides.join("="); + if (key === "expires") { + cookie.expires = new Date(value2); + } else if (key === "max-age") { + cookie.maxAge = parseInt(value2, 10); + } else if (key === "secure") { + cookie.secure = true; + } else if (key === "httponly") { + cookie.httpOnly = true; + } else if (key === "samesite") { + cookie.sameSite = value2; + } else if (key === "partitioned") { + cookie.partitioned = true; + } else { + cookie[key] = value2; + } + }); + return cookie; + } + function parseNameValuePair(nameValuePairStr) { + var name = ""; + var value = ""; + var nameValueArr = nameValuePairStr.split("="); + if (nameValueArr.length > 1) { + name = nameValueArr.shift(); + value = nameValueArr.join("="); + } else { + value = nameValuePairStr; + } + return { name, value }; + } + function parse2(input, options) { + options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions; + if (!input) { + if (!options.map) { + return []; + } else { + return {}; + } + } + if (input.headers) { + if (typeof input.headers.getSetCookie === "function") { + input = input.headers.getSetCookie(); + } else if (input.headers["set-cookie"]) { + input = input.headers["set-cookie"]; + } else { + var sch = input.headers[Object.keys(input.headers).find(function(key) { + return key.toLowerCase() === "set-cookie"; + })]; + if (!sch && input.headers.cookie && !options.silent) { + console.warn( + "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning." + ); + } + input = sch; + } + } + if (!Array.isArray(input)) { + input = [input]; + } + if (!options.map) { + return input.filter(isNonEmptyString).map(function(str) { + return parseString(str, options); + }); + } else { + var cookies = {}; + return input.filter(isNonEmptyString).reduce(function(cookies2, str) { + var cookie = parseString(str, options); + cookies2[cookie.name] = cookie; + return cookies2; + }, cookies); + } + } + function splitCookiesString2(cookiesString) { + if (Array.isArray(cookiesString)) { + return cookiesString; + } + if (typeof cookiesString !== "string") { + return []; + } + var cookiesStrings = []; + var pos = 0; + var start; + var ch; + var lastComma; + var nextStart; + var cookiesSeparatorFound; + function skipWhitespace() { + while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { + pos += 1; + } + return pos < cookiesString.length; + } + function notSpecialChar() { + ch = cookiesString.charAt(pos); + return ch !== "=" && ch !== ";" && ch !== ","; + } + while (pos < cookiesString.length) { + start = pos; + cookiesSeparatorFound = false; + while (skipWhitespace()) { + ch = cookiesString.charAt(pos); + if (ch === ",") { + lastComma = pos; + pos += 1; + skipWhitespace(); + nextStart = pos; + while (pos < cookiesString.length && notSpecialChar()) { + pos += 1; + } + if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { + cookiesSeparatorFound = true; + pos = nextStart; + cookiesStrings.push(cookiesString.substring(start, lastComma)); + start = pos; + } else { + pos = lastComma + 1; + } + } else { + pos += 1; + } + } + if (!cookiesSeparatorFound || pos >= cookiesString.length) { + cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); + } + } + return cookiesStrings; + } + module.exports = parse2; + module.exports.parse = parse2; + module.exports.parseString = parseString; + module.exports.splitCookiesString = splitCookiesString2; + } +}); + +// node_modules/react-router/dist/development/chunk-D4RADZKF.mjs +var React3 = __toESM(require_react(), 1); +var React = __toESM(require_react(), 1); +var React2 = __toESM(require_react(), 1); +var React10 = __toESM(require_react(), 1); +var React9 = __toESM(require_react(), 1); +var React4 = __toESM(require_react(), 1); +var React8 = __toESM(require_react(), 1); +var React7 = __toESM(require_react(), 1); +var React5 = __toESM(require_react(), 1); +var React6 = __toESM(require_react(), 1); +var React11 = __toESM(require_react(), 1); +var React12 = __toESM(require_react(), 1); +var React13 = __toESM(require_react(), 1); +var import_cookie = __toESM(require_dist(), 1); +var import_set_cookie_parser = __toESM(require_set_cookie(), 1); +var __typeError = (msg) => { + throw TypeError(msg); +}; +var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); +var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); +var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); +var Action = ((Action2) => { + Action2["Pop"] = "POP"; + Action2["Push"] = "PUSH"; + Action2["Replace"] = "REPLACE"; + return Action2; +})(Action || {}); +var PopStateEventType = "popstate"; +function createMemoryHistory(options = {}) { + let { initialEntries = ["/"], initialIndex, v5Compat = false } = options; + let entries; + entries = initialEntries.map( + (entry, index2) => createMemoryLocation( + entry, + typeof entry === "string" ? null : entry.state, + index2 === 0 ? "default" : void 0 + ) + ); + let index = clampIndex( + initialIndex == null ? entries.length - 1 : initialIndex + ); + let action = "POP"; + let listener = null; + function clampIndex(n) { + return Math.min(Math.max(n, 0), entries.length - 1); + } + function getCurrentLocation() { + return entries[index]; + } + function createMemoryLocation(to, state = null, key) { + let location = createLocation( + entries ? getCurrentLocation().pathname : "/", + to, + state, + key + ); + warning( + location.pathname.charAt(0) === "/", + `relative pathnames are not supported in memory history: ${JSON.stringify( + to + )}` + ); + return location; + } + function createHref2(to) { + return typeof to === "string" ? to : createPath(to); + } + let history = { + get index() { + return index; + }, + get action() { + return action; + }, + get location() { + return getCurrentLocation(); + }, + createHref: createHref2, + createURL(to) { + return new URL(createHref2(to), "http://localhost"); + }, + encodeLocation(to) { + let path = typeof to === "string" ? parsePath(to) : to; + return { + pathname: path.pathname || "", + search: path.search || "", + hash: path.hash || "" + }; + }, + push(to, state) { + action = "PUSH"; + let nextLocation = createMemoryLocation(to, state); + index += 1; + entries.splice(index, entries.length, nextLocation); + if (v5Compat && listener) { + listener({ action, location: nextLocation, delta: 1 }); + } + }, + replace(to, state) { + action = "REPLACE"; + let nextLocation = createMemoryLocation(to, state); + entries[index] = nextLocation; + if (v5Compat && listener) { + listener({ action, location: nextLocation, delta: 0 }); + } + }, + go(delta) { + action = "POP"; + let nextIndex = clampIndex(index + delta); + let nextLocation = entries[nextIndex]; + index = nextIndex; + if (listener) { + listener({ action, location: nextLocation, delta }); + } + }, + listen(fn) { + listener = fn; + return () => { + listener = null; + }; + } + }; + return history; +} +function createBrowserHistory(options = {}) { + function createBrowserLocation(window2, globalHistory) { + let { pathname, search, hash } = window2.location; + return createLocation( + "", + { pathname, search, hash }, + // state defaults to `null` because `window.history.state` does + globalHistory.state && globalHistory.state.usr || null, + globalHistory.state && globalHistory.state.key || "default" + ); + } + function createBrowserHref(window2, to) { + return typeof to === "string" ? to : createPath(to); + } + return getUrlBasedHistory( + createBrowserLocation, + createBrowserHref, + null, + options + ); +} +function createHashHistory(options = {}) { + function createHashLocation(window2, globalHistory) { + let { + pathname = "/", + search = "", + hash = "" + } = parsePath(window2.location.hash.substring(1)); + if (!pathname.startsWith("/") && !pathname.startsWith(".")) { + pathname = "/" + pathname; + } + return createLocation( + "", + { pathname, search, hash }, + // state defaults to `null` because `window.history.state` does + globalHistory.state && globalHistory.state.usr || null, + globalHistory.state && globalHistory.state.key || "default" + ); + } + function createHashHref(window2, to) { + let base = window2.document.querySelector("base"); + let href2 = ""; + if (base && base.getAttribute("href")) { + let url = window2.location.href; + let hashIndex = url.indexOf("#"); + href2 = hashIndex === -1 ? url : url.slice(0, hashIndex); + } + return href2 + "#" + (typeof to === "string" ? to : createPath(to)); + } + function validateHashLocation(location, to) { + warning( + location.pathname.charAt(0) === "/", + `relative pathnames are not supported in hash history.push(${JSON.stringify( + to + )})` + ); + } + return getUrlBasedHistory( + createHashLocation, + createHashHref, + validateHashLocation, + options + ); +} +function invariant(value, message) { + if (value === false || value === null || typeof value === "undefined") { + throw new Error(message); + } +} +function warning(cond, message) { + if (!cond) { + if (typeof console !== "undefined") console.warn(message); + try { + throw new Error(message); + } catch (e) { + } + } +} +function createKey() { + return Math.random().toString(36).substring(2, 10); +} +function getHistoryState(location, index) { + return { + usr: location.state, + key: location.key, + idx: index + }; +} +function createLocation(current, to, state = null, key) { + let location = { + pathname: typeof current === "string" ? current : current.pathname, + search: "", + hash: "", + ...typeof to === "string" ? parsePath(to) : to, + state, + // TODO: This could be cleaned up. push/replace should probably just take + // full Locations now and avoid the need to run through this flow at all + // But that's a pretty big refactor to the current test suite so going to + // keep as is for the time being and just let any incoming keys take precedence + key: to && to.key || key || createKey() + }; + return location; +} +function createPath({ + pathname = "/", + search = "", + hash = "" +}) { + if (search && search !== "?") + pathname += search.charAt(0) === "?" ? search : "?" + search; + if (hash && hash !== "#") + pathname += hash.charAt(0) === "#" ? hash : "#" + hash; + return pathname; +} +function parsePath(path) { + let parsedPath = {}; + if (path) { + let hashIndex = path.indexOf("#"); + if (hashIndex >= 0) { + parsedPath.hash = path.substring(hashIndex); + path = path.substring(0, hashIndex); + } + let searchIndex = path.indexOf("?"); + if (searchIndex >= 0) { + parsedPath.search = path.substring(searchIndex); + path = path.substring(0, searchIndex); + } + if (path) { + parsedPath.pathname = path; + } + } + return parsedPath; +} +function getUrlBasedHistory(getLocation, createHref2, validateLocation, options = {}) { + let { window: window2 = document.defaultView, v5Compat = false } = options; + let globalHistory = window2.history; + let action = "POP"; + let listener = null; + let index = getIndex(); + if (index == null) { + index = 0; + globalHistory.replaceState({ ...globalHistory.state, idx: index }, ""); + } + function getIndex() { + let state = globalHistory.state || { idx: null }; + return state.idx; + } + function handlePop() { + action = "POP"; + let nextIndex = getIndex(); + let delta = nextIndex == null ? null : nextIndex - index; + index = nextIndex; + if (listener) { + listener({ action, location: history.location, delta }); + } + } + function push(to, state) { + action = "PUSH"; + let location = createLocation(history.location, to, state); + if (validateLocation) validateLocation(location, to); + index = getIndex() + 1; + let historyState = getHistoryState(location, index); + let url = history.createHref(location); + try { + globalHistory.pushState(historyState, "", url); + } catch (error) { + if (error instanceof DOMException && error.name === "DataCloneError") { + throw error; + } + window2.location.assign(url); + } + if (v5Compat && listener) { + listener({ action, location: history.location, delta: 1 }); + } + } + function replace2(to, state) { + action = "REPLACE"; + let location = createLocation(history.location, to, state); + if (validateLocation) validateLocation(location, to); + index = getIndex(); + let historyState = getHistoryState(location, index); + let url = history.createHref(location); + globalHistory.replaceState(historyState, "", url); + if (v5Compat && listener) { + listener({ action, location: history.location, delta: 0 }); + } + } + function createURL(to) { + return createBrowserURLImpl(to); + } + let history = { + get action() { + return action; + }, + get location() { + return getLocation(window2, globalHistory); + }, + listen(fn) { + if (listener) { + throw new Error("A history only accepts one active listener"); + } + window2.addEventListener(PopStateEventType, handlePop); + listener = fn; + return () => { + window2.removeEventListener(PopStateEventType, handlePop); + listener = null; + }; + }, + createHref(to) { + return createHref2(window2, to); + }, + createURL, + encodeLocation(to) { + let url = createURL(to); + return { + pathname: url.pathname, + search: url.search, + hash: url.hash + }; + }, + push, + replace: replace2, + go(n) { + return globalHistory.go(n); + } + }; + return history; +} +function createBrowserURLImpl(to, isAbsolute = false) { + let base = "http://localhost"; + if (typeof window !== "undefined") { + base = window.location.origin !== "null" ? window.location.origin : window.location.href; + } + invariant(base, "No window.location.(origin|href) available to create URL"); + let href2 = typeof to === "string" ? to : createPath(to); + href2 = href2.replace(/ $/, "%20"); + if (!isAbsolute && href2.startsWith("//")) { + href2 = base + href2; + } + return new URL(href2, base); +} +function unstable_createContext(defaultValue) { + return { defaultValue }; +} +var _map; +var unstable_RouterContextProvider = class { + constructor(init) { + __privateAdd(this, _map, /* @__PURE__ */ new Map()); + if (init) { + for (let [context, value] of init) { + this.set(context, value); + } + } + } + get(context) { + if (__privateGet(this, _map).has(context)) { + return __privateGet(this, _map).get(context); + } + if (context.defaultValue !== void 0) { + return context.defaultValue; + } + throw new Error("No value found for context"); + } + set(context, value) { + __privateGet(this, _map).set(context, value); + } +}; +_map = /* @__PURE__ */ new WeakMap(); +var unsupportedLazyRouteObjectKeys = /* @__PURE__ */ new Set([ + "lazy", + "caseSensitive", + "path", + "id", + "index", + "children" +]); +function isUnsupportedLazyRouteObjectKey(key) { + return unsupportedLazyRouteObjectKeys.has( + key + ); +} +var unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([ + "lazy", + "caseSensitive", + "path", + "id", + "index", + "unstable_middleware", + "children" +]); +function isUnsupportedLazyRouteFunctionKey(key) { + return unsupportedLazyRouteFunctionKeys.has( + key + ); +} +function isIndexRoute(route) { + return route.index === true; +} +function convertRoutesToDataRoutes(routes, mapRouteProperties2, parentPath = [], manifest = {}) { + return routes.map((route, index) => { + let treePath = [...parentPath, String(index)]; + let id = typeof route.id === "string" ? route.id : treePath.join("-"); + invariant( + route.index !== true || !route.children, + `Cannot specify children on an index route` + ); + invariant( + !manifest[id], + `Found a route id collision on id "${id}". Route id's must be globally unique within Data Router usages` + ); + if (isIndexRoute(route)) { + let indexRoute = { + ...route, + ...mapRouteProperties2(route), + id + }; + manifest[id] = indexRoute; + return indexRoute; + } else { + let pathOrLayoutRoute = { + ...route, + ...mapRouteProperties2(route), + id, + children: void 0 + }; + manifest[id] = pathOrLayoutRoute; + if (route.children) { + pathOrLayoutRoute.children = convertRoutesToDataRoutes( + route.children, + mapRouteProperties2, + treePath, + manifest + ); + } + return pathOrLayoutRoute; + } + }); +} +function matchRoutes(routes, locationArg, basename = "/") { + return matchRoutesImpl(routes, locationArg, basename, false); +} +function matchRoutesImpl(routes, locationArg, basename, allowPartial) { + let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg; + let pathname = stripBasename(location.pathname || "/", basename); + if (pathname == null) { + return null; + } + let branches = flattenRoutes(routes); + rankRouteBranches(branches); + let matches = null; + for (let i = 0; matches == null && i < branches.length; ++i) { + let decoded = decodePath(pathname); + matches = matchRouteBranch( + branches[i], + decoded, + allowPartial + ); + } + return matches; +} +function convertRouteMatchToUiMatch(match, loaderData) { + let { route, pathname, params } = match; + return { + id: route.id, + pathname, + params, + data: loaderData[route.id], + handle: route.handle + }; +} +function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "") { + let flattenRoute = (route, index, relativePath) => { + let meta = { + relativePath: relativePath === void 0 ? route.path || "" : relativePath, + caseSensitive: route.caseSensitive === true, + childrenIndex: index, + route + }; + if (meta.relativePath.startsWith("/")) { + invariant( + meta.relativePath.startsWith(parentPath), + `Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.` + ); + meta.relativePath = meta.relativePath.slice(parentPath.length); + } + let path = joinPaths([parentPath, meta.relativePath]); + let routesMeta = parentsMeta.concat(meta); + if (route.children && route.children.length > 0) { + invariant( + // Our types know better, but runtime JS may not! + // @ts-expect-error + route.index !== true, + `Index routes must not have child routes. Please remove all child routes from route path "${path}".` + ); + flattenRoutes(route.children, branches, routesMeta, path); + } + if (route.path == null && !route.index) { + return; + } + branches.push({ + path, + score: computeScore(path, route.index), + routesMeta + }); + }; + routes.forEach((route, index) => { + var _a; + if (route.path === "" || !((_a = route.path) == null ? void 0 : _a.includes("?"))) { + flattenRoute(route, index); + } else { + for (let exploded of explodeOptionalSegments(route.path)) { + flattenRoute(route, index, exploded); + } + } + }); + return branches; +} +function explodeOptionalSegments(path) { + let segments = path.split("/"); + if (segments.length === 0) return []; + let [first, ...rest] = segments; + let isOptional = first.endsWith("?"); + let required = first.replace(/\?$/, ""); + if (rest.length === 0) { + return isOptional ? [required, ""] : [required]; + } + let restExploded = explodeOptionalSegments(rest.join("/")); + let result = []; + result.push( + ...restExploded.map( + (subpath) => subpath === "" ? required : [required, subpath].join("/") + ) + ); + if (isOptional) { + result.push(...restExploded); + } + return result.map( + (exploded) => path.startsWith("/") && exploded === "" ? "/" : exploded + ); +} +function rankRouteBranches(branches) { + branches.sort( + (a, b) => a.score !== b.score ? b.score - a.score : compareIndexes( + a.routesMeta.map((meta) => meta.childrenIndex), + b.routesMeta.map((meta) => meta.childrenIndex) + ) + ); +} +var paramRe = /^:[\w-]+$/; +var dynamicSegmentValue = 3; +var indexRouteValue = 2; +var emptySegmentValue = 1; +var staticSegmentValue = 10; +var splatPenalty = -2; +var isSplat = (s) => s === "*"; +function computeScore(path, index) { + let segments = path.split("/"); + let initialScore = segments.length; + if (segments.some(isSplat)) { + initialScore += splatPenalty; + } + if (index) { + initialScore += indexRouteValue; + } + return segments.filter((s) => !isSplat(s)).reduce( + (score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), + initialScore + ); +} +function compareIndexes(a, b) { + let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]); + return siblings ? ( + // If two routes are siblings, we should try to match the earlier sibling + // first. This allows people to have fine-grained control over the matching + // behavior by simply putting routes with identical paths in the order they + // want them tried. + a[a.length - 1] - b[b.length - 1] + ) : ( + // Otherwise, it doesn't really make sense to rank non-siblings by index, + // so they sort equally. + 0 + ); +} +function matchRouteBranch(branch, pathname, allowPartial = false) { + let { routesMeta } = branch; + let matchedParams = {}; + let matchedPathname = "/"; + let matches = []; + for (let i = 0; i < routesMeta.length; ++i) { + let meta = routesMeta[i]; + let end = i === routesMeta.length - 1; + let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/"; + let match = matchPath( + { path: meta.relativePath, caseSensitive: meta.caseSensitive, end }, + remainingPathname + ); + let route = meta.route; + if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) { + match = matchPath( + { + path: meta.relativePath, + caseSensitive: meta.caseSensitive, + end: false + }, + remainingPathname + ); + } + if (!match) { + return null; + } + Object.assign(matchedParams, match.params); + matches.push({ + // TODO: Can this as be avoided? + params: matchedParams, + pathname: joinPaths([matchedPathname, match.pathname]), + pathnameBase: normalizePathname( + joinPaths([matchedPathname, match.pathnameBase]) + ), + route + }); + if (match.pathnameBase !== "/") { + matchedPathname = joinPaths([matchedPathname, match.pathnameBase]); + } + } + return matches; +} +function generatePath(originalPath, params = {}) { + let path = originalPath; + if (path.endsWith("*") && path !== "*" && !path.endsWith("/*")) { + warning( + false, + `Route path "${path}" will be treated as if it were "${path.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${path.replace(/\*$/, "/*")}".` + ); + path = path.replace(/\*$/, "/*"); + } + const prefix = path.startsWith("/") ? "/" : ""; + const stringify2 = (p) => p == null ? "" : typeof p === "string" ? p : String(p); + const segments = path.split(/\/+/).map((segment, index, array) => { + const isLastSegment = index === array.length - 1; + if (isLastSegment && segment === "*") { + const star = "*"; + return stringify2(params[star]); + } + const keyMatch = segment.match(/^:([\w-]+)(\??)$/); + if (keyMatch) { + const [, key, optional] = keyMatch; + let param = params[key]; + invariant(optional === "?" || param != null, `Missing ":${key}" param`); + return stringify2(param); + } + return segment.replace(/\?$/g, ""); + }).filter((segment) => !!segment); + return prefix + segments.join("/"); +} +function matchPath(pattern, pathname) { + if (typeof pattern === "string") { + pattern = { path: pattern, caseSensitive: false, end: true }; + } + let [matcher, compiledParams] = compilePath( + pattern.path, + pattern.caseSensitive, + pattern.end + ); + let match = pathname.match(matcher); + if (!match) return null; + let matchedPathname = match[0]; + let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1"); + let captureGroups = match.slice(1); + let params = compiledParams.reduce( + (memo2, { paramName, isOptional }, index) => { + if (paramName === "*") { + let splatValue = captureGroups[index] || ""; + pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1"); + } + const value = captureGroups[index]; + if (isOptional && !value) { + memo2[paramName] = void 0; + } else { + memo2[paramName] = (value || "").replace(/%2F/g, "/"); + } + return memo2; + }, + {} + ); + return { + params, + pathname: matchedPathname, + pathnameBase, + pattern + }; +} +function compilePath(path, caseSensitive = false, end = true) { + warning( + path === "*" || !path.endsWith("*") || path.endsWith("/*"), + `Route path "${path}" will be treated as if it were "${path.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${path.replace(/\*$/, "/*")}".` + ); + let params = []; + let regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace( + /\/:([\w-]+)(\?)?/g, + (_, paramName, isOptional) => { + params.push({ paramName, isOptional: isOptional != null }); + return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)"; + } + ); + if (path.endsWith("*")) { + params.push({ paramName: "*" }); + regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$"; + } else if (end) { + regexpSource += "\\/*$"; + } else if (path !== "" && path !== "/") { + regexpSource += "(?:(?=\\/|$))"; + } else { + } + let matcher = new RegExp(regexpSource, caseSensitive ? void 0 : "i"); + return [matcher, params]; +} +function decodePath(value) { + try { + return value.split("/").map((v) => decodeURIComponent(v).replace(/\//g, "%2F")).join("/"); + } catch (error) { + warning( + false, + `The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).` + ); + return value; + } +} +function stripBasename(pathname, basename) { + if (basename === "/") return pathname; + if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) { + return null; + } + let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length; + let nextChar = pathname.charAt(startIndex); + if (nextChar && nextChar !== "/") { + return null; + } + return pathname.slice(startIndex) || "/"; +} +function resolvePath(to, fromPathname = "/") { + let { + pathname: toPathname, + search = "", + hash = "" + } = typeof to === "string" ? parsePath(to) : to; + let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname; + return { + pathname, + search: normalizeSearch(search), + hash: normalizeHash(hash) + }; +} +function resolvePathname(relativePath, fromPathname) { + let segments = fromPathname.replace(/\/+$/, "").split("/"); + let relativeSegments = relativePath.split("/"); + relativeSegments.forEach((segment) => { + if (segment === "..") { + if (segments.length > 1) segments.pop(); + } else if (segment !== ".") { + segments.push(segment); + } + }); + return segments.length > 1 ? segments.join("/") : "/"; +} +function getInvalidPathError(char, field, dest, path) { + return `Cannot include a '${char}' character in a manually specified \`to.${field}\` field [${JSON.stringify( + path + )}]. Please separate it out to the \`to.${dest}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`; +} +function getPathContributingMatches(matches) { + return matches.filter( + (match, index) => index === 0 || match.route.path && match.route.path.length > 0 + ); +} +function getResolveToMatches(matches) { + let pathMatches = getPathContributingMatches(matches); + return pathMatches.map( + (match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase + ); +} +function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = false) { + let to; + if (typeof toArg === "string") { + to = parsePath(toArg); + } else { + to = { ...toArg }; + invariant( + !to.pathname || !to.pathname.includes("?"), + getInvalidPathError("?", "pathname", "search", to) + ); + invariant( + !to.pathname || !to.pathname.includes("#"), + getInvalidPathError("#", "pathname", "hash", to) + ); + invariant( + !to.search || !to.search.includes("#"), + getInvalidPathError("#", "search", "hash", to) + ); + } + let isEmptyPath = toArg === "" || to.pathname === ""; + let toPathname = isEmptyPath ? "/" : to.pathname; + let from; + if (toPathname == null) { + from = locationPathname; + } else { + let routePathnameIndex = routePathnames.length - 1; + if (!isPathRelative && toPathname.startsWith("..")) { + let toSegments = toPathname.split("/"); + while (toSegments[0] === "..") { + toSegments.shift(); + routePathnameIndex -= 1; + } + to.pathname = toSegments.join("/"); + } + from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/"; + } + let path = resolvePath(to, from); + let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/"); + let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/"); + if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) { + path.pathname += "/"; + } + return path; +} +var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/"); +var normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/"); +var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search; +var normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash; +var DataWithResponseInit = class { + constructor(data2, init) { + this.type = "DataWithResponseInit"; + this.data = data2; + this.init = init || null; + } +}; +function data(data2, init) { + return new DataWithResponseInit( + data2, + typeof init === "number" ? { status: init } : init + ); +} +var redirect = (url, init = 302) => { + let responseInit = init; + if (typeof responseInit === "number") { + responseInit = { status: responseInit }; + } else if (typeof responseInit.status === "undefined") { + responseInit.status = 302; + } + let headers = new Headers(responseInit.headers); + headers.set("Location", url); + return new Response(null, { ...responseInit, headers }); +}; +var redirectDocument = (url, init) => { + let response = redirect(url, init); + response.headers.set("X-Remix-Reload-Document", "true"); + return response; +}; +var replace = (url, init) => { + let response = redirect(url, init); + response.headers.set("X-Remix-Replace", "true"); + return response; +}; +var ErrorResponseImpl = class { + constructor(status, statusText, data2, internal = false) { + this.status = status; + this.statusText = statusText || ""; + this.internal = internal; + if (data2 instanceof Error) { + this.data = data2.toString(); + this.error = data2; + } else { + this.data = data2; + } + } +}; +function isRouteErrorResponse(error) { + return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error; +} +var validMutationMethodsArr = [ + "POST", + "PUT", + "PATCH", + "DELETE" +]; +var validMutationMethods = new Set( + validMutationMethodsArr +); +var validRequestMethodsArr = [ + "GET", + ...validMutationMethodsArr +]; +var validRequestMethods = new Set(validRequestMethodsArr); +var redirectStatusCodes = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]); +var redirectPreserveMethodStatusCodes = /* @__PURE__ */ new Set([307, 308]); +var IDLE_NAVIGATION = { + state: "idle", + location: void 0, + formMethod: void 0, + formAction: void 0, + formEncType: void 0, + formData: void 0, + json: void 0, + text: void 0 +}; +var IDLE_FETCHER = { + state: "idle", + data: void 0, + formMethod: void 0, + formAction: void 0, + formEncType: void 0, + formData: void 0, + json: void 0, + text: void 0 +}; +var IDLE_BLOCKER = { + state: "unblocked", + proceed: void 0, + reset: void 0, + location: void 0 +}; +var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i; +var defaultMapRouteProperties = (route) => ({ + hasErrorBoundary: Boolean(route.hasErrorBoundary) +}); +var TRANSITIONS_STORAGE_KEY = "remix-router-transitions"; +var ResetLoaderDataSymbol = Symbol("ResetLoaderData"); +function createRouter(init) { + const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : void 0; + const isBrowser2 = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined"; + invariant( + init.routes.length > 0, + "You must provide a non-empty routes array to createRouter" + ); + let hydrationRouteProperties2 = init.hydrationRouteProperties || []; + let mapRouteProperties2 = init.mapRouteProperties || defaultMapRouteProperties; + let manifest = {}; + let dataRoutes = convertRoutesToDataRoutes( + init.routes, + mapRouteProperties2, + void 0, + manifest + ); + let inFlightDataRoutes; + let basename = init.basename || "/"; + let dataStrategyImpl = init.dataStrategy || defaultDataStrategyWithMiddleware; + let future = { + unstable_middleware: false, + ...init.future + }; + let unlistenHistory = null; + let subscribers = /* @__PURE__ */ new Set(); + let savedScrollPositions2 = null; + let getScrollRestorationKey2 = null; + let getScrollPosition = null; + let initialScrollRestored = init.hydrationData != null; + let initialMatches = matchRoutes(dataRoutes, init.history.location, basename); + let initialMatchesIsFOW = false; + let initialErrors = null; + let initialized; + if (initialMatches == null && !init.patchRoutesOnNavigation) { + let error = getInternalRouterError(404, { + pathname: init.history.location.pathname + }); + let { matches, route } = getShortCircuitMatches(dataRoutes); + initialized = true; + initialMatches = matches; + initialErrors = { [route.id]: error }; + } else { + if (initialMatches && !init.hydrationData) { + let fogOfWar = checkFogOfWar( + initialMatches, + dataRoutes, + init.history.location.pathname + ); + if (fogOfWar.active) { + initialMatches = null; + } + } + if (!initialMatches) { + initialized = false; + initialMatches = []; + let fogOfWar = checkFogOfWar( + null, + dataRoutes, + init.history.location.pathname + ); + if (fogOfWar.active && fogOfWar.matches) { + initialMatchesIsFOW = true; + initialMatches = fogOfWar.matches; + } + } else if (initialMatches.some((m) => m.route.lazy)) { + initialized = false; + } else if (!initialMatches.some((m) => m.route.loader)) { + initialized = true; + } else { + let loaderData = init.hydrationData ? init.hydrationData.loaderData : null; + let errors = init.hydrationData ? init.hydrationData.errors : null; + if (errors) { + let idx = initialMatches.findIndex( + (m) => errors[m.route.id] !== void 0 + ); + initialized = initialMatches.slice(0, idx + 1).every( + (m) => !shouldLoadRouteOnHydration(m.route, loaderData, errors) + ); + } else { + initialized = initialMatches.every( + (m) => !shouldLoadRouteOnHydration(m.route, loaderData, errors) + ); + } + } + } + let router2; + let state = { + historyAction: init.history.action, + location: init.history.location, + matches: initialMatches, + initialized, + navigation: IDLE_NAVIGATION, + // Don't restore on initial updateState() if we were SSR'd + restoreScrollPosition: init.hydrationData != null ? false : null, + preventScrollReset: false, + revalidation: "idle", + loaderData: init.hydrationData && init.hydrationData.loaderData || {}, + actionData: init.hydrationData && init.hydrationData.actionData || null, + errors: init.hydrationData && init.hydrationData.errors || initialErrors, + fetchers: /* @__PURE__ */ new Map(), + blockers: /* @__PURE__ */ new Map() + }; + let pendingAction = "POP"; + let pendingPreventScrollReset = false; + let pendingNavigationController; + let pendingViewTransitionEnabled = false; + let appliedViewTransitions = /* @__PURE__ */ new Map(); + let removePageHideEventListener = null; + let isUninterruptedRevalidation = false; + let isRevalidationRequired = false; + let cancelledFetcherLoads = /* @__PURE__ */ new Set(); + let fetchControllers = /* @__PURE__ */ new Map(); + let incrementingLoadId = 0; + let pendingNavigationLoadId = -1; + let fetchReloadIds = /* @__PURE__ */ new Map(); + let fetchRedirectIds = /* @__PURE__ */ new Set(); + let fetchLoadMatches = /* @__PURE__ */ new Map(); + let activeFetchers = /* @__PURE__ */ new Map(); + let fetchersQueuedForDeletion = /* @__PURE__ */ new Set(); + let blockerFunctions = /* @__PURE__ */ new Map(); + let unblockBlockerHistoryUpdate = void 0; + let pendingRevalidationDfd = null; + function initialize() { + unlistenHistory = init.history.listen( + ({ action: historyAction, location, delta }) => { + if (unblockBlockerHistoryUpdate) { + unblockBlockerHistoryUpdate(); + unblockBlockerHistoryUpdate = void 0; + return; + } + warning( + blockerFunctions.size === 0 || delta != null, + "You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL." + ); + let blockerKey = shouldBlockNavigation({ + currentLocation: state.location, + nextLocation: location, + historyAction + }); + if (blockerKey && delta != null) { + let nextHistoryUpdatePromise = new Promise((resolve) => { + unblockBlockerHistoryUpdate = resolve; + }); + init.history.go(delta * -1); + updateBlocker(blockerKey, { + state: "blocked", + location, + proceed() { + updateBlocker(blockerKey, { + state: "proceeding", + proceed: void 0, + reset: void 0, + location + }); + nextHistoryUpdatePromise.then(() => init.history.go(delta)); + }, + reset() { + let blockers = new Map(state.blockers); + blockers.set(blockerKey, IDLE_BLOCKER); + updateState({ blockers }); + } + }); + return; + } + return startNavigation(historyAction, location); + } + ); + if (isBrowser2) { + restoreAppliedTransitions(routerWindow, appliedViewTransitions); + let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions); + routerWindow.addEventListener("pagehide", _saveAppliedTransitions); + removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions); + } + if (!state.initialized) { + startNavigation("POP", state.location, { + initialHydration: true + }); + } + return router2; + } + function dispose() { + if (unlistenHistory) { + unlistenHistory(); + } + if (removePageHideEventListener) { + removePageHideEventListener(); + } + subscribers.clear(); + pendingNavigationController && pendingNavigationController.abort(); + state.fetchers.forEach((_, key) => deleteFetcher(key)); + state.blockers.forEach((_, key) => deleteBlocker(key)); + } + function subscribe(fn) { + subscribers.add(fn); + return () => subscribers.delete(fn); + } + function updateState(newState, opts = {}) { + state = { + ...state, + ...newState + }; + let unmountedFetchers = []; + let mountedFetchers = []; + state.fetchers.forEach((fetcher, key) => { + if (fetcher.state === "idle") { + if (fetchersQueuedForDeletion.has(key)) { + unmountedFetchers.push(key); + } else { + mountedFetchers.push(key); + } + } + }); + fetchersQueuedForDeletion.forEach((key) => { + if (!state.fetchers.has(key) && !fetchControllers.has(key)) { + unmountedFetchers.push(key); + } + }); + [...subscribers].forEach( + (subscriber) => subscriber(state, { + deletedFetchers: unmountedFetchers, + viewTransitionOpts: opts.viewTransitionOpts, + flushSync: opts.flushSync === true + }) + ); + unmountedFetchers.forEach((key) => deleteFetcher(key)); + mountedFetchers.forEach((key) => state.fetchers.delete(key)); + } + function completeNavigation(location, newState, { flushSync: flushSync2 } = {}) { + var _a, _b; + let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_a = location.state) == null ? void 0 : _a._isRedirect) !== true; + let actionData; + if (newState.actionData) { + if (Object.keys(newState.actionData).length > 0) { + actionData = newState.actionData; + } else { + actionData = null; + } + } else if (isActionReload) { + actionData = state.actionData; + } else { + actionData = null; + } + let loaderData = newState.loaderData ? mergeLoaderData( + state.loaderData, + newState.loaderData, + newState.matches || [], + newState.errors + ) : state.loaderData; + let blockers = state.blockers; + if (blockers.size > 0) { + blockers = new Map(blockers); + blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER)); + } + let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_b = location.state) == null ? void 0 : _b._isRedirect) !== true; + if (inFlightDataRoutes) { + dataRoutes = inFlightDataRoutes; + inFlightDataRoutes = void 0; + } + if (isUninterruptedRevalidation) { + } else if (pendingAction === "POP") { + } else if (pendingAction === "PUSH") { + init.history.push(location, location.state); + } else if (pendingAction === "REPLACE") { + init.history.replace(location, location.state); + } + let viewTransitionOpts; + if (pendingAction === "POP") { + let priorPaths = appliedViewTransitions.get(state.location.pathname); + if (priorPaths && priorPaths.has(location.pathname)) { + viewTransitionOpts = { + currentLocation: state.location, + nextLocation: location + }; + } else if (appliedViewTransitions.has(location.pathname)) { + viewTransitionOpts = { + currentLocation: location, + nextLocation: state.location + }; + } + } else if (pendingViewTransitionEnabled) { + let toPaths = appliedViewTransitions.get(state.location.pathname); + if (toPaths) { + toPaths.add(location.pathname); + } else { + toPaths = /* @__PURE__ */ new Set([location.pathname]); + appliedViewTransitions.set(state.location.pathname, toPaths); + } + viewTransitionOpts = { + currentLocation: state.location, + nextLocation: location + }; + } + updateState( + { + ...newState, + // matches, errors, fetchers go through as-is + actionData, + loaderData, + historyAction: pendingAction, + location, + initialized: true, + navigation: IDLE_NAVIGATION, + revalidation: "idle", + restoreScrollPosition: getSavedScrollPosition( + location, + newState.matches || state.matches + ), + preventScrollReset, + blockers + }, + { + viewTransitionOpts, + flushSync: flushSync2 === true + } + ); + pendingAction = "POP"; + pendingPreventScrollReset = false; + pendingViewTransitionEnabled = false; + isUninterruptedRevalidation = false; + isRevalidationRequired = false; + pendingRevalidationDfd == null ? void 0 : pendingRevalidationDfd.resolve(); + pendingRevalidationDfd = null; + } + async function navigate(to, opts) { + if (typeof to === "number") { + init.history.go(to); + return; + } + let normalizedPath = normalizeTo( + state.location, + state.matches, + basename, + to, + opts == null ? void 0 : opts.fromRouteId, + opts == null ? void 0 : opts.relative + ); + let { path, submission, error } = normalizeNavigateOptions( + false, + normalizedPath, + opts + ); + let currentLocation = state.location; + let nextLocation = createLocation(state.location, path, opts && opts.state); + nextLocation = { + ...nextLocation, + ...init.history.encodeLocation(nextLocation) + }; + let userReplace = opts && opts.replace != null ? opts.replace : void 0; + let historyAction = "PUSH"; + if (userReplace === true) { + historyAction = "REPLACE"; + } else if (userReplace === false) { + } else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) { + historyAction = "REPLACE"; + } + let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === true : void 0; + let flushSync2 = (opts && opts.flushSync) === true; + let blockerKey = shouldBlockNavigation({ + currentLocation, + nextLocation, + historyAction + }); + if (blockerKey) { + updateBlocker(blockerKey, { + state: "blocked", + location: nextLocation, + proceed() { + updateBlocker(blockerKey, { + state: "proceeding", + proceed: void 0, + reset: void 0, + location: nextLocation + }); + navigate(to, opts); + }, + reset() { + let blockers = new Map(state.blockers); + blockers.set(blockerKey, IDLE_BLOCKER); + updateState({ blockers }); + } + }); + return; + } + await startNavigation(historyAction, nextLocation, { + submission, + // Send through the formData serialization error if we have one so we can + // render at the right error boundary after we match routes + pendingError: error, + preventScrollReset, + replace: opts && opts.replace, + enableViewTransition: opts && opts.viewTransition, + flushSync: flushSync2 + }); + } + function revalidate() { + if (!pendingRevalidationDfd) { + pendingRevalidationDfd = createDeferred(); + } + interruptActiveLoads(); + updateState({ revalidation: "loading" }); + let promise = pendingRevalidationDfd.promise; + if (state.navigation.state === "submitting") { + return promise; + } + if (state.navigation.state === "idle") { + startNavigation(state.historyAction, state.location, { + startUninterruptedRevalidation: true + }); + return promise; + } + startNavigation( + pendingAction || state.historyAction, + state.navigation.location, + { + overrideNavigation: state.navigation, + // Proxy through any rending view transition + enableViewTransition: pendingViewTransitionEnabled === true + } + ); + return promise; + } + async function startNavigation(historyAction, location, opts) { + pendingNavigationController && pendingNavigationController.abort(); + pendingNavigationController = null; + pendingAction = historyAction; + isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true; + saveScrollPosition(state.location, state.matches); + pendingPreventScrollReset = (opts && opts.preventScrollReset) === true; + pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true; + let routesToUse = inFlightDataRoutes || dataRoutes; + let loadingNavigation = opts && opts.overrideNavigation; + let matches = (opts == null ? void 0 : opts.initialHydration) && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? ( + // `matchRoutes()` has already been called if we're in here via `router.initialize()` + state.matches + ) : matchRoutes(routesToUse, location, basename); + let flushSync2 = (opts && opts.flushSync) === true; + if (matches && state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) { + completeNavigation(location, { matches }, { flushSync: flushSync2 }); + return; + } + let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname); + if (fogOfWar.active && fogOfWar.matches) { + matches = fogOfWar.matches; + } + if (!matches) { + let { error, notFoundMatches, route } = handleNavigational404( + location.pathname + ); + completeNavigation( + location, + { + matches: notFoundMatches, + loaderData: {}, + errors: { + [route.id]: error + } + }, + { flushSync: flushSync2 } + ); + return; + } + pendingNavigationController = new AbortController(); + let request = createClientSideRequest( + init.history, + location, + pendingNavigationController.signal, + opts && opts.submission + ); + let scopedContext = new unstable_RouterContextProvider( + init.unstable_getContext ? await init.unstable_getContext() : void 0 + ); + let pendingActionResult; + if (opts && opts.pendingError) { + pendingActionResult = [ + findNearestBoundary(matches).route.id, + { type: "error", error: opts.pendingError } + ]; + } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) { + let actionResult = await handleAction( + request, + location, + opts.submission, + matches, + scopedContext, + fogOfWar.active, + opts && opts.initialHydration === true, + { replace: opts.replace, flushSync: flushSync2 } + ); + if (actionResult.shortCircuited) { + return; + } + if (actionResult.pendingActionResult) { + let [routeId, result] = actionResult.pendingActionResult; + if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) { + pendingNavigationController = null; + completeNavigation(location, { + matches: actionResult.matches, + loaderData: {}, + errors: { + [routeId]: result.error + } + }); + return; + } + } + matches = actionResult.matches || matches; + pendingActionResult = actionResult.pendingActionResult; + loadingNavigation = getLoadingNavigation(location, opts.submission); + flushSync2 = false; + fogOfWar.active = false; + request = createClientSideRequest( + init.history, + request.url, + request.signal + ); + } + let { + shortCircuited, + matches: updatedMatches, + loaderData, + errors + } = await handleLoaders( + request, + location, + matches, + scopedContext, + fogOfWar.active, + loadingNavigation, + opts && opts.submission, + opts && opts.fetcherSubmission, + opts && opts.replace, + opts && opts.initialHydration === true, + flushSync2, + pendingActionResult + ); + if (shortCircuited) { + return; + } + pendingNavigationController = null; + completeNavigation(location, { + matches: updatedMatches || matches, + ...getActionDataForCommit(pendingActionResult), + loaderData, + errors + }); + } + async function handleAction(request, location, submission, matches, scopedContext, isFogOfWar, initialHydration, opts = {}) { + interruptActiveLoads(); + let navigation = getSubmittingNavigation(location, submission); + updateState({ navigation }, { flushSync: opts.flushSync === true }); + if (isFogOfWar) { + let discoverResult = await discoverRoutes( + matches, + location.pathname, + request.signal + ); + if (discoverResult.type === "aborted") { + return { shortCircuited: true }; + } else if (discoverResult.type === "error") { + let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id; + return { + matches: discoverResult.partialMatches, + pendingActionResult: [ + boundaryId, + { + type: "error", + error: discoverResult.error + } + ] + }; + } else if (!discoverResult.matches) { + let { notFoundMatches, error, route } = handleNavigational404( + location.pathname + ); + return { + matches: notFoundMatches, + pendingActionResult: [ + route.id, + { + type: "error", + error + } + ] + }; + } else { + matches = discoverResult.matches; + } + } + let result; + let actionMatch = getTargetMatch(matches, location); + if (!actionMatch.route.action && !actionMatch.route.lazy) { + result = { + type: "error", + error: getInternalRouterError(405, { + method: request.method, + pathname: location.pathname, + routeId: actionMatch.route.id + }) + }; + } else { + let dsMatches = getTargetedDataStrategyMatches( + mapRouteProperties2, + manifest, + request, + matches, + actionMatch, + initialHydration ? [] : hydrationRouteProperties2, + scopedContext + ); + let results = await callDataStrategy( + request, + dsMatches, + scopedContext, + null + ); + result = results[actionMatch.route.id]; + if (!result) { + for (let match of matches) { + if (results[match.route.id]) { + result = results[match.route.id]; + break; + } + } + } + if (request.signal.aborted) { + return { shortCircuited: true }; + } + } + if (isRedirectResult(result)) { + let replace2; + if (opts && opts.replace != null) { + replace2 = opts.replace; + } else { + let location2 = normalizeRedirectLocation( + result.response.headers.get("Location"), + new URL(request.url), + basename + ); + replace2 = location2 === state.location.pathname + state.location.search; + } + await startRedirectNavigation(request, result, true, { + submission, + replace: replace2 + }); + return { shortCircuited: true }; + } + if (isErrorResult(result)) { + let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id); + if ((opts && opts.replace) !== true) { + pendingAction = "PUSH"; + } + return { + matches, + pendingActionResult: [ + boundaryMatch.route.id, + result, + actionMatch.route.id + ] + }; + } + return { + matches, + pendingActionResult: [actionMatch.route.id, result] + }; + } + async function handleLoaders(request, location, matches, scopedContext, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace2, initialHydration, flushSync2, pendingActionResult) { + let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission); + let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation); + let shouldUpdateNavigationState = !isUninterruptedRevalidation && !initialHydration; + if (isFogOfWar) { + if (shouldUpdateNavigationState) { + let actionData = getUpdatedActionData(pendingActionResult); + updateState( + { + navigation: loadingNavigation, + ...actionData !== void 0 ? { actionData } : {} + }, + { + flushSync: flushSync2 + } + ); + } + let discoverResult = await discoverRoutes( + matches, + location.pathname, + request.signal + ); + if (discoverResult.type === "aborted") { + return { shortCircuited: true }; + } else if (discoverResult.type === "error") { + let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id; + return { + matches: discoverResult.partialMatches, + loaderData: {}, + errors: { + [boundaryId]: discoverResult.error + } + }; + } else if (!discoverResult.matches) { + let { error, notFoundMatches, route } = handleNavigational404( + location.pathname + ); + return { + matches: notFoundMatches, + loaderData: {}, + errors: { + [route.id]: error + } + }; + } else { + matches = discoverResult.matches; + } + } + let routesToUse = inFlightDataRoutes || dataRoutes; + let { dsMatches, revalidatingFetchers } = getMatchesToLoad( + request, + scopedContext, + mapRouteProperties2, + manifest, + init.history, + state, + matches, + activeSubmission, + location, + initialHydration ? [] : hydrationRouteProperties2, + initialHydration === true, + isRevalidationRequired, + cancelledFetcherLoads, + fetchersQueuedForDeletion, + fetchLoadMatches, + fetchRedirectIds, + routesToUse, + basename, + pendingActionResult + ); + pendingNavigationLoadId = ++incrementingLoadId; + if (!init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && revalidatingFetchers.length === 0) { + let updatedFetchers2 = markFetchRedirectsDone(); + completeNavigation( + location, + { + matches, + loaderData: {}, + // Commit pending error if we're short circuiting + errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { [pendingActionResult[0]]: pendingActionResult[1].error } : null, + ...getActionDataForCommit(pendingActionResult), + ...updatedFetchers2 ? { fetchers: new Map(state.fetchers) } : {} + }, + { flushSync: flushSync2 } + ); + return { shortCircuited: true }; + } + if (shouldUpdateNavigationState) { + let updates = {}; + if (!isFogOfWar) { + updates.navigation = loadingNavigation; + let actionData = getUpdatedActionData(pendingActionResult); + if (actionData !== void 0) { + updates.actionData = actionData; + } + } + if (revalidatingFetchers.length > 0) { + updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers); + } + updateState(updates, { flushSync: flushSync2 }); + } + revalidatingFetchers.forEach((rf) => { + abortFetcher(rf.key); + if (rf.controller) { + fetchControllers.set(rf.key, rf.controller); + } + }); + let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((f) => abortFetcher(f.key)); + if (pendingNavigationController) { + pendingNavigationController.signal.addEventListener( + "abort", + abortPendingFetchRevalidations + ); + } + let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData( + dsMatches, + revalidatingFetchers, + request, + scopedContext + ); + if (request.signal.aborted) { + return { shortCircuited: true }; + } + if (pendingNavigationController) { + pendingNavigationController.signal.removeEventListener( + "abort", + abortPendingFetchRevalidations + ); + } + revalidatingFetchers.forEach((rf) => fetchControllers.delete(rf.key)); + let redirect2 = findRedirect(loaderResults); + if (redirect2) { + await startRedirectNavigation(request, redirect2.result, true, { + replace: replace2 + }); + return { shortCircuited: true }; + } + redirect2 = findRedirect(fetcherResults); + if (redirect2) { + fetchRedirectIds.add(redirect2.key); + await startRedirectNavigation(request, redirect2.result, true, { + replace: replace2 + }); + return { shortCircuited: true }; + } + let { loaderData, errors } = processLoaderData( + state, + matches, + loaderResults, + pendingActionResult, + revalidatingFetchers, + fetcherResults + ); + if (initialHydration && state.errors) { + errors = { ...state.errors, ...errors }; + } + let updatedFetchers = markFetchRedirectsDone(); + let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId); + let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0; + return { + matches, + loaderData, + errors, + ...shouldUpdateFetchers ? { fetchers: new Map(state.fetchers) } : {} + }; + } + function getUpdatedActionData(pendingActionResult) { + if (pendingActionResult && !isErrorResult(pendingActionResult[1])) { + return { + [pendingActionResult[0]]: pendingActionResult[1].data + }; + } else if (state.actionData) { + if (Object.keys(state.actionData).length === 0) { + return null; + } else { + return state.actionData; + } + } + } + function getUpdatedRevalidatingFetchers(revalidatingFetchers) { + revalidatingFetchers.forEach((rf) => { + let fetcher = state.fetchers.get(rf.key); + let revalidatingFetcher = getLoadingFetcher( + void 0, + fetcher ? fetcher.data : void 0 + ); + state.fetchers.set(rf.key, revalidatingFetcher); + }); + return new Map(state.fetchers); + } + async function fetch2(key, routeId, href2, opts) { + abortFetcher(key); + let flushSync2 = (opts && opts.flushSync) === true; + let routesToUse = inFlightDataRoutes || dataRoutes; + let normalizedPath = normalizeTo( + state.location, + state.matches, + basename, + href2, + routeId, + opts == null ? void 0 : opts.relative + ); + let matches = matchRoutes(routesToUse, normalizedPath, basename); + let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath); + if (fogOfWar.active && fogOfWar.matches) { + matches = fogOfWar.matches; + } + if (!matches) { + setFetcherError( + key, + routeId, + getInternalRouterError(404, { pathname: normalizedPath }), + { flushSync: flushSync2 } + ); + return; + } + let { path, submission, error } = normalizeNavigateOptions( + true, + normalizedPath, + opts + ); + if (error) { + setFetcherError(key, routeId, error, { flushSync: flushSync2 }); + return; + } + let match = getTargetMatch(matches, path); + let scopedContext = new unstable_RouterContextProvider( + init.unstable_getContext ? await init.unstable_getContext() : void 0 + ); + let preventScrollReset = (opts && opts.preventScrollReset) === true; + if (submission && isMutationMethod(submission.formMethod)) { + await handleFetcherAction( + key, + routeId, + path, + match, + matches, + scopedContext, + fogOfWar.active, + flushSync2, + preventScrollReset, + submission + ); + return; + } + fetchLoadMatches.set(key, { routeId, path }); + await handleFetcherLoader( + key, + routeId, + path, + match, + matches, + scopedContext, + fogOfWar.active, + flushSync2, + preventScrollReset, + submission + ); + } + async function handleFetcherAction(key, routeId, path, match, requestMatches, scopedContext, isFogOfWar, flushSync2, preventScrollReset, submission) { + interruptActiveLoads(); + fetchLoadMatches.delete(key); + function detectAndHandle405Error(m) { + if (!m.route.action && !m.route.lazy) { + let error = getInternalRouterError(405, { + method: submission.formMethod, + pathname: path, + routeId + }); + setFetcherError(key, routeId, error, { flushSync: flushSync2 }); + return true; + } + return false; + } + if (!isFogOfWar && detectAndHandle405Error(match)) { + return; + } + let existingFetcher = state.fetchers.get(key); + updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), { + flushSync: flushSync2 + }); + let abortController = new AbortController(); + let fetchRequest = createClientSideRequest( + init.history, + path, + abortController.signal, + submission + ); + if (isFogOfWar) { + let discoverResult = await discoverRoutes( + requestMatches, + path, + fetchRequest.signal, + key + ); + if (discoverResult.type === "aborted") { + return; + } else if (discoverResult.type === "error") { + setFetcherError(key, routeId, discoverResult.error, { flushSync: flushSync2 }); + return; + } else if (!discoverResult.matches) { + setFetcherError( + key, + routeId, + getInternalRouterError(404, { pathname: path }), + { flushSync: flushSync2 } + ); + return; + } else { + requestMatches = discoverResult.matches; + match = getTargetMatch(requestMatches, path); + if (detectAndHandle405Error(match)) { + return; + } + } + } + fetchControllers.set(key, abortController); + let originatingLoadId = incrementingLoadId; + let fetchMatches = getTargetedDataStrategyMatches( + mapRouteProperties2, + manifest, + fetchRequest, + requestMatches, + match, + hydrationRouteProperties2, + scopedContext + ); + let actionResults = await callDataStrategy( + fetchRequest, + fetchMatches, + scopedContext, + key + ); + let actionResult = actionResults[match.route.id]; + if (fetchRequest.signal.aborted) { + if (fetchControllers.get(key) === abortController) { + fetchControllers.delete(key); + } + return; + } + if (fetchersQueuedForDeletion.has(key)) { + if (isRedirectResult(actionResult) || isErrorResult(actionResult)) { + updateFetcherState(key, getDoneFetcher(void 0)); + return; + } + } else { + if (isRedirectResult(actionResult)) { + fetchControllers.delete(key); + if (pendingNavigationLoadId > originatingLoadId) { + updateFetcherState(key, getDoneFetcher(void 0)); + return; + } else { + fetchRedirectIds.add(key); + updateFetcherState(key, getLoadingFetcher(submission)); + return startRedirectNavigation(fetchRequest, actionResult, false, { + fetcherSubmission: submission, + preventScrollReset + }); + } + } + if (isErrorResult(actionResult)) { + setFetcherError(key, routeId, actionResult.error); + return; + } + } + let nextLocation = state.navigation.location || state.location; + let revalidationRequest = createClientSideRequest( + init.history, + nextLocation, + abortController.signal + ); + let routesToUse = inFlightDataRoutes || dataRoutes; + let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches; + invariant(matches, "Didn't find any matches after fetcher action"); + let loadId = ++incrementingLoadId; + fetchReloadIds.set(key, loadId); + let loadFetcher = getLoadingFetcher(submission, actionResult.data); + state.fetchers.set(key, loadFetcher); + let { dsMatches, revalidatingFetchers } = getMatchesToLoad( + revalidationRequest, + scopedContext, + mapRouteProperties2, + manifest, + init.history, + state, + matches, + submission, + nextLocation, + hydrationRouteProperties2, + false, + isRevalidationRequired, + cancelledFetcherLoads, + fetchersQueuedForDeletion, + fetchLoadMatches, + fetchRedirectIds, + routesToUse, + basename, + [match.route.id, actionResult] + ); + revalidatingFetchers.filter((rf) => rf.key !== key).forEach((rf) => { + let staleKey = rf.key; + let existingFetcher2 = state.fetchers.get(staleKey); + let revalidatingFetcher = getLoadingFetcher( + void 0, + existingFetcher2 ? existingFetcher2.data : void 0 + ); + state.fetchers.set(staleKey, revalidatingFetcher); + abortFetcher(staleKey); + if (rf.controller) { + fetchControllers.set(staleKey, rf.controller); + } + }); + updateState({ fetchers: new Map(state.fetchers) }); + let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((rf) => abortFetcher(rf.key)); + abortController.signal.addEventListener( + "abort", + abortPendingFetchRevalidations + ); + let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData( + dsMatches, + revalidatingFetchers, + revalidationRequest, + scopedContext + ); + if (abortController.signal.aborted) { + return; + } + abortController.signal.removeEventListener( + "abort", + abortPendingFetchRevalidations + ); + fetchReloadIds.delete(key); + fetchControllers.delete(key); + revalidatingFetchers.forEach((r) => fetchControllers.delete(r.key)); + if (state.fetchers.has(key)) { + let doneFetcher = getDoneFetcher(actionResult.data); + state.fetchers.set(key, doneFetcher); + } + let redirect2 = findRedirect(loaderResults); + if (redirect2) { + return startRedirectNavigation( + revalidationRequest, + redirect2.result, + false, + { preventScrollReset } + ); + } + redirect2 = findRedirect(fetcherResults); + if (redirect2) { + fetchRedirectIds.add(redirect2.key); + return startRedirectNavigation( + revalidationRequest, + redirect2.result, + false, + { preventScrollReset } + ); + } + let { loaderData, errors } = processLoaderData( + state, + matches, + loaderResults, + void 0, + revalidatingFetchers, + fetcherResults + ); + abortStaleFetchLoads(loadId); + if (state.navigation.state === "loading" && loadId > pendingNavigationLoadId) { + invariant(pendingAction, "Expected pending action"); + pendingNavigationController && pendingNavigationController.abort(); + completeNavigation(state.navigation.location, { + matches, + loaderData, + errors, + fetchers: new Map(state.fetchers) + }); + } else { + updateState({ + errors, + loaderData: mergeLoaderData( + state.loaderData, + loaderData, + matches, + errors + ), + fetchers: new Map(state.fetchers) + }); + isRevalidationRequired = false; + } + } + async function handleFetcherLoader(key, routeId, path, match, matches, scopedContext, isFogOfWar, flushSync2, preventScrollReset, submission) { + let existingFetcher = state.fetchers.get(key); + updateFetcherState( + key, + getLoadingFetcher( + submission, + existingFetcher ? existingFetcher.data : void 0 + ), + { flushSync: flushSync2 } + ); + let abortController = new AbortController(); + let fetchRequest = createClientSideRequest( + init.history, + path, + abortController.signal + ); + if (isFogOfWar) { + let discoverResult = await discoverRoutes( + matches, + path, + fetchRequest.signal, + key + ); + if (discoverResult.type === "aborted") { + return; + } else if (discoverResult.type === "error") { + setFetcherError(key, routeId, discoverResult.error, { flushSync: flushSync2 }); + return; + } else if (!discoverResult.matches) { + setFetcherError( + key, + routeId, + getInternalRouterError(404, { pathname: path }), + { flushSync: flushSync2 } + ); + return; + } else { + matches = discoverResult.matches; + match = getTargetMatch(matches, path); + } + } + fetchControllers.set(key, abortController); + let originatingLoadId = incrementingLoadId; + let dsMatches = getTargetedDataStrategyMatches( + mapRouteProperties2, + manifest, + fetchRequest, + matches, + match, + hydrationRouteProperties2, + scopedContext + ); + let results = await callDataStrategy( + fetchRequest, + dsMatches, + scopedContext, + key + ); + let result = results[match.route.id]; + if (fetchControllers.get(key) === abortController) { + fetchControllers.delete(key); + } + if (fetchRequest.signal.aborted) { + return; + } + if (fetchersQueuedForDeletion.has(key)) { + updateFetcherState(key, getDoneFetcher(void 0)); + return; + } + if (isRedirectResult(result)) { + if (pendingNavigationLoadId > originatingLoadId) { + updateFetcherState(key, getDoneFetcher(void 0)); + return; + } else { + fetchRedirectIds.add(key); + await startRedirectNavigation(fetchRequest, result, false, { + preventScrollReset + }); + return; + } + } + if (isErrorResult(result)) { + setFetcherError(key, routeId, result.error); + return; + } + updateFetcherState(key, getDoneFetcher(result.data)); + } + async function startRedirectNavigation(request, redirect2, isNavigation, { + submission, + fetcherSubmission, + preventScrollReset, + replace: replace2 + } = {}) { + if (redirect2.response.headers.has("X-Remix-Revalidate")) { + isRevalidationRequired = true; + } + let location = redirect2.response.headers.get("Location"); + invariant(location, "Expected a Location header on the redirect Response"); + location = normalizeRedirectLocation( + location, + new URL(request.url), + basename + ); + let redirectLocation = createLocation(state.location, location, { + _isRedirect: true + }); + if (isBrowser2) { + let isDocumentReload = false; + if (redirect2.response.headers.has("X-Remix-Reload-Document")) { + isDocumentReload = true; + } else if (ABSOLUTE_URL_REGEX.test(location)) { + const url = createBrowserURLImpl(location, true); + isDocumentReload = // Hard reload if it's an absolute URL to a new origin + url.origin !== routerWindow.location.origin || // Hard reload if it's an absolute URL that does not match our basename + stripBasename(url.pathname, basename) == null; + } + if (isDocumentReload) { + if (replace2) { + routerWindow.location.replace(location); + } else { + routerWindow.location.assign(location); + } + return; + } + } + pendingNavigationController = null; + let redirectNavigationType = replace2 === true || redirect2.response.headers.has("X-Remix-Replace") ? "REPLACE" : "PUSH"; + let { formMethod, formAction, formEncType } = state.navigation; + if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) { + submission = getSubmissionFromNavigation(state.navigation); + } + let activeSubmission = submission || fetcherSubmission; + if (redirectPreserveMethodStatusCodes.has(redirect2.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) { + await startNavigation(redirectNavigationType, redirectLocation, { + submission: { + ...activeSubmission, + formAction: location + }, + // Preserve these flags across redirects + preventScrollReset: preventScrollReset || pendingPreventScrollReset, + enableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0 + }); + } else { + let overrideNavigation = getLoadingNavigation( + redirectLocation, + submission + ); + await startNavigation(redirectNavigationType, redirectLocation, { + overrideNavigation, + // Send fetcher submissions through for shouldRevalidate + fetcherSubmission, + // Preserve these flags across redirects + preventScrollReset: preventScrollReset || pendingPreventScrollReset, + enableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0 + }); + } + } + async function callDataStrategy(request, matches, scopedContext, fetcherKey) { + let results; + let dataResults = {}; + try { + results = await callDataStrategyImpl( + dataStrategyImpl, + request, + matches, + fetcherKey, + scopedContext, + false + ); + } catch (e) { + matches.filter((m) => m.shouldLoad).forEach((m) => { + dataResults[m.route.id] = { + type: "error", + error: e + }; + }); + return dataResults; + } + if (request.signal.aborted) { + return dataResults; + } + for (let [routeId, result] of Object.entries(results)) { + if (isRedirectDataStrategyResult(result)) { + let response = result.result; + dataResults[routeId] = { + type: "redirect", + response: normalizeRelativeRoutingRedirectResponse( + response, + request, + routeId, + matches, + basename + ) + }; + } else { + dataResults[routeId] = await convertDataStrategyResultToDataResult( + result + ); + } + } + return dataResults; + } + async function callLoadersAndMaybeResolveData(matches, fetchersToLoad, request, scopedContext) { + let loaderResultsPromise = callDataStrategy( + request, + matches, + scopedContext, + null + ); + let fetcherResultsPromise = Promise.all( + fetchersToLoad.map(async (f) => { + if (f.matches && f.match && f.request && f.controller) { + let results = await callDataStrategy( + f.request, + f.matches, + scopedContext, + f.key + ); + let result = results[f.match.route.id]; + return { [f.key]: result }; + } else { + return Promise.resolve({ + [f.key]: { + type: "error", + error: getInternalRouterError(404, { + pathname: f.path + }) + } + }); + } + }) + ); + let loaderResults = await loaderResultsPromise; + let fetcherResults = (await fetcherResultsPromise).reduce( + (acc, r) => Object.assign(acc, r), + {} + ); + return { + loaderResults, + fetcherResults + }; + } + function interruptActiveLoads() { + isRevalidationRequired = true; + fetchLoadMatches.forEach((_, key) => { + if (fetchControllers.has(key)) { + cancelledFetcherLoads.add(key); + } + abortFetcher(key); + }); + } + function updateFetcherState(key, fetcher, opts = {}) { + state.fetchers.set(key, fetcher); + updateState( + { fetchers: new Map(state.fetchers) }, + { flushSync: (opts && opts.flushSync) === true } + ); + } + function setFetcherError(key, routeId, error, opts = {}) { + let boundaryMatch = findNearestBoundary(state.matches, routeId); + deleteFetcher(key); + updateState( + { + errors: { + [boundaryMatch.route.id]: error + }, + fetchers: new Map(state.fetchers) + }, + { flushSync: (opts && opts.flushSync) === true } + ); + } + function getFetcher(key) { + activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1); + if (fetchersQueuedForDeletion.has(key)) { + fetchersQueuedForDeletion.delete(key); + } + return state.fetchers.get(key) || IDLE_FETCHER; + } + function deleteFetcher(key) { + let fetcher = state.fetchers.get(key); + if (fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key))) { + abortFetcher(key); + } + fetchLoadMatches.delete(key); + fetchReloadIds.delete(key); + fetchRedirectIds.delete(key); + fetchersQueuedForDeletion.delete(key); + cancelledFetcherLoads.delete(key); + state.fetchers.delete(key); + } + function queueFetcherForDeletion(key) { + let count = (activeFetchers.get(key) || 0) - 1; + if (count <= 0) { + activeFetchers.delete(key); + fetchersQueuedForDeletion.add(key); + } else { + activeFetchers.set(key, count); + } + updateState({ fetchers: new Map(state.fetchers) }); + } + function abortFetcher(key) { + let controller = fetchControllers.get(key); + if (controller) { + controller.abort(); + fetchControllers.delete(key); + } + } + function markFetchersDone(keys) { + for (let key of keys) { + let fetcher = getFetcher(key); + let doneFetcher = getDoneFetcher(fetcher.data); + state.fetchers.set(key, doneFetcher); + } + } + function markFetchRedirectsDone() { + let doneKeys = []; + let updatedFetchers = false; + for (let key of fetchRedirectIds) { + let fetcher = state.fetchers.get(key); + invariant(fetcher, `Expected fetcher: ${key}`); + if (fetcher.state === "loading") { + fetchRedirectIds.delete(key); + doneKeys.push(key); + updatedFetchers = true; + } + } + markFetchersDone(doneKeys); + return updatedFetchers; + } + function abortStaleFetchLoads(landedId) { + let yeetedKeys = []; + for (let [key, id] of fetchReloadIds) { + if (id < landedId) { + let fetcher = state.fetchers.get(key); + invariant(fetcher, `Expected fetcher: ${key}`); + if (fetcher.state === "loading") { + abortFetcher(key); + fetchReloadIds.delete(key); + yeetedKeys.push(key); + } + } + } + markFetchersDone(yeetedKeys); + return yeetedKeys.length > 0; + } + function getBlocker(key, fn) { + let blocker = state.blockers.get(key) || IDLE_BLOCKER; + if (blockerFunctions.get(key) !== fn) { + blockerFunctions.set(key, fn); + } + return blocker; + } + function deleteBlocker(key) { + state.blockers.delete(key); + blockerFunctions.delete(key); + } + function updateBlocker(key, newBlocker) { + let blocker = state.blockers.get(key) || IDLE_BLOCKER; + invariant( + blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked", + `Invalid blocker state transition: ${blocker.state} -> ${newBlocker.state}` + ); + let blockers = new Map(state.blockers); + blockers.set(key, newBlocker); + updateState({ blockers }); + } + function shouldBlockNavigation({ + currentLocation, + nextLocation, + historyAction + }) { + if (blockerFunctions.size === 0) { + return; + } + if (blockerFunctions.size > 1) { + warning(false, "A router only supports one blocker at a time"); + } + let entries = Array.from(blockerFunctions.entries()); + let [blockerKey, blockerFunction] = entries[entries.length - 1]; + let blocker = state.blockers.get(blockerKey); + if (blocker && blocker.state === "proceeding") { + return; + } + if (blockerFunction({ currentLocation, nextLocation, historyAction })) { + return blockerKey; + } + } + function handleNavigational404(pathname) { + let error = getInternalRouterError(404, { pathname }); + let routesToUse = inFlightDataRoutes || dataRoutes; + let { matches, route } = getShortCircuitMatches(routesToUse); + return { notFoundMatches: matches, route, error }; + } + function enableScrollRestoration(positions, getPosition, getKey) { + savedScrollPositions2 = positions; + getScrollPosition = getPosition; + getScrollRestorationKey2 = getKey || null; + if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) { + initialScrollRestored = true; + let y = getSavedScrollPosition(state.location, state.matches); + if (y != null) { + updateState({ restoreScrollPosition: y }); + } + } + return () => { + savedScrollPositions2 = null; + getScrollPosition = null; + getScrollRestorationKey2 = null; + }; + } + function getScrollKey(location, matches) { + if (getScrollRestorationKey2) { + let key = getScrollRestorationKey2( + location, + matches.map((m) => convertRouteMatchToUiMatch(m, state.loaderData)) + ); + return key || location.key; + } + return location.key; + } + function saveScrollPosition(location, matches) { + if (savedScrollPositions2 && getScrollPosition) { + let key = getScrollKey(location, matches); + savedScrollPositions2[key] = getScrollPosition(); + } + } + function getSavedScrollPosition(location, matches) { + if (savedScrollPositions2) { + let key = getScrollKey(location, matches); + let y = savedScrollPositions2[key]; + if (typeof y === "number") { + return y; + } + } + return null; + } + function checkFogOfWar(matches, routesToUse, pathname) { + if (init.patchRoutesOnNavigation) { + if (!matches) { + let fogMatches = matchRoutesImpl( + routesToUse, + pathname, + basename, + true + ); + return { active: true, matches: fogMatches || [] }; + } else { + if (Object.keys(matches[0].params).length > 0) { + let partialMatches = matchRoutesImpl( + routesToUse, + pathname, + basename, + true + ); + return { active: true, matches: partialMatches }; + } + } + } + return { active: false, matches: null }; + } + async function discoverRoutes(matches, pathname, signal, fetcherKey) { + if (!init.patchRoutesOnNavigation) { + return { type: "success", matches }; + } + let partialMatches = matches; + while (true) { + let isNonHMR = inFlightDataRoutes == null; + let routesToUse = inFlightDataRoutes || dataRoutes; + let localManifest = manifest; + try { + await init.patchRoutesOnNavigation({ + signal, + path: pathname, + matches: partialMatches, + fetcherKey, + patch: (routeId, children) => { + if (signal.aborted) return; + patchRoutesImpl( + routeId, + children, + routesToUse, + localManifest, + mapRouteProperties2 + ); + } + }); + } catch (e) { + return { type: "error", error: e, partialMatches }; + } finally { + if (isNonHMR && !signal.aborted) { + dataRoutes = [...dataRoutes]; + } + } + if (signal.aborted) { + return { type: "aborted" }; + } + let newMatches = matchRoutes(routesToUse, pathname, basename); + if (newMatches) { + return { type: "success", matches: newMatches }; + } + let newPartialMatches = matchRoutesImpl( + routesToUse, + pathname, + basename, + true + ); + if (!newPartialMatches || partialMatches.length === newPartialMatches.length && partialMatches.every( + (m, i) => m.route.id === newPartialMatches[i].route.id + )) { + return { type: "success", matches: null }; + } + partialMatches = newPartialMatches; + } + } + function _internalSetRoutes(newRoutes) { + manifest = {}; + inFlightDataRoutes = convertRoutesToDataRoutes( + newRoutes, + mapRouteProperties2, + void 0, + manifest + ); + } + function patchRoutes(routeId, children) { + let isNonHMR = inFlightDataRoutes == null; + let routesToUse = inFlightDataRoutes || dataRoutes; + patchRoutesImpl( + routeId, + children, + routesToUse, + manifest, + mapRouteProperties2 + ); + if (isNonHMR) { + dataRoutes = [...dataRoutes]; + updateState({}); + } + } + router2 = { + get basename() { + return basename; + }, + get future() { + return future; + }, + get state() { + return state; + }, + get routes() { + return dataRoutes; + }, + get window() { + return routerWindow; + }, + initialize, + subscribe, + enableScrollRestoration, + navigate, + fetch: fetch2, + revalidate, + // Passthrough to history-aware createHref used by useHref so we get proper + // hash-aware URLs in DOM paths + createHref: (to) => init.history.createHref(to), + encodeLocation: (to) => init.history.encodeLocation(to), + getFetcher, + deleteFetcher: queueFetcherForDeletion, + dispose, + getBlocker, + deleteBlocker, + patchRoutes, + _internalFetchControllers: fetchControllers, + // TODO: Remove setRoutes, it's temporary to avoid dealing with + // updating the tree while validating the update algorithm. + _internalSetRoutes + }; + return router2; +} +function createStaticHandler(routes, opts) { + invariant( + routes.length > 0, + "You must provide a non-empty routes array to createStaticHandler" + ); + let manifest = {}; + let basename = (opts ? opts.basename : null) || "/"; + let mapRouteProperties2 = (opts == null ? void 0 : opts.mapRouteProperties) || defaultMapRouteProperties; + let dataRoutes = convertRoutesToDataRoutes( + routes, + mapRouteProperties2, + void 0, + manifest + ); + async function query(request, { + requestContext, + filterMatchesToLoad, + skipLoaderErrorBubbling, + skipRevalidation, + dataStrategy, + unstable_respond: respond + } = {}) { + let url = new URL(request.url); + let method = request.method; + let location = createLocation("", createPath(url), null, "default"); + let matches = matchRoutes(dataRoutes, location, basename); + requestContext = requestContext != null ? requestContext : new unstable_RouterContextProvider(); + if (!isValidMethod(method) && method !== "HEAD") { + let error = getInternalRouterError(405, { method }); + let { matches: methodNotAllowedMatches, route } = getShortCircuitMatches(dataRoutes); + let staticContext = { + basename, + location, + matches: methodNotAllowedMatches, + loaderData: {}, + actionData: null, + errors: { + [route.id]: error + }, + statusCode: error.status, + loaderHeaders: {}, + actionHeaders: {} + }; + return respond ? respond(staticContext) : staticContext; + } else if (!matches) { + let error = getInternalRouterError(404, { pathname: location.pathname }); + let { matches: notFoundMatches, route } = getShortCircuitMatches(dataRoutes); + let staticContext = { + basename, + location, + matches: notFoundMatches, + loaderData: {}, + actionData: null, + errors: { + [route.id]: error + }, + statusCode: error.status, + loaderHeaders: {}, + actionHeaders: {} + }; + return respond ? respond(staticContext) : staticContext; + } + if (respond && matches.some( + (m) => m.route.unstable_middleware || typeof m.route.lazy === "object" && m.route.lazy.unstable_middleware + )) { + invariant( + requestContext instanceof unstable_RouterContextProvider, + "When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`" + ); + try { + await loadLazyMiddlewareForMatches( + matches, + manifest, + mapRouteProperties2 + ); + let renderedStaticContext; + let response = await runMiddlewarePipeline( + { + request, + matches, + params: matches[0].params, + // If we're calling middleware then it must be enabled so we can cast + // this to the proper type knowing it's not an `AppLoadContext` + context: requestContext + }, + true, + async () => { + let result2 = await queryImpl( + request, + location, + matches, + requestContext, + dataStrategy || null, + skipLoaderErrorBubbling === true, + null, + filterMatchesToLoad || null, + skipRevalidation === true + ); + if (isResponse(result2)) { + return result2; + } + renderedStaticContext = { location, basename, ...result2 }; + let res = await respond(renderedStaticContext); + return res; + }, + async (error, routeId) => { + var _a; + if (isResponse(error)) { + return error; + } + if (renderedStaticContext) { + if (routeId in renderedStaticContext.loaderData) { + renderedStaticContext.loaderData[routeId] = void 0; + } + return respond( + getStaticContextFromError( + dataRoutes, + renderedStaticContext, + error, + skipLoaderErrorBubbling ? routeId : findNearestBoundary(matches, routeId).route.id + ) + ); + } else { + let boundaryRouteId = skipLoaderErrorBubbling ? routeId : findNearestBoundary( + matches, + ((_a = matches.find( + (m) => m.route.id === routeId || m.route.loader + )) == null ? void 0 : _a.route.id) || routeId + ).route.id; + return respond({ + matches, + location, + basename, + loaderData: {}, + actionData: null, + errors: { + [boundaryRouteId]: error + }, + statusCode: isRouteErrorResponse(error) ? error.status : 500, + actionHeaders: {}, + loaderHeaders: {} + }); + } + } + ); + invariant(isResponse(response), "Expected a response in query()"); + return response; + } catch (e) { + if (isResponse(e)) { + return e; + } + throw e; + } + } + let result = await queryImpl( + request, + location, + matches, + requestContext, + dataStrategy || null, + skipLoaderErrorBubbling === true, + null, + filterMatchesToLoad || null, + skipRevalidation === true + ); + if (isResponse(result)) { + return result; + } + return { location, basename, ...result }; + } + async function queryRoute(request, { + routeId, + requestContext, + dataStrategy, + unstable_respond: respond + } = {}) { + let url = new URL(request.url); + let method = request.method; + let location = createLocation("", createPath(url), null, "default"); + let matches = matchRoutes(dataRoutes, location, basename); + requestContext = requestContext != null ? requestContext : new unstable_RouterContextProvider(); + if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") { + throw getInternalRouterError(405, { method }); + } else if (!matches) { + throw getInternalRouterError(404, { pathname: location.pathname }); + } + let match = routeId ? matches.find((m) => m.route.id === routeId) : getTargetMatch(matches, location); + if (routeId && !match) { + throw getInternalRouterError(403, { + pathname: location.pathname, + routeId + }); + } else if (!match) { + throw getInternalRouterError(404, { pathname: location.pathname }); + } + if (respond && matches.some( + (m) => m.route.unstable_middleware || typeof m.route.lazy === "object" && m.route.lazy.unstable_middleware + )) { + invariant( + requestContext instanceof unstable_RouterContextProvider, + "When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`" + ); + await loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties2); + let response = await runMiddlewarePipeline( + { + request, + matches, + params: matches[0].params, + // If we're calling middleware then it must be enabled so we can cast + // this to the proper type knowing it's not an `AppLoadContext` + context: requestContext + }, + true, + async () => { + let result2 = await queryImpl( + request, + location, + matches, + requestContext, + dataStrategy || null, + false, + match, + null, + false + ); + if (isResponse(result2)) { + return respond(result2); + } + let error2 = result2.errors ? Object.values(result2.errors)[0] : void 0; + if (error2 !== void 0) { + throw error2; + } + let value = result2.actionData ? Object.values(result2.actionData)[0] : Object.values(result2.loaderData)[0]; + return typeof value === "string" ? new Response(value) : Response.json(value); + }, + (error2) => { + if (isResponse(error2)) { + return respond(error2); + } + return new Response(String(error2), { + status: 500, + statusText: "Unexpected Server Error" + }); + } + ); + return response; + } + let result = await queryImpl( + request, + location, + matches, + requestContext, + dataStrategy || null, + false, + match, + null, + false + ); + if (isResponse(result)) { + return result; + } + let error = result.errors ? Object.values(result.errors)[0] : void 0; + if (error !== void 0) { + throw error; + } + if (result.actionData) { + return Object.values(result.actionData)[0]; + } + if (result.loaderData) { + return Object.values(result.loaderData)[0]; + } + return void 0; + } + async function queryImpl(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, skipRevalidation) { + invariant( + request.signal, + "query()/queryRoute() requests must contain an AbortController signal" + ); + try { + if (isMutationMethod(request.method)) { + let result2 = await submit( + request, + matches, + routeMatch || getTargetMatch(matches, location), + requestContext, + dataStrategy, + skipLoaderErrorBubbling, + routeMatch != null, + filterMatchesToLoad, + skipRevalidation + ); + return result2; + } + let result = await loadRouteData( + request, + matches, + requestContext, + dataStrategy, + skipLoaderErrorBubbling, + routeMatch, + filterMatchesToLoad + ); + return isResponse(result) ? result : { + ...result, + actionData: null, + actionHeaders: {} + }; + } catch (e) { + if (isDataStrategyResult(e) && isResponse(e.result)) { + if (e.type === "error") { + throw e.result; + } + return e.result; + } + if (isRedirectResponse(e)) { + return e; + } + throw e; + } + } + async function submit(request, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest, filterMatchesToLoad, skipRevalidation) { + let result; + if (!actionMatch.route.action && !actionMatch.route.lazy) { + let error = getInternalRouterError(405, { + method: request.method, + pathname: new URL(request.url).pathname, + routeId: actionMatch.route.id + }); + if (isRouteRequest) { + throw error; + } + result = { + type: "error", + error + }; + } else { + let dsMatches = getTargetedDataStrategyMatches( + mapRouteProperties2, + manifest, + request, + matches, + actionMatch, + [], + requestContext + ); + let results = await callDataStrategy( + request, + dsMatches, + isRouteRequest, + requestContext, + dataStrategy + ); + result = results[actionMatch.route.id]; + if (request.signal.aborted) { + throwStaticHandlerAbortedError(request, isRouteRequest); + } + } + if (isRedirectResult(result)) { + throw new Response(null, { + status: result.response.status, + headers: { + Location: result.response.headers.get("Location") + } + }); + } + if (isRouteRequest) { + if (isErrorResult(result)) { + throw result.error; + } + return { + matches: [actionMatch], + loaderData: {}, + actionData: { [actionMatch.route.id]: result.data }, + errors: null, + // Note: statusCode + headers are unused here since queryRoute will + // return the raw Response or value + statusCode: 200, + loaderHeaders: {}, + actionHeaders: {} + }; + } + if (skipRevalidation) { + if (isErrorResult(result)) { + let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id); + return { + statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500, + actionData: null, + actionHeaders: { + ...result.headers ? { [actionMatch.route.id]: result.headers } : {} + }, + matches, + loaderData: {}, + errors: { + [boundaryMatch.route.id]: result.error + }, + loaderHeaders: {} + }; + } else { + return { + actionData: { + [actionMatch.route.id]: result.data + }, + actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {}, + matches, + loaderData: {}, + errors: null, + statusCode: result.statusCode || 200, + loaderHeaders: {} + }; + } + } + let loaderRequest = new Request(request.url, { + headers: request.headers, + redirect: request.redirect, + signal: request.signal + }); + if (isErrorResult(result)) { + let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id); + let handlerContext2 = await loadRouteData( + loaderRequest, + matches, + requestContext, + dataStrategy, + skipLoaderErrorBubbling, + null, + filterMatchesToLoad, + [boundaryMatch.route.id, result] + ); + return { + ...handlerContext2, + statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500, + actionData: null, + actionHeaders: { + ...result.headers ? { [actionMatch.route.id]: result.headers } : {} + } + }; + } + let handlerContext = await loadRouteData( + loaderRequest, + matches, + requestContext, + dataStrategy, + skipLoaderErrorBubbling, + null, + filterMatchesToLoad + ); + return { + ...handlerContext, + actionData: { + [actionMatch.route.id]: result.data + }, + // action status codes take precedence over loader status codes + ...result.statusCode ? { statusCode: result.statusCode } : {}, + actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {} + }; + } + async function loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, pendingActionResult) { + let isRouteRequest = routeMatch != null; + if (isRouteRequest && !(routeMatch == null ? void 0 : routeMatch.route.loader) && !(routeMatch == null ? void 0 : routeMatch.route.lazy)) { + throw getInternalRouterError(400, { + method: request.method, + pathname: new URL(request.url).pathname, + routeId: routeMatch == null ? void 0 : routeMatch.route.id + }); + } + let dsMatches; + if (routeMatch) { + dsMatches = getTargetedDataStrategyMatches( + mapRouteProperties2, + manifest, + request, + matches, + routeMatch, + [], + requestContext + ); + } else { + let maxIdx = pendingActionResult && isErrorResult(pendingActionResult[1]) ? ( + // Up to but not including the boundary + matches.findIndex((m) => m.route.id === pendingActionResult[0]) - 1 + ) : void 0; + dsMatches = matches.map((match, index) => { + if (maxIdx != null && index > maxIdx) { + return getDataStrategyMatch( + mapRouteProperties2, + manifest, + request, + match, + [], + requestContext, + false + ); + } + return getDataStrategyMatch( + mapRouteProperties2, + manifest, + request, + match, + [], + requestContext, + (match.route.loader || match.route.lazy) != null && (!filterMatchesToLoad || filterMatchesToLoad(match)) + ); + }); + } + if (!dataStrategy && !dsMatches.some((m) => m.shouldLoad)) { + return { + matches, + loaderData: {}, + errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { + [pendingActionResult[0]]: pendingActionResult[1].error + } : null, + statusCode: 200, + loaderHeaders: {} + }; + } + let results = await callDataStrategy( + request, + dsMatches, + isRouteRequest, + requestContext, + dataStrategy + ); + if (request.signal.aborted) { + throwStaticHandlerAbortedError(request, isRouteRequest); + } + let handlerContext = processRouteLoaderData( + matches, + results, + pendingActionResult, + true, + skipLoaderErrorBubbling + ); + return { + ...handlerContext, + matches + }; + } + async function callDataStrategy(request, matches, isRouteRequest, requestContext, dataStrategy) { + let results = await callDataStrategyImpl( + dataStrategy || defaultDataStrategy, + request, + matches, + null, + requestContext, + true + ); + let dataResults = {}; + await Promise.all( + matches.map(async (match) => { + if (!(match.route.id in results)) { + return; + } + let result = results[match.route.id]; + if (isRedirectDataStrategyResult(result)) { + let response = result.result; + throw normalizeRelativeRoutingRedirectResponse( + response, + request, + match.route.id, + matches, + basename + ); + } + if (isResponse(result.result) && isRouteRequest) { + throw result; + } + dataResults[match.route.id] = await convertDataStrategyResultToDataResult(result); + }) + ); + return dataResults; + } + return { + dataRoutes, + query, + queryRoute + }; +} +function getStaticContextFromError(routes, handlerContext, error, boundaryId) { + let errorBoundaryId = boundaryId || handlerContext._deepestRenderedBoundaryId || routes[0].id; + return { + ...handlerContext, + statusCode: isRouteErrorResponse(error) ? error.status : 500, + errors: { + [errorBoundaryId]: error + } + }; +} +function throwStaticHandlerAbortedError(request, isRouteRequest) { + if (request.signal.reason !== void 0) { + throw request.signal.reason; + } + let method = isRouteRequest ? "queryRoute" : "query"; + throw new Error( + `${method}() call aborted without an \`AbortSignal.reason\`: ${request.method} ${request.url}` + ); +} +function isSubmissionNavigation(opts) { + return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== void 0); +} +function normalizeTo(location, matches, basename, to, fromRouteId, relative) { + let contextualMatches; + let activeRouteMatch; + if (fromRouteId) { + contextualMatches = []; + for (let match of matches) { + contextualMatches.push(match); + if (match.route.id === fromRouteId) { + activeRouteMatch = match; + break; + } + } + } else { + contextualMatches = matches; + activeRouteMatch = matches[matches.length - 1]; + } + let path = resolveTo( + to ? to : ".", + getResolveToMatches(contextualMatches), + stripBasename(location.pathname, basename) || location.pathname, + relative === "path" + ); + if (to == null) { + path.search = location.search; + path.hash = location.hash; + } + if ((to == null || to === "" || to === ".") && activeRouteMatch) { + let nakedIndex = hasNakedIndexQuery(path.search); + if (activeRouteMatch.route.index && !nakedIndex) { + path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index"; + } else if (!activeRouteMatch.route.index && nakedIndex) { + let params = new URLSearchParams(path.search); + let indexValues = params.getAll("index"); + params.delete("index"); + indexValues.filter((v) => v).forEach((v) => params.append("index", v)); + let qs = params.toString(); + path.search = qs ? `?${qs}` : ""; + } + } + if (basename !== "/") { + path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]); + } + return createPath(path); +} +function normalizeNavigateOptions(isFetcher, path, opts) { + if (!opts || !isSubmissionNavigation(opts)) { + return { path }; + } + if (opts.formMethod && !isValidMethod(opts.formMethod)) { + return { + path, + error: getInternalRouterError(405, { method: opts.formMethod }) + }; + } + let getInvalidBodyError = () => ({ + path, + error: getInternalRouterError(400, { type: "invalid-body" }) + }); + let rawFormMethod = opts.formMethod || "get"; + let formMethod = rawFormMethod.toUpperCase(); + let formAction = stripHashFromPath(path); + if (opts.body !== void 0) { + if (opts.formEncType === "text/plain") { + if (!isMutationMethod(formMethod)) { + return getInvalidBodyError(); + } + let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ? ( + // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data + Array.from(opts.body.entries()).reduce( + (acc, [name, value]) => `${acc}${name}=${value} +`, + "" + ) + ) : String(opts.body); + return { + path, + submission: { + formMethod, + formAction, + formEncType: opts.formEncType, + formData: void 0, + json: void 0, + text + } + }; + } else if (opts.formEncType === "application/json") { + if (!isMutationMethod(formMethod)) { + return getInvalidBodyError(); + } + try { + let json = typeof opts.body === "string" ? JSON.parse(opts.body) : opts.body; + return { + path, + submission: { + formMethod, + formAction, + formEncType: opts.formEncType, + formData: void 0, + json, + text: void 0 + } + }; + } catch (e) { + return getInvalidBodyError(); + } + } + } + invariant( + typeof FormData === "function", + "FormData is not available in this environment" + ); + let searchParams; + let formData; + if (opts.formData) { + searchParams = convertFormDataToSearchParams(opts.formData); + formData = opts.formData; + } else if (opts.body instanceof FormData) { + searchParams = convertFormDataToSearchParams(opts.body); + formData = opts.body; + } else if (opts.body instanceof URLSearchParams) { + searchParams = opts.body; + formData = convertSearchParamsToFormData(searchParams); + } else if (opts.body == null) { + searchParams = new URLSearchParams(); + formData = new FormData(); + } else { + try { + searchParams = new URLSearchParams(opts.body); + formData = convertSearchParamsToFormData(searchParams); + } catch (e) { + return getInvalidBodyError(); + } + } + let submission = { + formMethod, + formAction, + formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded", + formData, + json: void 0, + text: void 0 + }; + if (isMutationMethod(submission.formMethod)) { + return { path, submission }; + } + let parsedPath = parsePath(path); + if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) { + searchParams.append("index", ""); + } + parsedPath.search = `?${searchParams}`; + return { path: createPath(parsedPath), submission }; +} +function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest, history, state, matches, submission, location, lazyRoutePropertiesToSkip, initialHydration, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult) { + var _a; + let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : void 0; + let currentUrl = history.createURL(state.location); + let nextUrl = history.createURL(location); + let maxIdx; + if (initialHydration && state.errors) { + let boundaryId = Object.keys(state.errors)[0]; + maxIdx = matches.findIndex((m) => m.route.id === boundaryId); + } else if (pendingActionResult && isErrorResult(pendingActionResult[1])) { + let boundaryId = pendingActionResult[0]; + maxIdx = matches.findIndex((m) => m.route.id === boundaryId) - 1; + } + let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : void 0; + let shouldSkipRevalidation = actionStatus && actionStatus >= 400; + let baseShouldRevalidateArgs = { + currentUrl, + currentParams: ((_a = state.matches[0]) == null ? void 0 : _a.params) || {}, + nextUrl, + nextParams: matches[0].params, + ...submission, + actionResult, + actionStatus + }; + let dsMatches = matches.map((match, index) => { + let { route } = match; + let forceShouldLoad = null; + if (maxIdx != null && index > maxIdx) { + forceShouldLoad = false; + } else if (route.lazy) { + forceShouldLoad = true; + } else if (route.loader == null) { + forceShouldLoad = false; + } else if (initialHydration) { + forceShouldLoad = shouldLoadRouteOnHydration( + route, + state.loaderData, + state.errors + ); + } else if (isNewLoader(state.loaderData, state.matches[index], match)) { + forceShouldLoad = true; + } + if (forceShouldLoad !== null) { + return getDataStrategyMatch( + mapRouteProperties2, + manifest, + request, + match, + lazyRoutePropertiesToSkip, + scopedContext, + forceShouldLoad + ); + } + let defaultShouldRevalidate = shouldSkipRevalidation ? false : ( + // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate + isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search || // Search params affect all loaders + currentUrl.search !== nextUrl.search || isNewRouteInstance(state.matches[index], match) + ); + let shouldRevalidateArgs = { + ...baseShouldRevalidateArgs, + defaultShouldRevalidate + }; + let shouldLoad = shouldRevalidateLoader(match, shouldRevalidateArgs); + return getDataStrategyMatch( + mapRouteProperties2, + manifest, + request, + match, + lazyRoutePropertiesToSkip, + scopedContext, + shouldLoad, + shouldRevalidateArgs + ); + }); + let revalidatingFetchers = []; + fetchLoadMatches.forEach((f, key) => { + if (initialHydration || !matches.some((m) => m.route.id === f.routeId) || fetchersQueuedForDeletion.has(key)) { + return; + } + let fetcherMatches = matchRoutes(routesToUse, f.path, basename); + if (!fetcherMatches) { + revalidatingFetchers.push({ + key, + routeId: f.routeId, + path: f.path, + matches: null, + match: null, + request: null, + controller: null + }); + return; + } + if (fetchRedirectIds.has(key)) { + return; + } + let fetcher = state.fetchers.get(key); + let fetcherMatch = getTargetMatch(fetcherMatches, f.path); + let fetchController = new AbortController(); + let fetchRequest = createClientSideRequest( + history, + f.path, + fetchController.signal + ); + let fetcherDsMatches = null; + if (cancelledFetcherLoads.has(key)) { + cancelledFetcherLoads.delete(key); + fetcherDsMatches = getTargetedDataStrategyMatches( + mapRouteProperties2, + manifest, + fetchRequest, + fetcherMatches, + fetcherMatch, + lazyRoutePropertiesToSkip, + scopedContext + ); + } else if (fetcher && fetcher.state !== "idle" && fetcher.data === void 0) { + if (isRevalidationRequired) { + fetcherDsMatches = getTargetedDataStrategyMatches( + mapRouteProperties2, + manifest, + fetchRequest, + fetcherMatches, + fetcherMatch, + lazyRoutePropertiesToSkip, + scopedContext + ); + } + } else { + let shouldRevalidateArgs = { + ...baseShouldRevalidateArgs, + defaultShouldRevalidate: shouldSkipRevalidation ? false : isRevalidationRequired + }; + if (shouldRevalidateLoader(fetcherMatch, shouldRevalidateArgs)) { + fetcherDsMatches = getTargetedDataStrategyMatches( + mapRouteProperties2, + manifest, + fetchRequest, + fetcherMatches, + fetcherMatch, + lazyRoutePropertiesToSkip, + scopedContext, + shouldRevalidateArgs + ); + } + } + if (fetcherDsMatches) { + revalidatingFetchers.push({ + key, + routeId: f.routeId, + path: f.path, + matches: fetcherDsMatches, + match: fetcherMatch, + request: fetchRequest, + controller: fetchController + }); + } + }); + return { dsMatches, revalidatingFetchers }; +} +function shouldLoadRouteOnHydration(route, loaderData, errors) { + if (route.lazy) { + return true; + } + if (!route.loader) { + return false; + } + let hasData = loaderData != null && route.id in loaderData; + let hasError = errors != null && errors[route.id] !== void 0; + if (!hasData && hasError) { + return false; + } + if (typeof route.loader === "function" && route.loader.hydrate === true) { + return true; + } + return !hasData && !hasError; +} +function isNewLoader(currentLoaderData, currentMatch, match) { + let isNew = ( + // [a] -> [a, b] + !currentMatch || // [a, b] -> [a, c] + match.route.id !== currentMatch.route.id + ); + let isMissingData = !currentLoaderData.hasOwnProperty(match.route.id); + return isNew || isMissingData; +} +function isNewRouteInstance(currentMatch, match) { + let currentPath = currentMatch.route.path; + return ( + // param change for this match, /users/123 -> /users/456 + currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path + // e.g. /files/images/avatar.jpg -> files/finances.xls + currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"] + ); +} +function shouldRevalidateLoader(loaderMatch, arg) { + if (loaderMatch.route.shouldRevalidate) { + let routeChoice = loaderMatch.route.shouldRevalidate(arg); + if (typeof routeChoice === "boolean") { + return routeChoice; + } + } + return arg.defaultShouldRevalidate; +} +function patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties2) { + let childrenToPatch; + if (routeId) { + let route = manifest[routeId]; + invariant( + route, + `No route found to patch children into: routeId = ${routeId}` + ); + if (!route.children) { + route.children = []; + } + childrenToPatch = route.children; + } else { + childrenToPatch = routesToUse; + } + let uniqueChildren = children.filter( + (newRoute) => !childrenToPatch.some( + (existingRoute) => isSameRoute(newRoute, existingRoute) + ) + ); + let newRoutes = convertRoutesToDataRoutes( + uniqueChildren, + mapRouteProperties2, + [routeId || "_", "patch", String((childrenToPatch == null ? void 0 : childrenToPatch.length) || "0")], + manifest + ); + childrenToPatch.push(...newRoutes); +} +function isSameRoute(newRoute, existingRoute) { + if ("id" in newRoute && "id" in existingRoute && newRoute.id === existingRoute.id) { + return true; + } + if (!(newRoute.index === existingRoute.index && newRoute.path === existingRoute.path && newRoute.caseSensitive === existingRoute.caseSensitive)) { + return false; + } + if ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) { + return true; + } + return newRoute.children.every( + (aChild, i) => { + var _a; + return (_a = existingRoute.children) == null ? void 0 : _a.some((bChild) => isSameRoute(aChild, bChild)); + } + ); +} +var lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap(); +var loadLazyRouteProperty = ({ + key, + route, + manifest, + mapRouteProperties: mapRouteProperties2 +}) => { + let routeToUpdate = manifest[route.id]; + invariant(routeToUpdate, "No route found in manifest"); + if (!routeToUpdate.lazy || typeof routeToUpdate.lazy !== "object") { + return; + } + let lazyFn = routeToUpdate.lazy[key]; + if (!lazyFn) { + return; + } + let cache = lazyRoutePropertyCache.get(routeToUpdate); + if (!cache) { + cache = {}; + lazyRoutePropertyCache.set(routeToUpdate, cache); + } + let cachedPromise = cache[key]; + if (cachedPromise) { + return cachedPromise; + } + let propertyPromise = (async () => { + let isUnsupported = isUnsupportedLazyRouteObjectKey(key); + let staticRouteValue = routeToUpdate[key]; + let isStaticallyDefined = staticRouteValue !== void 0 && key !== "hasErrorBoundary"; + if (isUnsupported) { + warning( + !isUnsupported, + "Route property " + key + " is not a supported lazy route property. This property will be ignored." + ); + cache[key] = Promise.resolve(); + } else if (isStaticallyDefined) { + warning( + false, + `Route "${routeToUpdate.id}" has a static property "${key}" defined. The lazy property will be ignored.` + ); + } else { + let value = await lazyFn(); + if (value != null) { + Object.assign(routeToUpdate, { [key]: value }); + Object.assign(routeToUpdate, mapRouteProperties2(routeToUpdate)); + } + } + if (typeof routeToUpdate.lazy === "object") { + routeToUpdate.lazy[key] = void 0; + if (Object.values(routeToUpdate.lazy).every((value) => value === void 0)) { + routeToUpdate.lazy = void 0; + } + } + })(); + cache[key] = propertyPromise; + return propertyPromise; +}; +var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap(); +function loadLazyRoute(route, type, manifest, mapRouteProperties2, lazyRoutePropertiesToSkip) { + let routeToUpdate = manifest[route.id]; + invariant(routeToUpdate, "No route found in manifest"); + if (!route.lazy) { + return { + lazyRoutePromise: void 0, + lazyHandlerPromise: void 0 + }; + } + if (typeof route.lazy === "function") { + let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate); + if (cachedPromise) { + return { + lazyRoutePromise: cachedPromise, + lazyHandlerPromise: cachedPromise + }; + } + let lazyRoutePromise2 = (async () => { + invariant( + typeof route.lazy === "function", + "No lazy route function found" + ); + let lazyRoute = await route.lazy(); + let routeUpdates = {}; + for (let lazyRouteProperty in lazyRoute) { + let lazyValue = lazyRoute[lazyRouteProperty]; + if (lazyValue === void 0) { + continue; + } + let isUnsupported = isUnsupportedLazyRouteFunctionKey(lazyRouteProperty); + let staticRouteValue = routeToUpdate[lazyRouteProperty]; + let isStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based + // on the route updates + lazyRouteProperty !== "hasErrorBoundary"; + if (isUnsupported) { + warning( + !isUnsupported, + "Route property " + lazyRouteProperty + " is not a supported property to be returned from a lazy route function. This property will be ignored." + ); + } else if (isStaticallyDefined) { + warning( + !isStaticallyDefined, + `Route "${routeToUpdate.id}" has a static property "${lazyRouteProperty}" defined but its lazy function is also returning a value for this property. The lazy route property "${lazyRouteProperty}" will be ignored.` + ); + } else { + routeUpdates[lazyRouteProperty] = lazyValue; + } + } + Object.assign(routeToUpdate, routeUpdates); + Object.assign(routeToUpdate, { + // To keep things framework agnostic, we use the provided `mapRouteProperties` + // function to set the framework-aware properties (`element`/`hasErrorBoundary`) + // since the logic will differ between frameworks. + ...mapRouteProperties2(routeToUpdate), + lazy: void 0 + }); + })(); + lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise2); + lazyRoutePromise2.catch(() => { + }); + return { + lazyRoutePromise: lazyRoutePromise2, + lazyHandlerPromise: lazyRoutePromise2 + }; + } + let lazyKeys = Object.keys(route.lazy); + let lazyPropertyPromises = []; + let lazyHandlerPromise = void 0; + for (let key of lazyKeys) { + if (lazyRoutePropertiesToSkip && lazyRoutePropertiesToSkip.includes(key)) { + continue; + } + let promise = loadLazyRouteProperty({ + key, + route, + manifest, + mapRouteProperties: mapRouteProperties2 + }); + if (promise) { + lazyPropertyPromises.push(promise); + if (key === type) { + lazyHandlerPromise = promise; + } + } + } + let lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => { + }) : void 0; + lazyRoutePromise == null ? void 0 : lazyRoutePromise.catch(() => { + }); + lazyHandlerPromise == null ? void 0 : lazyHandlerPromise.catch(() => { + }); + return { + lazyRoutePromise, + lazyHandlerPromise + }; +} +function isNonNullable(value) { + return value !== void 0; +} +function loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties2) { + let promises = matches.map(({ route }) => { + if (typeof route.lazy !== "object" || !route.lazy.unstable_middleware) { + return void 0; + } + return loadLazyRouteProperty({ + key: "unstable_middleware", + route, + manifest, + mapRouteProperties: mapRouteProperties2 + }); + }).filter(isNonNullable); + return promises.length > 0 ? Promise.all(promises) : void 0; +} +async function defaultDataStrategy(args) { + let matchesToLoad = args.matches.filter((m) => m.shouldLoad); + let keyedResults = {}; + let results = await Promise.all(matchesToLoad.map((m) => m.resolve())); + results.forEach((result, i) => { + keyedResults[matchesToLoad[i].route.id] = result; + }); + return keyedResults; +} +async function defaultDataStrategyWithMiddleware(args) { + if (!args.matches.some((m) => m.route.unstable_middleware)) { + return defaultDataStrategy(args); + } + return runMiddlewarePipeline( + args, + false, + () => defaultDataStrategy(args), + (error, routeId) => ({ [routeId]: { type: "error", result: error } }) + ); +} +async function runMiddlewarePipeline(args, propagateResult, handler, errorHandler) { + let { matches, request, params, context } = args; + let middlewareState = { + handlerResult: void 0 + }; + try { + let tuples = matches.flatMap( + (m) => m.route.unstable_middleware ? m.route.unstable_middleware.map((fn) => [m.route.id, fn]) : [] + ); + let result = await callRouteMiddleware( + { request, params, context }, + tuples, + propagateResult, + middlewareState, + handler + ); + return propagateResult ? result : middlewareState.handlerResult; + } catch (e) { + if (!middlewareState.middlewareError) { + throw e; + } + let result = await errorHandler( + middlewareState.middlewareError.error, + middlewareState.middlewareError.routeId + ); + if (propagateResult || !middlewareState.handlerResult) { + return result; + } + return Object.assign(middlewareState.handlerResult, result); + } +} +async function callRouteMiddleware(args, middlewares, propagateResult, middlewareState, handler, idx = 0) { + let { request } = args; + if (request.signal.aborted) { + if (request.signal.reason) { + throw request.signal.reason; + } + throw new Error( + `Request aborted without an \`AbortSignal.reason\`: ${request.method} ${request.url}` + ); + } + let tuple = middlewares[idx]; + if (!tuple) { + middlewareState.handlerResult = await handler(); + return middlewareState.handlerResult; + } + let [routeId, middleware] = tuple; + let nextCalled = false; + let nextResult = void 0; + let next = async () => { + if (nextCalled) { + throw new Error("You may only call `next()` once per middleware"); + } + nextCalled = true; + let result = await callRouteMiddleware( + args, + middlewares, + propagateResult, + middlewareState, + handler, + idx + 1 + ); + if (propagateResult) { + nextResult = result; + return nextResult; + } + }; + try { + let result = await middleware( + { + request: args.request, + params: args.params, + context: args.context + }, + next + ); + if (nextCalled) { + if (result === void 0) { + return nextResult; + } else { + return result; + } + } else { + return next(); + } + } catch (error) { + if (!middlewareState.middlewareError) { + middlewareState.middlewareError = { routeId, error }; + } else if (middlewareState.middlewareError.error !== error) { + middlewareState.middlewareError = { routeId, error }; + } + throw error; + } +} +function getDataStrategyMatchLazyPromises(mapRouteProperties2, manifest, request, match, lazyRoutePropertiesToSkip) { + let lazyMiddlewarePromise = loadLazyRouteProperty({ + key: "unstable_middleware", + route: match.route, + manifest, + mapRouteProperties: mapRouteProperties2 + }); + let lazyRoutePromises = loadLazyRoute( + match.route, + isMutationMethod(request.method) ? "action" : "loader", + manifest, + mapRouteProperties2, + lazyRoutePropertiesToSkip + ); + return { + middleware: lazyMiddlewarePromise, + route: lazyRoutePromises.lazyRoutePromise, + handler: lazyRoutePromises.lazyHandlerPromise + }; +} +function getDataStrategyMatch(mapRouteProperties2, manifest, request, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, unstable_shouldRevalidateArgs = null) { + let isUsingNewApi = false; + let _lazyPromises = getDataStrategyMatchLazyPromises( + mapRouteProperties2, + manifest, + request, + match, + lazyRoutePropertiesToSkip + ); + return { + ...match, + _lazyPromises, + shouldLoad, + unstable_shouldRevalidateArgs, + unstable_shouldCallHandler(defaultShouldRevalidate) { + isUsingNewApi = true; + if (!unstable_shouldRevalidateArgs) { + return shouldLoad; + } + if (typeof defaultShouldRevalidate === "boolean") { + return shouldRevalidateLoader(match, { + ...unstable_shouldRevalidateArgs, + defaultShouldRevalidate + }); + } + return shouldRevalidateLoader(match, unstable_shouldRevalidateArgs); + }, + resolve(handlerOverride) { + if (isUsingNewApi || shouldLoad || handlerOverride && request.method === "GET" && (match.route.lazy || match.route.loader)) { + return callLoaderOrAction({ + request, + match, + lazyHandlerPromise: _lazyPromises == null ? void 0 : _lazyPromises.handler, + lazyRoutePromise: _lazyPromises == null ? void 0 : _lazyPromises.route, + handlerOverride, + scopedContext + }); + } + return Promise.resolve({ type: "data", result: void 0 }); + } + }; +} +function getTargetedDataStrategyMatches(mapRouteProperties2, manifest, request, matches, targetMatch, lazyRoutePropertiesToSkip, scopedContext, shouldRevalidateArgs = null) { + return matches.map((match) => { + if (match.route.id !== targetMatch.route.id) { + return { + ...match, + shouldLoad: false, + unstable_shouldRevalidateArgs: shouldRevalidateArgs, + unstable_shouldCallHandler: () => false, + _lazyPromises: getDataStrategyMatchLazyPromises( + mapRouteProperties2, + manifest, + request, + match, + lazyRoutePropertiesToSkip + ), + resolve: () => Promise.resolve({ type: "data", result: void 0 }) + }; + } + return getDataStrategyMatch( + mapRouteProperties2, + manifest, + request, + match, + lazyRoutePropertiesToSkip, + scopedContext, + true, + shouldRevalidateArgs + ); + }); +} +async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherKey, scopedContext, isStaticHandler) { + if (matches.some((m) => { + var _a; + return (_a = m._lazyPromises) == null ? void 0 : _a.middleware; + })) { + await Promise.all(matches.map((m) => { + var _a; + return (_a = m._lazyPromises) == null ? void 0 : _a.middleware; + })); + } + let dataStrategyArgs = { + request, + params: matches[0].params, + context: scopedContext, + matches + }; + let unstable_runClientMiddleware = isStaticHandler ? () => { + throw new Error( + "You cannot call `unstable_runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`" + ); + } : (cb) => { + let typedDataStrategyArgs = dataStrategyArgs; + return runMiddlewarePipeline( + typedDataStrategyArgs, + false, + () => cb({ + ...typedDataStrategyArgs, + fetcherKey, + unstable_runClientMiddleware: () => { + throw new Error( + "Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler" + ); + } + }), + (error, routeId) => ({ + [routeId]: { type: "error", result: error } + }) + ); + }; + let results = await dataStrategyImpl({ + ...dataStrategyArgs, + fetcherKey, + unstable_runClientMiddleware + }); + try { + await Promise.all( + matches.flatMap((m) => { + var _a, _b; + return [(_a = m._lazyPromises) == null ? void 0 : _a.handler, (_b = m._lazyPromises) == null ? void 0 : _b.route]; + }) + ); + } catch (e) { + } + return results; +} +async function callLoaderOrAction({ + request, + match, + lazyHandlerPromise, + lazyRoutePromise, + handlerOverride, + scopedContext +}) { + let result; + let onReject; + let isAction = isMutationMethod(request.method); + let type = isAction ? "action" : "loader"; + let runHandler = (handler) => { + let reject; + let abortPromise = new Promise((_, r) => reject = r); + onReject = () => reject(); + request.signal.addEventListener("abort", onReject); + let actualHandler = (ctx) => { + if (typeof handler !== "function") { + return Promise.reject( + new Error( + `You cannot call the handler for a route which defines a boolean "${type}" [routeId: ${match.route.id}]` + ) + ); + } + return handler( + { + request, + params: match.params, + context: scopedContext + }, + ...ctx !== void 0 ? [ctx] : [] + ); + }; + let handlerPromise = (async () => { + try { + let val = await (handlerOverride ? handlerOverride((ctx) => actualHandler(ctx)) : actualHandler()); + return { type: "data", result: val }; + } catch (e) { + return { type: "error", result: e }; + } + })(); + return Promise.race([handlerPromise, abortPromise]); + }; + try { + let handler = isAction ? match.route.action : match.route.loader; + if (lazyHandlerPromise || lazyRoutePromise) { + if (handler) { + let handlerError; + let [value] = await Promise.all([ + // If the handler throws, don't let it immediately bubble out, + // since we need to let the lazy() execution finish so we know if this + // route has a boundary that can handle the error + runHandler(handler).catch((e) => { + handlerError = e; + }), + // Ensure all lazy route promises are resolved before continuing + lazyHandlerPromise, + lazyRoutePromise + ]); + if (handlerError !== void 0) { + throw handlerError; + } + result = value; + } else { + await lazyHandlerPromise; + let handler2 = isAction ? match.route.action : match.route.loader; + if (handler2) { + [result] = await Promise.all([runHandler(handler2), lazyRoutePromise]); + } else if (type === "action") { + let url = new URL(request.url); + let pathname = url.pathname + url.search; + throw getInternalRouterError(405, { + method: request.method, + pathname, + routeId: match.route.id + }); + } else { + return { type: "data", result: void 0 }; + } + } + } else if (!handler) { + let url = new URL(request.url); + let pathname = url.pathname + url.search; + throw getInternalRouterError(404, { + pathname + }); + } else { + result = await runHandler(handler); + } + } catch (e) { + return { type: "error", result: e }; + } finally { + if (onReject) { + request.signal.removeEventListener("abort", onReject); + } + } + return result; +} +async function convertDataStrategyResultToDataResult(dataStrategyResult) { + var _a, _b, _c, _d, _e, _f; + let { result, type } = dataStrategyResult; + if (isResponse(result)) { + let data2; + try { + let contentType = result.headers.get("Content-Type"); + if (contentType && /\bapplication\/json\b/.test(contentType)) { + if (result.body == null) { + data2 = null; + } else { + data2 = await result.json(); + } + } else { + data2 = await result.text(); + } + } catch (e) { + return { type: "error", error: e }; + } + if (type === "error") { + return { + type: "error", + error: new ErrorResponseImpl(result.status, result.statusText, data2), + statusCode: result.status, + headers: result.headers + }; + } + return { + type: "data", + data: data2, + statusCode: result.status, + headers: result.headers + }; + } + if (type === "error") { + if (isDataWithResponseInit(result)) { + if (result.data instanceof Error) { + return { + type: "error", + error: result.data, + statusCode: (_a = result.init) == null ? void 0 : _a.status, + headers: ((_b = result.init) == null ? void 0 : _b.headers) ? new Headers(result.init.headers) : void 0 + }; + } + return { + type: "error", + error: new ErrorResponseImpl( + ((_c = result.init) == null ? void 0 : _c.status) || 500, + void 0, + result.data + ), + statusCode: isRouteErrorResponse(result) ? result.status : void 0, + headers: ((_d = result.init) == null ? void 0 : _d.headers) ? new Headers(result.init.headers) : void 0 + }; + } + return { + type: "error", + error: result, + statusCode: isRouteErrorResponse(result) ? result.status : void 0 + }; + } + if (isDataWithResponseInit(result)) { + return { + type: "data", + data: result.data, + statusCode: (_e = result.init) == null ? void 0 : _e.status, + headers: ((_f = result.init) == null ? void 0 : _f.headers) ? new Headers(result.init.headers) : void 0 + }; + } + return { type: "data", data: result }; +} +function normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename) { + let location = response.headers.get("Location"); + invariant( + location, + "Redirects returned/thrown from loaders/actions must have a Location header" + ); + if (!ABSOLUTE_URL_REGEX.test(location)) { + let trimmedMatches = matches.slice( + 0, + matches.findIndex((m) => m.route.id === routeId) + 1 + ); + location = normalizeTo( + new URL(request.url), + trimmedMatches, + basename, + location + ); + response.headers.set("Location", location); + } + return response; +} +function normalizeRedirectLocation(location, currentUrl, basename) { + if (ABSOLUTE_URL_REGEX.test(location)) { + let normalizedLocation = location; + let url = normalizedLocation.startsWith("//") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation); + let isSameBasename = stripBasename(url.pathname, basename) != null; + if (url.origin === currentUrl.origin && isSameBasename) { + return url.pathname + url.search + url.hash; + } + } + return location; +} +function createClientSideRequest(history, location, signal, submission) { + let url = history.createURL(stripHashFromPath(location)).toString(); + let init = { signal }; + if (submission && isMutationMethod(submission.formMethod)) { + let { formMethod, formEncType } = submission; + init.method = formMethod.toUpperCase(); + if (formEncType === "application/json") { + init.headers = new Headers({ "Content-Type": formEncType }); + init.body = JSON.stringify(submission.json); + } else if (formEncType === "text/plain") { + init.body = submission.text; + } else if (formEncType === "application/x-www-form-urlencoded" && submission.formData) { + init.body = convertFormDataToSearchParams(submission.formData); + } else { + init.body = submission.formData; + } + } + return new Request(url, init); +} +function convertFormDataToSearchParams(formData) { + let searchParams = new URLSearchParams(); + for (let [key, value] of formData.entries()) { + searchParams.append(key, typeof value === "string" ? value : value.name); + } + return searchParams; +} +function convertSearchParamsToFormData(searchParams) { + let formData = new FormData(); + for (let [key, value] of searchParams.entries()) { + formData.append(key, value); + } + return formData; +} +function processRouteLoaderData(matches, results, pendingActionResult, isStaticHandler = false, skipLoaderErrorBubbling = false) { + let loaderData = {}; + let errors = null; + let statusCode; + let foundError = false; + let loaderHeaders = {}; + let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : void 0; + matches.forEach((match) => { + if (!(match.route.id in results)) { + return; + } + let id = match.route.id; + let result = results[id]; + invariant( + !isRedirectResult(result), + "Cannot handle redirect results in processLoaderData" + ); + if (isErrorResult(result)) { + let error = result.error; + if (pendingError !== void 0) { + error = pendingError; + pendingError = void 0; + } + errors = errors || {}; + if (skipLoaderErrorBubbling) { + errors[id] = error; + } else { + let boundaryMatch = findNearestBoundary(matches, id); + if (errors[boundaryMatch.route.id] == null) { + errors[boundaryMatch.route.id] = error; + } + } + if (!isStaticHandler) { + loaderData[id] = ResetLoaderDataSymbol; + } + if (!foundError) { + foundError = true; + statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500; + } + if (result.headers) { + loaderHeaders[id] = result.headers; + } + } else { + loaderData[id] = result.data; + if (result.statusCode && result.statusCode !== 200 && !foundError) { + statusCode = result.statusCode; + } + if (result.headers) { + loaderHeaders[id] = result.headers; + } + } + }); + if (pendingError !== void 0 && pendingActionResult) { + errors = { [pendingActionResult[0]]: pendingError }; + if (pendingActionResult[2]) { + loaderData[pendingActionResult[2]] = void 0; + } + } + return { + loaderData, + errors, + statusCode: statusCode || 200, + loaderHeaders + }; +} +function processLoaderData(state, matches, results, pendingActionResult, revalidatingFetchers, fetcherResults) { + let { loaderData, errors } = processRouteLoaderData( + matches, + results, + pendingActionResult + ); + revalidatingFetchers.filter((f) => !f.matches || f.matches.some((m) => m.shouldLoad)).forEach((rf) => { + let { key, match, controller } = rf; + let result = fetcherResults[key]; + invariant(result, "Did not find corresponding fetcher result"); + if (controller && controller.signal.aborted) { + return; + } else if (isErrorResult(result)) { + let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id); + if (!(errors && errors[boundaryMatch.route.id])) { + errors = { + ...errors, + [boundaryMatch.route.id]: result.error + }; + } + state.fetchers.delete(key); + } else if (isRedirectResult(result)) { + invariant(false, "Unhandled fetcher revalidation redirect"); + } else { + let doneFetcher = getDoneFetcher(result.data); + state.fetchers.set(key, doneFetcher); + } + }); + return { loaderData, errors }; +} +function mergeLoaderData(loaderData, newLoaderData, matches, errors) { + let mergedLoaderData = Object.entries(newLoaderData).filter(([, v]) => v !== ResetLoaderDataSymbol).reduce((merged, [k, v]) => { + merged[k] = v; + return merged; + }, {}); + for (let match of matches) { + let id = match.route.id; + if (!newLoaderData.hasOwnProperty(id) && loaderData.hasOwnProperty(id) && match.route.loader) { + mergedLoaderData[id] = loaderData[id]; + } + if (errors && errors.hasOwnProperty(id)) { + break; + } + } + return mergedLoaderData; +} +function getActionDataForCommit(pendingActionResult) { + if (!pendingActionResult) { + return {}; + } + return isErrorResult(pendingActionResult[1]) ? { + // Clear out prior actionData on errors + actionData: {} + } : { + actionData: { + [pendingActionResult[0]]: pendingActionResult[1].data + } + }; +} +function findNearestBoundary(matches, routeId) { + let eligibleMatches = routeId ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1) : [...matches]; + return eligibleMatches.reverse().find((m) => m.route.hasErrorBoundary === true) || matches[0]; +} +function getShortCircuitMatches(routes) { + let route = routes.length === 1 ? routes[0] : routes.find((r) => r.index || !r.path || r.path === "/") || { + id: `__shim-error-route__` + }; + return { + matches: [ + { + params: {}, + pathname: "", + pathnameBase: "", + route + } + ], + route + }; +} +function getInternalRouterError(status, { + pathname, + routeId, + method, + type, + message +} = {}) { + let statusText = "Unknown Server Error"; + let errorMessage = "Unknown @remix-run/router error"; + if (status === 400) { + statusText = "Bad Request"; + if (method && pathname && routeId) { + errorMessage = `You made a ${method} request to "${pathname}" but did not provide a \`loader\` for route "${routeId}", so there is no way to handle the request.`; + } else if (type === "invalid-body") { + errorMessage = "Unable to encode submission body"; + } + } else if (status === 403) { + statusText = "Forbidden"; + errorMessage = `Route "${routeId}" does not match URL "${pathname}"`; + } else if (status === 404) { + statusText = "Not Found"; + errorMessage = `No route matches URL "${pathname}"`; + } else if (status === 405) { + statusText = "Method Not Allowed"; + if (method && pathname && routeId) { + errorMessage = `You made a ${method.toUpperCase()} request to "${pathname}" but did not provide an \`action\` for route "${routeId}", so there is no way to handle the request.`; + } else if (method) { + errorMessage = `Invalid request method "${method.toUpperCase()}"`; + } + } + return new ErrorResponseImpl( + status || 500, + statusText, + new Error(errorMessage), + true + ); +} +function findRedirect(results) { + let entries = Object.entries(results); + for (let i = entries.length - 1; i >= 0; i--) { + let [key, result] = entries[i]; + if (isRedirectResult(result)) { + return { key, result }; + } + } +} +function stripHashFromPath(path) { + let parsedPath = typeof path === "string" ? parsePath(path) : path; + return createPath({ ...parsedPath, hash: "" }); +} +function isHashChangeOnly(a, b) { + if (a.pathname !== b.pathname || a.search !== b.search) { + return false; + } + if (a.hash === "") { + return b.hash !== ""; + } else if (a.hash === b.hash) { + return true; + } else if (b.hash !== "") { + return true; + } + return false; +} +function isDataStrategyResult(result) { + return result != null && typeof result === "object" && "type" in result && "result" in result && (result.type === "data" || result.type === "error"); +} +function isRedirectDataStrategyResult(result) { + return isResponse(result.result) && redirectStatusCodes.has(result.result.status); +} +function isErrorResult(result) { + return result.type === "error"; +} +function isRedirectResult(result) { + return (result && result.type) === "redirect"; +} +function isDataWithResponseInit(value) { + return typeof value === "object" && value != null && "type" in value && "data" in value && "init" in value && value.type === "DataWithResponseInit"; +} +function isResponse(value) { + return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined"; +} +function isRedirectStatusCode(statusCode) { + return redirectStatusCodes.has(statusCode); +} +function isRedirectResponse(result) { + return isResponse(result) && isRedirectStatusCode(result.status) && result.headers.has("Location"); +} +function isValidMethod(method) { + return validRequestMethods.has(method.toUpperCase()); +} +function isMutationMethod(method) { + return validMutationMethods.has(method.toUpperCase()); +} +function hasNakedIndexQuery(search) { + return new URLSearchParams(search).getAll("index").some((v) => v === ""); +} +function getTargetMatch(matches, location) { + let search = typeof location === "string" ? parsePath(location).search : location.search; + if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || "")) { + return matches[matches.length - 1]; + } + let pathMatches = getPathContributingMatches(matches); + return pathMatches[pathMatches.length - 1]; +} +function getSubmissionFromNavigation(navigation) { + let { formMethod, formAction, formEncType, text, formData, json } = navigation; + if (!formMethod || !formAction || !formEncType) { + return; + } + if (text != null) { + return { + formMethod, + formAction, + formEncType, + formData: void 0, + json: void 0, + text + }; + } else if (formData != null) { + return { + formMethod, + formAction, + formEncType, + formData, + json: void 0, + text: void 0 + }; + } else if (json !== void 0) { + return { + formMethod, + formAction, + formEncType, + formData: void 0, + json, + text: void 0 + }; + } +} +function getLoadingNavigation(location, submission) { + if (submission) { + let navigation = { + state: "loading", + location, + formMethod: submission.formMethod, + formAction: submission.formAction, + formEncType: submission.formEncType, + formData: submission.formData, + json: submission.json, + text: submission.text + }; + return navigation; + } else { + let navigation = { + state: "loading", + location, + formMethod: void 0, + formAction: void 0, + formEncType: void 0, + formData: void 0, + json: void 0, + text: void 0 + }; + return navigation; + } +} +function getSubmittingNavigation(location, submission) { + let navigation = { + state: "submitting", + location, + formMethod: submission.formMethod, + formAction: submission.formAction, + formEncType: submission.formEncType, + formData: submission.formData, + json: submission.json, + text: submission.text + }; + return navigation; +} +function getLoadingFetcher(submission, data2) { + if (submission) { + let fetcher = { + state: "loading", + formMethod: submission.formMethod, + formAction: submission.formAction, + formEncType: submission.formEncType, + formData: submission.formData, + json: submission.json, + text: submission.text, + data: data2 + }; + return fetcher; + } else { + let fetcher = { + state: "loading", + formMethod: void 0, + formAction: void 0, + formEncType: void 0, + formData: void 0, + json: void 0, + text: void 0, + data: data2 + }; + return fetcher; + } +} +function getSubmittingFetcher(submission, existingFetcher) { + let fetcher = { + state: "submitting", + formMethod: submission.formMethod, + formAction: submission.formAction, + formEncType: submission.formEncType, + formData: submission.formData, + json: submission.json, + text: submission.text, + data: existingFetcher ? existingFetcher.data : void 0 + }; + return fetcher; +} +function getDoneFetcher(data2) { + let fetcher = { + state: "idle", + formMethod: void 0, + formAction: void 0, + formEncType: void 0, + formData: void 0, + json: void 0, + text: void 0, + data: data2 + }; + return fetcher; +} +function restoreAppliedTransitions(_window, transitions) { + try { + let sessionPositions = _window.sessionStorage.getItem( + TRANSITIONS_STORAGE_KEY + ); + if (sessionPositions) { + let json = JSON.parse(sessionPositions); + for (let [k, v] of Object.entries(json || {})) { + if (v && Array.isArray(v)) { + transitions.set(k, new Set(v || [])); + } + } + } + } catch (e) { + } +} +function persistAppliedTransitions(_window, transitions) { + if (transitions.size > 0) { + let json = {}; + for (let [k, v] of transitions) { + json[k] = [...v]; + } + try { + _window.sessionStorage.setItem( + TRANSITIONS_STORAGE_KEY, + JSON.stringify(json) + ); + } catch (error) { + warning( + false, + `Failed to save applied view transitions in sessionStorage (${error}).` + ); + } + } +} +function createDeferred() { + let resolve; + let reject; + let promise = new Promise((res, rej) => { + resolve = async (val) => { + res(val); + try { + await promise; + } catch (e) { + } + }; + reject = async (error) => { + rej(error); + try { + await promise; + } catch (e) { + } + }; + }); + return { + promise, + //@ts-ignore + resolve, + //@ts-ignore + reject + }; +} +var DataRouterContext = React.createContext(null); +DataRouterContext.displayName = "DataRouter"; +var DataRouterStateContext = React.createContext(null); +DataRouterStateContext.displayName = "DataRouterState"; +var ViewTransitionContext = React.createContext({ + isTransitioning: false +}); +ViewTransitionContext.displayName = "ViewTransition"; +var FetchersContext = React.createContext( + /* @__PURE__ */ new Map() +); +FetchersContext.displayName = "Fetchers"; +var AwaitContext = React.createContext(null); +AwaitContext.displayName = "Await"; +var NavigationContext = React.createContext( + null +); +NavigationContext.displayName = "Navigation"; +var LocationContext = React.createContext( + null +); +LocationContext.displayName = "Location"; +var RouteContext = React.createContext({ + outlet: null, + matches: [], + isDataRoute: false +}); +RouteContext.displayName = "Route"; +var RouteErrorContext = React.createContext(null); +RouteErrorContext.displayName = "RouteError"; +var ENABLE_DEV_WARNINGS = true; +function useHref(to, { relative } = {}) { + invariant( + useInRouterContext(), + // TODO: This error is probably because they somehow have 2 versions of the + // router loaded. We can help them understand how to avoid that. + `useHref() may be used only in the context of a component.` + ); + let { basename, navigator } = React2.useContext(NavigationContext); + let { hash, pathname, search } = useResolvedPath(to, { relative }); + let joinedPathname = pathname; + if (basename !== "/") { + joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]); + } + return navigator.createHref({ pathname: joinedPathname, search, hash }); +} +function useInRouterContext() { + return React2.useContext(LocationContext) != null; +} +function useLocation() { + invariant( + useInRouterContext(), + // TODO: This error is probably because they somehow have 2 versions of the + // router loaded. We can help them understand how to avoid that. + `useLocation() may be used only in the context of a component.` + ); + return React2.useContext(LocationContext).location; +} +function useNavigationType() { + return React2.useContext(LocationContext).navigationType; +} +function useMatch(pattern) { + invariant( + useInRouterContext(), + // TODO: This error is probably because they somehow have 2 versions of the + // router loaded. We can help them understand how to avoid that. + `useMatch() may be used only in the context of a component.` + ); + let { pathname } = useLocation(); + return React2.useMemo( + () => matchPath(pattern, decodePath(pathname)), + [pathname, pattern] + ); +} +var navigateEffectWarning = `You should call navigate() in a React.useEffect(), not when your component is first rendered.`; +function useIsomorphicLayoutEffect(cb) { + let isStatic = React2.useContext(NavigationContext).static; + if (!isStatic) { + React2.useLayoutEffect(cb); + } +} +function useNavigate() { + let { isDataRoute } = React2.useContext(RouteContext); + return isDataRoute ? useNavigateStable() : useNavigateUnstable(); +} +function useNavigateUnstable() { + invariant( + useInRouterContext(), + // TODO: This error is probably because they somehow have 2 versions of the + // router loaded. We can help them understand how to avoid that. + `useNavigate() may be used only in the context of a component.` + ); + let dataRouterContext = React2.useContext(DataRouterContext); + let { basename, navigator } = React2.useContext(NavigationContext); + let { matches } = React2.useContext(RouteContext); + let { pathname: locationPathname } = useLocation(); + let routePathnamesJson = JSON.stringify(getResolveToMatches(matches)); + let activeRef = React2.useRef(false); + useIsomorphicLayoutEffect(() => { + activeRef.current = true; + }); + let navigate = React2.useCallback( + (to, options = {}) => { + warning(activeRef.current, navigateEffectWarning); + if (!activeRef.current) return; + if (typeof to === "number") { + navigator.go(to); + return; + } + let path = resolveTo( + to, + JSON.parse(routePathnamesJson), + locationPathname, + options.relative === "path" + ); + if (dataRouterContext == null && basename !== "/") { + path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]); + } + (!!options.replace ? navigator.replace : navigator.push)( + path, + options.state, + options + ); + }, + [ + basename, + navigator, + routePathnamesJson, + locationPathname, + dataRouterContext + ] + ); + return navigate; +} +var OutletContext = React2.createContext(null); +function useOutletContext() { + return React2.useContext(OutletContext); +} +function useOutlet(context) { + let outlet = React2.useContext(RouteContext).outlet; + if (outlet) { + return React2.createElement(OutletContext.Provider, { value: context }, outlet); + } + return outlet; +} +function useParams() { + let { matches } = React2.useContext(RouteContext); + let routeMatch = matches[matches.length - 1]; + return routeMatch ? routeMatch.params : {}; +} +function useResolvedPath(to, { relative } = {}) { + let { matches } = React2.useContext(RouteContext); + let { pathname: locationPathname } = useLocation(); + let routePathnamesJson = JSON.stringify(getResolveToMatches(matches)); + return React2.useMemo( + () => resolveTo( + to, + JSON.parse(routePathnamesJson), + locationPathname, + relative === "path" + ), + [to, routePathnamesJson, locationPathname, relative] + ); +} +function useRoutes(routes, locationArg) { + return useRoutesImpl(routes, locationArg); +} +function useRoutesImpl(routes, locationArg, dataRouterState, future) { + var _a; + invariant( + useInRouterContext(), + // TODO: This error is probably because they somehow have 2 versions of the + // router loaded. We can help them understand how to avoid that. + `useRoutes() may be used only in the context of a component.` + ); + let { navigator, static: isStatic } = React2.useContext(NavigationContext); + let { matches: parentMatches } = React2.useContext(RouteContext); + let routeMatch = parentMatches[parentMatches.length - 1]; + let parentParams = routeMatch ? routeMatch.params : {}; + let parentPathname = routeMatch ? routeMatch.pathname : "/"; + let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/"; + let parentRoute = routeMatch && routeMatch.route; + if (ENABLE_DEV_WARNINGS) { + let parentPath = parentRoute && parentRoute.path || ""; + warningOnce( + parentPathname, + !parentRoute || parentPath.endsWith("*") || parentPath.endsWith("*?"), + `You rendered descendant (or called \`useRoutes()\`) at "${parentPathname}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .` + ); + } + let locationFromContext = useLocation(); + let location; + if (locationArg) { + let parsedLocationArg = typeof locationArg === "string" ? parsePath(locationArg) : locationArg; + invariant( + parentPathnameBase === "/" || ((_a = parsedLocationArg.pathname) == null ? void 0 : _a.startsWith(parentPathnameBase)), + `When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${parentPathnameBase}" but pathname "${parsedLocationArg.pathname}" was given in the \`location\` prop.` + ); + location = parsedLocationArg; + } else { + location = locationFromContext; + } + let pathname = location.pathname || "/"; + let remainingPathname = pathname; + if (parentPathnameBase !== "/") { + let parentSegments = parentPathnameBase.replace(/^\//, "").split("/"); + let segments = pathname.replace(/^\//, "").split("/"); + remainingPathname = "/" + segments.slice(parentSegments.length).join("/"); + } + let matches = !isStatic && dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, { pathname: remainingPathname }); + if (ENABLE_DEV_WARNINGS) { + warning( + parentRoute || matches != null, + `No routes matched location "${location.pathname}${location.search}${location.hash}" ` + ); + warning( + matches == null || matches[matches.length - 1].route.element !== void 0 || matches[matches.length - 1].route.Component !== void 0 || matches[matches.length - 1].route.lazy !== void 0, + `Matched leaf route at location "${location.pathname}${location.search}${location.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.` + ); + } + let renderedMatches = _renderMatches( + matches && matches.map( + (match) => Object.assign({}, match, { + params: Object.assign({}, parentParams, match.params), + pathname: joinPaths([ + parentPathnameBase, + // Re-encode pathnames that were decoded inside matchRoutes + navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname + ]), + pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([ + parentPathnameBase, + // Re-encode pathnames that were decoded inside matchRoutes + navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase + ]) + }) + ), + parentMatches, + dataRouterState, + future + ); + if (locationArg && renderedMatches) { + return React2.createElement( + LocationContext.Provider, + { + value: { + location: { + pathname: "/", + search: "", + hash: "", + state: null, + key: "default", + ...location + }, + navigationType: "POP" + /* Pop */ + } + }, + renderedMatches + ); + } + return renderedMatches; +} +function DefaultErrorComponent() { + let error = useRouteError(); + let message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error); + let stack = error instanceof Error ? error.stack : null; + let lightgrey = "rgba(200,200,200, 0.5)"; + let preStyles = { padding: "0.5rem", backgroundColor: lightgrey }; + let codeStyles = { padding: "2px 4px", backgroundColor: lightgrey }; + let devInfo = null; + if (ENABLE_DEV_WARNINGS) { + console.error( + "Error handled by React Router default ErrorBoundary:", + error + ); + devInfo = React2.createElement(React2.Fragment, null, React2.createElement("p", null, "💿 Hey developer 👋"), React2.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", React2.createElement("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", React2.createElement("code", { style: codeStyles }, "errorElement"), " prop on your route.")); + } + return React2.createElement(React2.Fragment, null, React2.createElement("h2", null, "Unexpected Application Error!"), React2.createElement("h3", { style: { fontStyle: "italic" } }, message), stack ? React2.createElement("pre", { style: preStyles }, stack) : null, devInfo); +} +var defaultErrorElement = React2.createElement(DefaultErrorComponent, null); +var RenderErrorBoundary = class extends React2.Component { + constructor(props) { + super(props); + this.state = { + location: props.location, + revalidation: props.revalidation, + error: props.error + }; + } + static getDerivedStateFromError(error) { + return { error }; + } + static getDerivedStateFromProps(props, state) { + if (state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle") { + return { + error: props.error, + location: props.location, + revalidation: props.revalidation + }; + } + return { + error: props.error !== void 0 ? props.error : state.error, + location: state.location, + revalidation: props.revalidation || state.revalidation + }; + } + componentDidCatch(error, errorInfo) { + console.error( + "React Router caught the following error during render", + error, + errorInfo + ); + } + render() { + return this.state.error !== void 0 ? React2.createElement(RouteContext.Provider, { value: this.props.routeContext }, React2.createElement( + RouteErrorContext.Provider, + { + value: this.state.error, + children: this.props.component + } + )) : this.props.children; + } +}; +function RenderedRoute({ routeContext, match, children }) { + let dataRouterContext = React2.useContext(DataRouterContext); + if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) { + dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id; + } + return React2.createElement(RouteContext.Provider, { value: routeContext }, children); +} +function _renderMatches(matches, parentMatches = [], dataRouterState = null, future = null) { + if (matches == null) { + if (!dataRouterState) { + return null; + } + if (dataRouterState.errors) { + matches = dataRouterState.matches; + } else if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) { + matches = dataRouterState.matches; + } else { + return null; + } + } + let renderedMatches = matches; + let errors = dataRouterState == null ? void 0 : dataRouterState.errors; + if (errors != null) { + let errorIndex = renderedMatches.findIndex( + (m) => m.route.id && (errors == null ? void 0 : errors[m.route.id]) !== void 0 + ); + invariant( + errorIndex >= 0, + `Could not find a matching route for errors on route IDs: ${Object.keys( + errors + ).join(",")}` + ); + renderedMatches = renderedMatches.slice( + 0, + Math.min(renderedMatches.length, errorIndex + 1) + ); + } + let renderFallback = false; + let fallbackIndex = -1; + if (dataRouterState) { + for (let i = 0; i < renderedMatches.length; i++) { + let match = renderedMatches[i]; + if (match.route.HydrateFallback || match.route.hydrateFallbackElement) { + fallbackIndex = i; + } + if (match.route.id) { + let { loaderData, errors: errors2 } = dataRouterState; + let needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors2 || errors2[match.route.id] === void 0); + if (match.route.lazy || needsToRunLoader) { + renderFallback = true; + if (fallbackIndex >= 0) { + renderedMatches = renderedMatches.slice(0, fallbackIndex + 1); + } else { + renderedMatches = [renderedMatches[0]]; + } + break; + } + } + } + } + return renderedMatches.reduceRight((outlet, match, index) => { + let error; + let shouldRenderHydrateFallback = false; + let errorElement = null; + let hydrateFallbackElement = null; + if (dataRouterState) { + error = errors && match.route.id ? errors[match.route.id] : void 0; + errorElement = match.route.errorElement || defaultErrorElement; + if (renderFallback) { + if (fallbackIndex < 0 && index === 0) { + warningOnce( + "route-fallback", + false, + "No `HydrateFallback` element provided to render during initial hydration" + ); + shouldRenderHydrateFallback = true; + hydrateFallbackElement = null; + } else if (fallbackIndex === index) { + shouldRenderHydrateFallback = true; + hydrateFallbackElement = match.route.hydrateFallbackElement || null; + } + } + } + let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1)); + let getChildren = () => { + let children; + if (error) { + children = errorElement; + } else if (shouldRenderHydrateFallback) { + children = hydrateFallbackElement; + } else if (match.route.Component) { + children = React2.createElement(match.route.Component, null); + } else if (match.route.element) { + children = match.route.element; + } else { + children = outlet; + } + return React2.createElement( + RenderedRoute, + { + match, + routeContext: { + outlet, + matches: matches2, + isDataRoute: dataRouterState != null + }, + children + } + ); + }; + return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? React2.createElement( + RenderErrorBoundary, + { + location: dataRouterState.location, + revalidation: dataRouterState.revalidation, + component: errorElement, + error, + children: getChildren(), + routeContext: { outlet: null, matches: matches2, isDataRoute: true } + } + ) : getChildren(); + }, null); +} +function getDataRouterConsoleError(hookName) { + return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`; +} +function useDataRouterContext(hookName) { + let ctx = React2.useContext(DataRouterContext); + invariant(ctx, getDataRouterConsoleError(hookName)); + return ctx; +} +function useDataRouterState(hookName) { + let state = React2.useContext(DataRouterStateContext); + invariant(state, getDataRouterConsoleError(hookName)); + return state; +} +function useRouteContext(hookName) { + let route = React2.useContext(RouteContext); + invariant(route, getDataRouterConsoleError(hookName)); + return route; +} +function useCurrentRouteId(hookName) { + let route = useRouteContext(hookName); + let thisRoute = route.matches[route.matches.length - 1]; + invariant( + thisRoute.route.id, + `${hookName} can only be used on routes that contain a unique "id"` + ); + return thisRoute.route.id; +} +function useRouteId() { + return useCurrentRouteId( + "useRouteId" + /* UseRouteId */ + ); +} +function useNavigation() { + let state = useDataRouterState( + "useNavigation" + /* UseNavigation */ + ); + return state.navigation; +} +function useRevalidator() { + let dataRouterContext = useDataRouterContext( + "useRevalidator" + /* UseRevalidator */ + ); + let state = useDataRouterState( + "useRevalidator" + /* UseRevalidator */ + ); + let revalidate = React2.useCallback(async () => { + await dataRouterContext.router.revalidate(); + }, [dataRouterContext.router]); + return React2.useMemo( + () => ({ revalidate, state: state.revalidation }), + [revalidate, state.revalidation] + ); +} +function useMatches() { + let { matches, loaderData } = useDataRouterState( + "useMatches" + /* UseMatches */ + ); + return React2.useMemo( + () => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)), + [matches, loaderData] + ); +} +function useLoaderData() { + let state = useDataRouterState( + "useLoaderData" + /* UseLoaderData */ + ); + let routeId = useCurrentRouteId( + "useLoaderData" + /* UseLoaderData */ + ); + return state.loaderData[routeId]; +} +function useRouteLoaderData(routeId) { + let state = useDataRouterState( + "useRouteLoaderData" + /* UseRouteLoaderData */ + ); + return state.loaderData[routeId]; +} +function useActionData() { + let state = useDataRouterState( + "useActionData" + /* UseActionData */ + ); + let routeId = useCurrentRouteId( + "useLoaderData" + /* UseLoaderData */ + ); + return state.actionData ? state.actionData[routeId] : void 0; +} +function useRouteError() { + var _a; + let error = React2.useContext(RouteErrorContext); + let state = useDataRouterState( + "useRouteError" + /* UseRouteError */ + ); + let routeId = useCurrentRouteId( + "useRouteError" + /* UseRouteError */ + ); + if (error !== void 0) { + return error; + } + return (_a = state.errors) == null ? void 0 : _a[routeId]; +} +function useAsyncValue() { + let value = React2.useContext(AwaitContext); + return value == null ? void 0 : value._data; +} +function useAsyncError() { + let value = React2.useContext(AwaitContext); + return value == null ? void 0 : value._error; +} +var blockerId = 0; +function useBlocker(shouldBlock) { + let { router: router2, basename } = useDataRouterContext( + "useBlocker" + /* UseBlocker */ + ); + let state = useDataRouterState( + "useBlocker" + /* UseBlocker */ + ); + let [blockerKey, setBlockerKey] = React2.useState(""); + let blockerFunction = React2.useCallback( + (arg) => { + if (typeof shouldBlock !== "function") { + return !!shouldBlock; + } + if (basename === "/") { + return shouldBlock(arg); + } + let { currentLocation, nextLocation, historyAction } = arg; + return shouldBlock({ + currentLocation: { + ...currentLocation, + pathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname + }, + nextLocation: { + ...nextLocation, + pathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname + }, + historyAction + }); + }, + [basename, shouldBlock] + ); + React2.useEffect(() => { + let key = String(++blockerId); + setBlockerKey(key); + return () => router2.deleteBlocker(key); + }, [router2]); + React2.useEffect(() => { + if (blockerKey !== "") { + router2.getBlocker(blockerKey, blockerFunction); + } + }, [router2, blockerKey, blockerFunction]); + return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER; +} +function useNavigateStable() { + let { router: router2 } = useDataRouterContext( + "useNavigate" + /* UseNavigateStable */ + ); + let id = useCurrentRouteId( + "useNavigate" + /* UseNavigateStable */ + ); + let activeRef = React2.useRef(false); + useIsomorphicLayoutEffect(() => { + activeRef.current = true; + }); + let navigate = React2.useCallback( + async (to, options = {}) => { + warning(activeRef.current, navigateEffectWarning); + if (!activeRef.current) return; + if (typeof to === "number") { + router2.navigate(to); + } else { + await router2.navigate(to, { fromRouteId: id, ...options }); + } + }, + [router2, id] + ); + return navigate; +} +var alreadyWarned = {}; +function warningOnce(key, cond, message) { + if (!cond && !alreadyWarned[key]) { + alreadyWarned[key] = true; + warning(false, message); + } +} +var alreadyWarned2 = {}; +function warnOnce(condition, message) { + if (!condition && !alreadyWarned2[message]) { + alreadyWarned2[message] = true; + console.warn(message); + } +} +function mapRouteProperties(route) { + let updates = { + // Note: this check also occurs in createRoutesFromChildren so update + // there if you change this -- please and thank you! + hasErrorBoundary: route.hasErrorBoundary || route.ErrorBoundary != null || route.errorElement != null + }; + if (route.Component) { + if (ENABLE_DEV_WARNINGS) { + if (route.element) { + warning( + false, + "You should not include both `Component` and `element` on your route - `Component` will be used." + ); + } + } + Object.assign(updates, { + element: React3.createElement(route.Component), + Component: void 0 + }); + } + if (route.HydrateFallback) { + if (ENABLE_DEV_WARNINGS) { + if (route.hydrateFallbackElement) { + warning( + false, + "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used." + ); + } + } + Object.assign(updates, { + hydrateFallbackElement: React3.createElement(route.HydrateFallback), + HydrateFallback: void 0 + }); + } + if (route.ErrorBoundary) { + if (ENABLE_DEV_WARNINGS) { + if (route.errorElement) { + warning( + false, + "You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used." + ); + } + } + Object.assign(updates, { + errorElement: React3.createElement(route.ErrorBoundary), + ErrorBoundary: void 0 + }); + } + return updates; +} +var hydrationRouteProperties = [ + "HydrateFallback", + "hydrateFallbackElement" +]; +function createMemoryRouter(routes, opts) { + return createRouter({ + basename: opts == null ? void 0 : opts.basename, + unstable_getContext: opts == null ? void 0 : opts.unstable_getContext, + future: opts == null ? void 0 : opts.future, + history: createMemoryHistory({ + initialEntries: opts == null ? void 0 : opts.initialEntries, + initialIndex: opts == null ? void 0 : opts.initialIndex + }), + hydrationData: opts == null ? void 0 : opts.hydrationData, + routes, + hydrationRouteProperties, + mapRouteProperties, + dataStrategy: opts == null ? void 0 : opts.dataStrategy, + patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation + }).initialize(); +} +var Deferred = class { + constructor() { + this.status = "pending"; + this.promise = new Promise((resolve, reject) => { + this.resolve = (value) => { + if (this.status === "pending") { + this.status = "resolved"; + resolve(value); + } + }; + this.reject = (reason) => { + if (this.status === "pending") { + this.status = "rejected"; + reject(reason); + } + }; + }); + } +}; +function RouterProvider({ + router: router2, + flushSync: reactDomFlushSyncImpl +}) { + let [state, setStateImpl] = React3.useState(router2.state); + let [pendingState, setPendingState] = React3.useState(); + let [vtContext, setVtContext] = React3.useState({ + isTransitioning: false + }); + let [renderDfd, setRenderDfd] = React3.useState(); + let [transition, setTransition] = React3.useState(); + let [interruption, setInterruption] = React3.useState(); + let fetcherData = React3.useRef(/* @__PURE__ */ new Map()); + let setState = React3.useCallback( + (newState, { deletedFetchers, flushSync: flushSync2, viewTransitionOpts }) => { + newState.fetchers.forEach((fetcher, key) => { + if (fetcher.data !== void 0) { + fetcherData.current.set(key, fetcher.data); + } + }); + deletedFetchers.forEach((key) => fetcherData.current.delete(key)); + warnOnce( + flushSync2 === false || reactDomFlushSyncImpl != null, + 'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.' + ); + let isViewTransitionAvailable = router2.window != null && router2.window.document != null && typeof router2.window.document.startViewTransition === "function"; + warnOnce( + viewTransitionOpts == null || isViewTransitionAvailable, + "You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available." + ); + if (!viewTransitionOpts || !isViewTransitionAvailable) { + if (reactDomFlushSyncImpl && flushSync2) { + reactDomFlushSyncImpl(() => setStateImpl(newState)); + } else { + React3.startTransition(() => setStateImpl(newState)); + } + return; + } + if (reactDomFlushSyncImpl && flushSync2) { + reactDomFlushSyncImpl(() => { + if (transition) { + renderDfd && renderDfd.resolve(); + transition.skipTransition(); + } + setVtContext({ + isTransitioning: true, + flushSync: true, + currentLocation: viewTransitionOpts.currentLocation, + nextLocation: viewTransitionOpts.nextLocation + }); + }); + let t = router2.window.document.startViewTransition(() => { + reactDomFlushSyncImpl(() => setStateImpl(newState)); + }); + t.finished.finally(() => { + reactDomFlushSyncImpl(() => { + setRenderDfd(void 0); + setTransition(void 0); + setPendingState(void 0); + setVtContext({ isTransitioning: false }); + }); + }); + reactDomFlushSyncImpl(() => setTransition(t)); + return; + } + if (transition) { + renderDfd && renderDfd.resolve(); + transition.skipTransition(); + setInterruption({ + state: newState, + currentLocation: viewTransitionOpts.currentLocation, + nextLocation: viewTransitionOpts.nextLocation + }); + } else { + setPendingState(newState); + setVtContext({ + isTransitioning: true, + flushSync: false, + currentLocation: viewTransitionOpts.currentLocation, + nextLocation: viewTransitionOpts.nextLocation + }); + } + }, + [router2.window, reactDomFlushSyncImpl, transition, renderDfd] + ); + React3.useLayoutEffect(() => router2.subscribe(setState), [router2, setState]); + React3.useEffect(() => { + if (vtContext.isTransitioning && !vtContext.flushSync) { + setRenderDfd(new Deferred()); + } + }, [vtContext]); + React3.useEffect(() => { + if (renderDfd && pendingState && router2.window) { + let newState = pendingState; + let renderPromise = renderDfd.promise; + let transition2 = router2.window.document.startViewTransition(async () => { + React3.startTransition(() => setStateImpl(newState)); + await renderPromise; + }); + transition2.finished.finally(() => { + setRenderDfd(void 0); + setTransition(void 0); + setPendingState(void 0); + setVtContext({ isTransitioning: false }); + }); + setTransition(transition2); + } + }, [pendingState, renderDfd, router2.window]); + React3.useEffect(() => { + if (renderDfd && pendingState && state.location.key === pendingState.location.key) { + renderDfd.resolve(); + } + }, [renderDfd, transition, state.location, pendingState]); + React3.useEffect(() => { + if (!vtContext.isTransitioning && interruption) { + setPendingState(interruption.state); + setVtContext({ + isTransitioning: true, + flushSync: false, + currentLocation: interruption.currentLocation, + nextLocation: interruption.nextLocation + }); + setInterruption(void 0); + } + }, [vtContext.isTransitioning, interruption]); + let navigator = React3.useMemo(() => { + return { + createHref: router2.createHref, + encodeLocation: router2.encodeLocation, + go: (n) => router2.navigate(n), + push: (to, state2, opts) => router2.navigate(to, { + state: state2, + preventScrollReset: opts == null ? void 0 : opts.preventScrollReset + }), + replace: (to, state2, opts) => router2.navigate(to, { + replace: true, + state: state2, + preventScrollReset: opts == null ? void 0 : opts.preventScrollReset + }) + }; + }, [router2]); + let basename = router2.basename || "/"; + let dataRouterContext = React3.useMemo( + () => ({ + router: router2, + navigator, + static: false, + basename + }), + [router2, navigator, basename] + ); + return React3.createElement(React3.Fragment, null, React3.createElement(DataRouterContext.Provider, { value: dataRouterContext }, React3.createElement(DataRouterStateContext.Provider, { value: state }, React3.createElement(FetchersContext.Provider, { value: fetcherData.current }, React3.createElement(ViewTransitionContext.Provider, { value: vtContext }, React3.createElement( + Router, + { + basename, + location: state.location, + navigationType: state.historyAction, + navigator + }, + React3.createElement( + MemoizedDataRoutes, + { + routes: router2.routes, + future: router2.future, + state + } + ) + ))))), null); +} +var MemoizedDataRoutes = React3.memo(DataRoutes); +function DataRoutes({ + routes, + future, + state +}) { + return useRoutesImpl(routes, void 0, state, future); +} +function MemoryRouter({ + basename, + children, + initialEntries, + initialIndex +}) { + let historyRef = React3.useRef(); + if (historyRef.current == null) { + historyRef.current = createMemoryHistory({ + initialEntries, + initialIndex, + v5Compat: true + }); + } + let history = historyRef.current; + let [state, setStateImpl] = React3.useState({ + action: history.action, + location: history.location + }); + let setState = React3.useCallback( + (newState) => { + React3.startTransition(() => setStateImpl(newState)); + }, + [setStateImpl] + ); + React3.useLayoutEffect(() => history.listen(setState), [history, setState]); + return React3.createElement( + Router, + { + basename, + children, + location: state.location, + navigationType: state.action, + navigator: history + } + ); +} +function Navigate({ + to, + replace: replace2, + state, + relative +}) { + invariant( + useInRouterContext(), + // TODO: This error is probably because they somehow have 2 versions of + // the router loaded. We can help them understand how to avoid that. + ` may be used only in the context of a component.` + ); + let { static: isStatic } = React3.useContext(NavigationContext); + warning( + !isStatic, + ` must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.` + ); + let { matches } = React3.useContext(RouteContext); + let { pathname: locationPathname } = useLocation(); + let navigate = useNavigate(); + let path = resolveTo( + to, + getResolveToMatches(matches), + locationPathname, + relative === "path" + ); + let jsonPath = JSON.stringify(path); + React3.useEffect(() => { + navigate(JSON.parse(jsonPath), { replace: replace2, state, relative }); + }, [navigate, jsonPath, relative, replace2, state]); + return null; +} +function Outlet(props) { + return useOutlet(props.context); +} +function Route(_props) { + invariant( + false, + `A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .` + ); +} +function Router({ + basename: basenameProp = "/", + children = null, + location: locationProp, + navigationType = "POP", + navigator, + static: staticProp = false +}) { + invariant( + !useInRouterContext(), + `You cannot render a inside another . You should never have more than one in your app.` + ); + let basename = basenameProp.replace(/^\/*/, "/"); + let navigationContext = React3.useMemo( + () => ({ + basename, + navigator, + static: staticProp, + future: {} + }), + [basename, navigator, staticProp] + ); + if (typeof locationProp === "string") { + locationProp = parsePath(locationProp); + } + let { + pathname = "/", + search = "", + hash = "", + state = null, + key = "default" + } = locationProp; + let locationContext = React3.useMemo(() => { + let trailingPathname = stripBasename(pathname, basename); + if (trailingPathname == null) { + return null; + } + return { + location: { + pathname: trailingPathname, + search, + hash, + state, + key + }, + navigationType + }; + }, [basename, pathname, search, hash, state, key, navigationType]); + warning( + locationContext != null, + ` is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the won't render anything.` + ); + if (locationContext == null) { + return null; + } + return React3.createElement(NavigationContext.Provider, { value: navigationContext }, React3.createElement(LocationContext.Provider, { children, value: locationContext })); +} +function Routes({ + children, + location +}) { + return useRoutes(createRoutesFromChildren(children), location); +} +function Await({ + children, + errorElement, + resolve +}) { + return React3.createElement(AwaitErrorBoundary, { resolve, errorElement }, React3.createElement(ResolveAwait, null, children)); +} +var AwaitErrorBoundary = class extends React3.Component { + constructor(props) { + super(props); + this.state = { error: null }; + } + static getDerivedStateFromError(error) { + return { error }; + } + componentDidCatch(error, errorInfo) { + console.error( + " caught the following error during render", + error, + errorInfo + ); + } + render() { + let { children, errorElement, resolve } = this.props; + let promise = null; + let status = 0; + if (!(resolve instanceof Promise)) { + status = 1; + promise = Promise.resolve(); + Object.defineProperty(promise, "_tracked", { get: () => true }); + Object.defineProperty(promise, "_data", { get: () => resolve }); + } else if (this.state.error) { + status = 2; + let renderError = this.state.error; + promise = Promise.reject().catch(() => { + }); + Object.defineProperty(promise, "_tracked", { get: () => true }); + Object.defineProperty(promise, "_error", { get: () => renderError }); + } else if (resolve._tracked) { + promise = resolve; + status = "_error" in promise ? 2 : "_data" in promise ? 1 : 0; + } else { + status = 0; + Object.defineProperty(resolve, "_tracked", { get: () => true }); + promise = resolve.then( + (data2) => Object.defineProperty(resolve, "_data", { get: () => data2 }), + (error) => Object.defineProperty(resolve, "_error", { get: () => error }) + ); + } + if (status === 2 && !errorElement) { + throw promise._error; + } + if (status === 2) { + return React3.createElement(AwaitContext.Provider, { value: promise, children: errorElement }); + } + if (status === 1) { + return React3.createElement(AwaitContext.Provider, { value: promise, children }); + } + throw promise; + } +}; +function ResolveAwait({ + children +}) { + let data2 = useAsyncValue(); + let toRender = typeof children === "function" ? children(data2) : children; + return React3.createElement(React3.Fragment, null, toRender); +} +function createRoutesFromChildren(children, parentPath = []) { + let routes = []; + React3.Children.forEach(children, (element, index) => { + if (!React3.isValidElement(element)) { + return; + } + let treePath = [...parentPath, index]; + if (element.type === React3.Fragment) { + routes.push.apply( + routes, + createRoutesFromChildren(element.props.children, treePath) + ); + return; + } + invariant( + element.type === Route, + `[${typeof element.type === "string" ? element.type : element.type.name}] is not a component. All component children of must be a or ` + ); + invariant( + !element.props.index || !element.props.children, + "An index route cannot have child routes." + ); + let route = { + id: element.props.id || treePath.join("-"), + caseSensitive: element.props.caseSensitive, + element: element.props.element, + Component: element.props.Component, + index: element.props.index, + path: element.props.path, + loader: element.props.loader, + action: element.props.action, + hydrateFallbackElement: element.props.hydrateFallbackElement, + HydrateFallback: element.props.HydrateFallback, + errorElement: element.props.errorElement, + ErrorBoundary: element.props.ErrorBoundary, + hasErrorBoundary: element.props.hasErrorBoundary === true || element.props.ErrorBoundary != null || element.props.errorElement != null, + shouldRevalidate: element.props.shouldRevalidate, + handle: element.props.handle, + lazy: element.props.lazy + }; + if (element.props.children) { + route.children = createRoutesFromChildren( + element.props.children, + treePath + ); + } + routes.push(route); + }); + return routes; +} +var createRoutesFromElements = createRoutesFromChildren; +function renderMatches(matches) { + return _renderMatches(matches); +} +var defaultMethod = "get"; +var defaultEncType = "application/x-www-form-urlencoded"; +function isHtmlElement(object) { + return object != null && typeof object.tagName === "string"; +} +function isButtonElement(object) { + return isHtmlElement(object) && object.tagName.toLowerCase() === "button"; +} +function isFormElement(object) { + return isHtmlElement(object) && object.tagName.toLowerCase() === "form"; +} +function isInputElement(object) { + return isHtmlElement(object) && object.tagName.toLowerCase() === "input"; +} +function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); +} +function shouldProcessLinkClick(event, target) { + return event.button === 0 && // Ignore everything but left clicks + (!target || target === "_self") && // Let browser handle "target=_blank" etc. + !isModifiedEvent(event); +} +function createSearchParams(init = "") { + return new URLSearchParams( + typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo2, key) => { + let value = init[key]; + return memo2.concat( + Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]] + ); + }, []) + ); +} +function getSearchParamsForLocation(locationSearch, defaultSearchParams) { + let searchParams = createSearchParams(locationSearch); + if (defaultSearchParams) { + defaultSearchParams.forEach((_, key) => { + if (!searchParams.has(key)) { + defaultSearchParams.getAll(key).forEach((value) => { + searchParams.append(key, value); + }); + } + }); + } + return searchParams; +} +var _formDataSupportsSubmitter = null; +function isFormDataSubmitterSupported() { + if (_formDataSupportsSubmitter === null) { + try { + new FormData( + document.createElement("form"), + // @ts-expect-error if FormData supports the submitter parameter, this will throw + 0 + ); + _formDataSupportsSubmitter = false; + } catch (e) { + _formDataSupportsSubmitter = true; + } + } + return _formDataSupportsSubmitter; +} +var supportedFormEncTypes = /* @__PURE__ */ new Set([ + "application/x-www-form-urlencoded", + "multipart/form-data", + "text/plain" +]); +function getFormEncType(encType) { + if (encType != null && !supportedFormEncTypes.has(encType)) { + warning( + false, + `"${encType}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${defaultEncType}"` + ); + return null; + } + return encType; +} +function getFormSubmissionInfo(target, basename) { + let method; + let action; + let encType; + let formData; + let body; + if (isFormElement(target)) { + let attr = target.getAttribute("action"); + action = attr ? stripBasename(attr, basename) : null; + method = target.getAttribute("method") || defaultMethod; + encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType; + formData = new FormData(target); + } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) { + let form = target.form; + if (form == null) { + throw new Error( + `Cannot submit a